Thursday, May 16, 2024
HomeSolarisSolaris system administrationZFS: Create a Basic Filesystem or Pool using zpool

ZFS: Create a Basic Filesystem or Pool using zpool

ZFS obsoletes many 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 tech-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 the following:

zpool create techrx c0t0d0

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 tech-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

Quinn McHenry
Quinn McHenry
Quinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York.


Please enter your comment!
Please enter your name here

Most Popular


Recent Comments

error: Content is protected !!