Skip to content

tool - zfs and zpool - command overview

Just a quick overview about some zfs and zpool commands. $tank is used as zpool name.

  • zpool create $tank mirror c6t0d0p0 c8t0d0p0 | creates zpool in mirror by using two devices. Use -m to add a mountpoint.
  • zpool create $tank/dataset1 | creates a dataset in zpool $tank
  • zpool add $tank c11t0d0p0 | adds device to $tank (storageplace increased)
  • zpool destroy $tank | destroy a zpool
  • zpool destry $tank/dataset1 | destroy dataset1 in zpool $tank
  • zpool rename $tank/foo $tank/bar | renames dataset foo to bar
  • zpool replace $tank c8t0d0p0 c11t0d0p0 | replaces device c8t0d0p0 with c11t0d0p0
  • zpool offline $tank c8t0d0p0 | take device c8t0d0p0 offline
  • zpool detach $tank c8t0d0p0 | detach device c8t0d0p0 from zpool
  • zpool attach $tank c11t0d0p0 | attach device c11t0d0p0 from zpool
  • zpool history -i $tank | shows history of $tank
  • zpool get all $tank | returns all properties from $tank
  • zpool get option $tank | get option from $tank
  • zpool set option=value $tank | set option with value to $tank
  • zpool iostat [$pool $intervallInSeconds] | i/o performance monitor
  • zpool import $tank | imports $tank into system. Use -a to import all available zpools
  • zpool status [$tank] | status monitor
  • zpool export $tank | export $tank from system (importent if you want to use this tank in an other environment)
  • zpool scrub $tank | verify integrity of every blog of a data in $tank. Use -s to stop scrubbing.
  • zfs list [-t (type), -r (recursive)] | list available (imported) zpools
  • zfs snapshot $tank@backup | creates snaphot "backup" from $tank
  • zfs rollback $tank@backup | return $tank to dataset $backup
  • zfs destroy $tank@backup | destroy snapshot "backup"
  • zfs send -R $tank@backup | zfs receive -d $backuptank | creates backup zpool


No Trackbacks


Display comments as Linear | Threaded

No comments

Add Comment

E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
To leave a comment you must approve it via e-mail, which will be sent to your address after submission.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.

Markdown format allowed
Form options