User Tools

Site Tools


computing:storage:zfs_cmds

ZFS - Basic Commands

http://www.tumblr.com/tagged/zfs

ZFS Filesystem Integrity: http://docs.oracle.com/cd/E19963-01/html/821-1448/gbbwa.html

:!: Linux-style disk device syntax shown. These examples use disks like: /dev/sdb, /dev/sdc, /dev/sdx.

:!: Log in as root.

Check status of ZFS pools: http://docs.oracle.com/cd/E19082-01/817-2271/gamno/index.html

  zpool status

Check status of ZFS datasets:

  zfs list

Create ZFS pool:

  zpool create <Pool Name> <first storage device> <second storage device> ...

Create ZFS pool mirror:

  zpool create <Pool Name> mirror /dev/sdb /dev/sdc

Create ZFS pool raidz:

  zpool create <Pool Name> raidz /dev/sdd /dev/sde /dev/sdf

Create ZFS pool raidz2:

  zpool create <Pool Name> raidz /dev/sdg /dev/sdh /dev/sdi /dev/sdj

View the status of the ZFS pools:

  zpool status | more

Create ZFS pool RAID 10:

  zpool create <Pool Name> mirror /dev/sdb /dev/sdc
  zpool add <Pool Name> mirror /dev/sdd /dev/sde
  zpool add <Pool Name> mirror /dev/sdf /dev/sdg

Create ZFS pool RAID 50:

  zpool create <Pool Name> raidz /dev/sdb /dev/sdc /dev/sdd
  zpool add <Pool Name> raidz /dev/sde/dev/sdf /dev/sdg
  zpool add <Pool Name> raidz /dev/sdh /dev/sdi /dev/sdj

Create ZFS pool RAID 60:

  zpool create <Pool Name> raidz2 /dev/sdb /dev/sdc /dev/sdd /dev/sde
  zpool add <Pool Name> raidz2 /dev/sdf /dev/sdg /dev/sdh /dev/sdi

Modify the properties of the ZFS pool:

  zfs set <property>=<value> <Pool Name>

Enable compression on speific pool:

  zfs set compression=on <Pool Name>

Enable data deduplication on specific pool:

  zfs set dedup=on <Pool Name>

Verify the properties of specific pool:

  zfs get all <Pool Name>

Destroy a ZFS pool:

  zpool destroy <Pool Name>

SMART

smartctl -T permissive -a -d sat /dev/rdsk/XXXXXXXXX
computing/storage/zfs_cmds.txt · Last modified: 2015/12/22 17:07 by gcooper