The previous example illustrates the simplicity of ZFS. The remainder of this chapter demonstrates a more complete example similar to what you would encounter in your environment. The first tasks are to identify your storage requirements and create a storage pool. The pool describes the physical characteristics of the storage and must be created before any file systems are created.
Identifying Storage Requirements
Determine available devices.
Before creating a storage pool, you must determine which devices will store your data. These devices must be disks of at least 128 Mbytes in size, and they must not be in use by other parts of the operating system. The devices can be individual slices on a preformatted disk, or they can be entire disks that ZFS formats as a single large slice.
For the storage example used in
/dev/dsk/c1t0d0 are available for use.
For more information about disks and how they are used and labeled, see.
Choose data replication.
ZFS supports multiple types of data replication, which determines what types of hardware failures the pool can withstand. ZFS supports nonredundant (striped) configurations, as well as mirroring and RAID-Z (a variation on RAID-5).
For the storage example used in, basic mirroring of two available disks is used.
For more information about ZFS replication features, see.
Creating the ZFS Storage Pool
Become root or assume an equivalent role with the appropriate ZFS rights profile.
For more information about the ZFS rights profiles, see.
Pick a pool name.
The pool name is used to identify the storage pool when you are using the zpool or zfs commands. Most systems require only a single pool, so you can pick any name that you prefer, provided it satisfies the naming requirements outlined in .
Create the pool.
zpool create tank mirror c1t0d0 c1t1d0
If one or more devices contains another file system or is otherwise in use, the command cannot create the pool.
For more information about creating storage pools, see.
For more information about how device usage is determined, see.
View the results.
zpool listNAME SIZE USED AVAIL CAP HEALTH ALTROOT tank 80G 137K 80G 0% ONLINE -
For more information about viewing pool status, see.