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