]> git.proxmox.com Git - mirror_zfs.git/blame - man/man8/zfs.8
GCC 7.1 fixes
[mirror_zfs.git] / man / man8 / zfs.8
CommitLineData
5990da81
YP
1'\" t
2.\"
3.\" CDDL HEADER START
4.\"
5.\" The contents of this file are subject to the terms of the
6.\" Common Development and Distribution License (the "License").
7.\" You may not use this file except in compliance with the License.
8.\"
9.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10.\" or http://www.opensolaris.org/os/licensing.
11.\" See the License for the specific language governing permissions
12.\" and limitations under the License.
13.\"
14.\" When distributing Covered Code, include this CDDL HEADER in each
15.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16.\" If applicable, add the following below this CDDL HEADER, with the
17.\" fields enclosed by brackets "[]" replaced with your own identifying
18.\" information: Portions Copyright [yyyy] [name of copyright owner]
19.\"
20.\" CDDL HEADER END
21.\"
22.\"
058ac9ba 23.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
5990da81 24.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
fdbaf44f 25.\" Copyright (c) 2011, 2016 by Delphix. All rights reserved.
788eb90c 26.\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
5990da81 27.\" Copyright 2012 Nexenta Systems, Inc. All Rights Reserved.
9759c60f 28.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
76281da4 29.\" Copyright 2016 Richard Laager. All rights reserved.
5990da81 30.\"
76281da4 31.TH zfs 8 "May 11, 2016" "ZFS pool 28, filesystem 5" "System Administration Commands"
058ac9ba
BB
32.SH NAME
33zfs \- configures ZFS file systems
34.SH SYNOPSIS
35.LP
36.nf
37\fBzfs\fR [\fB-?\fR]
38.fi
39
40.LP
41.nf
42\fBzfs\fR \fBcreate\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem\fR
43.fi
44
45.LP
46.nf
47\fBzfs\fR \fBcreate\fR [\fB-ps\fR] [\fB-b\fR \fIblocksize\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fB-V\fR \fIsize\fR \fIvolume\fR
48.fi
49
50.LP
51.nf
330d06f9 52\fBzfs\fR \fBdestroy\fR [\fB-fnpRrv\fR] \fIfilesystem\fR|\fIvolume\fR
058ac9ba
BB
53.fi
54
55.LP
56.nf
330d06f9 57\fBzfs\fR \fBdestroy\fR [\fB-dnpRrv\fR] \fIfilesystem\fR|\fIvolume\fR@\fIsnap\fR[%\fIsnap\fR][,...]
058ac9ba
BB
58.fi
59
da536844
MA
60.LP
61.nf
62\fBzfs\fR \fBdestroy\fR \fIfilesystem\fR|\fIvolume\fR#\fIbookmark\fR
63.fi
64
058ac9ba
BB
65.LP
66.nf
6b4e21c6 67\fBzfs\fR \fBsnapshot | snap\fR [\fB-r\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ...
6f1ffb06 68 \fIfilesystem@snapname\fR|\fIvolume@snapname\fR ...
058ac9ba
BB
69.fi
70
71.LP
72.nf
73\fBzfs\fR \fBrollback\fR [\fB-rRf\fR] \fIsnapshot\fR
74.fi
75
76.LP
77.nf
78\fBzfs\fR \fBclone\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIsnapshot\fR \fIfilesystem\fR|\fIvolume\fR
79.fi
80
81.LP
82.nf
83\fBzfs\fR \fBpromote\fR \fIclone-filesystem\fR
84.fi
85
86.LP
87.nf
db49968e 88\fBzfs\fR \fBrename\fR [\fB-f\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR
058ac9ba
BB
89 \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR
90.fi
91
92.LP
93.nf
db49968e 94\fBzfs\fR \fBrename\fR [\fB-fp\fR] \fIfilesystem\fR|\fIvolume\fR \fIfilesystem\fR|\fIvolume\fR
058ac9ba
BB
95.fi
96
97.LP
98.nf
99\fBzfs\fR \fBrename\fR \fB-r\fR \fIsnapshot\fR \fIsnapshot\fR
100.fi
101
102.LP
103.nf
54d5378f 104\fBzfs\fR \fBlist\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-Hp\fR][\fB-o\fR \fIproperty\fR[,\fIproperty\fR]...] [\fB-t\fR \fItype\fR[,\fItype\fR]..]
76281da4 105 [\fB-s\fR \fIproperty\fR] ... [\fB-S\fR \fIproperty\fR] ... [\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR|\fImountpoint\fR] ...
058ac9ba
BB
106.fi
107
108.LP
109.nf
53ed2db2 110\fBzfs\fR \fBset\fR \fIproperty\fR=\fIvalue\fR... \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR...
058ac9ba
BB
111.fi
112
113.LP
114.nf
6b4e21c6 115\fBzfs\fR \fBget\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-Hp\fR][\fB-o\fR \fIfield\fR[,...]] [\fB-t\fR \fItype\fR[,...]]
76281da4 116 [\fB-s\fR \fIsource\fR[,...]] "\fIall\fR" | \fIproperty\fR[,...] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR|\fImountpoint\fR ...
058ac9ba
BB
117.fi
118
119.LP
120.nf
9ef3906a 121\fBzfs\fR \fBinherit\fR [\fB-rS\fR] \fIproperty\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...
058ac9ba
BB
122.fi
123
124.LP
125.nf
126\fBzfs\fR \fBupgrade\fR [\fB-v\fR]
127.fi
128
129.LP
130.nf
131\fBzfs\fR \fBupgrade\fR [\fB-r\fR] [\fB-V\fR \fIversion\fR] \fB-a\fR | \fIfilesystem\fR
132.fi
133
134.LP
135.nf
5990da81
YP
136\fBzfs\fR \fBuserspace\fR [\fB-Hinp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-s\fR \fIfield\fR] ...
137 [\fB-S\fR \fIfield\fR] ... [\fB-t\fR \fItype\fR[,...]] \fIfilesystem\fR|\fIsnapshot\fR
058ac9ba
BB
138.fi
139
140.LP
141.nf
5990da81
YP
142\fBzfs\fR \fBgroupspace\fR [\fB-Hinp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-s\fR \fIfield\fR] ...
143 [\fB-S\fR \fIfield\fR] ... [\fB-t\fR \fItype\fR[,...]] \fIfilesystem\fR|\fIsnapshot\fR
058ac9ba
BB
144.fi
145
146.LP
147.nf
6b4e21c6 148\fBzfs\fR \fBmount\fR
058ac9ba
BB
149.fi
150
151.LP
152.nf
153\fBzfs\fR \fBmount\fR [\fB-vO\fR] [\fB-o \fIoptions\fR\fR] \fB-a\fR | \fIfilesystem\fR
154.fi
155
156.LP
157.nf
10b75496 158\fBzfs\fR \fBunmount | umount\fR [\fB-f\fR] \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR
058ac9ba
BB
159.fi
160
161.LP
162.nf
2f71caf2 163\fBzfs\fR \fBshare\fR [\fBnfs\fR|\fBsmb\fR] \fB-a\fR | \fIfilesystem\fR
058ac9ba
BB
164.fi
165
166.LP
167.nf
2f71caf2 168\fBzfs\fR \fBunshare\fR [\fBnfs\fR|\fBsmb\fR] \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR
058ac9ba
BB
169.fi
170
da536844
MA
171.LP
172.nf
173\fBzfs\fR \fBbookmark\fR \fIsnapshot\fR \fIbookmark\fR
174.fi
175
058ac9ba
BB
176.LP
177.nf
038091fd 178\fBzfs\fR \fBsend\fR [\fB-DnPpRveLc\fR] [\fB-\fR[\fBi\fR|\fBI\fR] \fIsnapshot\fR] \fIsnapshot\fR
058ac9ba
BB
179.fi
180
da536844
MA
181.LP
182.nf
038091fd 183\fBzfs\fR \fBsend\fR [\fB-Lec\fR] [\fB-i \fIsnapshot\fR|\fIbookmark\fR]\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR
da536844
MA
184.fi
185
058ac9ba
BB
186.LP
187.nf
47dfff3b 188\fBzfs\fR \fBsend\fR [\fB-Penv\fR] \fB-t\fR \fIreceive_resume_token\fR
058ac9ba
BB
189.fi
190
191.LP
192.nf
a3eeab2d 193\fBzfs\fR \fBreceive\fR [\fB-Fnsuv\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... [\fB-x\fR \fIproperty\fR] ...
194 \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR
47dfff3b
MA
195.fi
196
197.LP
198.nf
a3eeab2d 199\fBzfs\fR \fBreceive\fR [\fB-Fnsuv\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... [\fB-x\fR \fIproperty\fR] ...
200 [\fB-d\fR|\fB-e\fR] \fIfilesystem\fR
47dfff3b
MA
201.fi
202
203.LP
204.nf
205\fBzfs\fR \fBreceive\fR \fB-A\fR \fIfilesystem\fR|\fIvolume\fR
058ac9ba
BB
206.fi
207
208.LP
209.nf
210\fBzfs\fR \fBallow\fR \fIfilesystem\fR|\fIvolume\fR
211.fi
212
213.LP
214.nf
6b4e21c6 215\fBzfs\fR \fBallow\fR [\fB-ldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] \fIperm\fR|\fI@setname\fR[,...]
058ac9ba
BB
216 \fIfilesystem\fR|\fIvolume\fR
217.fi
218
219.LP
220.nf
221\fBzfs\fR \fBallow\fR [\fB-ld\fR] \fB-e\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR
222.fi
223
224.LP
225.nf
226\fBzfs\fR \fBallow\fR \fB-c\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR
227.fi
228
229.LP
230.nf
231\fBzfs\fR \fBallow\fR \fB-s\fR @\fIsetname\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR
232.fi
233
234.LP
235.nf
6b4e21c6 236\fBzfs\fR \fBunallow\fR [\fB-rldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] [\fIperm\fR|@\fIsetname\fR[,... ]]
058ac9ba
BB
237 \fIfilesystem\fR|\fIvolume\fR
238.fi
239
240.LP
241.nf
242\fBzfs\fR \fBunallow\fR [\fB-rld\fR] \fB-e\fR [\fIperm\fR|@\fIsetname\fR[,... ]] \fIfilesystem\fR|\fIvolume\fR
243.fi
244
245.LP
246.nf
247\fBzfs\fR \fBunallow\fR [\fB-r\fR] \fB-c\fR [\fIperm\fR|@\fIsetname\fR[ ... ]] \fIfilesystem\fR|\fIvolume\fR
248.fi
249
250.LP
251.nf
252\fBzfs\fR \fBunallow\fR [\fB-r\fR] \fB-s\fR @\fIsetname\fR [\fIperm\fR|@\fIsetname\fR[,... ]] \fIfilesystem\fR|\fIvolume\fR
253.fi
254
255.LP
256.nf
257\fBzfs\fR \fBhold\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...
258.fi
259
260.LP
261.nf
262\fBzfs\fR \fBholds\fR [\fB-r\fR] \fIsnapshot\fR...
263.fi
264
265.LP
266.nf
267\fBzfs\fR \fBrelease\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...
268.fi
269
0677cb6f
RL
270.LP
271.nf
9ef3906a 272\fBzfs\fR \fBdiff\fR [\fB-FHt\fR] \fIsnapshot\fR \fIsnapshot\fR|\fIfilesystem\fR
0677cb6f 273
058ac9ba 274.SH DESCRIPTION
058ac9ba 275.LP
2d1b7b0b 276The \fBzfs\fR command configures \fBZFS\fR datasets within a \fBZFS\fR storage pool, as described in \fBzpool\fR(8). A dataset is identified by a unique path within the \fBZFS\fR namespace. For example:
058ac9ba
BB
277.sp
278.in +2
279.nf
280pool/{filesystem,volume,snapshot}
281.fi
282.in -2
283.sp
284
285.sp
286.LP
287where the maximum length of a dataset name is \fBMAXNAMELEN\fR (256 bytes).
288.sp
289.LP
290A dataset can be one of the following:
291.sp
292.ne 2
058ac9ba 293.na
9bb3e153 294\fB\fIfilesystem\fR\fR
058ac9ba
BB
295.ad
296.sp .6
297.RS 4n
298A \fBZFS\fR dataset of type \fBfilesystem\fR can be mounted within the standard system namespace and behaves like other file systems. While \fBZFS\fR file systems are designed to be \fBPOSIX\fR compliant, known issues exist that prevent compliance in some cases. Applications that depend on standards conformance might fail due to nonstandard behavior when checking file system free space.
299.RE
300
301.sp
302.ne 2
058ac9ba
BB
303.na
304\fB\fIvolume\fR\fR
305.ad
306.sp .6
307.RS 4n
308A logical volume exported as a raw or block device. This type of dataset should only be used under special circumstances. File systems are typically used in most environments.
309.RE
310
311.sp
312.ne 2
058ac9ba
BB
313.na
314\fB\fIsnapshot\fR\fR
315.ad
316.sp .6
317.RS 4n
318A read-only version of a file system or volume at a given point in time. It is specified as \fIfilesystem@name\fR or \fIvolume@name\fR.
319.RE
320
b467db45
TF
321.sp
322.ne 2
b467db45
TF
323.na
324\fB\fIbookmark\fR\fR
325.ad
326.sp .6
327.RS 4n
328Much like a \fIsnapshot\fR, but without the hold on on-disk data. It can be used as the source of a send (but not for a receive).
329It is specified as \fIfilesystem#name\fR or \fIvolume#name\fR.
330.RE
331
058ac9ba 332.SS "ZFS File System Hierarchy"
058ac9ba
BB
333.LP
334A \fBZFS\fR storage pool is a logical collection of devices that provide space for datasets. A storage pool is also the root of the \fBZFS\fR file system hierarchy.
335.sp
336.LP
2d1b7b0b 337The root of the pool can be accessed as a file system, such as mounting and unmounting, taking snapshots, and setting properties. The physical storage characteristics, however, are managed by the \fBzpool\fR(8) command.
058ac9ba
BB
338.sp
339.LP
2d1b7b0b 340See \fBzpool\fR(8) for more information on creating and administering pools.
058ac9ba 341.SS "Snapshots"
058ac9ba
BB
342.LP
343A snapshot is a read-only copy of a file system or volume. Snapshots can be created extremely quickly, and initially consume no additional space within the pool. As data within the active dataset changes, the snapshot consumes more data than would otherwise be shared with the active dataset.
344.sp
345.LP
d17eab9c 346Snapshots can have arbitrary names. Snapshots of volumes can be cloned or rolled back. Visibility is determined by the \fBsnapdev\fR property of the parent volume.
058ac9ba
BB
347.sp
348.LP
349File system snapshots can be accessed under the \fB\&.zfs/snapshot\fR directory in the root of the file system. Snapshots are automatically mounted on demand and may be unmounted at regular intervals. The visibility of the \fB\&.zfs\fR directory can be controlled by the \fBsnapdir\fR property.
b467db45
TF
350.SS "Bookmarks"
351.LP
352A bookmark is like a snapshot, a read-only copy of a file system or volume. Bookmarks can be created extremely quickly, compared to snapshots, and they consume no additional space within the pool. Bookmarks can also have arbitrary names, much like snapshots.
353.sp
354.LP
355Unlike snapshots, bookmarks can not be accessed through the filesystem in any way. From a storage standpoint a bookmark just provides a way to reference when a snapshot was created as a distinct object. Bookmarks are initially tied to a snapshot, not the filesystem/volume, and they will survive if the snapshot itself is destroyed. Since they are very light weight there's little incentive to destroy them.
058ac9ba 356.SS "Clones"
058ac9ba
BB
357.LP
358A clone is a writable volume or file system whose initial contents are the same as another dataset. As with snapshots, creating a clone is nearly instantaneous, and initially consumes no additional space.
359.sp
360.LP
361Clones can only be created from a snapshot. When a snapshot is cloned, it creates an implicit dependency between the parent and child. Even though the clone is created somewhere else in the dataset hierarchy, the original snapshot cannot be destroyed as long as a clone exists. The \fBorigin\fR property exposes this dependency, and the \fBdestroy\fR command lists any such dependencies, if they exist.
362.sp
363.LP
364The clone parent-child dependency relationship can be reversed by using the \fBpromote\fR subcommand. This causes the "origin" file system to become a clone of the specified file system, which makes it possible to destroy the file system that the clone was created from.
365.SS "Mount Points"
058ac9ba 366.LP
9a616b5d 367Creating a \fBZFS\fR file system is a simple operation, so the number of file systems per system is likely to be numerous. To cope with this, \fBZFS\fR automatically manages mounting and unmounting file systems without the need to edit the \fB/etc/fstab\fR file. All automatically managed file systems are mounted by \fBZFS\fR at boot time.
058ac9ba
BB
368.sp
369.LP
370By default, file systems are mounted under \fB/\fIpath\fR\fR, where \fIpath\fR is the name of the file system in the \fBZFS\fR namespace. Directories are created and destroyed as needed.
371.sp
372.LP
9a616b5d 373A file system can also have a mount point set in the \fBmountpoint\fR property. This directory is created as needed, and \fBZFS\fR automatically mounts the file system when the \fBzfs mount -a\fR command is invoked (without editing \fB/etc/fstab\fR). The \fBmountpoint\fR property can be inherited, so if \fBpool/home\fR has a mount point of \fB/export/stuff\fR, then \fBpool/home/user\fR automatically inherits a mount point of \fB/export/stuff/user\fR.
058ac9ba
BB
374.sp
375.LP
376A file system \fBmountpoint\fR property of \fBnone\fR prevents the file system from being mounted.
377.sp
378.LP
9a616b5d 379If needed, \fBZFS\fR file systems can also be managed with traditional tools (\fBmount\fR, \fBumount\fR, \fB/etc/fstab\fR). If a file system's mount point is set to \fBlegacy\fR, \fBZFS\fR makes no attempt to manage the file system, and the administrator is responsible for mounting and unmounting the file system.
c8f25918 380.SS "Deduplication"
c8f25918
KA
381.LP
382Deduplication is the process for removing redundant data at the block-level, reducing the total amount of data stored. If a file system has the \fBdedup\fR property enabled, duplicate data blocks are removed synchronously. The result is that only unique data is stored and common components are shared among files.
971808ec
TF
383.sp
384\fBWARNING: DO NOT ENABLE DEDUPLICATION UNLESS YOU NEED IT AND KNOW EXACTLY WHAT YOU ARE DOING!\fR
385.sp
7e0754c6 386Deduplicating data is a very resource-intensive operation. It is generally recommended that you have \fIat least\fR 1.25 GiB of RAM per 1 TiB of storage when you enable deduplication. But calculating the exact requirements is a somewhat complicated affair.
971808ec
TF
387.sp
388Enabling deduplication on an improperly-designed system will result in extreme performance issues (extremely slow filesystem and snapshot deletions etc.) and can potentially lead to data loss (i.e. unimportable pool due to memory exhaustion) if your system is not built for this purpose. Deduplication affects the processing power (CPU), disks (and the controller) as well as primary (real) memory.
389.sp
390Before creating a pool with deduplication enabled, ensure that you have planned your hardware requirements appropriately and implemented appropriate recovery practices, such as regular backups.
391.sp
392Unless necessary, deduplication should NOT be enabled on a system. Instead, consider using \fIcompression=lz4\fR, as a less resource-intensive alternative.
879dbef0
RL
393.SS "Properties"
394.sp
058ac9ba 395.LP
879dbef0 396Properties are divided into two types: native properties and user-defined (or "user") properties. Native properties either export internal statistics or control \fBZFS\fR behavior. User properties have no effect on \fBZFS\fR behavior, but you can use them to annotate datasets and snapshots in a way that is meaningful in your environment.
058ac9ba
BB
397.sp
398.LP
879dbef0
RL
399Properties are generally inherited from the parent unless overridden by the child. See the documentation below for exceptions.
400.sp
401.LP
402.SS "Native Properties"
403Native properties apply to all dataset types unless otherwise noted. However, native properties cannot be edited on snapshots.
058ac9ba
BB
404.sp
405.LP
879dbef0 406The values of numeric native properties can be specified using human-readable abbreviations (\fBK\fR, \fBM\fR, \fBG\fR, \fBT\fR, \fBP\fR, \fBE\fR, and \fBZ\fR). These abbreviations can optionally use the IEC binary prefixes (e.g. GiB) or SI decimal prefixes (e.g. GB), though the SI prefixes are treated as binary prefixes. Abbreviations are case-insensitive. The following are all valid (and equal) specifications:
058ac9ba
BB
407.sp
408.in +2
409.nf
7e0754c6 4101536M, 1.5g, 1.50GB, 1.5GiB
058ac9ba
BB
411.fi
412.in -2
413.sp
414
415.sp
416.LP
879dbef0 417The values of non-numeric native properties are case-sensitive and must be lowercase, except for \fBmountpoint\fR, \fBsharenfs\fR, and \fBsharesmb\fR.
058ac9ba
BB
418.sp
419.LP
879dbef0 420The following native properties consist of read-only statistics about the dataset. These properties can be neither set, nor inherited.
058ac9ba
BB
421.sp
422.ne 2
058ac9ba
BB
423.na
424\fB\fBavailable\fR\fR
425.ad
426.sp .6
427.RS 4n
428The amount of space available to the dataset and all its children, assuming that there is no other activity in the pool. Because space is shared within a pool, availability can be limited by any number of factors, including physical pool size, quotas, reservations, or other datasets within the pool.
429.sp
430This property can also be referred to by its shortened column name, \fBavail\fR.
431.RE
432
433.sp
434.ne 2
058ac9ba
BB
435.na
436\fB\fBcompressratio\fR\fR
437.ad
438.sp .6
439.RS 4n
8fd888ba 440For non-snapshots, the compression ratio achieved for the \fBused\fR space of this dataset, expressed as a multiplier. The \fBused\fR property includes descendant datasets, and, for clones, does not include the space shared with the origin snapshot. For snapshots, the \fBcompressratio\fR is the same as the \fBrefcompressratio\fR property. The \fBcompression\fR property controls whether compression is enabled on a dataset.
058ac9ba
BB
441.RE
442
305bc4b3
CS
443.sp
444.ne 2
445.na
446\fB\fBcreatetxg\fR
447.ad
448.sp .6
449.RS 4n
450The transaction group (TXG) in which the dataset was created. Bookmarks have the same \fBcreatetxg\fR as the snapshot they are initially tied to.
451.sp
452\fBcreatetxg\fR is suitable for ordering a list of snapshots, e.g. for incremental \fBsend\fR & \fBrecv\fR.
453.RE
454
058ac9ba
BB
455.sp
456.ne 2
058ac9ba
BB
457.na
458\fB\fBcreation\fR\fR
459.ad
460.sp .6
461.RS 4n
462The time this dataset was created.
463.RE
464
465.sp
466.ne 2
058ac9ba 467.na
330d06f9
MA
468\fB\fBclones\fR\fR
469.ad
470.sp .6
471.RS 4n
472For snapshots, this property is a comma-separated list of filesystems or
473volumes which are clones of this snapshot. The clones' \fBorigin\fR property
474is this snapshot. If the \fBclones\fR property is not empty, then this
8fd888ba
RL
475snapshot can not be destroyed (even with the \fB-r\fR or \fB-f\fR options). The
476roles of origin and clone can be swapped by promoting the clone with the
477\fBzfs promote\fR command.
330d06f9
MA
478.RE
479
480.sp
481.ne 2
482.na
058ac9ba
BB
483\fB\fBdefer_destroy\fR\fR
484.ad
485.sp .6
486.RS 4n
3b204150 487This property is \fBon\fR if the snapshot has been marked for deferred destruction by using the \fBzfs destroy\fR \fB-d\fR command. Otherwise, the property is \fBoff\fR.
058ac9ba
BB
488.RE
489
490.sp
491.ne 2
058ac9ba 492.na
788eb90c
JJ
493\fB\fBfilesystem_count\fR
494.ad
495.sp .6
496.RS 4n
497The total number of filesystems and volumes that exist under this location in the
498dataset tree. This value is only available when a \fBfilesystem_limit\fR has
499been set somewhere in the tree under which the dataset resides.
500.RE
501
305bc4b3
CS
502.sp
503.ne 2
504.na
505\fB\fBguid\fR
506.ad
507.sp .6
508.RS 4n
509The 64 bit GUID of this dataset or bookmark, which does not change over its entire lifetime.
510.sp
511When a snapshot is sent to another pool, the received snapshot has the same GUID. Thus, \fBguid\fR is suitable to identify a snapshot across pools.
512.RE
513
788eb90c
JJ
514.sp
515.ne 2
516.na
24a64651
MA
517\fB\fBlogicalreferenced\fR\fR
518.ad
519.sp .6
520.RS 4n
521The amount of space that is "logically" accessible by this dataset. See
522the \fBreferenced\fR property. The logical space ignores the effect of
523the \fBcompression\fR and \fBcopies\fR properties, giving a quantity
524closer to the amount of data that applications see. However, it does
525include space consumed by metadata.
526.sp
527This property can also be referred to by its shortened column name,
528\fBlrefer\fR.
529.RE
530
531.sp
532.ne 2
533.na
534\fB\fBlogicalused\fR\fR
535.ad
536.sp .6
537.RS 4n
538The amount of space that is "logically" consumed by this dataset and all
539its descendents. See the \fBused\fR property. The logical space
540ignores the effect of the \fBcompression\fR and \fBcopies\fR properties,
541giving a quantity closer to the amount of data that applications see.
542However, it does include space consumed by metadata.
543.sp
544This property can also be referred to by its shortened column name,
545\fBlused\fR.
546.RE
547
548.sp
549.ne 2
550.na
058ac9ba
BB
551\fB\fBmounted\fR\fR
552.ad
553.sp .6
554.RS 4n
555For file systems, indicates whether the file system is currently mounted. This property can be either \fByes\fR or \fBno\fR.
556.RE
557
558.sp
559.ne 2
058ac9ba
BB
560.na
561\fB\fBorigin\fR\fR
562.ad
563.sp .6
564.RS 4n
c5ee7513 565For cloned file systems or volumes, the snapshot from which the clone was created. The origin cannot be destroyed (even with the \fB-r\fR or \fB-f\fR options) so long as a clone exists. See also the \fBclones\fR property.
058ac9ba
BB
566.RE
567
568.sp
569.ne 2
058ac9ba 570.na
47dfff3b
MA
571\fB\fBreceive_resume_token\fR\fR
572.ad
573.sp .6
574.RS 4n
575For filesystems or volumes which have saved partially-completed state from \fBzfs receive -s\fR , this opaque token can be provided to \fBzfs send -t\fR to resume and complete the \fBzfs receive\fR.
576.RE
577
578.sp
579.ne 2
580.mk
581.na
058ac9ba
BB
582\fB\fBreferenced\fR\fR
583.ad
584.sp .6
585.RS 4n
586The amount of data that is accessible by this dataset, which may or may not be shared with other datasets in the pool. When a snapshot or clone is created, it initially references the same amount of space as the file system or snapshot it was created from, since its contents are identical.
587.sp
588This property can also be referred to by its shortened column name, \fBrefer\fR.
589.RE
590
f5fc4aca
MA
591.sp
592.ne 2
f5fc4aca
MA
593.na
594\fB\fBrefcompressratio\fR\fR
595.ad
596.sp .6
597.RS 4n
598The compression ratio achieved for the \fBreferenced\fR space of this
599dataset, expressed as a multiplier. See also the \fBcompressratio\fR
600property.
601.RE
602
058ac9ba
BB
603.sp
604.ne 2
058ac9ba 605.na
788eb90c
JJ
606\fB\fBsnapshot_count\fR
607.ad
608.sp .6
609.RS 4n
610The total number of snapshots that exist under this location in the dataset tree.
611This value is only available when a \fBsnapshot_limit\fR has been set somewhere
612in the tree under which the dataset resides.
613.RE
614
615.sp
616.ne 2
617.na
058ac9ba
BB
618\fB\fBtype\fR\fR
619.ad
620.sp .6
621.RS 4n
622The type of dataset: \fBfilesystem\fR, \fBvolume\fR, or \fBsnapshot\fR.
623.RE
624
625.sp
626.ne 2
058ac9ba
BB
627.na
628\fB\fBused\fR\fR
629.ad
630.sp .6
631.RS 4n
fdbaf44f 632The amount of space consumed by this dataset and all its descendents. This is the value that is checked against this dataset's quota and reservation. The space used does not include this dataset's reservation, but does take into account the reservations of any descendent datasets. The amount of space that a dataset consumes from its parent, as well as the amount of space that is freed if this dataset is recursively destroyed, is the greater of its space used and its reservation.
058ac9ba 633.sp
fdbaf44f 634The used space of a snapshot (see the "Snapshots" section) is space that is referenced exclusively by this snapshot. If this snapshot is destroyed, the amount of \fBused\fR space will be freed. Space that is shared by multiple snapshots isn't accounted for in this metric. When a snapshot is destroyed, space that was previously shared with this snapshot can become unique to snapshots adjacent to it, thus changing the used space of those snapshots. The used space of the latest snapshot can also be affected by changes in the file system. Note that the \fBused\fR space of a snapshot is a subset of the \fBwritten\fR space of the snapshot.
058ac9ba 635.sp
8fd888ba 636The amount of space used, available, or referenced does not take into account pending changes. Pending changes are generally accounted for within a few seconds. Committing a change to a disk using \fBfsync\fR(2) or \fBO_SYNC\fR (see \fBopen\fR(2)) does not necessarily guarantee that the space usage information is updated immediately.
058ac9ba
BB
637.RE
638
639.sp
640.ne 2
058ac9ba
BB
641.na
642\fB\fBusedby*\fR\fR
643.ad
644.sp .6
645.RS 4n
9bb3e153 646The \fBusedby*\fR properties decompose the \fBused\fR properties into the various reasons that space is used. Specifically, \fBused\fR = \fBusedbychildren\fR + \fBusedbydataset\fR + \fBusedbyrefreservation\fR + \fBusedbysnapshots\fR. These properties are only available for datasets created on \fBzpool\fR version 13 or higher pools.
058ac9ba
BB
647.RE
648
649.sp
650.ne 2
058ac9ba
BB
651.na
652\fB\fBusedbychildren\fR\fR
653.ad
654.sp .6
655.RS 4n
656The amount of space used by children of this dataset, which would be freed if all the dataset's children were destroyed.
657.RE
658
659.sp
660.ne 2
058ac9ba
BB
661.na
662\fB\fBusedbydataset\fR\fR
663.ad
664.sp .6
665.RS 4n
666The amount of space used by this dataset itself, which would be freed if the dataset were destroyed (after first removing any \fBrefreservation\fR and destroying any necessary snapshots or descendents).
667.RE
668
669.sp
670.ne 2
058ac9ba
BB
671.na
672\fB\fBusedbyrefreservation\fR\fR
673.ad
674.sp .6
675.RS 4n
676The amount of space used by a \fBrefreservation\fR set on this dataset, which would be freed if the \fBrefreservation\fR was removed.
677.RE
678
679.sp
680.ne 2
058ac9ba
BB
681.na
682\fB\fBusedbysnapshots\fR\fR
683.ad
684.sp .6
685.RS 4n
686The amount of space consumed by snapshots of this dataset. In particular, it is the amount of space that would be freed if all of this dataset's snapshots were destroyed. Note that this is not simply the sum of the snapshots' \fBused\fR properties because space can be shared by multiple snapshots.
687.RE
688
689.sp
690.ne 2
058ac9ba 691.na
1de321e6
JX
692\fB\fBuserobjused@\fR\fIuser\fR\fR
693.br
058ac9ba
BB
694\fB\fBuserused@\fR\fIuser\fR\fR
695.ad
696.sp .6
697.RS 4n
698The amount of space consumed by the specified user in this dataset. Space is charged to the owner of each file, as displayed by \fBls\fR \fB-l\fR. The amount of space charged is displayed by \fBdu\fR and \fBls\fR \fB-s\fR. See the \fBzfs userspace\fR subcommand for more information.
699.sp
700Unprivileged users can access only their own space usage. The root user, or a user who has been granted the \fBuserused\fR privilege with \fBzfs allow\fR, can access everyone's usage.
701.sp
702The \fBuserused@\fR... properties are not displayed by \fBzfs get all\fR. The user's name must be appended after the \fB@\fR symbol, using one of the following forms:
703.RS +4
704.TP
705.ie t \(bu
706.el o
707\fIPOSIX name\fR (for example, \fBjoe\fR)
708.RE
709.RS +4
710.TP
711.ie t \(bu
712.el o
713\fIPOSIX numeric ID\fR (for example, \fB789\fR)
714.RE
715.RS +4
716.TP
717.ie t \(bu
718.el o
719\fISID name\fR (for example, \fBjoe.smith@mydomain\fR)
720.RE
721.RS +4
722.TP
723.ie t \(bu
724.el o
725\fISID numeric ID\fR (for example, \fBS-1-123-456-789\fR)
726.RE
727.RE
1de321e6 728.RS 4n
f974e414
D
729.sp
730Files created on Linux always have POSIX owners.
731.sp
1de321e6
JX
732The \fBuserobjused\fR is similar to \fBuserused\fR but instead it counts the number of objects consumed by \fIuser\fR. This feature doesn't count the internal objects used by ZFS, therefore it may under count a few objects comparing with the results of third-party tool such as \fBdfs -i\fR.
733When the property \fBxattr=on\fR is set on a fileset, ZFS will create additional objects per-file to store extended attributes. These additional objects are reflected in the \fBuserobjused\fR value and are counted against the user's \fBuserobjquota\fR. When a filesystem is configured to use \fBxattr=sa\fR no additional internal objects are required.
734.RE
735
058ac9ba
BB
736.sp
737.ne 2
058ac9ba
BB
738.na
739\fB\fBuserrefs\fR\fR
740.ad
741.sp .6
742.RS 4n
743This property is set to the number of user holds on this snapshot. User holds are set by using the \fBzfs hold\fR command.
744.RE
745
746.sp
747.ne 2
058ac9ba
BB
748.na
749\fB\fBgroupused@\fR\fIgroup\fR\fR
1de321e6
JX
750.br
751\fB\fBgroupobjused@\fR\fIgroup\fR\fR
058ac9ba
BB
752.ad
753.sp .6
754.RS 4n
755The amount of space consumed by the specified group in this dataset. Space is charged to the group of each file, as displayed by \fBls\fR \fB-l\fR. See the \fBuserused@\fR\fIuser\fR property for more information.
756.sp
757Unprivileged users can only access their own groups' space usage. The root user, or a user who has been granted the \fBgroupused\fR privilege with \fBzfs allow\fR, can access all groups' usage.
758.RE
759
1de321e6
JX
760.RS 4n
761The \fBgroupobjused\fR is similar to \fBgroupused\fR but instead it counts the number of objects consumed by \fIgroup\fR.
762When the property \fBxattr=on\fR is set on a fileset, ZFS will create additional objects per-file to store extended attributes. These additional objects are reflected in the \fBgroupobjused\fR value and are counted against the group's \fBgroupobjquota.\fR. When a filesystem is configured to use \fBxattr=sa\fR no additional internal objects are required.
763.RE
764
058ac9ba
BB
765.sp
766.ne 2
058ac9ba
BB
767.na
768\fB\fBvolblocksize\fR=\fIblocksize\fR\fR
769.ad
770.sp .6
771.RS 4n
7e0754c6
RL
772This property, which is only valid on volumes, specifies the block size of the volume. Any power of two from 512B to 128KiB is valid. The default is 8KiB.
773.sp
774This property cannot be changed after the volume is created.
058ac9ba
BB
775.sp
776This property can also be referred to by its shortened column name, \fBvolblock\fR.
777.RE
778
330d06f9
MA
779.sp
780.ne 2
781.na
782\fB\fBwritten\fR\fR
783.ad
784.sp .6
785.RS 4n
fdbaf44f
GM
786The amount of space \fBreferenced\fR by this dataset, that was written since the previous snapshot
787(i.e. that is not referenced by the previous snapshot).
330d06f9
MA
788.RE
789
790.sp
791.ne 2
792.na
793\fB\fBwritten@\fR\fIsnapshot\fR\fR
794.ad
795.sp .6
796.RS 4n
797The amount of \fBreferenced\fR space written to this dataset since the
798specified snapshot. This is the space that is referenced by this dataset
799but was not referenced by the specified snapshot.
800.sp
801The \fIsnapshot\fR may be specified as a short snapshot name (just the part
802after the \fB@\fR), in which case it will be interpreted as a snapshot in
803the same filesystem as this dataset.
804The \fIsnapshot\fR be a full snapshot name (\fIfilesystem\fR@\fIsnapshot\fR),
805which for clones may be a snapshot in the origin's filesystem (or the origin
806of the origin's filesystem, etc).
807.RE
808
058ac9ba
BB
809.sp
810.LP
811The following native properties can be used to change the behavior of a \fBZFS\fR dataset.
812.sp
813.ne 2
058ac9ba 814.na
d919da83 815\fB\fBaclinherit\fR=\fBrestricted\fR | \fBdiscard\fR | \fBnoallow\fR | \fBpassthrough\fR | \fBpassthrough-x\fR\fR
058ac9ba
BB
816.ad
817.sp .6
818.RS 4n
819Controls how \fBACL\fR entries are inherited when files and directories are created. A file system with an \fBaclinherit\fR property of \fBdiscard\fR does not inherit any \fBACL\fR entries. A file system with an \fBaclinherit\fR property value of \fBnoallow\fR only inherits inheritable \fBACL\fR entries that specify "deny" permissions. The property value \fBrestricted\fR (the default) removes the \fBwrite_acl\fR and \fBwrite_owner\fR permissions when the \fBACL\fR entry is inherited. A file system with an \fBaclinherit\fR property value of \fBpassthrough\fR inherits all inheritable \fBACL\fR entries without any modifications made to the \fBACL\fR entries when they are inherited. A file system with an \fBaclinherit\fR property value of \fBpassthrough-x\fR has the same meaning as \fBpassthrough\fR, except that the \fBowner@\fR, \fBgroup@\fR, and \fBeveryone@\fR \fBACE\fRs inherit the execute permission only if the file creation mode also requests the execute bit.
820.sp
821When the property value is set to \fBpassthrough\fR, files are created with a mode determined by the inheritable \fBACE\fRs. If no inheritable \fBACE\fRs exist that affect the mode, then the mode is set in accordance to the requested mode from the application.
023699cd
MM
822.sp
823The \fBaclinherit\fR property does not apply to Posix ACLs.
058ac9ba
BB
824.RE
825
826.sp
827.ne 2
058ac9ba 828.na
8fd888ba 829\fB\fBacltype\fR=\fBoff\fR | \fBnoacl\fR | \fBposixacl\fR \fR
058ac9ba
BB
830.ad
831.sp .6
832.RS 4n
023699cd 833Controls whether ACLs are enabled and if so what type of ACL to use. When
8fd888ba 834a file system has the \fBacltype\fR property set to \fBoff\fR (the default)
023699cd
MM
835then ACLs are disabled. Setting the \fBacltype\fR property to \fBposixacl\fR
836indicates Posix ACLs should be used. Posix ACLs are specific to Linux and
837are not functional on other platforms. Posix ACLs are stored as an xattr and
838therefore will not overwrite any existing ZFS/NFSv4 ACLs which may be set.
839Currently only \fBposixacls\fR are supported on Linux.
840.sp
841To obtain the best performance when setting \fBposixacl\fR users are strongly
842encouraged to set the \fBxattr=sa\fR property. This will result in the
843Posix ACL being stored more efficiently on disk. But as a consequence of this
8f343973 844all new xattrs will only be accessible from ZFS implementations which support
023699cd 845the \fBxattr=sa\fR property. See the \fBxattr\fR property for more details.
8fd888ba
RL
846.sp
847The value \fBnoacl\fR is an alias for \fBoff\fR.
058ac9ba
BB
848.RE
849
850.sp
851.ne 2
058ac9ba
BB
852.na
853\fB\fBatime\fR=\fBon\fR | \fBoff\fR\fR
854.ad
855.sp .6
856.RS 4n
a5eb2d87
RL
857Controls whether the access time for files is updated when they are read. Setting this property to \fBoff\fR avoids producing write traffic when reading files and can result in significant performance gains, though it might confuse mailers and other similar utilities. The default value is \fBon\fR. See also \fBrelatime\fR below.
858.sp
859The values \fBon\fR and \fBoff\fR are equivalent to the \fBatime\fR and \fBnoatime\fR mount options.
058ac9ba
BB
860.RE
861
862.sp
863.ne 2
058ac9ba
BB
864.na
865\fB\fBcanmount\fR=\fBon\fR | \fBoff\fR | \fBnoauto\fR\fR
866.ad
867.sp .6
868.RS 4n
869If this property is set to \fBoff\fR, the file system cannot be mounted, and is ignored by \fBzfs mount -a\fR. Setting this property to \fBoff\fR is similar to setting the \fBmountpoint\fR property to \fBnone\fR, except that the dataset still has a normal \fBmountpoint\fR property, which can be inherited. Setting this property to \fBoff\fR allows datasets to be used solely as a mechanism to inherit properties. One example of setting \fBcanmount=\fR\fBoff\fR is to have two datasets with the same \fBmountpoint\fR, so that the children of both datasets appear in the same directory, but might have different inherited characteristics.
870.sp
871When the \fBnoauto\fR option is set, a dataset can only be mounted and unmounted explicitly. The dataset is not mounted automatically when the dataset is created or imported, nor is it mounted by the \fBzfs mount -a\fR command or unmounted by the \fBzfs unmount -a\fR command.
872.sp
a5eb2d87
RL
873This property is not inherited. Every dataset defaults to \fBon\fR independently.
874.sp
875The values \fBon\fR and \fBnoauto\fR are equivalent to the \fBauto\fR and \fBnoauto\fR mount options.
058ac9ba
BB
876.RE
877
878.sp
879.ne 2
058ac9ba 880.na
3c67d83a 881\fB\fBchecksum\fR=\fBon\fR | \fBoff\fR | \fBfletcher2\fR | \fBfletcher4\fR | \fBsha256\fR | \fBnoparity\fR | \fBsha512\fR | \fBskein\fR | \fBedonr\fR\fR
058ac9ba
BB
882.ad
883.sp .6
884.RS 4n
3c67d83a
TH
885Controls the checksum used to verify data integrity. The default value is
886\fBon\fR, which automatically selects an appropriate algorithm (currently,
887\fBfletcher4\fR, but this may change in future releases). The value \fBoff\fR
888disables integrity checking on user data. The value \fBnoparity\fR not only
889disables integrity but also disables maintaining parity for user data.
890This setting is used internally by a dump device residing on a RAID-Z pool and
891should not be used by any other dataset. Disabling checksums is \fBNOT\fR a
892recommended practice.
058ac9ba 893.sp
3c67d83a
TH
894The \fBsha512\fR, \fBskein\fR, and \fBedonr\fR checksum algorithms require
895enabling the appropriate features on the pool. Please see zpool-features for
896more information on these algorithms.
897
058ac9ba
BB
898Changing this property affects only newly-written data.
899.RE
900
901.sp
902.ne 2
058ac9ba 903.na
d919da83 904\fB\fBcompression\fR=\fBoff\fR | \fBon\fR | \fBlzjb\fR | \fBlz4\fR |
99197f03 905\fBgzip\fR | \fBgzip-\fR\fIN\fR | \fBzle\fR\fR
058ac9ba
BB
906.ad
907.sp .6
908.RS 4n
99197f03 909Controls the compression algorithm used for this dataset.
f4605f07 910.sp
99197f03
JG
911Setting compression to \fBon\fR indicates that the current default
912compression algorithm should be used. The default balances compression
913and decompression speed, with compression ratio and is expected to
914work well on a wide variety of workloads. Unlike all other settings for
915this property, \fBon\fR does not select a fixed compression type. As
916new compression algorithms are added to ZFS and enabled on a pool, the
917default compression algorithm may change. The current default compression
6b4e21c6 918algorithm is either \fBlzjb\fR or, if the \fBlz4_compress\fR feature is
99197f03 919enabled, \fBlz4\fR.
f4605f07 920.sp
99197f03
JG
921The \fBlzjb\fR compression algorithm is optimized for performance while
922providing decent data compression.
058ac9ba 923.sp
9759c60f
ED
924The \fBlz4\fR compression algorithm is a high-performance replacement
925for the \fBlzjb\fR algorithm. It features significantly faster
926compression and decompression, as well as a moderately higher
927compression ratio than \fBlzjb\fR, but can only be used on pools with
928the \fBlz4_compress\fR feature set to \fIenabled\fR. See
929\fBzpool-features\fR(5) for details on ZFS feature flags and the
930\fBlz4_compress\fR feature.
931.sp
99197f03
JG
932The \fBgzip\fR compression algorithm uses the same compression as
933the \fBgzip\fR(1) command. You can specify the \fBgzip\fR level by using the
934value \fBgzip-\fR\fIN\fR where \fIN\fR is an integer from 1 (fastest) to 9
935(best compression ratio). Currently, \fBgzip\fR is equivalent to \fBgzip-6\fR
936(which is also the default for \fBgzip\fR(1)). The \fBzle\fR compression
937algorithm compresses runs of zeros.
938.sp
939This property can also be referred to by its shortened column name
940\fBcompress\fR. Changing this property affects only newly-written data.
058ac9ba
BB
941.RE
942
943.sp
944.ne 2
058ac9ba
BB
945.na
946\fB\fBcopies\fR=\fB1\fR | \fB2\fR | \fB3\fR\fR
947.ad
948.sp .6
949.RS 4n
950Controls the number of copies of data stored for this dataset. These copies are in addition to any redundancy provided by the pool, for example, mirroring or RAID-Z. The copies are stored on different disks, if possible. The space used by multiple copies is charged to the associated file and dataset, changing the \fBused\fR property and counting against quotas and reservations.
951.sp
8fd888ba
RL
952Changing this property only affects newly-written data.
953.sp
954Remember that \fBZFS\fR will not import a pool with a missing top-level vdev. Do NOT create, for example, a two-disk, striped pool and set \fBcopies=\fR\fI2\fR on some datasets thinking you have setup redundancy for them. When one disk dies, you will not be able to import the pool and will have lost all of your data.
058ac9ba
BB
955.RE
956
c8f25918
KA
957.sp
958.ne 2
c8f25918 959.na
d919da83 960\fB\fBdedup\fR=\fBoff\fR | \fBon\fR | \fBverify\fR | \fBsha256\fR[,\fBverify\fR]\fR
c8f25918
KA
961.ad
962.sp .6
963.RS 4n
964Controls whether deduplication is in effect for a dataset. The default value is \fBoff\fR. The default checksum used for deduplication is \fBsha256\fR (subject to change). When \fBdedup\fR is enabled, the \fBdedup\fR checksum algorithm overrides the \fBchecksum\fR property. Setting the value to \fBverify\fR is equivalent to specifying \fBsha256,verify\fR.
965.sp
966If the property is set to \fBverify\fR, then, whenever two blocks have the same signature, ZFS will do a byte-for-byte comparison with the existing block to ensure that the contents are identical.
971808ec
TF
967.sp
968Unless necessary, deduplication should NOT be enabled on a system. See \fBDeduplication\fR above.
c8f25918
KA
969.RE
970
058ac9ba
BB
971.sp
972.ne 2
058ac9ba
BB
973.na
974\fB\fBdevices\fR=\fBon\fR | \fBoff\fR\fR
975.ad
976.sp .6
977.RS 4n
978Controls whether device nodes can be opened on this file system. The default value is \fBon\fR.
a5eb2d87
RL
979.sp
980The values \fBon\fR and \fBoff\fR are equivalent to the \fBdev\fR and \fBnodev\fR mount options.
058ac9ba
BB
981.RE
982
983.sp
984.ne 2
058ac9ba 985.na
50c957f7
NB
986\fB\fBdnodesize\fR=\fBlegacy\fR | \fBauto\fR | \fB1k\fR | \fB2k\fR | \fB4k\fR | \fB8k\fR | \fB16k\fR\fR
987.ad
988.sp .6
989.RS 4n
990Specifies a compatibility mode or literal value for the size of dnodes
991in the file system. The default value is \fBlegacy\fR. Setting this
992property to a value other than \fBlegacy\fR requires the
993\fBlarge_dnode\fR pool feature to be enabled.
994.sp
995Consider setting \fBdnodesize\fR to \fBauto\fR if the dataset uses the
996\fBxattr=sa\fR property setting and the workload makes heavy use of
997extended attributes. This may be applicable to SELinux-enabled systems,
998Lustre servers, and Samba servers, for example. Literal values are
999supported for cases where the optimal size is known in advance and for
1000performance testing.
1001.sp
1002Leave \fBdnodesize\fR set to \fBlegacy\fR if you need to receive
1003a \fBzfs send\fR stream of this dataset on a pool that doesn't enable
1004the \fBlarge_dnode\fR feature, or if you need to import this pool on a
1005system that doesn't support the \fBlarge_dnode\fR feature.
1006.sp
1007This property can also be referred to by its shortened column name,
1008\fBdnsize\fR.
1009.RE
1010
1011.sp
1012.ne 2
1013.mk
1014.na
058ac9ba
BB
1015\fB\fBexec\fR=\fBon\fR | \fBoff\fR\fR
1016.ad
1017.sp .6
1018.RS 4n
1019Controls whether processes can be executed from within this file system. The default value is \fBon\fR.
a5eb2d87
RL
1020.sp
1021The values \fBon\fR and \fBoff\fR are equivalent to the \fBexec\fR and \fBnoexec\fR mount options.
058ac9ba
BB
1022.RE
1023
c8f25918
KA
1024.sp
1025.ne 2
c8f25918 1026.na
d919da83 1027\fB\fBmlslabel\fR=\fBnone\fR\fR | \fIlabel\fR
c8f25918
KA
1028.ad
1029.sp .6
1030.RS 4n
1031The \fBmlslabel\fR property is a sensitivity label that determines if a dataset can be mounted in a zone on a system with Trusted Extensions enabled. If the labeled dataset matches the labeled zone, the dataset can be mounted and accessed from the labeled zone.
1032.sp
1033When the \fBmlslabel\fR property is not set, the default value is \fBnone\fR. Setting the \fBmlslabel\fR property to \fBnone\fR is equivalent to removing the property.
1034.sp
1035The \fBmlslabel\fR property can be modified only when Trusted Extensions is enabled and only with appropriate privilege. Rights to modify it cannot be delegated. When changing a label to a higher label or setting the initial dataset label, the \fB{PRIV_FILE_UPGRADE_SL}\fR privilege is required. When changing a label to a lower label or the default (\fBnone\fR), the \fB{PRIV_FILE_DOWNGRADE_SL}\fR privilege is required. Changing the dataset to labels other than the default can be done only when the dataset is not mounted. When a dataset with the default label is mounted into a labeled-zone, the mount operation automatically sets the \fBmlslabel\fR property to the label of that zone.
1036.sp
1037When Trusted Extensions is \fBnot\fR enabled, only datasets with the default label (\fBnone\fR) can be mounted.
1038.sp
1039Zones are a Solaris feature and are not relevant on Linux.
1040.RE
1041
058ac9ba
BB
1042.sp
1043.ne 2
058ac9ba 1044.na
d919da83 1045\fB\fBfilesystem_limit\fR=\fBnone\fR\fR | \fIcount\fR
788eb90c
JJ
1046.ad
1047.sp .6
1048.RS 4n
1049Limits the number of filesystems and volumes that can exist under this point in
1050the dataset tree. The limit is not enforced if the user is allowed to change
1051the limit. Setting a filesystem_limit on a descendent of a filesystem that
1052already has a filesystem_limit does not override the ancestor's filesystem_limit,
1053but rather imposes an additional limit. This feature must be enabled to be used
1054(see \fBzpool-features\fR(5)).
1055.RE
1056
1057.sp
1058.ne 2
1059.na
058ac9ba
BB
1060\fB\fBmountpoint\fR=\fIpath\fR | \fBnone\fR | \fBlegacy\fR\fR
1061.ad
1062.sp .6
1063.RS 4n
6b4e21c6 1064Controls the mount point used for this file system. See the "Mount Points" section for more information on how this property is used.
058ac9ba
BB
1065.sp
1066When the \fBmountpoint\fR property is changed for a file system, the file system and any children that inherit the mount point are unmounted. If the new value is \fBlegacy\fR, then they remain unmounted. Otherwise, they are automatically remounted in the new location if the property was previously \fBlegacy\fR or \fBnone\fR, or if they were mounted before the property was changed. In addition, any shared file systems are unshared and shared in the new location.
1067.RE
1068
1069.sp
1070.ne 2
058ac9ba 1071.na
d919da83 1072\fB\fBnbmand\fR=\fBoff\fR | \fBon\fR\fR
058ac9ba
BB
1073.ad
1074.sp .6
1075.RS 4n
a5eb2d87
RL
1076Controls whether the file system should be mounted with \fBnbmand\fR (Non Blocking mandatory locks). This is used for \fBCIFS\fR clients. Changes to this property only take effect when the file system is umounted and remounted. See \fBmount\fR(1M) on a Solaris system for more information on \fBnbmand\fR mounts.
1077.sp
1078The values \fBon\fR and \fBoff\fR are equivalent to the \fBnbmand\fR and \fBnonbmand\fR mount options.
1079.sp
1080This property is not used on Linux.
058ac9ba
BB
1081.RE
1082
1083.sp
1084.ne 2
058ac9ba
BB
1085.na
1086\fB\fBprimarycache\fR=\fBall\fR | \fBnone\fR | \fBmetadata\fR\fR
1087.ad
1088.sp .6
1089.RS 4n
1090Controls what is cached in the primary cache (ARC). If this property is set to \fBall\fR, then both user data and metadata is cached. If this property is set to \fBnone\fR, then neither user data nor metadata is cached. If this property is set to \fBmetadata\fR, then only metadata is cached. The default value is \fBall\fR.
1091.RE
1092
1093.sp
1094.ne 2
058ac9ba 1095.na
d919da83 1096\fB\fBquota\fR=\fBnone\fR | \fIsize\fR\fR
058ac9ba
BB
1097.ad
1098.sp .6
1099.RS 4n
1100Limits the amount of space a dataset and its descendents can consume. This property enforces a hard limit on the amount of space used. This includes all space consumed by descendents, including file systems and snapshots. Setting a quota on a descendent of a dataset that already has a quota does not override the ancestor's quota, but rather imposes an additional limit.
1101.sp
1102Quotas cannot be set on volumes, as the \fBvolsize\fR property acts as an implicit quota.
1103.RE
1104
1105.sp
1106.ne 2
058ac9ba 1107.na
d919da83 1108\fB\fBsnapshot_limit\fR=\fBnone\fR\fR | \fIcount\fR
788eb90c
JJ
1109.ad
1110.sp .6
1111.RS 4n
1112Limits the number of snapshots that can be created on a dataset and its
1113descendents. Setting a snapshot_limit on a descendent of a dataset that already
1114has a snapshot_limit does not override the ancestor's snapshot_limit, but
1115rather imposes an additional limit. The limit is not enforced if the user is
1116allowed to change the limit. For example, this means that recursive snapshots
1117taken from the global zone are counted against each delegated dataset within
1118a zone. This feature must be enabled to be used (see \fBzpool-features\fR(5)).
1119.RE
1120
1121.sp
1122.ne 2
1123.na
d919da83 1124\fB\fBuserquota@\fR\fIuser\fR=\fBnone\fR | \fIsize\fR\fR
1de321e6
JX
1125.br
1126\fB\fBuserobjquota@\fR\fIuser\fR=\fBnone\fR | \fIcount\fR\fR
058ac9ba
BB
1127.ad
1128.sp .6
1129.RS 4n
8fd888ba 1130Limits the amount of space consumed by the specified user. Similar to the \fBrefquota\fR property, the \fBuserquota\fR space calculation does not include space that is used by descendent datasets, such as snapshots and clones. User space consumption is identified by the \fBuserspace@\fR\fIuser\fR property. See the \fBzfs userspace\fR subcommand for more information.
058ac9ba 1131.sp
8fd888ba 1132Enforcement of user quotas may be delayed by several seconds. This delay means that a user might exceed their quota before the system notices that they are over quota and begins to refuse additional writes with the \fBEDQUOT\fR error message.
058ac9ba
BB
1133.sp
1134Unprivileged users can only access their own groups' space usage. The root user, or a user who has been granted the \fBuserquota\fR privilege with \fBzfs allow\fR, can get and set everyone's quota.
1135.sp
1136This property is not available on volumes, on file systems before version 4, or on pools before version 15. The \fBuserquota@\fR... properties are not displayed by \fBzfs get all\fR. The user's name must be appended after the \fB@\fR symbol, using one of the following forms:
1137.RS +4
1138.TP
1139.ie t \(bu
1140.el o
1141\fIPOSIX name\fR (for example, \fBjoe\fR)
1142.RE
1143.RS +4
1144.TP
1145.ie t \(bu
1146.el o
1147\fIPOSIX numeric ID\fR (for example, \fB789\fR)
1148.RE
1149.RS +4
1150.TP
1151.ie t \(bu
1152.el o
1153\fISID name\fR (for example, \fBjoe.smith@mydomain\fR)
1154.RE
1155.RS +4
1156.TP
1157.ie t \(bu
1158.el o
1159\fISID numeric ID\fR (for example, \fBS-1-123-456-789\fR)
1160.RE
1161.RE
6a107f41 1162Files created on Linux always have POSIX owners.
058ac9ba 1163
1de321e6
JX
1164.RS 4
1165The \fBuserobjquota\fR is similar to \fBuserquota\fR but it limits the number of objects a \fIuser\fR can create.
1166Please refer to \fBuserobjused\fR for more information about how ZFS counts object usage.
1167.RE
1168
058ac9ba
BB
1169.sp
1170.ne 2
058ac9ba 1171.na
d919da83 1172\fB\fBgroupquota@\fR\fIgroup\fR=\fBnone\fR\fR | \fIsize\fR
1de321e6
JX
1173.br
1174\fB\fBgroupobjquota@\fR\fIgroup\fR=\fBnone\fR\fR | \fIcount\fR
058ac9ba
BB
1175.ad
1176.sp .6
1177.RS 4n
1178Limits the amount of space consumed by the specified group. Group space consumption is identified by the \fBuserquota@\fR\fIuser\fR property.
1179.sp
1180Unprivileged users can access only their own groups' space usage. The root user, or a user who has been granted the \fBgroupquota\fR privilege with \fBzfs allow\fR, can get and set all groups' quotas.
1de321e6
JX
1181
1182The \fBgroupobjquota\fR is similar to \fBgroupquota\fR but it limits that the \fIgroup\fR can consume \fIcount\fR number of objects at most.
1183Please refer to \fBuserobjused\fR for more information about how zfs counts object usage.
058ac9ba
BB
1184.RE
1185
1186.sp
1187.ne 2
058ac9ba 1188.na
d919da83 1189\fB\fBreadonly\fR=\fBoff\fR | \fBon\fR\fR
058ac9ba
BB
1190.ad
1191.sp .6
1192.RS 4n
1193Controls whether this dataset can be modified. The default value is \fBoff\fR.
1194.sp
1195This property can also be referred to by its shortened column name, \fBrdonly\fR.
a5eb2d87
RL
1196.sp
1197The values \fBon\fR and \fBoff\fR are equivalent to the \fBro\fR and \fBrw\fR mount options.
058ac9ba
BB
1198.RE
1199
1200.sp
1201.ne 2
058ac9ba
BB
1202.na
1203\fB\fBrecordsize\fR=\fIsize\fR\fR
1204.ad
1205.sp .6
1206.RS 4n
6b4e21c6 1207Specifies a suggested block size for files in the file system. This property is designed solely for use with database workloads that access files in fixed-size records. \fBZFS\fR automatically tunes block sizes according to internal algorithms optimized for typical access patterns.
058ac9ba
BB
1208.sp
1209For databases that create very large files but access them in small random chunks, these algorithms may be suboptimal. Specifying a \fBrecordsize\fR greater than or equal to the record size of the database can result in significant performance gains. Use of this property for general purpose file systems is strongly discouraged, and may adversely affect performance.
1210.sp
7e0754c6 1211Any power of two from 512B to 1MiB is valid. The default is 128KiB. Values larger than 128KiB require the pool have the \fBlarge_blocks\fR feature enabled. See \fBzpool-features\fR(5) for details on ZFS feature flags and the \fBlarge_blocks\fR feature.
058ac9ba
BB
1212.sp
1213Changing the file system's \fBrecordsize\fR affects only files created afterward; existing files are unaffected.
1214.sp
1215This property can also be referred to by its shortened column name, \fBrecsize\fR.
1216.RE
1217
1218.sp
1219.ne 2
058ac9ba 1220.na
faf0f58c
MA
1221\fB\fBredundant_metadata\fR=\fBall\fR | \fBmost\fR\fR
1222.ad
1223.sp .6
1224.RS 4n
1225Controls what types of metadata are stored redundantly. ZFS stores an
1226extra copy of metadata, so that if a single block is corrupted, the
1227amount of user data lost is limited. This extra copy is in addition to
1228any redundancy provided at the pool level (e.g. by mirroring or RAID-Z),
1229and is in addition to an extra copy specified by the \fBcopies\fR
1230property (up to a total of 3 copies). For example if the pool is
1231mirrored, \fBcopies\fR=2, and \fBredundant_metadata\fR=most, then ZFS
1232stores 6 copies of most metadata, and 4 copies of data and some
1233metadata.
1234.sp
1235When set to \fBall\fR, ZFS stores an extra copy of all metadata. If a
1236single on-disk block is corrupt, at worst a single block of user data
1237(which is \fBrecordsize\fR bytes long) can be lost.
1238.sp
1239When set to \fBmost\fR, ZFS stores an extra copy of most types of
1240metadata. This can improve performance of random writes, because less
1241metadata must be written. In practice, at worst about 100 blocks (of
1242\fBrecordsize\fR bytes each) of user data can be lost if a single
1243on-disk block is corrupt. The exact behavior of which metadata blocks
1244are stored redundantly may change in future releases.
1245.sp
1246The default value is \fBall\fR.
1247.RE
1248
1249.sp
1250.ne 2
1251.na
d919da83 1252\fB\fBrefquota\fR=\fBnone\fR | \fIsize\fR\fR
058ac9ba
BB
1253.ad
1254.sp .6
1255.RS 4n
1256Limits the amount of space a dataset can consume. This property enforces a hard limit on the amount of space used. This hard limit does not include space used by descendents, including file systems and snapshots.
1257.RE
1258
1259.sp
1260.ne 2
058ac9ba 1261.na
d919da83 1262\fB\fBrefreservation\fR=\fBnone\fR | \fIsize\fR\fR
058ac9ba
BB
1263.ad
1264.sp .6
1265.RS 4n
1266The minimum amount of space guaranteed to a dataset, not including its descendents. When the amount of space used is below this value, the dataset is treated as if it were taking up the amount of space specified by \fBrefreservation\fR. The \fBrefreservation\fR reservation is accounted for in the parent datasets' space used, and counts against the parent datasets' quotas and reservations.
1267.sp
8fd888ba
RL
1268If \fBrefreservation\fR is set, a snapshot is only allowed if there is enough free pool space outside of this reservation to accommodate the current number of \fBreferenced\fR bytes in the dataset (which are the bytes to be referenced by the snapshot). This is necessary to continue to provide the \fBrefreservation\fRguarantee to the dataset.
1269.sp
1270For volumes, see also \fBvolsize\fR.
058ac9ba
BB
1271.sp
1272This property can also be referred to by its shortened column name, \fBrefreserv\fR.
1273.RE
1274
6d111134
TC
1275.sp
1276.ne 2
6d111134 1277.na
d919da83 1278\fB\fBrelatime\fR=\fBoff\fR | \fBon\fR\fR
6d111134
TC
1279.ad
1280.sp .6
1281.RS 4n
1282Controls the manner in which the access time is updated when \fBatime=on\fR is set. Turning this property \fBon\fR causes the access time to be updated relative to the modify or change time. Access time is only updated if the previous access time was earlier than the current modify or change time or if the existing access time hasn't been updated within the past 24 hours. The default value is \fBoff\fR.
a5eb2d87
RL
1283.sp
1284The values \fBon\fR and \fBoff\fR are equivalent to the \fBrelatime\fR and \fBnorelatime\fR mount options.
6d111134
TC
1285.RE
1286
058ac9ba
BB
1287.sp
1288.ne 2
058ac9ba 1289.na
d919da83 1290\fB\fBreservation\fR=\fBnone\fR | \fIsize\fR\fR
058ac9ba
BB
1291.ad
1292.sp .6
1293.RS 4n
1294The minimum amount of space guaranteed to a dataset and its descendents. When the amount of space used is below this value, the dataset is treated as if it were taking up the amount of space specified by its reservation. Reservations are accounted for in the parent datasets' space used, and count against the parent datasets' quotas and reservations.
1295.sp
1296This property can also be referred to by its shortened column name, \fBreserv\fR.
1297.RE
1298
1299.sp
1300.ne 2
058ac9ba
BB
1301.na
1302\fB\fBsecondarycache\fR=\fBall\fR | \fBnone\fR | \fBmetadata\fR\fR
1303.ad
1304.sp .6
1305.RS 4n
1306Controls what is cached in the secondary cache (L2ARC). If this property is set to \fBall\fR, then both user data and metadata is cached. If this property is set to \fBnone\fR, then neither user data nor metadata is cached. If this property is set to \fBmetadata\fR, then only metadata is cached. The default value is \fBall\fR.
1307.RE
1308
1309.sp
1310.ne 2
058ac9ba
BB
1311.na
1312\fB\fBsetuid\fR=\fBon\fR | \fBoff\fR\fR
1313.ad
1314.sp .6
1315.RS 4n
a5eb2d87
RL
1316Controls whether the setuid bit is respected for the file system. The default value is \fBon\fR.
1317.sp
1318The values \fBon\fR and \fBoff\fR are equivalent to the \fBsuid\fR and \fBnosuid\fR mount options.
058ac9ba
BB
1319.RE
1320
058ac9ba
BB
1321.sp
1322.ne 2
058ac9ba 1323.na
d919da83 1324\fB\fBsharesmb\fR=\fBoff\fR | \fBon\fR
058ac9ba
BB
1325.ad
1326.sp .6
1327.RS 4n
645fb9cc 1328Controls whether the file system is shared by using \fBSamba USERSHARES\fR, and what options are to be used. Otherwise, the file system is automatically shared and unshared with the \fBzfs share\fR and \fBzfs unshare\fR commands. If the property is set to \fBon\fR, the \fBnet\fR(8) command is invoked to create a \fBUSERSHARE\fR.
058ac9ba 1329.sp
8c5edae9 1330Because \fBSMB\fR shares requires a resource name, a unique resource name is constructed from the dataset name. The constructed name is a copy of the dataset name except that the characters in the dataset name, which would be invalid in the resource name, are replaced with underscore (\fB_\fR) characters. Linux does not currently support additional options which might be available on Solaris.
058ac9ba 1331.sp
645fb9cc 1332If the \fBsharesmb\fR property is set to \fBoff\fR, the file systems are unshared.
058ac9ba 1333.sp
9bb3e153 1334In Linux, the share is created with the ACL (Access Control List) "Everyone:F" ("F" stands for "full permissions", ie. read and write permissions) and no guest access (which means Samba must be able to authenticate a real user, system passwd/shadow, LDAP or smbpasswd based) by default. This means that any additional access control (disallow specific user specific access etc) must be done on the underlaying filesystem.
4a5b1218
TF
1335.sp
1336.in +2
1337Example to mount a SMB filesystem shared through ZFS (share/tmp):
4a5b1218
TF
1338Note that a user and his/her password \fBmust\fR be given!
1339.sp
1340.in +2
1341smbmount //127.0.0.1/share_tmp /mnt/tmp -o user=workgroup/turbo,password=obrut,uid=1000
1342.in -2
1343.in -2
645fb9cc
TF
1344.sp
1345.ne 2
645fb9cc
TF
1346.na
1347\fBMinimal /etc/samba/smb.conf configuration\fR
1348.sp
1349.in +2
9bb3e153 1350* Samba will need to listen to 'localhost' (127.0.0.1) for the zfs utilities to communicate with Samba. This is the default behavior for most Linux distributions.
645fb9cc 1351.sp
4a5b1218
TF
1352* Samba must be able to authenticate a user. This can be done in a number of ways, depending on if using the system password file, LDAP or the Samba specific smbpasswd file. How to do this is outside the scope of this manual. Please refer to the smb.conf(5) manpage for more information.
1353.sp
1354* See the \fBUSERSHARE\fR section of the \fBsmb.conf\fR(5) man page for all configuration options in case you need to modify any options to the share afterwards. Do note that any changes done with the 'net' command will be undone if the share is every unshared (such as at a reboot etc). In the future, ZoL will be able to set specific options directly using sharesmb=<option>.
645fb9cc
TF
1355.sp
1356.in -2
058ac9ba
BB
1357.RE
1358
1359.sp
1360.ne 2
058ac9ba 1361.na
d919da83 1362\fB\fBsharenfs\fR=\fBoff\fR | \fBon\fR | \fIopts\fR\fR
058ac9ba
BB
1363.ad
1364.sp .6
1365.RS 4n
beb4be77
TF
1366Controls whether the file system is shared via \fBNFS\fR, and what options are used. A file system with a \fBsharenfs\fR property of \fBoff\fR is managed with the \fBexportfs\fR(8) command and entries in \fB/etc/exports\fR file. Otherwise, the file system is automatically shared and unshared with the \fBzfs share\fR and \fBzfs unshare\fR commands. If the property is set to \fBon\fR, the dataset is shared using the \fBexportfs\fR(8) command in the following manner (see \fBexportfs\fR(8) for the meaning of the different options):
1367.sp
1368.in +4
1369.nf
9b77d1c9 1370/usr/sbin/exportfs -i -o sec=sys,rw,crossmnt,no_subtree_check,no_root_squash,mountpoint *:<mountpoint of dataset>
beb4be77
TF
1371.fi
1372.in -4
1373.sp
1374Otherwise, the \fBexportfs\fR(8) command is invoked with options equivalent to the contents of this property.
058ac9ba
BB
1375.sp
1376When the \fBsharenfs\fR property is changed for a dataset, the dataset and any children inheriting the property are re-shared with the new options, only if the property was previously \fBoff\fR, or if they were shared before the property was changed. If the new property is \fBoff\fR, the file systems are unshared.
1377.RE
1378
1379.sp
1380.ne 2
058ac9ba 1381.na
9bb3e153 1382\fB\fBlogbias\fR=\fBlatency\fR | \fBthroughput\fR\fR
058ac9ba
BB
1383.ad
1384.sp .6
1385.RS 4n
1386Provide a hint to ZFS about handling of synchronous requests in this dataset. If \fBlogbias\fR is set to \fBlatency\fR (the default), ZFS will use pool log devices (if configured) to handle the requests at low latency. If \fBlogbias\fR is set to \fBthroughput\fR, ZFS will not use configured pool log devices. ZFS will instead optimize synchronous operations for global pool throughput and efficient use of resources.
1387.RE
1388
0b4d1b58
ED
1389.sp
1390.ne 2
0b4d1b58
ED
1391.na
1392\fB\fBsnapdev\fR=\fBhidden\fR | \fBvisible\fR\fR
1393.ad
1394.sp .6
1395.RS 4n
1396Controls whether the snapshots devices of zvol's are hidden or visible. The default value is \fBhidden\fR.
8fd888ba
RL
1397.sp
1398In this context, hidden does not refer to the concept of hiding files or directories by starting their name with a "." character. Even with \fBvisible\fR, the directory is still named \fB\&.zfs\fR. Instead, \fBhidden\fR means that the directory is not returned by \fBreaddir\fR(3), so it doesn't show up in directory listings done by any program, including \fBls\fR \fB-a\fR. It is still possible to chdir(2) into the directory, so \fBcd\fR \fB\&.zfs\fR works even with \fBhidden\fR. This unusual behavior is to protect against unwanted effects from applications recursing into the special \fB\&.zfs\fR directory.
0b4d1b58
ED
1399.RE
1400
058ac9ba
BB
1401.sp
1402.ne 2
058ac9ba
BB
1403.na
1404\fB\fBsnapdir\fR=\fBhidden\fR | \fBvisible\fR\fR
1405.ad
1406.sp .6
1407.RS 4n
1408Controls whether the \fB\&.zfs\fR directory is hidden or visible in the root of the file system as discussed in the "Snapshots" section. The default value is \fBhidden\fR.
1409.RE
1410
1411.sp
1412.ne 2
058ac9ba 1413.na
e0fd2787 1414\fB\fBsync\fR=\fBstandard\fR | \fBalways\fR | \fBdisabled\fR\fR
330d06f9
MA
1415.ad
1416.sp .6
1417.RS 4n
1418Controls the behavior of synchronous requests (e.g. fsync, O_DSYNC).
e0fd2787 1419\fBstandard\fR is the POSIX specified behavior of ensuring all synchronous
330d06f9
MA
1420requests are written to stable storage and all devices are flushed to ensure
1421data is not cached by device controllers (this is the default). \fBalways\fR
1422causes every file system transaction to be written and flushed before its
1423system call returns. This has a large performance penalty. \fBdisabled\fR
1424disables synchronous requests. File system transactions are only committed to
1425stable storage periodically. This option will give the highest performance.
1426However, it is very dangerous as ZFS would be ignoring the synchronous
1427transaction demands of applications such as databases or NFS. Administrators
1428should only use this option when the risks are understood.
1429.RE
1430
1431.sp
1432.ne 2
1433.na
d919da83 1434\fB\fBversion\fR=\fB5\fR | \fB4\fR | \fB3\fR | \fB2\fR | \fB1\fR | \fBcurrent\fR\fR
058ac9ba
BB
1435.ad
1436.sp .6
1437.RS 4n
8fd888ba 1438The on-disk version of this file system, which is independent of the pool version. This property can only be set to later supported versions. The value \fBcurrent\fR automatically selects the latest supported version. See the \fBzfs upgrade\fR command.
058ac9ba
BB
1439.RE
1440
1441.sp
1442.ne 2
058ac9ba
BB
1443.na
1444\fB\fBvolsize\fR=\fIsize\fR\fR
1445.ad
1446.sp .6
1447.RS 4n
8fd888ba 1448For volumes, specifies the logical size of the volume. By default, creating a volume establishes a \fBrefreservation\fR equal to the volume size plus the metadata required for a fully-written volume. (For pool version 8 or lower, a \fBreservation\fR is set instead.) Any changes to \fBvolsize\fR are reflected in an equivalent change to the \fBrefreservation\fR. The \fBvolsize\fR can only be set to a multiple of \fBvolblocksize\fR, and cannot be zero.
058ac9ba 1449.sp
8fd888ba 1450Without the reservation, the volume could run out of space, resulting in undefined behavior or data corruption, depending on how the volume is used. These effects can also occur when the volume size is changed while it is in use (particularly when shrinking the size). Extreme care should be used when adjusting the volume size.
058ac9ba 1451.sp
8fd888ba 1452A "sparse volume" (also known as "thin provisioning") can be created by specifying the \fB-s\fR option to the \fBzfs create -V\fR command, or by removing (or changing) the \fBrefreservation\fR after the volume has been created. A "sparse volume" is a volume where the \fBrefreservation\fR is unset or less then the volume size. Consequently, writes to a sparse volume can fail with \fBENOSPC\fR when the pool is low on space. For a sparse volume, changes to \fBvolsize\fR are not reflected in the reservation.
058ac9ba
BB
1453.RE
1454
1455.sp
1456.ne 2
058ac9ba 1457.na
d919da83 1458\fB\fBvscan\fR=\fBoff\fR | \fBon\fR\fR
058ac9ba
BB
1459.ad
1460.sp .6
1461.RS 4n
1462Controls whether regular files should be scanned for viruses when a file is opened and closed. In addition to enabling this property, the virus scan service must also be enabled for virus scanning to occur. The default value is \fBoff\fR.
6a107f41
RL
1463.sp
1464This property is not used on Linux.
058ac9ba
BB
1465.RE
1466
1467.sp
1468.ne 2
058ac9ba 1469.na
7c2448a3 1470\fB\fBxattr\fR=\fBon\fR | \fBoff\fR | \fBsa\fR\fR
058ac9ba
BB
1471.ad
1472.sp .6
1473.RS 4n
7c2448a3
BB
1474Controls whether extended attributes are enabled for this file system. Two
1475styles of extended attributes are supported either directory based or system
1476attribute based.
1477.sp
1478The default value of \fBon\fR enables directory based extended attributes.
1479This style of xattr imposes no practical limit on either the size or number of
1480xattrs which may be set on a file. Although under Linux the \fBgetxattr\fR(2)
1481and \fBsetxattr\fR(2) system calls limit the maximum xattr size to 64K. This
1482is the most compatible style of xattr and it is supported by the majority of
1483ZFS implementations.
1484.sp
1485System attribute based xattrs may be enabled by setting the value to \fBsa\fR.
1486The key advantage of this type of xattr is improved performance. Storing
1487xattrs as system attributes significantly decreases the amount of disk IO
1488required. Up to 64K of xattr data may be stored per file in the space reserved
1489for system attributes. If there is not enough space available for an xattr then
1490it will be automatically written as a directory based xattr. System attribute
8f343973 1491based xattrs are not accessible on platforms which do not support the
7c2448a3
BB
1492\fBxattr=sa\fR feature.
1493.sp
1494The use of system attribute based xattrs is strongly encouraged for users of
1495SELinux or Posix ACLs. Both of these features heavily rely of xattrs and
1496benefit significantly from the reduced xattr access time.
a5eb2d87
RL
1497.sp
1498The values \fBon\fR and \fBoff\fR are equivalent to the \fBxattr\fR and \fBnoxattr\fR mount options.
058ac9ba
BB
1499.RE
1500
1501.sp
1502.ne 2
058ac9ba 1503.na
d919da83 1504\fB\fBzoned\fR=\fBoff\fR | \fBon\fR\fR
058ac9ba
BB
1505.ad
1506.sp .6
1507.RS 4n
4da4a9e1 1508Controls whether the dataset is managed from a non-global zone. Zones are a Solaris feature and are not relevant on Linux. The default value is \fBoff\fR.
058ac9ba
BB
1509.RE
1510
1511.sp
1512.LP
1513The 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.
1514.sp
1515.ne 2
058ac9ba
BB
1516.na
1517\fB\fBcasesensitivity\fR=\fBsensitive\fR | \fBinsensitive\fR | \fBmixed\fR\fR
1518.ad
1519.sp .6
1520.RS 4n
1521Indicates whether the file name matching algorithm used by the file system should be case-sensitive, case-insensitive, or allow a combination of both styles of matching. The default value for the \fBcasesensitivity\fR property is \fBsensitive\fR. Traditionally, UNIX and POSIX file systems have case-sensitive file names.
1522.sp
cab1aa29 1523The \fBmixed\fR value for the \fBcasesensitivity\fR property indicates that the file system can support requests for both case-sensitive and case-insensitive matching behavior. Currently, case-insensitive matching behavior on a file system that supports mixed behavior is limited to the Solaris CIFS server product.
058ac9ba
BB
1524.RE
1525
1526.sp
1527.ne 2
058ac9ba
BB
1528.na
1529\fB\fBnormalization\fR = \fBnone\fR | \fBformC\fR | \fBformD\fR | \fBformKC\fR | \fBformKD\fR\fR
1530.ad
1531.sp .6
1532.RS 4n
8fd888ba
RL
1533Indicates whether the file system should perform a Unicode normalization of file names whenever two file names are compared, and which normalization algorithm should be used.
1534.sp
1535If this property is set to a value other than \fBnone\fR (the default), and the \fButf8only\fR property was left unspecified, the \fButf8only\fR property is automatically set to \fBon\fR. See the cautionary note in the \fButf8only\fR section before modifying \fBnormalization\fR.
1536.sp
1537File names are always stored unmodified; names are normalized as part of any comparison process. Thus, \fBformC\fR and \fBformD\fR are equivalent, as are \fBformKC\fR and \fBformKD\fR. Given that, only \fBformD\fR and \fBformKD\fR make sense, as they are slightly faster because they avoid the additional canonical composition step.
1538.\" unicode.org says it's possible to quickly detect if a string is already in a given form. Since most text (basically everything but OS X) is already in NFC, this means formC could potentially be made faster. But the additional complexity probably isn't worth the likely undetectable in practice speed improvement.
1539.sp
1540The practical impact of this property is: \fBnone\fR (like traditional filesystems) allows a directory to contain two files that appear (to humans) to have the same name. The other options solve this problem, for different definitions of "the same". If you need to solve this problem and are not sure what to choose,\fBformD\fR.
1541.sp
1542This property cannot be changed after the file system is created.
058ac9ba
BB
1543.RE
1544
1545.sp
1546.ne 2
058ac9ba 1547.na
d919da83 1548\fB\fButf8only\fR=\fBoff\fR | \fBon\fR\fR
058ac9ba
BB
1549.ad
1550.sp .6
1551.RS 4n
8fd888ba
RL
1552Indicates whether the file system should reject file names that include characters that are not present in the \fBUTF-8\fR character set. If this property is explicitly set to \fBoff\fR, the \fBnormalization\fR property must either not be explicitly set or be set to \fBnone\fR. The default value for the \fButf8only\fR property is \fBoff\fR.
1553.sp
1554Note that forcing the use of \fBUTF-8\fR filenames may cause pain for users. For example, extracting files from an archive will fail if the filenames within the archive are encoded in another character set.
1555.sp
1556If you are thinking of setting this (to \fBon\fR), you probably want to set \fBnormalization\fR=\fBformD\fR which will set this property to \fBon\fR implicitly.
1557.sp
1558This property cannot be changed after the file system is created.
058ac9ba
BB
1559.RE
1560
1561.sp
1562.LP
8fd888ba 1563The \fBcasesensitivity\fR, \fBnormalization\fR, and \fButf8only\fR properties are also permissions that can be assigned to non-privileged users by using the \fBZFS\fR delegated administration feature.
11b9ec23
MT
1564.RE
1565
1566.sp
1567.ne 2
11b9ec23 1568.na
d919da83 1569\fB\fBcontext\fR=\fBnone\fR | \fISELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level\fR\fR
11b9ec23
MT
1570.ad
1571.sp .6
1572.RS 4n
32a6c3d7 1573This flag sets the SELinux context for all files in the filesystem under the mountpoint for that filesystem. See \fBselinux\fR(8) for more information.
11b9ec23
MT
1574.RE
1575
1576.sp
1577.ne 2
11b9ec23 1578.na
d919da83 1579\fB\fBfscontext\fR=\fBnone\fR | \fISELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level\fR\fR
11b9ec23
MT
1580.ad
1581.sp .6
1582.RS 4n
32a6c3d7 1583This flag sets the SELinux context for the filesystem being mounted. See \fBselinux\fR(8) for more information.
11b9ec23
MT
1584.RE
1585
1586.sp
1587.ne 2
11b9ec23 1588.na
32a6c3d7 1589\fB\fBdefcontext\fR=\fBnone\fR | \fISELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level\fR\fR
11b9ec23
MT
1590.ad
1591.sp .6
1592.RS 4n
1593This flag sets the SELinux context for unlabeled files. See \fBselinux\fR(8) for more information.
1594.RE
1595
1596.sp
1597.ne 2
11b9ec23 1598.na
d919da83 1599\fB\fBrootcontext\fR=\fBnone\fR | \fISELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level\fR\fR
11b9ec23
MT
1600.ad
1601.sp .6
1602.RS 4n
1603This flag sets the SELinux context for the root inode of the filesystem. See \fBselinux\fR(8) for more information.
1604.RE
1605
f67d7090
TF
1606.sp
1607.ne 2
f67d7090 1608.na
d919da83 1609\fB\fBoverlay\fR=\fBoff\fR | \fBon\fR\fR
f67d7090
TF
1610.ad
1611.sp .6
1612.RS 4n
1613Allow mounting on a busy directory or a directory which already contains files/directories. This is the default mount behavior for Linux filesystems. However, for consistency with ZFS on other platforms overlay mounts are disabled by default. Set \fBoverlay=on\fR to enable overlay mounts.
1614.RE
1615
058ac9ba 1616.SS "Temporary Mount Point Properties"
058ac9ba 1617.LP
2d1b7b0b 1618When a file system is mounted, either through \fBmount\fR(8) for legacy mounts or the \fBzfs mount\fR command for normal file systems, its mount options are set according to its properties. The correlation between properties and mount options is as follows:
058ac9ba
BB
1619.sp
1620.in +2
1621.nf
1622 PROPERTY MOUNT OPTION
a5eb2d87
RL
1623 atime atime/noatime
1624 canmount auto/noauto
058ac9ba
BB
1625 devices devices/nodevices
1626 exec exec/noexec
1627 readonly ro/rw
0282c413 1628 relatime relatime/norelatime
a5eb2d87
RL
1629 setuid suid/nosuid
1630 xattr xattr/noxattr
1631 nbmand nbmand/nonbmand (Solaris)
058ac9ba
BB
1632.fi
1633.in -2
1634.sp
1635
1636.sp
1637.LP
1638In addition, these options can be set on a per-mount basis using the \fB-o\fR option, without affecting the property that is stored on disk. The values specified on the command line override the values stored in the dataset. The \fB-nosuid\fR option is an alias for \fBnodevices,nosetuid\fR. These properties are reported as "temporary" by the \fBzfs get\fR command. If the properties are changed while the dataset is mounted, the new setting overrides any temporary settings.
1639.SS "User Properties"
058ac9ba 1640.LP
879dbef0 1641In addition to the standard native properties, \fBZFS\fR supports arbitrary user properties. User properties have no effect on \fBZFS\fR behavior, but applications or administrators can use them to annotate datasets (file systems, volumes, and snapshots). Unlike native properties, user properties are editable on snapshots.
058ac9ba
BB
1642.sp
1643.LP
1644User property names must contain a colon (\fB:\fR) character to distinguish them from native properties. They may contain lowercase letters, numbers, and the following punctuation characters: colon (\fB:\fR), dash (\fB-\fR), period (\fB\&.\fR), and underscore (\fB_\fR). The expected convention is that the property name is divided into two portions such as \fImodule\fR\fB:\fR\fIproperty\fR, but this namespace is not enforced by \fBZFS\fR. User property names can be at most 256 characters, and cannot begin with a dash (\fB-\fR).
1645.sp
1646.LP
879dbef0 1647When making programmatic use of user properties, it is strongly suggested to use a reversed \fBDNS\fR domain name for the \fImodule\fR component of property names to reduce the chance that two independently-developed packages use the same property name for different purposes. For example, property names beginning with \fBcom.sun\fR. are reserved for definition by Oracle Corporation (which acquired Sun Microsystems).
058ac9ba
BB
1648.sp
1649.LP
a0aacd37 1650The values of user properties are arbitrary strings, are always inherited, and are never validated. All of the commands that operate on properties (\fBzfs list\fR, \fBzfs get\fR, \fBzfs set\fR, and so forth) can be used to manipulate both native properties and user properties. Use the \fBzfs inherit\fR command to clear a user property. If the property is not defined in any parent dataset, it is removed entirely. Property values are limited to 8192 bytes.
4da4a9e1 1651.SS "ZFS Volumes as Swap"
058ac9ba 1652.LP
52768784
BB
1653\fBZFS\fR volumes may be used as Linux swap devices. After creating the volume
1654with the \fBzfs create\fR command set up and enable the swap area using the
1655\fBmkswap\fR(8) and \fBswapon\fR(8) commands. Do not swap to a file on a
1656\fBZFS\fR file system. A \fBZFS\fR swap file configuration is not supported.
058ac9ba 1657.SH SUBCOMMANDS
058ac9ba 1658.LP
8fd888ba 1659All subcommands that modify state are logged persistently to the pool in their original form. The log can be viewed with \fBzpool history\fR.
058ac9ba
BB
1660.sp
1661.ne 2
058ac9ba
BB
1662.na
1663\fB\fBzfs ?\fR\fR
1664.ad
1665.sp .6
1666.RS 4n
1667Displays a help message.
1668.RE
1669
1670.sp
1671.ne 2
058ac9ba
BB
1672.na
1673\fB\fBzfs create\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem\fR\fR
1674.ad
1675.sp .6
1676.RS 4n
8fd888ba 1677Creates a new \fBZFS\fR file system. The file system is automatically mounted according to the \fBmountpoint\fR and \fBcanmount\fR properties.
058ac9ba
BB
1678.sp
1679.ne 2
058ac9ba
BB
1680.na
1681\fB\fB-p\fR\fR
1682.ad
1683.sp .6
1684.RS 4n
8fd888ba 1685Creates all the non-existing parent datasets. Datasets created in this manner inherit their properties; any property specified on the command line using the \fB-o\fR option applies only to the final child file system. If the target filesystem already exists, the operation completes successfully and no properties are changed.
058ac9ba
BB
1686.RE
1687
1688.sp
1689.ne 2
058ac9ba
BB
1690.na
1691\fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1692.ad
1693.sp .6
1694.RS 4n
1695Sets the specified property as if the command \fBzfs set\fR \fIproperty\fR=\fIvalue\fR was invoked at the same time the dataset was created. Any editable \fBZFS\fR property can also be set at creation time. Multiple \fB-o\fR options can be specified. An error results if the same property is specified in multiple \fB-o\fR options.
1696.RE
1697
1698.RE
1699
1700.sp
1701.ne 2
058ac9ba
BB
1702.na
1703\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
1704.ad
1705.sp .6
1706.RS 4n
8fd888ba 1707Creates a volume of the given size. The volume is exported as a block device in \fB/dev/zvol/\fR\fIpath\fR, where \fIpath\fR is the name of the volume in the \fBZFS\fR namespace. The size represents the logical size as exported by the device. By default, a \fBrefreservation\fR is created.
058ac9ba 1708.sp
7e0754c6 1709\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.
058ac9ba
BB
1710.sp
1711.ne 2
058ac9ba
BB
1712.na
1713\fB\fB-p\fR\fR
1714.ad
1715.sp .6
1716.RS 4n
8fd888ba 1717Creates all the non-existing parent datasets as file systems. Datasets created in this manner inherit their properties; any property specified on the command line using the \fB-o\fR option applies only to the final child volume. If the target volume already exists, the operation completes successfully and no properties are changed.
058ac9ba
BB
1718.RE
1719
1720.sp
1721.ne 2
058ac9ba
BB
1722.na
1723\fB\fB-s\fR\fR
1724.ad
1725.sp .6
1726.RS 4n
8fd888ba 1727Creates a sparse volume by omitting the automatic creation of a \fBrefreservation\fR. See \fBvolsize\fR in the Native Properties section for more information about sparse volumes. If this option is specified in conjunction with \fB-o\fR \fBrefreservation\fR, the \fBrefreservation\fR will be honored; this allows for a partial reservation on a sparse volume.
058ac9ba
BB
1728.RE
1729
1730.sp
1731.ne 2
058ac9ba
BB
1732.na
1733\fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1734.ad
1735.sp .6
1736.RS 4n
1737Sets the specified property as if the \fBzfs set\fR \fIproperty\fR=\fIvalue\fR command was invoked at the same time the dataset was created. Any editable \fBZFS\fR property can also be set at creation time. Multiple \fB-o\fR options can be specified. An error results if the same property is specified in multiple \fB-o\fR options.
8fd888ba
RL
1738.sp
1739If \fB-o\fR \fBvolsize\fR is provided, the resulting behavior is undefined; it conflicts with the -V option, which is required in this mode.
058ac9ba
BB
1740.RE
1741
1742.sp
1743.ne 2
058ac9ba
BB
1744.na
1745\fB\fB-b\fR \fIblocksize\fR\fR
1746.ad
1747.sp .6
1748.RS 4n
1749Equivalent to \fB-o\fR \fBvolblocksize\fR=\fIblocksize\fR. If this option is specified in conjunction with \fB-o\fR \fBvolblocksize\fR, the resulting behavior is undefined.
1750.RE
1751
1752.RE
1753
1754.sp
1755.ne 2
058ac9ba 1756.na
330d06f9 1757\fBzfs destroy\fR [\fB-fnpRrv\fR] \fIfilesystem\fR|\fIvolume\fR
058ac9ba
BB
1758.ad
1759.sp .6
1760.RS 4n
1761Destroys 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).
1762.sp
1763.ne 2
058ac9ba
BB
1764.na
1765\fB\fB-r\fR\fR
1766.ad
1767.sp .6
1768.RS 4n
1769Recursively destroy all children.
1770.RE
1771
1772.sp
1773.ne 2
058ac9ba
BB
1774.na
1775\fB\fB-R\fR\fR
1776.ad
1777.sp .6
1778.RS 4n
1779Recursively destroy all dependents, including cloned file systems outside the target hierarchy.
1780.RE
1781
1782.sp
1783.ne 2
058ac9ba
BB
1784.na
1785\fB\fB-f\fR\fR
1786.ad
1787.sp .6
1788.RS 4n
8fd888ba 1789Force an unmount of any file systems using the \fBzfs unmount -f\fR command. This option has no effect on non-file systems or unmounted file systems.
058ac9ba
BB
1790.RE
1791
330d06f9
MA
1792.sp
1793.ne 2
1794.na
1795\fB\fB-n\fR\fR
1796.ad
1797.sp .6
1798.RS 4n
1799Do a dry-run ("No-op") deletion. No data will be deleted. This is
1800useful in conjunction with the \fB-v\fR or \fB-p\fR flags to determine what
1801data would be deleted.
1802.RE
1803
1804.sp
1805.ne 2
1806.na
1807\fB\fB-p\fR\fR
1808.ad
1809.sp .6
1810.RS 4n
1811Print machine-parsable verbose information about the deleted data.
1812.RE
1813
1814.sp
1815.ne 2
1816.na
1817\fB\fB-v\fR\fR
1818.ad
1819.sp .6
1820.RS 4n
1821Print verbose information about the deleted data.
1822.RE
1823.sp
1824
8fd888ba 1825Extreme care should be taken when applying either the \fB-r\fR or the \fB-R\fR options, as they can destroy large portions of a pool.
058ac9ba
BB
1826.RE
1827
1828.sp
1829.ne 2
058ac9ba 1830.na
330d06f9 1831\fBzfs destroy\fR [\fB-dnpRrv\fR] \fIfilesystem\fR|\fIvolume\fR@\fIsnap\fR[%\fIsnap\fR][,...]
058ac9ba
BB
1832.ad
1833.sp .6
1834.RS 4n
8fd888ba 1835The specified snapshots are destroyed immediately if they have no clones and the user-initiated reference count is zero (i.e. there are no holds set with \fBzfs hold\fR). If these conditions are not met, this command returns an error, unless \fB-d\fR is supplied.
330d06f9
MA
1836.sp
1837An inclusive range of snapshots may be specified by separating the
1838first and last snapshots with a percent sign.
1839The first and/or last snapshots may be left blank, in which case the
1840filesystem's oldest or newest snapshot will be implied.
058ac9ba 1841.sp
330d06f9
MA
1842Multiple snapshots
1843(or ranges of snapshots) of the same filesystem or volume may be specified
1844in a comma-separated list of snapshots.
1845Only the snapshot's short name (the
1846part after the \fB@\fR) should be specified when using a range or
1847comma-separated list to identify multiple snapshots.
058ac9ba
BB
1848.sp
1849.ne 2
058ac9ba
BB
1850.na
1851\fB\fB-d\fR\fR
1852.ad
1853.sp .6
1854.RS 4n
c5ee7513 1855If a snapshot does not qualify for immediate destruction, rather than returning an error, it is marked for deferred destruction. In this state, it exists as a usable, visible snapshot until both of the preconditions listed above are met, at which point it is destroyed.
058ac9ba
BB
1856.RE
1857
1858.sp
1859.ne 2
058ac9ba
BB
1860.na
1861\fB\fB-r\fR\fR
1862.ad
1863.sp .6
1864.RS 4n
3b204150 1865Destroy (or mark for deferred destruction) all snapshots with this name in descendent file systems.
058ac9ba
BB
1866.RE
1867
1868.sp
1869.ne 2
058ac9ba
BB
1870.na
1871\fB\fB-R\fR\fR
1872.ad
1873.sp .6
1874.RS 4n
13fe0198
MA
1875Recursively destroy all clones of these snapshots, including the clones,
1876snapshots, and children. If this flag is specified, the \fB-d\fR flag will
1877have no effect.
058ac9ba
BB
1878.RE
1879
330d06f9
MA
1880.sp
1881.ne 2
1882.na
1883\fB\fB-n\fR\fR
1884.ad
1885.sp .6
1886.RS 4n
1887Do a dry-run ("No-op") deletion. No data will be deleted. This is
1888useful in conjunction with the \fB-v\fR or \fB-p\fR flags to determine what
1889data would be deleted.
1890.RE
1891
1892.sp
1893.ne 2
1894.na
1895\fB\fB-p\fR\fR
1896.ad
1897.sp .6
1898.RS 4n
1899Print machine-parsable verbose information about the deleted data.
1900.RE
1901
1902.sp
1903.ne 2
1904.na
1905\fB\fB-v\fR\fR
1906.ad
1907.sp .6
1908.RS 4n
1909Print verbose information about the deleted data.
1910.RE
1911
1912.sp
13fe0198 1913Extreme care should be taken when applying either the \fB-r\fR or the \fB-R\fR
330d06f9
MA
1914options, as they can destroy large portions of a pool and cause unexpected
1915behavior for mounted file systems in use.
1916.RE
1917
058ac9ba
BB
1918.RE
1919
1920.sp
1921.ne 2
058ac9ba 1922.na
da536844
MA
1923\fBzfs destroy\fR \fIfilesystem\fR|\fIvolume\fR#\fIbookmark\fR
1924.ad
1925.sp .6
1926.RS 4n
1927The given bookmark is destroyed.
1928
1929.RE
1930
1931.sp
1932.ne 2
1933.na
6f1ffb06 1934\fB\fBzfs snapshot\fR [\fB-r\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem@snapname\fR|\fIvolume@snapname\fR\fR ...
058ac9ba
BB
1935.ad
1936.sp .6
1937.RS 4n
6f1ffb06 1938Creates 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.
058ac9ba
BB
1939.sp
1940.ne 2
058ac9ba
BB
1941.na
1942\fB\fB-r\fR\fR
1943.ad
1944.sp .6
1945.RS 4n
6f1ffb06 1946Recursively create snapshots of all descendent datasets.
058ac9ba
BB
1947.RE
1948
1949.sp
1950.ne 2
058ac9ba
BB
1951.na
1952\fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1953.ad
1954.sp .6
1955.RS 4n
8fd888ba 1956Sets the specified property; see \fBzfs set\fR for details.
058ac9ba
BB
1957.RE
1958
1959.RE
1960
1961.sp
1962.ne 2
058ac9ba
BB
1963.na
1964\fB\fBzfs rollback\fR [\fB-rRf\fR] \fIsnapshot\fR\fR
1965.ad
1966.sp .6
1967.RS 4n
da536844 1968Roll back the given dataset to a previous snapshot. When a dataset is rolled back, all data that has changed since the snapshot is discarded, and the dataset reverts to the state at the time of the snapshot. By default, the command refuses to roll back to a snapshot other than the most recent one. In order to do so, all intermediate snapshots and bookmarks must be destroyed by specifying the \fB-r\fR option.
058ac9ba 1969.sp
da536844 1970The \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.
058ac9ba
BB
1971.sp
1972.ne 2
058ac9ba
BB
1973.na
1974\fB\fB-r\fR\fR
1975.ad
1976.sp .6
1977.RS 4n
da536844 1978Destroy any snapshots and bookmarks more recent than the one specified.
058ac9ba
BB
1979.RE
1980
1981.sp
1982.ne 2
058ac9ba
BB
1983.na
1984\fB\fB-R\fR\fR
1985.ad
1986.sp .6
1987.RS 4n
da536844 1988Recursively destroy any more recent snapshots and bookmarks, as well as any clones of those snapshots.
058ac9ba
BB
1989.RE
1990
1991.sp
1992.ne 2
058ac9ba
BB
1993.na
1994\fB\fB-f\fR\fR
1995.ad
1996.sp .6
1997.RS 4n
8fd888ba 1998Used with the \fB-R\fR option to force an unmount (see \fBzfs unmount -f\fR) of any clone file systems that are to be destroyed.
058ac9ba
BB
1999.RE
2000
2001.RE
2002
2003.sp
2004.ne 2
058ac9ba
BB
2005.na
2006\fB\fBzfs clone\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIsnapshot\fR \fIfilesystem\fR|\fIvolume\fR\fR
2007.ad
2008.sp .6
2009.RS 4n
2010Creates 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.
2011.sp
2012.ne 2
058ac9ba
BB
2013.na
2014\fB\fB-p\fR\fR
2015.ad
2016.sp .6
2017.RS 4n
8fd888ba 2018Creates all the non-existing parent datasets; see \fBzfs create\fR for details.
058ac9ba
BB
2019.RE
2020
2021.sp
2022.ne 2
058ac9ba
BB
2023.na
2024\fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
2025.ad
2026.sp .6
2027.RS 4n
8fd888ba 2028Sets the specified property; see \fBzfs set\fR for details.
058ac9ba
BB
2029.RE
2030
2031.RE
2032
2033.sp
2034.ne 2
058ac9ba
BB
2035.na
2036\fB\fBzfs promote\fR \fIclone-filesystem\fR\fR
2037.ad
2038.sp .6
2039.RS 4n
6b4e21c6 2040Promotes a clone file system to no longer be dependent on its "origin" snapshot. This makes it possible to destroy the file system that the clone was created from. The clone parent-child dependency relationship is reversed, so that the origin file system becomes a clone of the specified file system.
058ac9ba 2041.sp
8fd888ba 2042The snapshot that was cloned, and any snapshots previous to this snapshot, are now owned by the promoted clone. The space they use moves from the origin file system to the promoted clone, so enough space must be available to accommodate these snapshots. No new space is consumed by this operation, but the space accounting is adjusted. The promoted clone must not have any conflicting snapshot names of its own. The \fBzfs rename\fR command can be used to rename any conflicting snapshots.
058ac9ba
BB
2043.RE
2044
2045.sp
2046.ne 2
058ac9ba 2047.na
db49968e 2048\fB\fBzfs rename\fR [\fB-f\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
058ac9ba
BB
2049.ad
2050.br
2051.na
db49968e 2052\fB\fBzfs rename\fR [\fB-fp\fR] \fIfilesystem\fR|\fIvolume\fR \fIfilesystem\fR|\fIvolume\fR\fR
058ac9ba
BB
2053.ad
2054.sp .6
2055.RS 4n
2056Renames 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.
2057.sp
2058.ne 2
058ac9ba
BB
2059.na
2060\fB\fB-p\fR\fR
2061.ad
2062.sp .6
2063.RS 4n
8fd888ba 2064Creates all the nonexistent parent datasets; see \fBzfs create\fR for details.
058ac9ba
BB
2065.RE
2066
db49968e
ES
2067.sp
2068.ne 2
2069.na
2070\fB\fB-f\fR\fR
2071.ad
2072.sp .6
2073.RS 4n
2074Force unmount any filesystems that need to be unmounted in the process.
2075.RE
2076
058ac9ba
BB
2077.RE
2078
2079.sp
2080.ne 2
058ac9ba
BB
2081.na
2082\fB\fBzfs rename\fR \fB-r\fR \fIsnapshot\fR \fIsnapshot\fR\fR
2083.ad
2084.sp .6
2085.RS 4n
2086Recursively rename the snapshots of all descendent datasets. Snapshots are the only dataset that can be renamed recursively.
2087.RE
2088
2089.sp
2090.ne 2
058ac9ba 2091.na
76281da4 2092\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
058ac9ba
BB
2093.ad
2094.sp .6
2095.RS 4n
61a3d06f 2096Lists 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 starting with "./" (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
058ac9ba
BB
2097.sp
2098.ne 2
058ac9ba
BB
2099.na
2100\fB\fB-H\fR\fR
2101.ad
2102.sp .6
2103.RS 4n
2104Used for scripting mode. Do not print headers and separate fields by a single tab instead of arbitrary white space.
2105.RE
2106
54d5378f
YP
2107.sp
2108.ne 2
54d5378f
YP
2109.na
2110\fB\fB-p\fR\fR
2111.sp .6
2112.RS 4n
2113Display numbers in parsable (exact) values.
2114.RE
2115
058ac9ba
BB
2116.sp
2117.ne 2
058ac9ba
BB
2118.na
2119\fB\fB-r\fR\fR
2120.ad
2121.sp .6
2122.RS 4n
6b4e21c6 2123Recursively display any children of the dataset on the command line.
058ac9ba
BB
2124.RE
2125
2126.sp
2127.ne 2
058ac9ba
BB
2128.na
2129\fB\fB-d\fR \fIdepth\fR\fR
2130.ad
2131.sp .6
2132.RS 4n
2133Recursively display any children of the dataset, limiting the recursion to \fIdepth\fR. A depth of \fB1\fR will display only the dataset and its direct children.
2134.RE
2135
2136.sp
2137.ne 2
058ac9ba
BB
2138.na
2139\fB\fB-o\fR \fIproperty\fR\fR
2140.ad
2141.sp .6
2142.RS 4n
2143A comma-separated list of properties to display. The property must be:
2144.RS +4
2145.TP
2146.ie t \(bu
2147.el o
2148One of the properties described in the "Native Properties" section
2149.RE
2150.RS +4
2151.TP
2152.ie t \(bu
2153.el o
2154A user property
2155.RE
2156.RS +4
2157.TP
2158.ie t \(bu
2159.el o
2160The value \fBname\fR to display the dataset name
2161.RE
2162.RS +4
2163.TP
2164.ie t \(bu
2165.el o
2166The value \fBspace\fR to display space usage properties on file systems and volumes. This is a shortcut for specifying \fB-o name,avail,used,usedsnap,usedds,usedrefreserv,usedchild\fR \fB-t filesystem,volume\fR syntax.
2167.RE
2168.RE
2169
2170.sp
2171.ne 2
058ac9ba
BB
2172.na
2173\fB\fB-s\fR \fIproperty\fR\fR
2174.ad
2175.sp .6
2176.RS 4n
2177A property for sorting the output by column in ascending order based on the value of the property. The property must be one of the properties described in the "Properties" section, or the special value \fBname\fR to sort by the dataset name. Multiple properties can be specified at one time using multiple \fB-s\fR property options. Multiple \fB-s\fR options are evaluated from left to right in decreasing order of importance.
2178.sp
2179The following is a list of sorting criteria:
2180.RS +4
2181.TP
2182.ie t \(bu
2183.el o
2184Numeric types sort in numeric order.
2185.RE
2186.RS +4
2187.TP
2188.ie t \(bu
2189.el o
2190String types sort in alphabetical order.
2191.RE
2192.RS +4
2193.TP
2194.ie t \(bu
2195.el o
2196Types inappropriate for a row sort that row to the literal bottom, regardless of the specified ordering.
2197.RE
2198.RS +4
2199.TP
2200.ie t \(bu
2201.el o
2202If no sorting options are specified the existing behavior of \fBzfs list\fR is preserved.
2203.RE
2204.RE
2205
2206.sp
2207.ne 2
058ac9ba
BB
2208.na
2209\fB\fB-S\fR \fIproperty\fR\fR
2210.ad
2211.sp .6
2212.RS 4n
6b4e21c6 2213Same as the \fB-s\fR option, but sorts by property in descending order.
058ac9ba
BB
2214.RE
2215
2216.sp
2217.ne 2
058ac9ba
BB
2218.na
2219\fB\fB-t\fR \fItype\fR\fR
2220.ad
2221.sp .6
2222.RS 4n
da536844 2223A comma-separated list of types to display, where \fItype\fR is one of \fBfilesystem\fR, \fBsnapshot\fR, \fBsnap\fR, \fBvolume\fR, \fBbookmark\fR, or \fBall\fR. For example, specifying \fB-t snapshot\fR displays only snapshots.
058ac9ba
BB
2224.RE
2225
2226.RE
2227
2228.sp
2229.ne 2
058ac9ba 2230.na
23de906c 2231\fB\fBzfs set\fR \fIproperty\fR=\fIvalue\fR[ \fIproperty\fR=\fIvalue\fR]...
aeacdefe 2232\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR|\fIbookmark\fR ...\fR
058ac9ba
BB
2233.ad
2234.sp .6
2235.RS 4n
23de906c
CW
2236Sets the property or list of properties to the given value(s) for each dataset.
2237Only some properties can be edited. See the "Properties" section for more
7e0754c6
RL
2238information on which properties can be set and acceptable values. User properties
2239can be set on snapshots. For more information, see the "User Properties" section.
058ac9ba
BB
2240.RE
2241
2242.sp
2243.ne 2
aeacdefe 2244\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|\fIbookmark\fR ...\fR
058ac9ba
BB
2245.ad
2246.sp .6
2247.RS 4n
2248Displays properties for the given datasets. If no datasets are specified, then the command displays properties for all datasets on the system. For each property, the following columns are displayed:
2249.sp
2250.in +2
2251.nf
2252 name Dataset name
2253 property Property name
2254 value Property value
2255 source Property source. Can either be local, default,
0bf8501a 2256 temporary, inherited, received, or none (-).
058ac9ba
BB
2257.fi
2258.in -2
2259.sp
2260
2261All columns are displayed by default, though this can be controlled by using the \fB-o\fR option. This command takes a comma-separated list of properties as described in the "Native Properties" and "User Properties" sections.
2262.sp
da536844 2263The special value \fBall\fR can be used to display all properties that apply to the given dataset's type (filesystem, volume snapshot, or bookmark).
058ac9ba
BB
2264.sp
2265.ne 2
058ac9ba
BB
2266.na
2267\fB\fB-r\fR\fR
2268.ad
2269.sp .6
2270.RS 4n
2271Recursively display properties for any children.
2272.RE
2273
2274.sp
2275.ne 2
058ac9ba
BB
2276.na
2277\fB\fB-d\fR \fIdepth\fR\fR
2278.ad
2279.sp .6
2280.RS 4n
2281Recursively display any children of the dataset, limiting the recursion to \fIdepth\fR. A depth of \fB1\fR will display only the dataset and its direct children.
2282.RE
2283
2284.sp
2285.ne 2
058ac9ba
BB
2286.na
2287\fB\fB-H\fR\fR
2288.ad
2289.sp .6
2290.RS 4n
2291Display output in a form more easily parsed by scripts. Any headers are omitted, and fields are explicitly separated by a single tab instead of an arbitrary amount of space.
2292.RE
2293
2294.sp
2295.ne 2
058ac9ba
BB
2296.na
2297\fB\fB-o\fR \fIfield\fR\fR
2298.ad
2299.sp .6
2300.RS 4n
6b4e21c6 2301A comma-separated list of columns to display. \fBname,property,value,source\fR is the default value.
058ac9ba
BB
2302.RE
2303
2304.sp
2305.ne 2
058ac9ba
BB
2306.na
2307\fB\fB-s\fR \fIsource\fR\fR
2308.ad
2309.sp .6
2310.RS 4n
0bf8501a 2311A comma-separated list of sources to display. Those properties coming from a source other than those in this list are ignored. Each source must be one of the following: \fBlocal,default,inherited,received,temporary,none\fR. The default value is all sources.
058ac9ba
BB
2312.RE
2313
2314.sp
2315.ne 2
058ac9ba
BB
2316.na
2317\fB\fB-p\fR\fR
2318.ad
2319.sp .6
2320.RS 4n
54d5378f 2321Display numbers in parsable (exact) values.
058ac9ba
BB
2322.RE
2323
2324.RE
2325
2326.sp
2327.ne 2
058ac9ba 2328.na
0bf8501a 2329\fB\fBzfs inherit\fR [\fB-rS\fR] \fIproperty\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
058ac9ba
BB
2330.ad
2331.sp .6
2332.RS 4n
0bf8501a 2333Clears 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.
058ac9ba
BB
2334.sp
2335.ne 2
058ac9ba
BB
2336.na
2337\fB\fB-r\fR\fR
2338.ad
2339.sp .6
2340.RS 4n
2341Recursively inherit the given property for all children.
2342.RE
0bf8501a
PH
2343.sp
2344.ne 2
2345.na
2346\fB\fB-S\fR\fR
2347.ad
2348.sp .6
2349.RS 4n
2350Revert the property to the received value if one exists; otherwise operate as
2351if the \fB-S\fR option was not specified.
2352.RE
058ac9ba
BB
2353
2354.RE
2355
2356.sp
2357.ne 2
058ac9ba 2358.na
8e07f9a9 2359\fB\fBzfs upgrade\fR
058ac9ba
BB
2360.ad
2361.sp .6
2362.RS 4n
2363Displays a list of file systems that are not the most recent version.
2364.RE
2365
8e07f9a9
RL
2366.sp
2367.ne 2
8e07f9a9
RL
2368.na
2369\fB\fBzfs upgrade\fR \fB-v\fR\fR
2370.ad
2371.sp .6
2372.RS 4n
2373Displays a list of file system versions.
2374.RE
2375
2376
058ac9ba
BB
2377.sp
2378.ne 2
058ac9ba
BB
2379.na
2380\fB\fBzfs upgrade\fR [\fB-r\fR] [\fB-V\fR \fIversion\fR] [\fB-a\fR | \fIfilesystem\fR]\fR
2381.ad
2382.sp .6
2383.RS 4n
2384Upgrades file systems to a new on-disk version. Once this is done, the file systems will no longer be accessible on systems running older versions of the software. \fBzfs send\fR streams generated from new snapshots of these file systems cannot be accessed on systems running older versions of the software.
2385.sp
6b4e21c6 2386In general, the file system version is independent of the pool version. See \fBzpool\fR(8) for information on the \fBzpool upgrade\fR command.
058ac9ba
BB
2387.sp
2388In 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.
2389.sp
2390.ne 2
058ac9ba
BB
2391.na
2392\fB\fB-a\fR\fR
2393.ad
2394.sp .6
2395.RS 4n
8e07f9a9 2396Upgrades all file systems on all imported pools.
058ac9ba
BB
2397.RE
2398
2399.sp
2400.ne 2
058ac9ba
BB
2401.na
2402\fB\fIfilesystem\fR\fR
2403.ad
2404.sp .6
2405.RS 4n
8e07f9a9 2406Upgrades the specified file system.
058ac9ba
BB
2407.RE
2408
2409.sp
2410.ne 2
058ac9ba
BB
2411.na
2412\fB\fB-r\fR\fR
2413.ad
2414.sp .6
2415.RS 4n
8e07f9a9 2416Upgrades the specified file system and all descendent file systems
058ac9ba
BB
2417.RE
2418
2419.sp
2420.ne 2
058ac9ba
BB
2421.na
2422\fB\fB-V\fR \fIversion\fR\fR
2423.ad
2424.sp .6
2425.RS 4n
8e07f9a9 2426Upgrades to the specified \fIversion\fR. If the \fB-V\fR flag is not specified, this command upgrades to the most recent version. This option can only be used to increase the version number, and only up to the most recent version supported by this software.
058ac9ba
BB
2427.RE
2428
2429.RE
2430
2431.sp
2432.ne 2
058ac9ba 2433.na
5990da81
YP
2434\fBzfs\fR \fBuserspace\fR [\fB-Hinp\fR] [\fB-o\fR \fIfield\fR[,...]]
2435[\fB-s\fR \fIfield\fR] ...
2436[\fB-S\fR \fIfield\fR] ...
2437[\fB-t\fR \fItype\fR[,...]] \fIfilesystem\fR|\fIsnapshot\fR
058ac9ba
BB
2438.ad
2439.sp .6
2440.RS 4n
5990da81 2441Displays space consumed by, and quotas on, each user in the specified
1de321e6
JX
2442filesystem or snapshot. This corresponds to the \fBuserused@\fR\fIuser\fR, \fBuserobjused@\fR\fIuser\fR,
2443\fBuserquota@\fR\fIuser\fR, and \fBuserobjquota@\fR\fIuser\fR properties.
058ac9ba
BB
2444.sp
2445.ne 2
058ac9ba
BB
2446.na
2447\fB\fB-n\fR\fR
2448.ad
2449.sp .6
2450.RS 4n
2451Print numeric ID instead of user/group name.
2452.RE
2453
2454.sp
2455.ne 2
058ac9ba
BB
2456.na
2457\fB\fB-H\fR\fR
2458.ad
2459.sp .6
2460.RS 4n
8fd888ba 2461Display output in a form more easily parsed by scripts. Any headers are omitted, and fields are explicitly separated by a single tab instead of an arbitrary amount of space.
058ac9ba
BB
2462.RE
2463
2464.sp
2465.ne 2
058ac9ba
BB
2466.na
2467\fB\fB-p\fR\fR
2468.ad
2469.sp .6
2470.RS 4n
5990da81 2471Use exact (parsable) numeric output.
058ac9ba
BB
2472.RE
2473
2474.sp
2475.ne 2
058ac9ba
BB
2476.na
2477\fB\fB-o\fR \fIfield\fR[,...]\fR
2478.ad
2479.sp .6
2480.RS 4n
5990da81
YP
2481Display only the specified fields from the following
2482set: \fBtype, name, used, quota\fR. The default is to display all fields.
058ac9ba
BB
2483.RE
2484
2485.sp
2486.ne 2
058ac9ba
BB
2487.na
2488\fB\fB-s\fR \fIfield\fR\fR
2489.ad
2490.sp .6
2491.RS 4n
5990da81
YP
2492Sort output by this field. The \fIs\fR and \fIS\fR flags may be specified
2493multiple times to sort first by one field, then by another. The default is
2494\fB-s type\fR \fB-s name\fR.
058ac9ba
BB
2495.RE
2496
2497.sp
2498.ne 2
058ac9ba
BB
2499.na
2500\fB\fB-S\fR \fIfield\fR\fR
2501.ad
2502.sp .6
2503.RS 4n
2504Sort by this field in reverse order. See \fB-s\fR.
2505.RE
2506
2507.sp
2508.ne 2
058ac9ba
BB
2509.na
2510\fB\fB-t\fR \fItype\fR[,...]\fR
2511.ad
2512.sp .6
2513.RS 4n
5990da81
YP
2514Print only the specified types from the following
2515set: \fBall, posixuser, smbuser, posixgroup, smbgroup\fR. The default
2516is \fB-t posixuser,smbuser\fR. The default can be changed to include group
2517types.
058ac9ba
BB
2518.RE
2519
2520.sp
2521.ne 2
058ac9ba
BB
2522.na
2523\fB\fB-i\fR\fR
2524.ad
2525.sp .6
2526.RS 4n
5990da81 2527Translate SID to POSIX ID. The POSIX ID may be ephemeral if no mapping exists.
6a107f41 2528Normal POSIX interfaces (for example, \fBstat\fR(2), \fBls\fR(1) \fB-l\fR) perform
5990da81
YP
2529this translation, so the \fB-i\fR option allows the output from \fBzfs
2530userspace\fR to be compared directly with those utilities. However, \fB-i\fR
2531may lead to confusion if some files were created by an SMB user before a
2532SMB-to-POSIX name mapping was established. In such a case, some files will be owned
2533by the SMB entity and some by the POSIX entity. However, the \fB-i\fR option
2534will report that the POSIX entity has the total usage and quota for both.
6a107f41
RL
2535.sp
2536This option is not useful on Linux.
058ac9ba
BB
2537.RE
2538
2539.RE
2540
2541.sp
2542.ne 2
058ac9ba 2543.na
5990da81
YP
2544\fBzfs\fR \fBgroupspace\fR [\fB-Hinp\fR] [\fB-o\fR \fIfield\fR[,...]]
2545[\fB-s\fR \fIfield\fR] ...
2546[\fB-S\fR \fIfield\fR] ...
2547[\fB-t\fR \fItype\fR[,...]] \fIfilesystem\fR|\fIsnapshot\fR
058ac9ba
BB
2548.ad
2549.sp .6
2550.RS 4n
5990da81
YP
2551Displays space consumed by, and quotas on, each group in the specified
2552filesystem or snapshot. This subcommand is identical to \fBzfs userspace\fR,
2553except that the default types to display are \fB-t posixgroup,smbgroup\fR.
058ac9ba
BB
2554.RE
2555
2556.sp
2557.ne 2
058ac9ba
BB
2558.na
2559\fB\fBzfs mount\fR\fR
2560.ad
2561.sp .6
2562.RS 4n
2563Displays all \fBZFS\fR file systems currently mounted.
2564.RE
2565
2566.sp
2567.ne 2
058ac9ba
BB
2568.na
2569\fB\fBzfs mount\fR [\fB-vO\fR] [\fB-o\fR \fIoptions\fR] \fB-a\fR | \fIfilesystem\fR\fR
2570.ad
2571.sp .6
2572.RS 4n
8fd888ba 2573Mounts \fBZFS\fR file systems. This is invoked automatically as part of the boot process.
058ac9ba
BB
2574.sp
2575.ne 2
058ac9ba
BB
2576.na
2577\fB\fB-o\fR \fIoptions\fR\fR
2578.ad
2579.sp .6
2580.RS 4n
5990da81
YP
2581An optional, comma-separated list of mount options to use temporarily for the
2582duration of the mount. See the "Temporary Mount Point Properties" section for
2583details.
058ac9ba
BB
2584.RE
2585
2586.sp
2587.ne 2
058ac9ba
BB
2588.na
2589\fB\fB-O\fR\fR
2590.ad
2591.sp .6
2592.RS 4n
6a107f41
RL
2593Allow mounting the filesystem even if the target directory is not empty.
2594.sp
2595On Solaris, the behavior of \fBzfs mount\fR matches \fBmount\fR and \fBzfs mount -O\fR matches \fBmount -O\fR. See \fBmount\fR(1M).
2596.sp
2597On Linux, this is the default for \fBmount\fR(8). In other words, \fBzfs mount -O\fR matches \fBmount\fR and there is no \fBmount\fR equivalent to a plain \fBzfs mount\fR.
058ac9ba
BB
2598.RE
2599
2600.sp
2601.ne 2
058ac9ba
BB
2602.na
2603\fB\fB-v\fR\fR
2604.ad
2605.sp .6
2606.RS 4n
8fd888ba 2607Report mount progress. This is intended for use with \fBzfs mount -a\fR on a system with a significant number of filesystems.
058ac9ba
BB
2608.RE
2609
2610.sp
2611.ne 2
058ac9ba
BB
2612.na
2613\fB\fB-a\fR\fR
2614.ad
2615.sp .6
2616.RS 4n
5990da81
YP
2617Mount all available \fBZFS\fR file systems. Invoked automatically as part of
2618the boot process.
058ac9ba
BB
2619.RE
2620
2621.sp
2622.ne 2
058ac9ba
BB
2623.na
2624\fB\fIfilesystem\fR\fR
2625.ad
2626.sp .6
2627.RS 4n
2628Mount the specified filesystem.
2629.RE
2630
2631.RE
2632
2633.sp
2634.ne 2
058ac9ba
BB
2635.na
2636\fB\fBzfs unmount\fR [\fB-f\fR] \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR\fR
2637.ad
2638.sp .6
2639.RS 4n
2640Unmounts currently mounted \fBZFS\fR file systems. Invoked automatically as part of the shutdown process.
2641.sp
2642.ne 2
058ac9ba
BB
2643.na
2644\fB\fB-f\fR\fR
2645.ad
2646.sp .6
2647.RS 4n
2648Forcefully unmount the file system, even if it is currently in use.
2649.RE
2650
2651.sp
2652.ne 2
058ac9ba
BB
2653.na
2654\fB\fB-a\fR\fR
2655.ad
2656.sp .6
2657.RS 4n
291b06c3 2658Unmount all available \fBZFS\fR file systems. Invoked automatically as part of the shutdown process.
058ac9ba
BB
2659.RE
2660
2661.sp
2662.ne 2
058ac9ba 2663.na
8fd888ba 2664\fIfilesystem\fR|\fImountpoint\fR
058ac9ba
BB
2665.ad
2666.sp .6
2667.RS 4n
2668Unmount the specified filesystem. The command can also be given a path to a \fBZFS\fR file system mount point on the system.
2669.RE
2670
2671.RE
2672
2673.sp
2674.ne 2
058ac9ba 2675.na
2f71caf2 2676\fB\fBzfs share\fR [\fBnfs\fR|\fBsmb\fR] \fB-a\fR | \fIfilesystem\fR\fR
058ac9ba
BB
2677.ad
2678.sp .6
2679.RS 4n
6b4e21c6 2680Shares available \fBZFS\fR file systems.
058ac9ba
BB
2681.sp
2682.ne 2
058ac9ba
BB
2683.na
2684\fB\fB-a\fR\fR
2685.ad
2686.sp .6
2687.RS 4n
2f71caf2 2688Share all available \fBZFS\fR file systems. Invoked automatically as part of the boot process. Additionally if one of \fBnfs\fR|\fBsmb\fR protocols is specified only share file systems whose \fBsharenfs\fR|\fBsharesmb\fR is set.
058ac9ba
BB
2689.RE
2690
2691.sp
2692.ne 2
058ac9ba
BB
2693.na
2694\fB\fIfilesystem\fR\fR
2695.ad
2696.sp .6
2697.RS 4n
2698Share the specified filesystem according to the \fBsharenfs\fR and \fBsharesmb\fR properties. File systems are shared when the \fBsharenfs\fR or \fBsharesmb\fR property is set.
2699.RE
2700
2701.RE
2702
2703.sp
2704.ne 2
058ac9ba 2705.na
2f71caf2 2706\fB\fBzfs unshare\fR [\fBnfs\fR|\fBsmb\fR] \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR\fR
058ac9ba
BB
2707.ad
2708.sp .6
2709.RS 4n
2f71caf2 2710Unshares currently shared \fBZFS\fR file systems. This is invoked automatically as part of the shutdown process. Additionally if one of \fBnfs\fR|\fBsmb\fR is specified unshare only file systems currently shared by that protocol.
058ac9ba
BB
2711.sp
2712.ne 2
058ac9ba
BB
2713.na
2714\fB\fB-a\fR\fR
2715.ad
2716.sp .6
2717.RS 4n
6b4e21c6 2718Unshare all available \fBZFS\fR file systems. Invoked automatically as part of the boot process.
058ac9ba
BB
2719.RE
2720
2721.sp
2722.ne 2
058ac9ba
BB
2723.na
2724\fB\fIfilesystem\fR|\fImountpoint\fR\fR
2725.ad
2726.sp .6
2727.RS 4n
2728Unshare the specified filesystem. The command can also be given a path to a \fBZFS\fR file system shared on the system.
2729.RE
2730
2731.RE
2732
2733.sp
2734.ne 2
058ac9ba 2735.na
da536844
MA
2736\fB\fBzfs bookmark\fR \fIsnapshot\fR \fIbookmark\fR\fR
2737.ad
2738.sp .6
2739.RS 4n
2740Creates a bookmark of the given snapshot. Bookmarks mark the point in time
2741when the snapshot was created, and can be used as the incremental source for
2742a \fBzfs send\fR command.
2743.sp
2744This feature must be enabled to be used.
2745See \fBzpool-features\fR(5) for details on ZFS feature flags and the
2746\fBbookmarks\fR feature.
2747.RE
2748
2749
2750.RE
2751.sp
2752.ne 2
2753.na
038091fd 2754\fBzfs send\fR [\fB-DnPpRveLc\fR] [\fB-\fR[\fBi\fR|\fBI\fR] \fIsnapshot\fR] \fIsnapshot\fR
058ac9ba
BB
2755.ad
2756.sp .6
2757.RS 4n
8fd888ba 2758Creates 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.
058ac9ba
BB
2759.sp
2760.ne 2
058ac9ba 2761.na
038091fd 2762\fB\fB-i\fR \fIsnapshot\fR\fR
058ac9ba
BB
2763.ad
2764.sp .6
2765.RS 4n
038091fd 2766Generate an incremental stream from the first \fIsnapshot\fR (the incremental source) to the second \fIsnapshot\fR (the incremental target). The incremental source can be specified as the last component of the snapshot name (the \fB@\fR character and following) and it is assumed to be from the same file system as the incremental target.
058ac9ba
BB
2767.sp
2768If the destination is a clone, the source may be the origin snapshot, which must be fully specified (for example, \fBpool/fs@origin\fR, not just \fB@origin\fR).
2769.RE
2770
2771.sp
2772.ne 2
058ac9ba
BB
2773.na
2774\fB\fB-I\fR \fIsnapshot\fR\fR
2775.ad
2776.sp .6
2777.RS 4n
038091fd 2778Generate a stream package that sends all intermediary snapshots from the first snapshot to the second snapshot. For example, \fB-I @a fs@d\fR is similar to \fB-i @a fs@b; -i @b fs@c; -i @c fs@d\fR. The incremental source may be specified as with the \fB-i\fR option.
058ac9ba
BB
2779.RE
2780
e0f86c98
BB
2781.sp
2782.ne 2
e0f86c98 2783.na
a7004725 2784\fB\fB-R\fR, \fB--replicate\fR\fR
e0f86c98
BB
2785.ad
2786.sp .6
2787.RS 4n
9566fb1a
SB
2788Generate a replication stream package, which will replicate the specified filesystem, and all descendent file systems, up to the named snapshot. When received, all properties, snapshots, descendent file systems, and clones are preserved.
2789.sp
6b4e21c6 2790If the \fB-i\fR or \fB-I\fR flags are used in conjunction with the \fB-R\fR flag, an incremental replication stream is generated. The current values of properties, and current snapshot and file system names are set when the stream is received. If the \fB-F\fR flag is specified when this stream is received, snapshots and file systems that do not exist on the sending side are destroyed.
e0f86c98
BB
2791.RE
2792
058ac9ba
BB
2793.sp
2794.ne 2
058ac9ba 2795.na
a7004725 2796\fB\fB-D\fR, \fB--dedup\fR\fR
058ac9ba
BB
2797.ad
2798.sp .6
2799.RS 4n
33c08194 2800Generate a deduplicated stream. Blocks which would have been sent multiple times in the send stream will only be sent once. The receiving system must also support this feature to receive a deduplicated stream. This flag can be used regardless of the dataset's dedup property, but performance will be much better if the filesystem uses a dedup-capable checksum (eg. sha256).
058ac9ba
BB
2801.RE
2802
f1512ee6
MA
2803.sp
2804.ne 2
f1512ee6 2805.na
a7004725 2806\fB\fB-L\fR, \fB--large-block\fR\fR
f1512ee6
MA
2807.ad
2808.sp .6
2809.RS 4n
7e0754c6 2810Generate a stream which may contain blocks larger than 128KiB. This flag
f1512ee6
MA
2811has no effect if the \fBlarge_blocks\fR pool feature is disabled, or if
2812the \fRrecordsize\fR property of this filesystem has never been set above
7e0754c6 2813128KiB. The receiving system must have the \fBlarge_blocks\fR pool feature
f1512ee6
MA
2814enabled as well. See \fBzpool-features\fR(5) for details on ZFS feature
2815flags and the \fBlarge_blocks\fR feature.
2816.RE
2817
058ac9ba
BB
2818.sp
2819.ne 2
058ac9ba 2820.na
a7004725 2821\fB\fB-e\fR, \fB--embed\fR\fR
9b67f605
MA
2822.ad
2823.sp .6
2824.RS 4n
2825Generate a more compact stream by using WRITE_EMBEDDED records for blocks
2826which are stored more compactly on disk by the \fBembedded_data\fR pool
2827feature. This flag has no effect if the \fBembedded_data\fR feature is
2828disabled. The receiving system must have the \fBembedded_data\fR feature
2829enabled. If the \fBlz4_compress\fR feature is active on the sending system,
2830then the receiving system must have that feature enabled as well. See
2831\fBzpool-features\fR(5) for details on ZFS feature flags and the
2832\fBembedded_data\fR feature.
2833.RE
2834
2aa34383
DK
2835.sp
2836.ne 2
2837.na
2838\fB\fB-c\fR, \fB--compressed\fR\fR
2839.ad
2840.sp .6
2841.RS 4n
2842Generate a more compact stream by using compressed WRITE records for blocks
2843which are compressed on disk and in memory (see the \fBcompression\fR property
2844for details). If the \fBlz4_compress\fR feature is active on the sending
2845system, then the receiving system must have that feature enabled as well. If
2846the \fBlarge_blocks\fR feature is enabled on the sending system but the \fB-L\fR
2847option is not supplied in conjunction with \fB-c\fR, then the data will be
2848decompressed before sending so it can be split into smaller block sizes.
2849.RE
2850
9b67f605
MA
2851.sp
2852.ne 2
2853.na
a7004725 2854\fB\fB-p\fR, \fB--props\fR\fR
9566fb1a
SB
2855.ad
2856.sp .6
2857.RS 4n
2858Include the dataset's properties in the stream. This flag is implicit when -R is specified. The receiving system must also support this feature.
2859.RE
2860
2861.sp
2862.ne 2
2863.na
a7004725 2864\fB\fB-n\fR, \fB--dryrun\fR\fR
058ac9ba
BB
2865.ad
2866.sp .6
2867.RS 4n
9566fb1a
SB
2868Do a dry-run ("No-op") send. Do not generate any actual send data. This is
2869useful in conjunction with the \fB-v\fR or \fB-P\fR flags to determine what
93f6d7e2
MJ
2870data will be sent. In this case, the verbose output will be written to
2871standard output (contrast with a non-dry-run, where the stream is written
2872to standard output and the verbose output goes to standard error).
9566fb1a
SB
2873.RE
2874
e0f86c98 2875.sp
9566fb1a
SB
2876.ne 2
2877.na
a7004725 2878\fB\fB-P\fR, \fB--parsable\fR\fR
9566fb1a
SB
2879.ad
2880.sp .6
2881.RS 4n
2882Print machine-parsable verbose information about the stream package generated.
e0f86c98
BB
2883.RE
2884
2885.sp
2886.ne 2
e0f86c98 2887.na
a7004725 2888\fB\fB-v\fR, \fB--verbose\fR\fR
e0f86c98
BB
2889.ad
2890.sp .6
2891.RS 4n
9566fb1a
SB
2892Print verbose information about the stream package generated. This information
2893includes a per-second report of how much data has been sent.
058ac9ba
BB
2894.RE
2895
2896The format of the stream is committed. You will be able to receive your streams on future versions of \fBZFS\fR.
2897.RE
2898
da536844
MA
2899.RE
2900.sp
2901.ne 2
2902.na
2aa34383 2903\fBzfs send\fR [\fB-Lec\fR] [\fB-i\fR \fIsnapshot\fR|\fIbookmark\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR
da536844
MA
2904.ad
2905.sp .6
2906.RS 4n
2907Generate a send stream, which may be of a filesystem, and may be
2908incremental from a bookmark. If the destination is a filesystem or volume,
2909the pool must be read-only, or the filesystem must not be mounted. When the
2910stream generated from a filesystem or volume is received, the default snapshot
2911name will be "--head--".
2912
f1512ee6
MA
2913.sp
2914.ne 2
f1512ee6 2915.na
a7004725 2916\fB\fB-L\fR, \fB--large-block\fR\fR
f1512ee6
MA
2917.ad
2918.sp .6
2919.RS 4n
7e0754c6 2920Generate a stream which may contain blocks larger than 128KiB. This flag
f1512ee6
MA
2921has no effect if the \fBlarge_blocks\fR pool feature is disabled, or if
2922the \fRrecordsize\fR property of this filesystem has never been set above
7e0754c6 2923128KiB. The receiving system must have the \fBlarge_blocks\fR pool feature
f1512ee6
MA
2924enabled as well. See \fBzpool-features\fR(5) for details on ZFS feature
2925flags and the \fBlarge_blocks\fR feature.
2926.RE
2927
b1a3e932
TF
2928.sp
2929.ne 2
b1a3e932 2930.na
a7004725 2931\fB\fB-e\fR, \fB--embed\fR\fR
b1a3e932
TF
2932.ad
2933.sp .6
2934.RS 4n
2935Generate a more compact stream by using WRITE_EMBEDDED records for blocks
2936which are stored more compactly on disk by the \fBembedded_data\fR pool
2937feature. This flag has no effect if the \fBembedded_data\fR feature is
2938disabled. The receiving system must have the \fBembedded_data\fR feature
2939enabled. If the \fBlz4_compress\fR feature is active on the sending system,
2940then the receiving system must have that feature enabled as well. See
2941\fBzpool-features\fR(5) for details on ZFS feature flags and the
2942\fBembedded_data\fR feature.
2943.RE
2944
2aa34383
DK
2945.sp
2946.ne 2
2947.na
2948\fB\fB-c\fR, \fB--compressed\fR\fR
2949.ad
2950.sp .6
2951.RS 4n
2952Generate a more compact stream by using compressed WRITE records for blocks
2953which are compressed on disk and in memory (see the \fBcompression\fR property
2954for details). If the \fBlz4_compress\fR feature is active on the sending
2955system, then the receiving system must have that feature enabled as well. If
2956the \fBlarge_blocks\fR feature is enabled on the sending system but the \fB-L\fR
2957option is not supplied in conjunction with \fB-c\fR, then the data will be
2958decompressed before sending so it can be split into smaller block sizes.
2959.RE
2960
47dfff3b
MA
2961.sp
2962.ne 2
2963.na
2964\fB-i\fR \fIsnapshot\fR|\fIbookmark\fR
2965.ad
2966.sp .6
2967.RS 4n
2968Generate an incremental send stream. The incremental source must be an earlier snapshot in the destination's history. It will commonly be an earlier snapshot in the destination's filesystem, in which case it can be specified as the last component of the name (the \fB#\fR or \fB@\fR character and following).
2969.sp
2970If the incremental target is a clone, the incremental source can be the origin snapshot, or an earlier snapshot in the origin's filesystem, or the origin's origin, etc.
2971.RE
2972
2973.RE
2974.sp
2975.ne 2
2976.na
2977\fB\fBzfs send\fR [\fB-Penv\fR] \fB-t\fR \fIreceive_resume_token\fR\fR
2978.ad
2979.sp .6
2980.RS 4n
2981Creates a send stream which resumes an interrupted receive. The \fIreceive_resume_token\fR is the value of this property on the filesystem or volume that was being received into. See the documentation for \fBzfs receive -s\fR for more details.
2982
2983.RE
2984
da536844 2985.RE
058ac9ba
BB
2986.sp
2987.ne 2
058ac9ba 2988.na
a3eeab2d 2989\fB\fBzfs receive\fR [\fB-Fnsuv\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... [\fB-x\fR \fIproperty\fR] ... \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
058ac9ba
BB
2990.ad
2991.br
2992.na
a3eeab2d 2993\fB\fBzfs receive\fR [\fB-Fnsuv\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... [\fB-x\fR \fIproperty\fR] ... [\fB-d\fR|\fB-e\fR] \fIfilesystem\fR\fR
058ac9ba
BB
2994.ad
2995.sp .6
2996.RS 4n
2997Creates a snapshot whose contents are as specified in the stream provided on standard input. If a full stream is received, then a new file system is created as well. Streams are created using the \fBzfs send\fR subcommand, which by default creates a full stream. \fBzfs recv\fR can be used as an alias for \fBzfs receive\fR.
2998.sp
2999If an incremental stream is received, then the destination file system must already exist, and its most recent snapshot must match the incremental stream's source. For \fBzvols\fR, the destination device link is destroyed and recreated, which means the \fBzvol\fR cannot be accessed during the \fBreceive\fR operation.
3000.sp
9bb3e153 3001When a snapshot replication package stream that is generated by using the \fBzfs send\fR \fB-R\fR command is received, any snapshots that do not exist on the sending location are destroyed by using the \fBzfs destroy\fR \fB-d\fR command.
058ac9ba 3002.sp
a3eeab2d 3003If \fB-o\fR \fIproperty\fR=\fIvalue\fR or \fB-x\fR \fIproperty\fR is specified, it applies to the effective value of the property throughout the entire subtree of replicated datasets. Effective property values will be set (-o) or inherited (-x) on the topmost in the replicated subtree. In descendant datasets, if the property is set by the send stream, it will be overridden by forcing the property to be inherited from the topmost filesystem. Received properties are retained in spite of being overridden and may be restored with \fBzfs inherit\fR \fB-S\fR. Specifying \fB-o origin\fR=\fIsnapshot\fR is a special case because, even if \fBorigin\fR is a read-only property and cannot be set, it allows to receive the send stream as a clone of the given snapshot.
3004.sp
bb8b81ec 3005The name of the snapshot (and file system, if a full stream is received) that this subcommand creates depends on the argument type and the use of the \fB-d\fR or \fB-e\fR options.
058ac9ba 3006.sp
bb8b81ec
BB
3007If the argument is a snapshot name, the specified \fIsnapshot\fR is created. If the argument is a file system or volume name, a snapshot with the same name as the sent snapshot is created within the specified \fIfilesystem\fR or \fIvolume\fR. If neither of the \fB-d\fR or \fB-e\fR options are specified, the provided target snapshot name is used exactly as provided.
3008.sp
3009The \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.
058ac9ba
BB
3010.sp
3011.ne 2
058ac9ba 3012.na
47dfff3b 3013\fB\fB-F\fR\fR
058ac9ba
BB
3014.ad
3015.sp .6
3016.RS 4n
47dfff3b 3017Force a rollback of the file system to the most recent snapshot before performing the receive operation. If receiving an incremental replication stream (for example, one generated by \fBzfs send -R -[iI]\fR), destroy snapshots and file systems that do not exist on the sending side.
bb8b81ec
BB
3018.RE
3019
3020.sp
3021.ne 2
47dfff3b 3022.mk
bb8b81ec 3023.na
47dfff3b 3024\fB\fB-n\fR\fR
bb8b81ec
BB
3025.ad
3026.sp .6
3027.RS 4n
47dfff3b
MA
3028Do not actually receive the stream. This can be useful in conjunction with the \fB-v\fR option to verify the name the receive operation would use.
3029.RE
3030
3031.sp
3032.ne 2
3033.na
3034\fB\fB-s\fR\fR
3035.ad
3036.sp .6
3037.RS 4n
3038If the receive is interrupted, save the partially received state, rather than deleting it. Interruption may be due to premature termination of the stream (e.g. due to network failure or failure of the remote system if the stream is being read over a network connection), a checksum error in the stream, termination of the \fBzfs receive\fR process, or unclean shutdown of the system.
3039.sp
3040The receive can be resumed with a stream generated by \fBzfs send -t\fR token, where the \fItoken\fR is the value of the \fBreceive_resume_token\fR property of the filesystem or volume which is received into.
3041.sp
3042To use this flag, the storage pool must have the \fBextensible_dataset\fR feature enabled. See \fBzpool-features\fR(5) for details on ZFS feature flags.
058ac9ba
BB
3043.RE
3044
3045.sp
3046.ne 2
058ac9ba
BB
3047.na
3048\fB\fB-u\fR\fR
3049.ad
3050.sp .6
3051.RS 4n
8fd888ba 3052Do not mount the file system that is associated with the received stream.
058ac9ba
BB
3053.RE
3054
330d06f9
MA
3055.sp
3056.ne 2
3057.na
058ac9ba
BB
3058\fB\fB-v\fR\fR
3059.ad
3060.sp .6
3061.RS 4n
3062Print verbose information about the stream and the time required to perform the receive operation.
3063.RE
3064
a3eeab2d 3065.sp
3066.ne 2
3067.mk
3068.na
3069\fB-o\fR \fIproperty\fR=\fIvalue\fR
3070.ad
3071.sp .6
3072.RS 4n
3073Sets the specified property as if the command \fBzfs set\fR \fIproperty\fR=\fIvalue\fR was invoked immediately before the receive. When receiving a stream from \fBzfs send -R\fR, causes the property to be inherited by all descendant datasets, as through \fBzfs inherit\fR \fIproperty\fR was run on any descendant datasets that have this property set on the sending system.
3074.sp
3075Any editable ZFS property can be set at receive time. Set-once properties bound to the received data, such as \fBnormalization\fR and \fBcasesensitivity\fR, cannot be set at receive time even when the datasets are newly created by zfs receive. Additionally both settable properties \fBversion\fR and \fBvolsize\fR cannot be set at receive time.
3076.sp
3077The \fB-o\fR option may be specified multiple times, for different properties. An error results if the same property is specified in multiple \fB-o\fR or \fB-x\fR options.
3078.RE
3079
3080.sp
3081.ne 2
3082.mk
3083.na
3084\fB-x\fR \fIproperty\fR
3085.ad
3086.sp .6
3087.RS 4n
3088Ensures that the effective value of the specified property after the receive is unaffected by the value of that property in the send stream (if any), as if the property had been excluded from the send stream.
3089.sp
3090If the specified property is not present in the send stream, this option does nothing.
3091.sp
3092If a received property needs to be overridden, the effective value will be set or inherited, depending on whether the property is inheritable or not.
3093.sp
3094In the case of an incremental update, \fB-x\fR leaves any existing local setting or explicit inheritance unchanged.
3095.sp
3096All \fB-o\fR restrictions on set-once and special properties apply equally to \fB-x\fR.
3097.RE
3098
058ac9ba
BB
3099.sp
3100.ne 2
058ac9ba 3101.na
47dfff3b 3102\fB\fB-d\fR\fR
058ac9ba
BB
3103.ad
3104.sp .6
3105.RS 4n
47dfff3b
MA
3106Discard the first element of the sent snapshot's file system name, using the remaining elements to determine the name of the target file system for the new snapshot as described in the paragraph above.
3107.RE
3108
3109.sp
3110.ne 2
3111.na
3112\fB\fB-e\fR\fR
3113.ad
3114.sp .6
3115.RS 4n
3116Discard all but the last element of the sent snapshot's file system name, using that element to determine the name of the target file system for the new snapshot as described in the paragraph above.
058ac9ba
BB
3117.RE
3118
fcff0f35
PD
3119.sp
3120.ne 2
fcff0f35
PD
3121.na
3122\fB\fB-o\fR \fBorigin\fR=\fIsnapshot\fR
3123.ad
3124.sp .6
3125.RS 4n
e6d3a843
PD
3126Forces the stream to be received as a clone of the given snapshot.
3127If the stream is a full send stream, this will create the filesystem
3128described by the stream as a clone of the specified snapshot. Which
3129snapshot was specified will not affect the success or failure of the
3130receive, as long as the snapshot does exist. If the stream is an
3131incremental send stream, all the normal verification will be performed.
fcff0f35
PD
3132.RE
3133
47dfff3b
MA
3134.RE
3135
058ac9ba
BB
3136.sp
3137.ne 2
058ac9ba 3138.na
47dfff3b 3139\fB\fBzfs receive\fR [\fB-A\fR] \fIfilesystem\fR|\fIvolume\fR
058ac9ba
BB
3140.ad
3141.sp .6
3142.RS 4n
47dfff3b 3143Abort an interrupted \fBzfs receive \fB-s\fR\fR, deleting its saved partially received state.
058ac9ba 3144
614e598c
D
3145.RE
3146
058ac9ba
BB
3147.sp
3148.ne 2
058ac9ba
BB
3149.na
3150\fB\fBzfs allow\fR \fIfilesystem\fR | \fIvolume\fR\fR
3151.ad
3152.sp .6
3153.RS 4n
3154Displays permissions that have been delegated on the specified filesystem or volume. See the other forms of \fBzfs allow\fR for more information.
f74b821a
BB
3155.sp
3156Delegations are supported under Linux with the exception of \fBmount\fR,
3157\fBunmount\fR, \fBmountpoint\fR, \fBcanmount\fR, \fBrename\fR, and \fBshare\fR.
3158These permissions cannot be delegated because the Linux \fBmount(8)\fR command
3159restricts modifications of the global namespace to the root user.
058ac9ba
BB
3160.RE
3161
3162.sp
3163.ne 2
058ac9ba
BB
3164.na
3165\fB\fBzfs allow\fR [\fB-ldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR| \fIvolume\fR\fR
3166.ad
3167.br
3168.na
3169\fB\fBzfs allow\fR [\fB-ld\fR] \fB-e\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR | \fIvolume\fR\fR
3170.ad
3171.sp .6
3172.RS 4n
3173Delegates \fBZFS\fR administration permission for the file systems to non-privileged users.
3174.sp
3175.ne 2
058ac9ba
BB
3176.na
3177\fB[\fB-ug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...]\fR
3178.ad
3179.sp .6
3180.RS 4n
3181Specifies to whom the permissions are delegated. Multiple entities can be specified as a comma-separated list. If neither of the \fB-ug\fR options are specified, then the argument is interpreted preferentially as the keyword "everyone", then as a user name, and lastly as a group name. To specify a user or group named "everyone", use the \fB-u\fR or \fB-g\fR options. To specify a group with the same name as a user, use the \fB-g\fR options.
3182.RE
3183
3184.sp
3185.ne 2
058ac9ba
BB
3186.na
3187\fB[\fB-e\fR] \fIperm\fR|@\fIsetname\fR[,...]\fR
3188.ad
3189.sp .6
3190.RS 4n
3191Specifies that the permissions be delegated to "everyone." Multiple permissions may be specified as a comma-separated list. Permission names are the same as \fBZFS\fR subcommand and property names. See the property list below. Property set names, which begin with an at sign (\fB@\fR) , may be specified. See the \fB-s\fR form below for details.
3192.RE
3193
3194.sp
3195.ne 2
058ac9ba
BB
3196.na
3197\fB[\fB-ld\fR] \fIfilesystem\fR|\fIvolume\fR\fR
3198.ad
3199.sp .6
3200.RS 4n
3201Specifies where the permissions are delegated. If neither of the \fB-ld\fR options are specified, or both are, then the permissions are allowed for the file system or volume, and all of its descendents. If only the \fB-l\fR option is used, then is allowed "locally" only for the specified file system. If only the \fB-d\fR option is used, then is allowed only for the descendent file systems.
3202.RE
3203
3204.RE
3205
3206.sp
3207.LP
8fd888ba 3208Permissions are generally the ability to use a \fBzfs\fR subcommand or change a property. The following permissions are available:
058ac9ba
BB
3209.sp
3210.in +2
3211.nf
3212NAME TYPE NOTES
3213allow subcommand Must also have the permission that is being
3214 allowed
3215clone subcommand Must also have the 'create' ability and 'mount'
3216 ability in the origin file system
3217create subcommand Must also have the 'mount' ability
3218destroy subcommand Must also have the 'mount' ability
0677cb6f
RL
3219diff subcommand Allows lookup of paths within a dataset
3220 given an object number, and the ability to
3221 create snapshots necessary to 'zfs diff'.
058ac9ba
BB
3222mount subcommand Allows mount/umount of ZFS datasets
3223promote subcommand Must also have the 'mount'
3224 and 'promote' ability in the origin file system
3225receive subcommand Must also have the 'mount' and 'create' ability
3226rename subcommand Must also have the 'mount' and 'create'
3227 ability in the new parent
3228rollback subcommand Must also have the 'mount' ability
6b4e21c6 3229send subcommand
058ac9ba
BB
3230share subcommand Allows sharing file systems over NFS or SMB
3231 protocols
3232snapshot subcommand Must also have the 'mount' ability
1de321e6 3233groupobjquota other Allows accessing any groupobjquota@... property
058ac9ba 3234groupquota other Allows accessing any groupquota@... property
1de321e6 3235groupobjused other Allows reading any groupobjused@... property
058ac9ba
BB
3236groupused other Allows reading any groupused@... property
3237userprop other Allows changing any user property
1de321e6 3238userobjquota other Allows accessing any userobjquota@... property
058ac9ba 3239userquota other Allows accessing any userquota@... property
1de321e6 3240userobjused other Allows reading any userobjused@... property
058ac9ba
BB
3241userused other Allows reading any userused@... property
3242
023699cd 3243acltype property
6b4e21c6
NB
3244aclinherit property
3245atime property
3246canmount property
3247casesensitivity property
3248checksum property
3249compression property
3250copies property
c8f25918 3251dedup property
6b4e21c6
NB
3252devices property
3253exec property
788eb90c 3254filesystem_limit property
c8f25918
KA
3255logbias property
3256mlslabel property
6b4e21c6
NB
3257mountpoint property
3258nbmand property
3259normalization property
3260primarycache property
3261quota property
3262readonly property
3263recordsize property
3264refquota property
3265refreservation property
3266reservation property
3267secondarycache property
3268setuid property
3269sharenfs property
3270sharesmb property
3271snapdir property
788eb90c 3272snapshot_limit property
6b4e21c6
NB
3273utf8only property
3274version property
3275volblocksize property
3276volsize property
3277vscan property
3278xattr property
3279zoned property
058ac9ba
BB
3280.fi
3281.in -2
3282.sp
3283
3284.sp
3285.ne 2
058ac9ba
BB
3286.na
3287\fB\fBzfs allow\fR \fB-c\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR\fR
3288.ad
3289.sp .6
3290.RS 4n
3291Sets "create time" permissions. These permissions are granted (locally) to the creator of any newly-created descendent file system.
3292.RE
3293
3294.sp
3295.ne 2
058ac9ba
BB
3296.na
3297\fB\fBzfs allow\fR \fB-s\fR @\fIsetname\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR\fR
3298.ad
3299.sp .6
3300.RS 4n
3301Defines or adds permissions to a permission set. The set can be used by other \fBzfs allow\fR commands for the specified file system and its descendents. Sets are evaluated dynamically, so changes to a set are immediately reflected. Permission sets follow the same naming restrictions as ZFS file systems, but the name must begin with an "at sign" (\fB@\fR), and can be no more than 64 characters long.
3302.RE
3303
3304.sp
3305.ne 2
058ac9ba
BB
3306.na
3307\fB\fBzfs unallow\fR [\fB-rldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] [\fIperm\fR|@\fIsetname\fR[, ...]] \fIfilesystem\fR|\fIvolume\fR\fR
3308.ad
3309.br
3310.na
3311\fB\fBzfs unallow\fR [\fB-rld\fR] \fB-e\fR [\fIperm\fR|@\fIsetname\fR [,...]] \fIfilesystem\fR|\fIvolume\fR\fR
3312.ad
3313.br
3314.na
8fd888ba 3315\fB\fBzfs unallow\fR [\fB-r\fR] \fB-c\fR [\fIperm\fR|@\fIsetname\fR[,...]]\fR \fB\fIfilesystem\fR|\fIvolume\fR\fR
058ac9ba
BB
3316.ad
3317.sp .6
3318.RS 4n
3319Removes 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.
3320.sp
3321.ne 2
058ac9ba
BB
3322.na
3323\fB\fB-r\fR\fR
3324.ad
3325.sp .6
3326.RS 4n
3327Recursively remove the permissions from this file system and all descendents.
3328.RE
3329
3330.RE
3331
3332.sp
3333.ne 2
058ac9ba 3334.na
8fd888ba 3335\fB\fBzfs unallow\fR [\fB-r\fR] \fB-s\fR @\fIsetname\fR [\fIperm\fR|@\fIsetname\fR[,...]]\fR \fB\fIfilesystem\fR|\fIvolume\fR\fR
058ac9ba
BB
3336.ad
3337.sp .6
3338.RS 4n
3339Removes permissions from a permission set. If no permissions are specified, then all permissions are removed, thus removing the set entirely.
3340.RE
3341
3342.sp
3343.ne 2
058ac9ba
BB
3344.na
3345\fB\fBzfs hold\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
3346.ad
3347.sp .6
3348.RS 4n
3349Adds a single reference, named with the \fItag\fR argument, to the specified snapshot or snapshots. Each snapshot has its own tag namespace, and tags must be unique within that space.
3350.sp
3351If a hold exists on a snapshot, attempts to destroy that snapshot by using the \fBzfs destroy\fR command return \fBEBUSY\fR.
3352.sp
3353.ne 2
058ac9ba
BB
3354.na
3355\fB\fB-r\fR\fR
3356.ad
3357.sp .6
3358.RS 4n
3359Specifies that a hold with the given tag is applied recursively to the snapshots of all descendent file systems.
3360.RE
3361
3362.RE
3363
3364.sp
3365.ne 2
058ac9ba
BB
3366.na
3367\fB\fBzfs holds\fR [\fB-r\fR] \fIsnapshot\fR...\fR
3368.ad
3369.sp .6
3370.RS 4n
3371Lists all existing user references for the given snapshot or snapshots.
3372.sp
3373.ne 2
058ac9ba
BB
3374.na
3375\fB\fB-r\fR\fR
3376.ad
3377.sp .6
3378.RS 4n
3379Lists the holds that are set on the named descendent snapshots, in addition to listing the holds on the named snapshot.
3380.RE
3381
3382.RE
3383
3384.sp
3385.ne 2
058ac9ba
BB
3386.na
3387\fB\fBzfs release\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
3388.ad
3389.sp .6
3390.RS 4n
3391Removes a single reference, named with the \fItag\fR argument, from the specified snapshot or snapshots. The tag must already exist for each snapshot.
3392.sp
058ac9ba 3393.ne 2
058ac9ba
BB
3394.na
3395\fB\fB-r\fR\fR
3396.ad
3397.sp .6
3398.RS 4n
3399Recursively releases a hold with the given tag on the snapshots of all descendent file systems.
3400.RE
3401
3402.RE
3403
0677cb6f
RL
3404.sp
3405.ne 2
0677cb6f 3406.na
9ef3906a 3407\fB\fBzfs diff\fR [\fB-FHt\fR] \fIsnapshot\fR \fIsnapshot\fR|\fIfilesystem\fR
0677cb6f
RL
3408.ad
3409.sp .6
3410.RS 4n
3411Display the difference between a snapshot of a given filesystem and another
3412snapshot of that filesystem from a later time or the current contents of the
3413filesystem. The first column is a character indicating the type of change,
3414the other columns indicate pathname, new pathname (in case of rename), change
3415in link count, and optionally file type and/or change time.
3416
3417The types of change are:
3418.in +2
3419.nf
3420- The path has been removed
3421+ The path has been created
3422M The path has been modified
3423R The path has been renamed
3424.fi
3425.in -2
3426.sp
3427.ne 2
3428.na
3429\fB-F\fR
3430.ad
3431.sp .6
3432.RS 4n
3433Display an indication of the type of file, in a manner similar to the \fB-F\fR
3434option of \fBls\fR(1).
3435.in +2
3436.nf
3437B Block device
3438C Character device
3439/ Directory
3440> Door
3441| Named pipe
3442@ Symbolic link
3443P Event port
3444= Socket
3445F Regular file
3446.fi
3447.in -2
3448.RE
3449.sp
3450.ne 2
3451.na
3452\fB-H\fR
3453.ad
3454.sp .6
3455.RS 4n
54d5378f 3456Give more parsable tab-separated output, without header lines and without arrows.
0677cb6f
RL
3457.RE
3458.sp
3459.ne 2
3460.na
3461\fB-t\fR
3462.ad
3463.sp .6
3464.RS 4n
3465Display the path's inode change time as the first column of output.
3466.RE
3467
058ac9ba
BB
3468.SH EXAMPLES
3469.LP
3470\fBExample 1 \fRCreating a ZFS File System Hierarchy
3471.sp
3472.LP
3473The following commands create a file system named \fBpool/home\fR and a file system named \fBpool/home/bob\fR. The mount point \fB/export/home\fR is set for the parent file system, and is automatically inherited by the child file system.
3474
3475.sp
3476.in +2
3477.nf
3478# \fBzfs create pool/home\fR
3479# \fBzfs set mountpoint=/export/home pool/home\fR
3480# \fBzfs create pool/home/bob\fR
3481.fi
3482.in -2
3483.sp
3484
3485.LP
3486\fBExample 2 \fRCreating a ZFS Snapshot
3487.sp
3488.LP
8fd888ba 3489The following command creates a snapshot named \fBbackup\fR. This snapshot is mounted on demand in the \fB\&.zfs/snapshot\fR directory at the root of the \fBpool/home/bob\fR file system.
058ac9ba
BB
3490
3491.sp
3492.in +2
3493.nf
8fd888ba 3494# \fBzfs snapshot pool/home/bob@backup\fR
058ac9ba
BB
3495.fi
3496.in -2
3497.sp
3498
3499.LP
3500\fBExample 3 \fRCreating and Destroying Multiple Snapshots
3501.sp
3502.LP
8fd888ba 3503The following command creates snapshots named \fBbackup\fR of \fBpool/home\fR and all of its descendent file systems. Each snapshot is mounted on demand in the \fB\&.zfs/snapshot\fR directory at the root of its file system. The second command destroys the newly created snapshots.
058ac9ba
BB
3504
3505.sp
3506.in +2
3507.nf
8fd888ba
RL
3508# \fBzfs snapshot -r pool/home@backup\fR
3509# \fBzfs destroy -r pool/home@backup\fR
058ac9ba
BB
3510.fi
3511.in -2
3512.sp
3513
3514.LP
3515\fBExample 4 \fRDisabling and Enabling File System Compression
3516.sp
3517.LP
3518The following command disables the \fBcompression\fR property for all file systems under \fBpool/home\fR. The next command explicitly enables \fBcompression\fR for \fBpool/home/anne\fR.
3519
3520.sp
3521.in +2
3522.nf
3523# \fBzfs set compression=off pool/home\fR
3524# \fBzfs set compression=on pool/home/anne\fR
3525.fi
3526.in -2
3527.sp
3528
3529.LP
3530\fBExample 5 \fRListing ZFS Datasets
3531.sp
3532.LP
8fd888ba 3533The following command lists all active file systems and volumes in the system. Snapshots are displayed if the pool's \fBlistsnapshots\fR property is \fBon\fR (the default is \fBoff\fR). See \fBzpool\fR(8) for more information on pool properties.
058ac9ba
BB
3534
3535.sp
3536.in +2
3537.nf
3538# \fBzfs list\fR
3539 NAME USED AVAIL REFER MOUNTPOINT
3540 pool 450K 457G 18K /pool
3541 pool/home 315K 457G 21K /export/home
3542 pool/home/anne 18K 457G 18K /export/home/anne
3543 pool/home/bob 276K 457G 276K /export/home/bob
3544.fi
3545.in -2
3546.sp
3547
3548.LP
3549\fBExample 6 \fRSetting a Quota on a ZFS File System
3550.sp
3551.LP
7e0754c6 3552The following command sets a quota of 50 GiB for \fBpool/home/bob\fR.
058ac9ba
BB
3553
3554.sp
3555.in +2
3556.nf
3557# \fBzfs set quota=50G pool/home/bob\fR
3558.fi
3559.in -2
3560.sp
3561
3562.LP
3563\fBExample 7 \fRListing ZFS Properties
3564.sp
3565.LP
3566The following command lists all properties for \fBpool/home/bob\fR.
3567
3568.sp
3569.in +2
3570.nf
3571# \fBzfs get all pool/home/bob\fR
3572NAME PROPERTY VALUE SOURCE
3573pool/home/bob type filesystem -
3574pool/home/bob creation Tue Jul 21 15:53 2009 -
3575pool/home/bob used 21K -
3576pool/home/bob available 20.0G -
3577pool/home/bob referenced 21K -
3578pool/home/bob compressratio 1.00x -
3579pool/home/bob mounted yes -
3580pool/home/bob quota 20G local
3581pool/home/bob reservation none default
3582pool/home/bob recordsize 128K default
3583pool/home/bob mountpoint /pool/home/bob default
3584pool/home/bob sharenfs off default
3585pool/home/bob checksum on default
3586pool/home/bob compression on local
3587pool/home/bob atime on default
3588pool/home/bob devices on default
3589pool/home/bob exec on default
3590pool/home/bob setuid on default
3591pool/home/bob readonly off default
3592pool/home/bob zoned off default
3593pool/home/bob snapdir hidden default
023699cd 3594pool/home/bob acltype off default
058ac9ba
BB
3595pool/home/bob aclinherit restricted default
3596pool/home/bob canmount on default
058ac9ba
BB
3597pool/home/bob xattr on default
3598pool/home/bob copies 1 default
3599pool/home/bob version 4 -
3600pool/home/bob utf8only off -
3601pool/home/bob normalization none -
3602pool/home/bob casesensitivity sensitive -
3603pool/home/bob vscan off default
3604pool/home/bob nbmand off default
3605pool/home/bob sharesmb off default
3606pool/home/bob refquota none default
3607pool/home/bob refreservation none default
3608pool/home/bob primarycache all default
3609pool/home/bob secondarycache all default
3610pool/home/bob usedbysnapshots 0 -
3611pool/home/bob usedbydataset 21K -
3612pool/home/bob usedbychildren 0 -
3613pool/home/bob usedbyrefreservation 0 -
c8f25918
KA
3614pool/home/bob logbias latency default
3615pool/home/bob dedup off default
3616pool/home/bob mlslabel none default
6d111134 3617pool/home/bob relatime off default
058ac9ba
BB
3618.fi
3619.in -2
3620.sp
3621
3622.sp
3623.LP
3624The following command gets a single property value.
3625
3626.sp
3627.in +2
3628.nf
3629# \fBzfs get -H -o value compression pool/home/bob\fR
3630on
3631.fi
3632.in -2
3633.sp
3634
3635.sp
3636.LP
3637The following command lists all properties with local settings for \fBpool/home/bob\fR.
3638
3639.sp
3640.in +2
3641.nf
3642# \fBzfs get -r -s local -o name,property,value all pool/home/bob\fR
3643NAME PROPERTY VALUE
3644pool/home/bob quota 20G
3645pool/home/bob compression on
3646.fi
3647.in -2
3648.sp
3649
3650.LP
3651\fBExample 8 \fRRolling Back a ZFS File System
3652.sp
3653.LP
3654The following command reverts the contents of \fBpool/home/anne\fR to the snapshot named \fByesterday\fR, deleting all intermediate snapshots.
3655
3656.sp
3657.in +2
3658.nf
3659# \fBzfs rollback -r pool/home/anne@yesterday\fR
3660.fi
3661.in -2
3662.sp
3663
3664.LP
3665\fBExample 9 \fRCreating a ZFS Clone
3666.sp
3667.LP
3668The following command creates a writable file system whose initial contents are the same as \fBpool/home/bob@yesterday\fR.
3669
3670.sp
3671.in +2
3672.nf
3673# \fBzfs clone pool/home/bob@yesterday pool/clone\fR
3674.fi
3675.in -2
3676.sp
3677
3678.LP
3679\fBExample 10 \fRPromoting a ZFS Clone
3680.sp
3681.LP
3682The following commands illustrate how to test out changes to a file system, and then replace the original file system with the changed one, using clones, clone promotion, and renaming:
3683
3684.sp
3685.in +2
3686.nf
3687# \fBzfs create pool/project/production\fR
3688 populate /pool/project/production with data
3689# \fBzfs snapshot pool/project/production@today\fR
3690# \fBzfs clone pool/project/production@today pool/project/beta\fR
3691make changes to /pool/project/beta and test them
3692# \fBzfs promote pool/project/beta\fR
3693# \fBzfs rename pool/project/production pool/project/legacy\fR
3694# \fBzfs rename pool/project/beta pool/project/production\fR
3695once the legacy version is no longer needed, it can be destroyed
3696# \fBzfs destroy pool/project/legacy\fR
3697.fi
3698.in -2
3699.sp
3700
3701.LP
3702\fBExample 11 \fRInheriting ZFS Properties
3703.sp
3704.LP
3705The following command causes \fBpool/home/bob\fR and \fBpool/home/anne\fR to inherit the \fBchecksum\fR property from their parent.
3706
3707.sp
3708.in +2
3709.nf
3710# \fBzfs inherit checksum pool/home/bob pool/home/anne\fR
3711.fi
3712.in -2
3713.sp
0bf8501a
PH
3714.LP
3715The following command causes \fBpool/home/bob\fR to revert to the received
3716value for the \fBquota\fR property if it exists.
3717
3718.sp
3719.in +2
3720.nf
3721# \fBzfs inherit -S quota pool/home/bob
3722.fi
3723.in -2
3724.sp
058ac9ba
BB
3725
3726.LP
3727\fBExample 12 \fRRemotely Replicating ZFS Data
3728.sp
3729.LP
3730The following commands send a full stream and then an incremental stream to a remote machine, restoring them into \fBpoolB/received/fs@a\fRand \fBpoolB/received/fs@b\fR, respectively. \fBpoolB\fR must contain the file system \fBpoolB/received\fR, and must not initially contain \fBpoolB/received/fs\fR.
3731
3732.sp
3733.in +2
3734.nf
3735# \fBzfs send pool/fs@a | \e\fR
3736 \fBssh host zfs receive poolB/received/fs@a\fR
3737# \fBzfs send -i a pool/fs@b | ssh host \e\fR
3738 \fBzfs receive poolB/received/fs\fR
3739.fi
3740.in -2
3741.sp
3742
3743.LP
3744\fBExample 13 \fRUsing the \fBzfs receive\fR \fB-d\fR Option
3745.sp
3746.LP
3747The following command sends a full stream of \fBpoolA/fsA/fsB@snap\fR to a remote machine, receiving it into \fBpoolB/received/fsA/fsB@snap\fR. The \fBfsA/fsB@snap\fR portion of the received snapshot's name is determined from the name of the sent snapshot. \fBpoolB\fR must contain the file system \fBpoolB/received\fR. If \fBpoolB/received/fsA\fR does not exist, it is created as an empty file system.
3748
3749.sp
3750.in +2
3751.nf
3752# \fBzfs send poolA/fsA/fsB@snap | \e
3753 ssh host zfs receive -d poolB/received\fR
3754.fi
3755.in -2
3756.sp
3757
3758.LP
3759\fBExample 14 \fRSetting User Properties
3760.sp
3761.LP
3762The following example sets the user-defined \fBcom.example:department\fR property for a dataset.
3763
3764.sp
3765.in +2
3766.nf
3767# \fBzfs set com.example:department=12345 tank/accounting\fR
3768.fi
3769.in -2
3770.sp
3771
3772.LP
b23d5430 3773\fBExample 15 \fRPerforming a Rolling Snapshot
058ac9ba
BB
3774.sp
3775.LP
3776The following example shows how to maintain a history of snapshots with a consistent naming scheme. To keep a week's worth of snapshots, the user destroys the oldest snapshot, renames the remaining snapshots, and then creates a new snapshot, as follows:
3777
3778.sp
3779.in +2
3780.nf
3781# \fBzfs destroy -r pool/users@7daysago\fR
3782# \fBzfs rename -r pool/users@6daysago @7daysago\fR
3783# \fBzfs rename -r pool/users@5daysago @6daysago\fR
b5d8c5fb
NG
3784# \fBzfs rename -r pool/users@4daysago @5daysago\fR
3785# \fBzfs rename -r pool/users@3daysago @4daysago\fR
3786# \fBzfs rename -r pool/users@2daysago @3daysago\fR
058ac9ba
BB
3787# \fBzfs rename -r pool/users@yesterday @2daysago\fR
3788# \fBzfs rename -r pool/users@today @yesterday\fR
3789# \fBzfs snapshot -r pool/users@today\fR
3790.fi
3791.in -2
3792.sp
3793
3794.LP
b23d5430 3795\fBExample 16 \fRSetting \fBsharenfs\fR Property Options on a ZFS File System
058ac9ba
BB
3796.sp
3797.LP
3798The following commands show how to set \fBsharenfs\fR property options to enable \fBrw\fR access for a set of \fBIP\fR addresses and to enable root access for system \fBneo\fR on the \fBtank/home\fR file system.
3799
3800.sp
3801.in +2
3802.nf
0677cb6f 3803# \fBzfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home\fR
058ac9ba
BB
3804.fi
3805.in -2
3806.sp
3807
3808.sp
3809.LP
3810If you are using \fBDNS\fR for host name resolution, specify the fully qualified hostname.
3811
9b77d1c9
CC
3812.sp
3813.LP
3814If you want to access snapdir through NFS, be sure to add \fBcrossmnt\fR to the options.
3815
058ac9ba 3816.LP
b23d5430 3817\fBExample 17 \fRDelegating ZFS Administration Permissions on a ZFS Dataset
058ac9ba 3818.sp
058ac9ba
BB
3819The following example shows how to set permissions so that user \fBcindys\fR can create, destroy, mount, and take snapshots on \fBtank/cindys\fR. The permissions on \fBtank/cindys\fR are also displayed.
3820
3821.sp
3822.in +2
3823.nf
3824# \fBzfs allow cindys create,destroy,mount,snapshot tank/cindys\fR
3825# \fBzfs allow tank/cindys\fR
3826-------------------------------------------------------------
3827Local+Descendent permissions on (tank/cindys)
3828 user cindys create,destroy,mount,snapshot
3829-------------------------------------------------------------
3830.fi
3831.in -2
3832.sp
3833
3834.sp
3835.LP
3836Because the \fBtank/cindys\fR mount point permission is set to 755 by default, user \fBcindys\fR will be unable to mount file systems under \fBtank/cindys\fR. Set an \fBACL\fR similar to the following syntax to provide mount point access:
3837.sp
3838.in +2
3839.nf
3840# \fBchmod A+user:cindys:add_subdirectory:allow /tank/cindys\fR
3841.fi
3842.in -2
3843.sp
3844
3845.LP
b23d5430 3846\fBExample 18 \fRDelegating Create Time Permissions on a ZFS Dataset
058ac9ba
BB
3847.sp
3848.LP
3849The following example shows how to grant anyone in the group \fBstaff\fR to create file systems in \fBtank/users\fR. This syntax also allows staff members to destroy their own file systems, but not destroy anyone else's file system. The permissions on \fBtank/users\fR are also displayed.
3850
3851.sp
3852.in +2
3853.nf
0677cb6f 3854# \fBzfs allow staff create,mount tank/users\fR
058ac9ba
BB
3855# \fBzfs allow -c destroy tank/users\fR
3856# \fBzfs allow tank/users\fR
3857-------------------------------------------------------------
3858Create time permissions on (tank/users)
3859 create,destroy
3860Local+Descendent permissions on (tank/users)
3861 group staff create,mount
6b4e21c6 3862-------------------------------------------------------------
058ac9ba
BB
3863.fi
3864.in -2
3865.sp
3866
3867.LP
b23d5430 3868\fBExample 19 \fRDefining and Granting a Permission Set on a ZFS Dataset
058ac9ba
BB
3869.sp
3870.LP
3871The following example shows how to define and grant a permission set on the \fBtank/users\fR file system. The permissions on \fBtank/users\fR are also displayed.
3872
3873.sp
3874.in +2
3875.nf
3876# \fBzfs allow -s @pset create,destroy,snapshot,mount tank/users\fR
3877# \fBzfs allow staff @pset tank/users\fR
3878# \fBzfs allow tank/users\fR
3879-------------------------------------------------------------
3880Permission sets on (tank/users)
3881 @pset create,destroy,mount,snapshot
3882Create time permissions on (tank/users)
3883 create,destroy
3884Local+Descendent permissions on (tank/users)
3885 group staff @pset,create,mount
3886-------------------------------------------------------------
3887.fi
3888.in -2
3889.sp
3890
3891.LP
b23d5430 3892\fBExample 20 \fRDelegating Property Permissions on a ZFS Dataset
058ac9ba
BB
3893.sp
3894.LP
3895The following example shows to grant the ability to set quotas and reservations on the \fBusers/home\fR file system. The permissions on \fBusers/home\fR are also displayed.
3896
3897.sp
3898.in +2
3899.nf
3900# \fBzfs allow cindys quota,reservation users/home\fR
3901# \fBzfs allow users/home\fR
3902-------------------------------------------------------------
3903Local+Descendent permissions on (users/home)
3904 user cindys quota,reservation
3905-------------------------------------------------------------
3906cindys% \fBzfs set quota=10G users/home/marks\fR
3907cindys% \fBzfs get quota users/home/marks\fR
3908NAME PROPERTY VALUE SOURCE
6b4e21c6 3909users/home/marks quota 10G local
058ac9ba
BB
3910.fi
3911.in -2
3912.sp
3913
3914.LP
b23d5430 3915\fBExample 21 \fRRemoving ZFS Delegated Permissions on a ZFS Dataset
058ac9ba
BB
3916.sp
3917.LP
3918The following example shows how to remove the snapshot permission from the \fBstaff\fR group on the \fBtank/users\fR file system. The permissions on \fBtank/users\fR are also displayed.
3919
3920.sp
3921.in +2
3922.nf
3923# \fBzfs unallow staff snapshot tank/users\fR
3924# \fBzfs allow tank/users\fR
3925-------------------------------------------------------------
3926Permission sets on (tank/users)
3927 @pset create,destroy,mount,snapshot
3928Create time permissions on (tank/users)
3929 create,destroy
3930Local+Descendent permissions on (tank/users)
3931 group staff @pset,create,mount
6b4e21c6 3932-------------------------------------------------------------
058ac9ba
BB
3933.fi
3934.in -2
3935.sp
3936
0677cb6f 3937.LP
b23d5430 3938\fBExample 22\fR Showing the differences between a snapshot and a ZFS Dataset
0677cb6f
RL
3939.sp
3940.LP
3941The following example shows how to see what has changed between a prior
3942snapshot of a ZFS Dataset and its current state. The \fB-F\fR option is used
3943to indicate type information for the files affected.
3944
3945.sp
3946.in +2
3947.nf
3948# zfs diff -F tank/test@before tank/test
3949M / /tank/test/
3950M F /tank/test/linked (+1)
3951R F /tank/test/oldname -> /tank/test/newname
3952- F /tank/test/deleted
3953+ F /tank/test/created
3954M F /tank/test/modified
3955.fi
3956.in -2
3957.sp
3958
a215ee16 3959.LP
b23d5430 3960\fBExample 23\fR Creating a bookmark
a215ee16
TF
3961.sp
3962.LP
3963The following example create a bookmark to a snapshot. This bookmark can then
3964be used instead of snapshot in send streams.
3965
3966.sp
3967.in +2
3968.nf
3969# zfs bookmark rpool@snapshot rpool#bookmark
3970.fi
3971.in -2
3972.sp
3973
71bd0645
TF
3974.SH "ENVIRONMENT VARIABLES"
3975.TP
3976.B "ZFS_ABORT
3977Cause \fBzfs\fR to dump core on exit for the purposes of running \fB::findleaks\fR.
3978
058ac9ba 3979.SH EXIT STATUS
058ac9ba
BB
3980.LP
3981The following exit values are returned:
3982.sp
3983.ne 2
058ac9ba
BB
3984.na
3985\fB\fB0\fR\fR
3986.ad
3987.sp .6
3988.RS 4n
6b4e21c6 3989Successful completion.
058ac9ba
BB
3990.RE
3991
3992.sp
3993.ne 2
058ac9ba
BB
3994.na
3995\fB\fB1\fR\fR
3996.ad
3997.sp .6
3998.RS 4n
3999An error occurred.
4000.RE
4001
4002.sp
4003.ne 2
058ac9ba
BB
4004.na
4005\fB\fB2\fR\fR
4006.ad
4007.sp .6
4008.RS 4n
4009Invalid command line options were specified.
4010.RE
4011
058ac9ba 4012.SH SEE ALSO
058ac9ba 4013.LP
83426735 4014\fBchmod\fR(2), \fBfsync\fR(2), \fBgzip\fR(1), \fBls\fR(1), \fBmount\fR(8), \fBopen\fR(2), \fBreaddir\fR(3), \fBssh\fR(1), \fBstat\fR(2), \fBwrite\fR(2), \fBzpool\fR(8), \fBzfs-module-parameters\fR(5)
6a107f41
RL
4015.sp
4016On Solaris: \fBdfstab(4)\fR, \fBiscsitadm(1M)\fR, \fBmount(1M)\fR, \fBshare(1M)\fR, \fBsharemgr(1M)\fR, \fBunshare(1M)\fR