ZFS: Create a basic filesystem or pool using zpool
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






Add New Comment
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Add New Comment