From LedHed's Wiki
Jump to: navigation, search
 
(6 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
  zpool add
 
  zpool add
  
  zpool status
+
  zpool status -v <POOL_NAME>
  
 
  zpool list
 
  zpool list
  
 +
'''Remove a failed disk'''
 +
zpool offline <POOL_NAME> /dev/gptid/00000000-0000-0000-0000-000000000000
  
 +
'''Replace Offline disk with new'''
 +
zpool replace <POOL_NAME> /dev/gptid/00000000-0000-0000-0000-000000000000 /dev/da#
 +
''Note:/dev/da# should be the new disk''
  
  
  
 +
=== io statistics ===
 +
zpool iostat mypool 30
 +
This will display the IO statistics of the pool every seconds.
 +
 +
 +
 +
== ZFS Usage ==
 +
 +
=== Create ZVOL ===
 +
zfs create -V <VOLUME_SIZE> <VOLUME_PATH>
 +
zfs create -V 200g mypool/myvol
 +
 +
=== Grow a ZVOL ===
 +
zfs set volsize=200G mypool/myvol
 +
''Note: If using FreeNAS and the ZVOL is an iSCSI extent then you need to open and re-save the extent. This reloads the configuration for the iSCSI service and makes the changes visible to the initiators (VMWare, Windows, etc...)''
  
  
Line 23: Line 43:
  
  
[[Category:ZFS]]
+
[[Category:ZFS]][[Category:FreeNAS]]

Latest revision as of 04:06, 10 August 2015

ZPool Usage

zpool create <POOL_NAME> <RAID_LEVEL> <DEVICE>
zpool create mypool raidz da{0,1,2}
zpool destroy <poolname>
zpool destroy mypool
zpool add
zpool status -v <POOL_NAME>
zpool list

Remove a failed disk

zpool offline <POOL_NAME> /dev/gptid/00000000-0000-0000-0000-000000000000

Replace Offline disk with new

zpool replace <POOL_NAME> /dev/gptid/00000000-0000-0000-0000-000000000000 /dev/da#

Note:/dev/da# should be the new disk


io statistics

zpool iostat mypool 30

This will display the IO statistics of the pool every seconds.


ZFS Usage

Create ZVOL

zfs create -V <VOLUME_SIZE> <VOLUME_PATH>
zfs create -V 200g mypool/myvol

Grow a ZVOL

zfs set volsize=200G mypool/myvol

Note: If using FreeNAS and the ZVOL is an iSCSI extent then you need to open and re-save the extent. This reloads the configuration for the iSCSI service and makes the changes visible to the initiators (VMWare, Windows, etc...)


Reference

zpools man page - http://www.manpagez.com/man/8/zpool/