ZFS cheatsheet
create
single device:
zpool create POOLNAME /dev/sdc
to add more than one device at once:
zpool create POOLNAME /dev/sda /dev/sdb /dev/sdc
mirror: It’s not really secure to have important data only on one disk or just striped, so its strongly recommended to use the mirror command (or raidz) like this:
zpool create POOLNAME mirror /dev/sda /dev/sdb
this will mirror everything on /dev/sda on /dev/sdb, so if one disk fails, you dont loose your data
you can add more mirrored disks to the pool as easy as:
zpool add POOLNAME mirror /dev/sdc /dev/sdd
HINT list all your blockdevices with lsblk:
lsblk
adding more devices to a pool
zpool add POOLNAME /dev/sdd /dev/sde /dev/sdf
listing pools
zpool list
get mountpoint
zfs get mountpoint
INFO: default only writeable by root, chmod if needed
check io
zpool iostat -v
INFO: this will show you current io statistics
HINT: use zpool iostat -v 1
to refresh the view every second
delete pool
zpool destroy POOLNAME