ZFS: Create a basic filesystem or pool using zpool

Home -> UNIX -> Solaris -> System administration

15531 views

From the computer of: qmchenry (339 recipes)
Created: Jun 03, 2006


Add a comment

Add to:
Add to stumbleuponAdd to del.icio.usDigg itAdd to FURL

ZFS obsoletes a lot of familiar filesystem maintenance commands. Creating a UFS filesystem involved partitioning a disk into slices (format), creating the filesystem (newfs), and mounting it (mount). ZFS does all of this in one simple command. This recipe describes creating a ZFS pool which is the basic building block of filesystems created using ZFS.

Given a physical disk c0t0d0, you can create a pool using the entire disk and mount it to the mountpoint /techrx using

zpool create techrx c0t0d0


Done. The pool is now mounted at /techrx and the space is ready to use. Of course, ZFS allows a number of amazing capabilities. See the related recipes below for examples.

A ZFS pool can also be created from an existing slice of a physical disk instead of the whole thing. Just use the whole disk descriptor list c0t0d0s6.

When trying to creating a pool where an existing filesystem exists, as you might do when testing or migrating to ZFS, you will receive a warning. To override the warning, repeat the command with the -f option:

zpool create -f techrx c0t0d0s6

Subscribe to the Tech-Recipes Newsletter

You can get tips like this delivered in your email every week!

Enter your Email

We will never, ever sell your email address or spam you.





Related recipes:

  ZFS: Unmount or take a filesystem offline
  ZFS: Create a new filesystem from an existing pool
  ZFS: How to fsck or check filesystem integrity with scrub
  ZFS: Create a mirrored storage pool
  ZFS: Grow or add more disk space to pool or filesystem
  ZFS: Display information about pools using zpool
  ZFS: Create a raidz filesystem
  ZFS: Set or change the mount point of a filesystem
  ZFS: reserve space for filesystem
  ZFS: List or view filesystems

 

Sponsored links

 

Login

Nickname

Password

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.