ZFS

ZFS Cheatsheet #

ZFS (Zettabyte File System) is a combined file system and logical volume manager designed for high storage capacities and data integrity.

Pool Management #

Command/OptionExampleDescription
zpool createzpool create mypool /dev/sdX1Create a new ZFS storage pool
zpool destroyzpool destroy mypoolDestroy a ZFS storage pool
zpool statuszpool status mypoolDisplay the status of a ZFS pool
zpool listzpool listList all ZFS pools
zpool scrubzpool scrub mypoolStart a scrub operation to check for data integrity

File System Management #

Command/OptionExampleDescription
zfs createzfs create mypool/mydatasetCreate a new ZFS file system
zfs destroyzfs destroy mypool/mydatasetDestroy a ZFS file system
zfs listzfs listList all ZFS file systems
zfs snapshotzfs snapshot mypool/mydataset@snapshot1Create a snapshot of a ZFS file system
zfs rollbackzfs rollback mypool/mydataset@snapshot1Roll back to a specific snapshot

Quotas and Reservations #

Command/OptionExampleDescription
zfs set quotazfs set quota=10G mypool/mydatasetSet a quota on a ZFS file system
zfs set reservationzfs set reservation=5G mypool/mydatasetSet a reservation on a ZFS file system

Properties and Tuning #

Command/OptionExampleDescription
zfs getzfs get all mypool/mydatasetGet all properties of a ZFS file system
zfs setzfs set compression=lz4 mypool/mydatasetSet a property on a ZFS file system
zfs inheritzfs inherit compression mypool/mydatasetInherit a property from the parent dataset

Replication and Send/Receive #

Command/OptionExampleDescription
zfs sendzfs send mypool/mydataset@snapshot1 > /path/to/backupSend a snapshot to a file
zfs receivezfs receive mypool/mydataset < /path/to/backupReceive a snapshot from a file

Zpool and ZFS Commands #

Command/OptionExampleDescription
zpool upgradezpool upgradeUpgrade ZFS pools to the latest version
zfs getzfs get all mypool/mydatasetDisplay all properties of a ZFS dataset

This cheatsheet covers essential ZFS commands and options to help you manage and maintain ZFS file systems and storage pools effectively.

Cheatsheet Website

Discover our extensive collection of cheatsheets covering various tools and technologies to streamline your workflow.