A dataset can be one of the following:
.sp
.ne 2
-.mk
.na
\fB\fIfilesystem\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fIvolume\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fIsnapshot\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fIbookmark\fR\fR
.ad
The following native properties consist of read-only statistics about the dataset. These properties can be neither set, nor inherited.
.sp
.ne 2
-.mk
.na
\fB\fBavailable\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBcompressratio\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBcreation\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBclones\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBfilesystem_count\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBorigin\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBreferenced\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBrefcompressratio\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBsnapshot_count\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBused\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBusedby*\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBusedbychildren\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBusedbydataset\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBusedbyrefreservation\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBusedbysnapshots\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBuserused@\fR\fIuser\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBuserrefs\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBgroupused@\fR\fIgroup\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBvolblocksize\fR=\fIblocksize\fR\fR
.ad
The following native properties can be used to change the behavior of a \fBZFS\fR dataset.
.sp
.ne 2
-.mk
.na
\fB\fBaclinherit\fR=\fBrestricted\fR | \fBdiscard\fR | \fBnoallow\fR | \fBpassthrough\fR | \fBpassthrough-x\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBacltype\fR=\fBoff\fR | \fBnoacl\fR | \fBposixacl\fR \fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBatime\fR=\fBon\fR | \fBoff\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBcanmount\fR=\fBon\fR | \fBoff\fR | \fBnoauto\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBchecksum\fR=\fBon\fR | \fBoff\fR | \fBfletcher2\fR | \fBfletcher4\fR | \fBsha256\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBcompression\fR=\fBoff\fR | \fBon\fR | \fBlzjb\fR | \fBlz4\fR |
\fBgzip\fR | \fBgzip-\fR\fIN\fR | \fBzle\fR\fR
.sp
.ne 2
-.mk
.na
\fB\fBcopies\fR=\fB1\fR | \fB2\fR | \fB3\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBdedup\fR=\fBoff\fR | \fBon\fR | \fBverify\fR | \fBsha256\fR[,\fBverify\fR]\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBdevices\fR=\fBon\fR | \fBoff\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBexec\fR=\fBon\fR | \fBoff\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBmlslabel\fR=\fBnone\fR\fR | \fIlabel\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBfilesystem_limit\fR=\fBnone\fR\fR | \fIcount\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBnbmand\fR=\fBoff\fR | \fBon\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBprimarycache\fR=\fBall\fR | \fBnone\fR | \fBmetadata\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBquota\fR=\fBnone\fR | \fIsize\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBsnapshot_limit\fR=\fBnone\fR\fR | \fIcount\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBgroupquota@\fR\fIgroup\fR=\fBnone\fR\fR | \fIsize\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBreadonly\fR=\fBoff\fR | \fBon\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBrecordsize\fR=\fIsize\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBredundant_metadata\fR=\fBall\fR | \fBmost\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBrefreservation\fR=\fBnone\fR | \fIsize\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBrelatime\fR=\fBoff\fR | \fBon\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBreservation\fR=\fBnone\fR | \fIsize\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBsecondarycache\fR=\fBall\fR | \fBnone\fR | \fBmetadata\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBsetuid\fR=\fBon\fR | \fBoff\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBsharesmb\fR=\fBoff\fR | \fBon\fR
.ad
.sp
.in +2
Example to mount a SMB filesystem shared through ZFS (share/tmp):
-.mk
Note that a user and his/her password \fBmust\fR be given!
.sp
.in +2
.in -2
.sp
.ne 2
-.mk
.na
\fBMinimal /etc/samba/smb.conf configuration\fR
.sp
.sp
.ne 2
-.mk
.na
\fB\fBsharenfs\fR=\fBoff\fR | \fBon\fR | \fIopts\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBlogbias\fR=\fBlatency\fR | \fBthroughput\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBsnapdev\fR=\fBhidden\fR | \fBvisible\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBsnapdir\fR=\fBhidden\fR | \fBvisible\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBsync\fR=\fBstandard\fR | \fBalways\fR | \fBdisabled\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBvolsize\fR=\fIsize\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBvscan\fR=\fBoff\fR | \fBon\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBxattr\fR=\fBon\fR | \fBoff\fR | \fBsa\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzoned\fR=\fBoff\fR | \fBon\fR\fR
.ad
The following three properties cannot be changed after the file system is created, and therefore, should be set when the file system is created. If the properties are not set with the \fBzfs create\fR or \fBzpool create\fR commands, these properties are inherited from the parent dataset. If the parent dataset lacks these properties due to having been created prior to these features being supported, the new file system will have the default values for these properties.
.sp
.ne 2
-.mk
.na
\fB\fBcasesensitivity\fR=\fBsensitive\fR | \fBinsensitive\fR | \fBmixed\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBnormalization\fR = \fBnone\fR | \fBformC\fR | \fBformD\fR | \fBformKC\fR | \fBformKD\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fButf8only\fR=\fBoff\fR | \fBon\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBcontext\fR=\fBnone\fR | \fISELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBfscontext\fR=\fBnone\fR | \fISELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBdefcontext\fR=\fBnone\fR | \fISELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBrootcontext\fR=\fBnone\fR | \fISELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBoverlay\fR=\fBoff\fR | \fBon\fR\fR
.ad
All subcommands that modify state are logged persistently to the pool in their original form. The log can be viewed with \fBzpool history\fR.
.sp
.ne 2
-.mk
.na
\fB\fBzfs ?\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs create\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem\fR\fR
.ad
Creates a new \fBZFS\fR file system. The file system is automatically mounted according to the \fBmountpoint\fR and \fBcanmount\fR properties.
.sp
.ne 2
-.mk
.na
\fB\fB-p\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs create\fR [\fB-ps\fR] [\fB-b\fR \fIblocksize\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fB-V\fR \fIsize\fR \fIvolume\fR\fR
.ad
\fIsize\fR is automatically rounded up to the nearest 128KiB to ensure that the volume has an integral number of blocks regardless of \fIblocksize\fR.
.sp
.ne 2
-.mk
.na
\fB\fB-p\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-s\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-b\fR \fIblocksize\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fBzfs destroy\fR [\fB-fnpRrv\fR] \fIfilesystem\fR|\fIvolume\fR
.ad
Destroys the given dataset. By default, the command unshares any file systems that are currently shared, unmounts any file systems that are currently mounted, and refuses to destroy a dataset that has active dependents (children or clones).
.sp
.ne 2
-.mk
.na
\fB\fB-r\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-R\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-f\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fBzfs destroy\fR [\fB-dnpRrv\fR] \fIfilesystem\fR|\fIvolume\fR@\fIsnap\fR[%\fIsnap\fR][,...]
.ad
comma-separated list to identify multiple snapshots.
.sp
.ne 2
-.mk
.na
\fB\fB-d\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-r\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-R\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fBzfs destroy\fR \fIfilesystem\fR|\fIvolume\fR#\fIbookmark\fR
.ad
Creates snapshots with the given names. All previous modifications by successful system calls to the file system are part of the snapshots. Snapshots are taken atomically, so that all snapshots correspond to the same moment in time. See the "Snapshots" section for details.
.sp
.ne 2
-.mk
.na
\fB\fB-r\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs rollback\fR [\fB-rRf\fR] \fIsnapshot\fR\fR
.ad
The \fB-rR\fR options do not recursively destroy the child snapshots of a recursive snapshot. Only direct snapshots of the specified filesystem are destroyed by either of these options. To completely roll back a recursive snapshot, you must rollback the individual child snapshots.
.sp
.ne 2
-.mk
.na
\fB\fB-r\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-R\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-f\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs clone\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIsnapshot\fR \fIfilesystem\fR|\fIvolume\fR\fR
.ad
Creates a clone of the given snapshot. See the "Clones" section for details. The target dataset can be located anywhere in the \fBZFS\fR hierarchy, and is created as the same type as the original.
.sp
.ne 2
-.mk
.na
\fB\fB-p\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs promote\fR \fIclone-filesystem\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs rename\fR [\fB-f\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
.ad
Renames the given dataset. The new target can be located anywhere in the \fBZFS\fR hierarchy, with the exception of snapshots. Snapshots can only be renamed within the parent file system or volume. When renaming a snapshot, the parent file system of the snapshot does not need to be specified as part of the second argument. Renamed file systems can inherit new mount points, in which case they are unmounted and remounted at the new mount point.
.sp
.ne 2
-.mk
.na
\fB\fB-p\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs rename\fR \fB-r\fR \fIsnapshot\fR \fIsnapshot\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs\fR \fBlist\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR] [\fB-Hp\fR] [\fB-o\fR \fIproperty\fR[,\fI\&...\fR]] [ \fB-t\fR \fItype\fR[,\fI\&...\fR]] [ \fB-s\fR \fIproperty\fR ] ... [ \fB-S\fR \fIproperty\fR ] ... [\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR|\fImountpoint\fR] ...\fR
.ad
Lists the property information for the given datasets in tabular form. If a mount point is specified, it can be an absolute pathname or a relative pathname as long as it contains a slash (e.g. \fBzfs list ./\fR). By default, all file systems and volumes are displayed. Snapshots are displayed if the pool's \fBlistsnapshots\fR property is \fBon\fR (the default is \fBoff\fR). When listing hundreds or thousands of snapshots performance can be improved by restricting the output to only the name. In that case, it is recommended to use \fB-o name -s name\fR. The following fields are displayed by default: \fBname, used, available, referenced, mountpoint\fR
.sp
.ne 2
-.mk
.na
\fB\fB-H\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-p\fR\fR
.sp .6
.sp
.ne 2
-.mk
.na
\fB\fB-r\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-d\fR \fIdepth\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-o\fR \fIproperty\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-s\fR \fIproperty\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-S\fR \fIproperty\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-t\fR \fItype\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs set\fR \fIproperty\fR=\fIvalue\fR[ \fIproperty\fR=\fIvalue\fR]...
\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
.sp
.ne 2
-.mk .na
\fB\fBzfs get\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR] [\fB-Hp\fR] [\fB-o\fR \fIfield\fR[,...] [\fB-t\fR \fItype\fR[,...]] [\fB-s\fR \fIsource\fR[,...] "\fIall\fR" | \fIproperty\fR[,...] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
.ad
.sp .6
The special value \fBall\fR can be used to display all properties that apply to the given dataset's type (filesystem, volume snapshot, or bookmark).
.sp
.ne 2
-.mk
.na
\fB\fB-r\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-d\fR \fIdepth\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-H\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-o\fR \fIfield\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-s\fR \fIsource\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-p\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs inherit\fR [\fB-rS\fR] \fIproperty\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
.ad
Clears the specified property, causing it to be inherited from an ancestor, restored to default if no ancestor has the property set, or with the \fB-S\fR option reverted to the received value if one exists. See the "Properties" section for a listing of default values, and details on which properties can be inherited.
.sp
.ne 2
-.mk
.na
\fB\fB-r\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs upgrade\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs upgrade\fR \fB-v\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs upgrade\fR [\fB-r\fR] [\fB-V\fR \fIversion\fR] [\fB-a\fR | \fIfilesystem\fR]\fR
.ad
In some cases, the file system version and the pool version are interrelated and the pool version must be upgraded before the file system version can be upgraded.
.sp
.ne 2
-.mk
.na
\fB\fB-a\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fIfilesystem\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-r\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-V\fR \fIversion\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fBzfs\fR \fBuserspace\fR [\fB-Hinp\fR] [\fB-o\fR \fIfield\fR[,...]]
[\fB-s\fR \fIfield\fR] ...
\fBuserquota@\fR\fIuser\fR properties.
.sp
.ne 2
-.mk
.na
\fB\fB-n\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-H\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-p\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-o\fR \fIfield\fR[,...]\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-s\fR \fIfield\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-S\fR \fIfield\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-t\fR \fItype\fR[,...]\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-i\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fBzfs\fR \fBgroupspace\fR [\fB-Hinp\fR] [\fB-o\fR \fIfield\fR[,...]]
[\fB-s\fR \fIfield\fR] ...
.sp
.ne 2
-.mk
.na
\fB\fBzfs mount\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs mount\fR [\fB-vO\fR] [\fB-o\fR \fIoptions\fR] \fB-a\fR | \fIfilesystem\fR\fR
.ad
Mounts \fBZFS\fR file systems. This is invoked automatically as part of the boot process.
.sp
.ne 2
-.mk
.na
\fB\fB-o\fR \fIoptions\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-O\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-v\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-a\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fIfilesystem\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs unmount\fR [\fB-f\fR] \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR\fR
.ad
Unmounts currently mounted \fBZFS\fR file systems. Invoked automatically as part of the shutdown process.
.sp
.ne 2
-.mk
.na
\fB\fB-f\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-a\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fIfilesystem\fR|\fImountpoint\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs share\fR \fB-a\fR | \fIfilesystem\fR\fR
.ad
Shares available \fBZFS\fR file systems.
.sp
.ne 2
-.mk
.na
\fB\fB-a\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fIfilesystem\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs unshare\fR \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR\fR
.ad
Unshares currently shared \fBZFS\fR file systems. This is invoked automatically as part of the shutdown process.
.sp
.ne 2
-.mk
.na
\fB\fB-a\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fIfilesystem\fR|\fImountpoint\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs bookmark\fR \fIsnapshot\fR \fIbookmark\fR\fR
.ad
Creates a stream representation of the (second, if \fB-i\fR is specified) \fIsnapshot\fR, which is written to standard output. The output can be redirected to a file or to a pipe (for example, using \fBssh\fR(1) to send it to a different system with \fBzfs receive\fR). By default, a full stream is generated; specifying \fB-i\fR or \fB-I\fR changes this behavior.
.sp
.ne 2
-.mk
.na
\fB\fB-i\fR \fIsnapshot\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-I\fR \fIsnapshot\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-R\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-D\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-L\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-e\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-v\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-L\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-e\fR\fR
.ad
.RE
.sp
.ne 2
-.mk
.na
\fB\fBzfs receive\fR [\fB-vnFu\fR] [\fB-o origin\fR=\fIsnapshot\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
.ad
The \fB-d\fR and \fB-e\fR options cause the file system name of the target snapshot to be determined by appending a portion of the sent snapshot's name to the specified target \fIfilesystem\fR. If the \fB-d\fR option is specified, all but the first element of the sent snapshot's file system path (usually the pool name) is used and any required intermediate file systems within the specified one are created. If the \fB-e\fR option is specified, then only the last element of the sent snapshot's file system name (i.e. the name of the source file system itself) is used as the target file system name.
.sp
.ne 2
-.mk
.na
\fB\fB-d\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-u\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-n\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-o\fR \fBorigin\fR=\fIsnapshot\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-F\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs allow\fR \fIfilesystem\fR | \fIvolume\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs allow\fR [\fB-ldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR| \fIvolume\fR\fR
.ad
Delegates \fBZFS\fR administration permission for the file systems to non-privileged users.
.sp
.ne 2
-.mk
.na
\fB[\fB-ug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...]\fR
.ad
.sp
.ne 2
-.mk
.na
\fB[\fB-e\fR] \fIperm\fR|@\fIsetname\fR[,...]\fR
.ad
.sp
.ne 2
-.mk
.na
\fB[\fB-ld\fR] \fIfilesystem\fR|\fIvolume\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs allow\fR \fB-c\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs allow\fR \fB-s\fR @\fIsetname\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs unallow\fR [\fB-rldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] [\fIperm\fR|@\fIsetname\fR[, ...]] \fIfilesystem\fR|\fIvolume\fR\fR
.ad
Removes permissions that were granted with the \fBzfs allow\fR command. No permissions are explicitly denied, so other permissions granted are still in effect. For example, if the permission is granted by an ancestor. If no permissions are specified, then all permissions for the specified \fIuser\fR, \fIgroup\fR, or \fIeveryone\fR are removed. Specifying "everyone" (or using the \fB-e\fR option) only removes the permissions that were granted to "everyone", not all permissions for every user and group. See the \fBzfs allow\fR command for a description of the \fB-ldugec\fR options.
.sp
.ne 2
-.mk
.na
\fB\fB-r\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs unallow\fR [\fB-r\fR] \fB-s\fR @\fIsetname\fR [\fIperm\fR|@\fIsetname\fR[,...]]\fR \fB\fIfilesystem\fR|\fIvolume\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs hold\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
.ad
If a hold exists on a snapshot, attempts to destroy that snapshot by using the \fBzfs destroy\fR command return \fBEBUSY\fR.
.sp
.ne 2
-.mk
.na
\fB\fB-r\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs holds\fR [\fB-r\fR] \fIsnapshot\fR...\fR
.ad
Lists all existing user references for the given snapshot or snapshots.
.sp
.ne 2
-.mk
.na
\fB\fB-r\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs release\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
.ad
Removes a single reference, named with the \fItag\fR argument, from the specified snapshot or snapshots. The tag must already exist for each snapshot.
.sp
.ne 2
-.mk
.na
\fB\fB-r\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzfs diff\fR [\fB-FHt\fR] \fIsnapshot\fR \fIsnapshot|filesystem\fR
.ad
The following exit values are returned:
.sp
.ne 2
-.mk
.na
\fB\fB0\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB1\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB2\fR\fR
.ad
A "virtual device" describes a single device or a collection of devices organized according to certain performance and fault characteristics. The following virtual devices are supported:
.sp
.ne 2
-.mk
.na
\fB\fBdisk\fR\fR
.ad
.RS 10n
-.rt
A block device, typically located under \fB/dev\fR. \fBZFS\fR can use individual partitions, though the recommended mode of operation is to use whole disks. A disk can be specified by a full path, or it can be a shorthand name (the relative portion of the path under "/dev"). For example, "sda" is equivalent to "/dev/sda". A whole disk can be specified by omitting the partition designation. When given a whole disk, \fBZFS\fR automatically labels the disk, if necessary.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBfile\fR\fR
.ad
.RS 10n
-.rt
A regular file. The use of files as a backing store is strongly discouraged. It is designed primarily for experimental purposes, as the fault tolerance of a file is only as good as the file system of which it is a part. A file must be specified by a full path.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBmirror\fR\fR
.ad
.RS 10n
-.rt
A mirror of two or more devices. Data is replicated in an identical fashion across all components of a mirror. A mirror with \fIN\fR disks of size \fIX\fR can hold \fIX\fR bytes and can withstand (\fIN-1\fR) devices failing before data integrity is compromised.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBraidz\fR\fR
.ad
\fB\fBraidz3\fR\fR
.ad
.RS 10n
-.rt
A variation on \fBRAID-5\fR that allows for better distribution of parity and eliminates the "\fBRAID-5\fR write hole" (in which data and parity become inconsistent after a power loss). Data and parity is striped across all disks within a \fBraidz\fR group.
.sp
A \fBraidz\fR group can have single-, double- , or triple parity, meaning that the \fBraidz\fR group can sustain one, two, or three failures, respectively, without losing any data. The \fBraidz1\fR \fBvdev\fR type specifies a single-parity \fBraidz\fR group; the \fBraidz2\fR \fBvdev\fR type specifies a double-parity \fBraidz\fR group; and the \fBraidz3\fR \fBvdev\fR type specifies a triple-parity \fBraidz\fR group. The \fBraidz\fR \fBvdev\fR type is an alias for \fBraidz1\fR.
.sp
.ne 2
-.mk
.na
\fB\fBspare\fR\fR
.ad
.RS 10n
-.rt
A special pseudo-\fBvdev\fR which keeps track of available hot spares for a pool. For more information, see the "Hot Spares" section.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBlog\fR\fR
.ad
.RS 10n
-.rt
A separate-intent log device. If more than one log device is specified, then writes are load-balanced between devices. Log devices can be mirrored. However, \fBraidz\fR \fBvdev\fR types are not supported for the intent log. For more information, see the "Intent Log" section.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBcache\fR\fR
.ad
.RS 10n
-.rt
A device used to cache storage pool data. A cache device cannot be configured as a mirror or \fBraidz\fR group. For more information, see the "Cache Devices" section.
.RE
The health of the top-level vdev, such as mirror or \fBraidz\fR device, is potentially impacted by the state of its associated vdevs, or component devices. A top-level vdev or component device is in one of the following states:
.sp
.ne 2
-.mk
.na
\fB\fBDEGRADED\fR\fR
.ad
.RS 12n
-.rt
One or more top-level vdevs is in the degraded state because one or more component devices are offline. Sufficient replicas exist to continue functioning.
.sp
One or more component devices is in the degraded or faulted state, but sufficient replicas exist to continue functioning. The underlying conditions are as follows:
.sp
.ne 2
-.mk
.na
\fB\fBFAULTED\fR\fR
.ad
.RS 12n
-.rt
One or more top-level vdevs is in the faulted state because one or more component devices are offline. Insufficient replicas exist to continue functioning.
.sp
One or more component devices is in the faulted state, and insufficient replicas exist to continue functioning. The underlying conditions are as follows:
.sp
.ne 2
-.mk
.na
\fB\fBOFFLINE\fR\fR
.ad
.RS 12n
-.rt
The device was explicitly taken offline by the "\fBzpool offline\fR" command.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBONLINE\fR\fR
.ad
.RS 12n
-.rt
The device is online and functioning.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBREMOVED\fR\fR
.ad
.RS 12n
-.rt
The device was physically removed while the system was running. Device removal detection is hardware-dependent and may not be supported on all platforms.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBUNAVAIL\fR\fR
.ad
.RS 12n
-.rt
The device could not be opened. If a pool is imported when a device was unavailable, then the device will be identified by a unique identifier instead of its path since the path was never correct in the first place.
.RE
Each pool has several properties associated with it. Some properties are read-only statistics while others are configurable and change the behavior of the pool. The following are read-only properties:
.sp
.ne 2
-.mk
.na
\fB\fBavailable\fR\fR
.ad
.RS 20n
-.rt
Amount of storage available within the pool. This property can also be referred to by its shortened column name, "avail".
.RE
.sp
.ne 2
-.mk
.na
\fB\fBcapacity\fR\fR
.ad
.RS 20n
-.rt
Percentage of pool space used. This property can also be referred to by its shortened column name, "cap".
.RE
.sp
.ne 2
-.mk
.na
\fB\fBexpandsize\fR\fR
.ad
.RS 20n
-.rt
Amount of uninitialized space within the pool or device that can be used to
increase the total capacity of the pool. Uninitialized space consists of
any space on an EFI labeled vdev which has not been brought online
.sp
.ne 2
-.mk
.na
\fB\fBfragmentation\fR\fR
.ad
.RS 20n
-.rt
The amount of fragmentation in the pool.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBfree\fR\fR
.ad
.RS 20n
-.rt
The amount of free space available in the pool.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBfreeing\fR\fR
.ad
.RS 20n
-.rt
After a file system or snapshot is destroyed, the space it was using is
returned to the pool asynchronously. \fB\fBfreeing\fR\fR is the amount of
space remaining to be reclaimed. Over time \fB\fBfreeing\fR\fR will decrease
.sp
.ne 2
-.mk
.na
\fB\fBhealth\fR\fR
.ad
.RS 20n
-.rt
The current health of the pool. Health can be "\fBONLINE\fR", "\fBDEGRADED\fR", "\fBFAULTED\fR", " \fBOFFLINE\fR", "\fBREMOVED\fR", or "\fBUNAVAIL\fR".
.RE
.sp
.ne 2
-.mk
.na
\fB\fBguid\fR\fR
.ad
.RS 20n
-.rt
A unique identifier for the pool.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBsize\fR\fR
.ad
.RS 20n
-.rt
Total size of the storage pool.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBunsupported@\fR\fIfeature_guid\fR\fR
.ad
.RS 20n
-.rt
.sp
Information about unsupported features that are enabled on the pool. See
\fBzpool-features\fR(5) for details.
.sp
.ne 2
-.mk
.na
\fB\fBused\fR\fR
.ad
.RS 20n
-.rt
Amount of storage space used within the pool.
.RE
The following property can be set at creation time:
.sp
.ne 2
-.mk
.na
\fB\fBashift\fR=\fIashift\fR\fR
.ad
The following property can be set at creation time and import time:
.sp
.ne 2
-.mk
.na
\fB\fBaltroot\fR=(unset) | \fIpath\fR\fR
.ad
The following property can only be set at import time:
.sp
.ne 2
-.mk
.na
\fB\fBreadonly\fR=\fBoff\fR | \fBon\fR\fR
.ad
The following properties can be set at creation time and import time, and later changed with the \fBzpool set\fR command:
.sp
.ne 2
-.mk
.na
\fB\fBautoexpand\fR=\fBoff\fR | \fBon\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBautoreplace\fR=\fBoff\fR | \fBon\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBbootfs\fR=(unset) | \fIpool\fR/\fIdataset\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBcachefile\fR=fBnone\fR | \fIpath\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBcomment\fR=(unset) | \fB\fItext\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBdedupditto\fR=\fB\fInumber\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBdelegation\fR=\fBon\fR | \fBoff\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBfailmode\fR=\fBwait\fR | \fBcontinue\fR | \fBpanic\fR\fR
.ad
Controls the system behavior in the event of catastrophic pool failure. This condition is typically a result of a loss of connectivity to the underlying storage device(s) or a failure of all devices within the pool. The behavior of such an event is determined as follows:
.sp
.ne 2
-.mk
.na
\fB\fBwait\fR\fR
.ad
.RS 12n
-.rt
Blocks all \fBI/O\fR access until the device connectivity is recovered and the errors are cleared. This is the default behavior.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBcontinue\fR\fR
.ad
.RS 12n
-.rt
Returns \fBEIO\fR to any new write \fBI/O\fR requests but allows reads to any of the remaining healthy devices. Any write requests that have yet to be committed to disk would be blocked.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBpanic\fR\fR
.ad
.RS 12n
-.rt
Prints out a message to the console and generates a system crash dump.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBlistsnapshots\fR=on | off\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBversion\fR=(unset) | \fIversion\fR\fR
.ad
The \fBzpool\fR command provides subcommands to create and destroy storage pools, add capacity to storage pools, and provide information about the storage pools. The following subcommands are supported:
.sp
.ne 2
-.mk
.na
\fB\fBzpool\fR \fB-?\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzpool add\fR [\fB-fgLnP\fR] [\fB-o\fR \fIproperty=value\fR] \fIpool\fR \fIvdev\fR ...\fR
.ad
Adds the specified virtual devices to the given pool. The \fIvdev\fR specification is described in the "Virtual Devices" section. The behavior of the \fB-f\fR option, and the device checks performed are described in the "zpool create" subcommand.
.sp
.ne 2
-.mk
.na
\fB\fB-f\fR\fR
.ad
.RS 6n
-.rt
Forces use of \fBvdev\fRs, even if they appear in use or specify a conflicting replication level. Not all devices can be overridden in this manner.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-g\fR\fR
.ad
.RS 6n
-.rt
Display vdev GUIDs instead of the normal device names. These GUIDs can be used in place of device names for the zpool detach/offline/remove/replace commands.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-L\fR\fR
.ad
.RS 6n
-.rt
Display real paths for vdevs resolving all symbolic links. This can be used to look up the current block device name regardless of the /dev/disk/ path used to open it.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-n\fR\fR
.ad
.RS 6n
-.rt
Displays the configuration that would be used without actually adding the \fBvdev\fRs. The actual pool creation can still fail due to insufficient privileges or device sharing.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-P\fR\fR
.ad
.RS 6n
-.rt
Display full paths for vdevs instead of only the last component of the path. This can be used in conjunction with the \fB-L\fR flag.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-o\fR \fIproperty=value\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzpool attach\fR [\fB-f\fR] [\fB-o\fR \fIproperty=value\fR] \fIpool\fR \fIdevice\fR \fInew_device\fR\fR
.ad
Attaches \fInew_device\fR to an existing \fBzpool\fR device. The existing device cannot be part of a \fBraidz\fR configuration. If \fIdevice\fR is not currently part of a mirrored configuration, \fIdevice\fR automatically transforms into a two-way mirror of \fIdevice\fR and \fInew_device\fR. If \fIdevice\fR is part of a two-way mirror, attaching \fInew_device\fR creates a three-way mirror, and so on. In either case, \fInew_device\fR begins to resilver immediately.
.sp
.ne 2
-.mk
.na
\fB\fB-f\fR\fR
.ad
.RS 6n
-.rt
Forces use of \fInew_device\fR, even if its appears to be in use. Not all devices can be overridden in this manner.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-o\fR \fIproperty=value\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzpool clear\fR \fIpool\fR [\fIdevice\fR] ...\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzpool create\fR [\fB-fnd\fR] [\fB-o\fR \fIproperty=value\fR] ... [\fB-O\fR \fIfile-system-property=value\fR] ... [\fB-m\fR \fImountpoint\fR] [\fB-R\fR \fIroot\fR] [\fB-t\fR \fItname\fR] \fIpool\fR \fIvdev\fR ...\fR
.ad
By default all supported features are enabled on the new pool unless the \fB-d\fR option is specified.
.sp
.ne 2
-.mk
.na
\fB\fB-f\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-n\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-d\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-O\fR \fIfile-system-property=value\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-R\fR \fIroot\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-m\fR \fImountpoint\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-t\fR \fItname\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzpool destroy\fR [\fB-f\fR] \fIpool\fR\fR
.ad
Destroys the given pool, freeing up any devices for other use. This command tries to unmount any active datasets before destroying the pool.
.sp
.ne 2
-.mk
.na
\fB\fB-f\fR\fR
.ad
.RS 6n
-.rt
Forces any active datasets contained within the pool to be unmounted.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBzpool detach\fR \fIpool\fR \fIdevice\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fBzpool events\fR [\fB-vHfc\fR] [\fIpool\fR] ...
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-v\fR\fR
.ad
.RS 6n
-.rt
Get a full detail of the events and what information is available about it.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-H\fR\fR
.ad
.RS 6n
-.rt
Scripted mode. Do not display headers, and separate fields by a single tab instead of arbitrary space.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-f\fR\fR
.ad
.RS 6n
-.rt
Follow mode.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-c\fR\fR
.ad
.RS 6n
-.rt
Clear all previous events.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBzpool export\fR [\fB-a\fR] [\fB-f\fR] \fIpool\fR ...\fR
.ad
For pools to be portable, you must give the \fBzpool\fR command whole disks, not just partitions, so that \fBZFS\fR can label the disks with portable \fBEFI\fR labels. Otherwise, disk drivers on platforms of different endianness will not recognize the disks.
.sp
.ne 2
-.mk
.na
\fB\fB-a\fR\fR
.ad
.RS 6n
-.rt
Exports all pools imported on the system.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-f\fR\fR
.ad
.RS 6n
-.rt
Forcefully unmount all datasets, using the "\fBunmount -f\fR" command.
.sp
This command will forcefully export the pool even if it has a shared spare that is currently being used. This may lead to potential data corruption.
.sp
.ne 2
-.mk
.na
\fB\fBzpool get\fR [\fB-Hp\fR] [\fB-o \fR\fIfield\fR[,...]] "\fIall\fR" | \fIproperty\fR[,...]
\fIpool\fR ...\fR
.sp
.ne 2
-.mk
.na
\fB\fB-H\fR\fR
.ad
.RS 6n
-.rt
Scripted mode. Do not display headers, and separate fields by a single tab instead of arbitrary space.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-p\fR\fR
.ad
.RS 6n
-.rt
Display numbers in parseable (exact) values.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBzpool history\fR [\fB-il\fR] [\fIpool\fR] ...\fR
.ad
Displays the command history of the specified pools or all pools if no pool is specified.
.sp
.ne 2
-.mk
.na
\fB\fB-i\fR\fR
.ad
.RS 6n
-.rt
Displays internally logged \fBZFS\fR events in addition to user initiated events.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-l\fR\fR
.ad
.RS 6n
-.rt
Displays log records in long format, which in addition to standard format includes, the user name, the hostname, and the zone in which the operation was performed.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBzpool import\fR [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR] [\fB-D\fR]\fR
.ad
The numeric identifier is unique, and can be used instead of the pool name when multiple exported pools of the same name are available.
.sp
.ne 2
-.mk
.na
\fB\fB-c\fR \fIcachefile\fR\fR
.ad
.RS 16n
-.rt
Reads configuration from the given \fBcachefile\fR that was created with the "\fBcachefile\fR" pool property. This \fBcachefile\fR is used instead of searching for devices.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-d\fR \fIdir\fR\fR
.ad
.RS 16n
-.rt
Searches for devices or files in \fIdir\fR. The \fB-d\fR option can be specified multiple times.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-D\fR\fR
.ad
.RS 16n
-.rt
Lists destroyed pools only.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBzpool import\fR [\fB-o\fR \fImntopts\fR] [ \fB-o\fR \fIproperty\fR=\fIvalue\fR] ... [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR] [\fB-D\fR] [\fB-f\fR] [\fB-m\fR] [\fB-N\fR] [\fB-R\fR \fIroot\fR] [\fB-F\fR [\fB-n\fR]] [\fB-s\fR] \fB-a\fR\fR
.ad
Imports all pools found in the search directories. Identical to the previous command, except that all pools with a sufficient number of devices available are imported. Destroyed pools, pools that were previously destroyed with the "\fBzpool destroy\fR" command, will not be imported unless the \fB-D\fR option is specified.
.sp
.ne 2
-.mk
.na
\fB\fB-o\fR \fImntopts\fR\fR
.ad
.RS 21n
-.rt
Comma-separated list of mount options to use when mounting datasets within the pool. See \fBzfs\fR(8) for a description of dataset properties and mount options.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-o\fR \fIproperty=value\fR\fR
.ad
.RS 21n
-.rt
Sets the specified property on the imported pool. See the "Properties" section for more information on the available pool properties.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-c\fR \fIcachefile\fR\fR
.ad
.RS 21n
-.rt
Reads configuration from the given \fBcachefile\fR that was created with the "\fBcachefile\fR" pool property. This \fBcachefile\fR is used instead of searching for devices.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-d\fR \fIdir\fR\fR
.ad
.RS 21n
-.rt
Searches for devices or files in \fIdir\fR. The \fB-d\fR option can be specified multiple times. This option is incompatible with the \fB-c\fR option.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-D\fR\fR
.ad
.RS 21n
-.rt
Imports destroyed pools only. The \fB-f\fR option is also required.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-f\fR\fR
.ad
.RS 21n
-.rt
Forces import, even if the pool appears to be potentially active.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-F\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-a\fR\fR
.ad
.RS 21n
-.rt
Searches for and imports all pools found.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-m\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-R\fR \fIroot\fR\fR
.ad
.RS 21n
-.rt
Sets the "\fBcachefile\fR" property to "\fBnone\fR" and the "\fIaltroot\fR" property to "\fIroot\fR".
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-N\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-n\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-X\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-T\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-s\fR
.ad
.RS 21n
-.rt
Scan using the default search path, the libblkid cache will not be consulted. A custom search path may be specified by setting the \fBZPOOL_IMPORT_PATH\fR environment variable.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBzpool import\fR [\fB-o\fR \fImntopts\fR] [ \fB-o\fR \fIproperty\fR=\fIvalue\fR] ... [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR] [\fB-D\fR] [\fB-f\fR] [\fB-m\fR] [\fB-R\fR \fIroot\fR] [\fB-F\fR [\fB-n\fR]] [\fB-t\fR]] [\fB-s\fR] \fIpool\fR | \fIid\fR [\fInewpool\fR]\fR
.ad
If a device is removed from a system without running "\fBzpool export\fR" first, the device appears as potentially active. It cannot be determined if this was a failed export, or whether the device is really in use from another host. To import a pool in this state, the \fB-f\fR option is required.
.sp
.ne 2
-.mk
.na
\fB\fB-o\fR \fImntopts\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-o\fR \fIproperty=value\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-c\fR \fIcachefile\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-d\fR \fIdir\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-D\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-f\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-F\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-R\fR \fIroot\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-n\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-X\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-T\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-t\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-m\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-s\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzpool iostat\fR [\fB-T\fR \fBd\fR | \fBu\fR] [\fB-ghHLpPvy\fR] [\fB-w\fR|[\fB-lq\fR]] [[\fIpool\fR ...]|[\fIpool vdev\fR ...]|[\fIvdev\fR ...]] [\fIinterval\fR[\fIcount\fR]]\fR
base 1024. To get the raw values, use the \fB-p\fR flag.
.sp
.ne 2
-.mk
.na
\fB\fB-T\fR \fBu\fR | \fBd\fR\fR
.ad
.RS 12n
-.rt
Display a time stamp.
.sp
Specify \fBu\fR for a printed representation of the internal representation of time. See \fBtime\fR(2). Specify \fBd\fR for standard date format. See \fBdate\fR(1).
.sp
.ne 2
-.mk
.na
\fB\fB-g\fR\fR
.ad
.RS 12n
-.rt
Display vdev GUIDs instead of the normal device names. These GUIDs can be used in place of device names for the zpool detach/offline/remove/replace commands.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-H\fR\fR
.ad
\fB\fB-L\fR\fR
.ad
.RS 12n
-.rt
Display real paths for vdevs resolving all symbolic links. This can be used to look up the current block device name regardless of the /dev/disk/ path used to open it.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-p\fR\fR
.ad
\fB\fB-P\fR\fR
.ad
.RS 12n
-.rt
Display full paths for vdevs instead of only the last component of the path. This can be used in conjunction with the \fB-L\fR flag.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-v\fR\fR
.ad
.RS 12n
-.rt
Verbose statistics. Reports usage statistics for individual \fIvdevs\fR within the pool, in addition to the pool-wide statistics.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-y\fR\fR
.ad
.RS 12n
-.rt
Omit statistics since boot. Normally the first line of output reports the statistics since boot. This option suppresses that first line of output.
.RE
.sp
.RE
.sp
.ne 2
-.mk
.na
\fB\fBzpool labelclear\fR [\fB-f\fR] \fIdevice\fR
.ad
Removes ZFS label information from the specified device. The device must not be part of an active pool configuration.
.sp
.ne 2
-.mk
.na
\fB\fB-f\fR\fR
.ad
.RS 12n
-.rt
Treat exported or foreign devices as inactive.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBzpool list\fR [\fB-T\fR \fBd\fR | \fBu\fR] [\fB-HgLpPv\fR] [\fB-o\fR \fIprops\fR[,...]] [\fIpool\fR] ... [\fIinterval\fR[\fIcount\fR]]\fR
.ad
Lists the given pools along with a health status and space usage. If no \fIpools\fR are specified, all pools in the system are listed. When given an \fIinterval\fR, the information is printed every \fIinterval\fR seconds until \fBCtrl-C\fR is pressed. If \fIcount\fR is specified, the command exits after \fIcount\fR reports are printed.
.sp
.ne 2
-.mk
.na
\fB\fB-H\fR\fR
.ad
.RS 12n
-.rt
Scripted mode. Do not display headers, and separate fields by a single tab instead of arbitrary space.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-g\fR\fR
.ad
.RS 12n
-.rt
Display vdev GUIDs instead of the normal device names. These GUIDs can be used in place of device names for the zpool detach/offline/remove/replace commands.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-L\fR\fR
.ad
.RS 12n
-.rt
Display real paths for vdevs resolving all symbolic links. This can be used to look up the current block device name regardless of the /dev/disk/ path used to open it.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-p\fR\fR
.ad
\fB\fB-P\fR\fR
.ad
.RS 12n
-.rt
Display full paths for vdevs instead of only the last component of the path. This can be used in conjunction with the \fB-L\fR flag.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-T\fR \fBd\fR | \fBu\fR\fR
.ad
.RS 12n
-.rt
Display a time stamp.
.sp
Specify \fBu\fR for a printed representation of the internal representation of time. See \fBtime\fR(2). Specify \fBd\fR for standard date format. See \fBdate\fR(1).
.sp
.ne 2
-.mk
.na
\fB\fB-o\fR \fIprops\fR\fR
.ad
.RS 12n
-.rt
Comma-separated list of properties to display. See the "Properties" section for a list of valid properties. The default list is "name, size, used, available, fragmentation, expandsize, capacity, dedupratio, health, altroot"
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-v\fR\fR
.ad
.RS 12n
-.rt
Verbose statistics. Reports usage statistics for individual \fIvdevs\fR within the pool, in addition to the pool-wise statistics.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBzpool offline\fR [\fB-t\fR] \fIpool\fR \fIdevice\fR ...\fR
.ad
This command is not applicable to spares or cache devices.
.sp
.ne 2
-.mk
.na
\fB\fB-t\fR\fR
.ad
.RS 6n
-.rt
Temporary. Upon reboot, the specified physical device reverts to its previous state.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBzpool online\fR [\fB-e\fR] \fIpool\fR \fIdevice\fR...\fR
.ad
This command is not applicable to spares or cache devices.
.sp
.ne 2
-.mk
.na
\fB\fB-e\fR\fR
.ad
.RS 6n
-.rt
Expand the device to use all available space. If the device is part of a mirror or \fBraidz\fR then all devices must be expanded before the new space will become available to the pool.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBzpool reguid\fR \fIpool\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzpool replace\fR [\fB-f\fR] [\fB-o\fR \fIproperty=value\fR] \fIpool\fR \fIold_device\fR [\fInew_device\fR]\fR
.ad
\fInew_device\fR is required if the pool is not redundant. If \fInew_device\fR is not specified, it defaults to \fIold_device\fR. This form of replacement is useful after an existing disk has failed and has been physically replaced. In this case, the new disk may have the same \fB/dev\fR path as the old device, even though it is actually a different disk. \fBZFS\fR recognizes this.
.sp
.ne 2
-.mk
.na
\fB\fB-f\fR\fR
.ad
.RS 6n
-.rt
Forces use of \fInew_device\fR, even if its appears to be in use. Not all devices can be overridden in this manner.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-o\fR \fIproperty=value\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzpool scrub\fR [\fB-s\fR] \fIpool\fR ...\fR
.ad
Because scrubbing and resilvering are \fBI/O\fR-intensive operations, \fBZFS\fR only allows one at a time. If a scrub is already in progress, the "\fBzpool scrub\fR" command terminates it and starts a new scrub. If a resilver is in progress, \fBZFS\fR does not allow a scrub to be started until the resilver completes.
.sp
.ne 2
-.mk
.na
\fB\fB-s\fR\fR
.ad
.RS 6n
-.rt
Stop scrubbing.
.RE
.sp
.ne 2
-.mk
.na
\fB\fBzpool set\fR \fIproperty\fR=\fIvalue\fR \fIpool\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fBzpool split\fR [\fB-gLnP\fR] [\fB-R\fR \fIaltroot\fR] [\fB-o\fR \fIproperty=value\fR] \fIpool\fR \fInewpool\fR [\fIdevice\fR ...]
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-g\fR\fR
.ad
.RS 6n
-.rt
Display vdev GUIDs instead of the normal device names. These GUIDs can be used in place of device names for the zpool detach/offline/remove/replace commands.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-L\fR\fR
.ad
.RS 6n
-.rt
Display real paths for vdevs resolving all symbolic links. This can be used to look up the current block device name regardless of the /dev/disk/ path used to open it.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-n\fR \fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-P\fR\fR
.ad
.RS 6n
-.rt
Display full paths for vdevs instead of only the last component of the path. This can be used in conjunction with the \fB-L\fR flag.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-R\fR \fIaltroot\fR \fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-o\fR \fIproperty=value\fR \fR
.ad
.sp
.ne 2
-.mk
.na
\fBzpool status\fR [\fB-gLPvxD\fR] [\fB-T\fR d | u] [\fIpool\fR] ... [\fIinterval\fR [\fIcount\fR]]
.ad
.sp
.ne 2
-.mk
.na
\fB\fB-g\fR\fR
.ad
.RS 12n
-.rt
Display vdev GUIDs instead of the normal device names. These GUIDs can be used innplace of device names for the zpool detach/offline/remove/replace commands.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-L\fR\fR
.ad
.RS 12n
-.rt
Display real paths for vdevs resolving all symbolic links. This can be used to look up the current block device name regardless of the /dev/disk/ path used to open it.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-P\fR\fR
.ad
.RS 12n
-.rt
Display full paths for vdevs instead of only the last component of the path. This can be used in conjunction with the \fB-L\fR flag.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-v\fR\fR
.ad
.RS 12n
-.rt
Displays verbose data error information, printing out a complete list of all data errors since the last complete pool scrub.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-x\fR\fR
.ad
.RS 12n
-.rt
Only display status for pools that are exhibiting errors or are otherwise unavailable. Warnings about pools not using the latest on-disk format will not be included.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-D\fR\fR
.ad
.RS 12n
-.rt
Display a histogram of deduplication statistics, showing the allocated (physically present on disk) and
referenced (logically referenced in the pool) block counts and sizes by reference count.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-T\fR \fBd\fR | \fBu\fR\fR
.ad
.RS 12n
-.rt
Display a time stamp.
.sp
Specify \fBu\fR for a printed representation of the internal representation of time. See \fBtime\fR(2). Specify \fBd\fR for standard date format. See \fBdate\fR(1).
.sp
.ne 2
-.mk
.na
\fB\fBzpool upgrade\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzpool upgrade\fR \fB-v\fR\fR
.ad
.sp
.ne 2
-.mk
.na
\fB\fBzpool upgrade\fR [\fB-V\fR \fIversion\fR] \fB-a\fR | \fIpool\fR ...\fR
.ad
Enables all supported features on the given pool. Once this is done, the pool will no longer be accessible on systems that do not support feature flags. See \fBzfs-features\fR(5) for details on compatibility with systems that support feature flags, but do not support all features enabled on the pool.
.sp
.ne 2
-.mk
.na
\fB\fB-a\fR\fR
.ad
.RS 14n
-.rt
Enables all supported features on all pools.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB-V\fR \fIversion\fR\fR
.ad
.RS 14n
-.rt
Upgrade to the specified legacy version. If the \fB-V\fR flag is specified, no features will be enabled on the pool. This option can only be used to increase the version number up to the last supported legacy version number.
.RE
The following exit values are returned:
.sp
.ne 2
-.mk
.na
\fB\fB0\fR\fR
.ad
.RS 5n
-.rt
Successful completion.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB1\fR\fR
.ad
.RS 5n
-.rt
An error occurred.
.RE
.sp
.ne 2
-.mk
.na
\fB\fB2\fR\fR
.ad
.RS 5n
-.rt
Invalid command line options were specified.
.RE