Solaris ZFS Command Line Reference (Cheat Sheet)
Solaris ZFS Command Line Reference (Cheat Sheet)
# zpool create -m /data datapool c0t0d0 Create a pool with a different mount point
than the default.
# zpool add datapool raidz c4t0d0 c4t1d0 Add RAID-Z vdev to pool datapool
c4t2d0
# zpool create datapool mirror c0t0d0 disk c0t0d0 is mirrored with c0t5d0 and
c0t5d0 mirror c0t2d0 c0t4d0 disk c0t2d0 is mirrored with c0t4d0
# zpool add datapool mirror c3t0d0 c3t1d0 Add new mirrored vdev to datapool
# zpool add datapool spare c1t3d0 Add spare device c1t3d0 to the datapool
https://hadafq8.wordpress.com/2015/01/26/solaris-zfs-command-line-reference-cheat-sheet/ 1/4
1/30/24, 3:27 PM Solaris ZFS command line reference (Cheat sheet) | Solaris Specialist's Blog
# zpool list -Ho name Show all pools without headers and
columns
# zfs destroy -r datapool destroy datapool and all datasets under it.
# zfs set mountpoint=legacy datapool/fs1 Disable ZFS auto mounting and enable
mounting through /etc/vfstab.
# zfs destroy -r datapool destroy datapool and all datasets under it.
# zfs get all datapool” List all properties of a ZFS file system
# zpool offline -t datapool c0t0d0 Temporarily offline a disk (until next reboot)
Import/Export Commands
# zpool import List pools available for import
https://hadafq8.wordpress.com/2015/01/26/solaris-zfs-command-line-reference-cheat-sheet/ 3/4
1/30/24, 3:27 PM Solaris ZFS command line reference (Cheat sheet) | Solaris Specialist's Blog
# zpool import -d /zfs datapool Search for a pool with block devices
created in /zfs
Snapshot Commands
Combine the send and receive operation
# zfs snapshot datapool/fs1@12jan2014 Create a snapshot named 12jan2014 of
the fs1 filesystem
# zfs rollback -rf datapool/fs1@10jan2014 Roll back must and force unmount and
remount
Clone Commands
# zfs clone datapool/fs1@10jan2014 Clone an existing snapshot
/clones/fs1
https://hadafq8.wordpress.com/2015/01/26/solaris-zfs-command-line-reference-cheat-sheet/ 4/4