Useful ZFS commands

Create a ZFS pool

 zpool create testpool c1txxxdn

Check pool status

 zpool status

Create a ZFS volume

 zfs create testpool/testvol

Check ZFS volumes

 zfs list

Export a pool

 zpool export pool

Import a pool

 zpool import pool

Create a raidz pool

 zpool create poolname raidz disk1 disk2 ...

Procedure for migratig a ZFS filesystem with snapshots amd clones

  1. The relationships between original ZFS filesystems, clones and snapshots can be found using command zfs origin
  2. Snapshot the top level filesystem, e.g. zfs snapshot apool/azfsfilesystem@snap1
  3. Copy this: zfs send -R apool/azfsfilesystem@snap1 | zfs recieve -d apool-new (this will copy the top level ZFS filesystem and all it's snapshots
  4. snapshot each clone
  5. zfs send each snapshot of the clone as per the original top level send/recieve

Recent Changes

Contribute to this wiki

Why not help others by sharing your knowledge? Contribute something to this wiki and join out hall of fame!
Contact us for a user name and password