Difference between revisions of "Zpool"

From OpenZFS on OS X
Jump to: navigation, search
(Created page with " == Creating a pool == In the past, it was customary to label the disk before using it with ZFS. This is no longer the case. It is preferred that ZFS labels the disk. It is ...")
 
m
Line 12: Line 12:
 
  zpool create -f -O casesensitivity=insensitive -O normalization=formD -o ashift=12 $poolname /dev/diskX
 
  zpool create -f -O casesensitivity=insensitive -O normalization=formD -o ashift=12 $poolname /dev/diskX
  
Replace $poolname with the name of the pool you want, for example "tank".
+
* Replace $poolname with the name of the pool you want, for example "tank".
''If you want to use the entire disk for ZFS'', replace /dev/diskX with the available disk. For example /dev/disk1
+
* ''If you want to use the entire disk for ZFS'', replace /dev/diskX with the available disk. For example /dev/disk1
If you have already partitioned the disk, and wish to only use a slice, use /dev/disk1s2
+
* If you have already partitioned the disk, and wish to only use a slice, use /dev/disk1s2
 +
 
 +
Use "diskutil list" to make sure you pick the correct disk before attempting to create your pool.
  
 
You can also decide to disable '''access time''', enable '''compression''' and all those nice things. But that
 
You can also decide to disable '''access time''', enable '''compression''' and all those nice things. But that

Revision as of 00:02, 11 March 2014

Creating a pool

In the past, it was customary to label the disk before using it with ZFS. This is no longer the case. It is preferred that ZFS labels the disk.

It is recommended on OS X that ZFS is told to be case-insensitive and using formD. This is what OS X expects by default. It is also recommended to create pools with the default 4096 (4k) disks, even if your disks are still the older 512.

Recommended pool creation command line

zpool create -f -O casesensitivity=insensitive -O normalization=formD -o ashift=12 $poolname /dev/diskX
  • Replace $poolname with the name of the pool you want, for example "tank".
  • If you want to use the entire disk for ZFS, replace /dev/diskX with the available disk. For example /dev/disk1
  • If you have already partitioned the disk, and wish to only use a slice, use /dev/disk1s2

Use "diskutil list" to make sure you pick the correct disk before attempting to create your pool.

You can also decide to disable access time, enable compression and all those nice things. But that can be done at any time in ZFS. For example

zfs set compression=on $poolname