]> git.proxmox.com Git - mirror_zfs.git/blame - man/man8/zfs.8
Illumos #1726: Removal of pyzfs broke delegation for volumes
[mirror_zfs.git] / man / man8 / zfs.8
CommitLineData
058ac9ba
BB
1'\" te
2.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
330d06f9 3.\" Copyright (c) 2011 by Delphix. All rights reserved.
bb8b81ec 4.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
058ac9ba
BB
5.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
6.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
7.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
330d06f9 8.TH zfs 8 "10 Jul 2012" "ZFS pool 28, filesystem 5" "System Administration Commands"
058ac9ba
BB
9.SH NAME
10zfs \- configures ZFS file systems
11.SH SYNOPSIS
12.LP
13.nf
14\fBzfs\fR [\fB-?\fR]
15.fi
16
17.LP
18.nf
19\fBzfs\fR \fBcreate\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem\fR
20.fi
21
22.LP
23.nf
24\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
25.fi
26
27.LP
28.nf
330d06f9 29\fBzfs\fR \fBdestroy\fR [\fB-fnpRrv\fR] \fIfilesystem\fR|\fIvolume\fR
058ac9ba
BB
30.fi
31
32.LP
33.nf
330d06f9 34\fBzfs\fR \fBdestroy\fR [\fB-dnpRrv\fR] \fIfilesystem\fR|\fIvolume\fR@\fIsnap\fR[%\fIsnap\fR][,...]
058ac9ba
BB
35.fi
36
37.LP
38.nf
10b75496 39\fBzfs\fR \fBsnapshot | snap\fR [\fB-r\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR]...
058ac9ba
BB
40 \fIfilesystem@snapname\fR|\fIvolume@snapname\fR
41.fi
42
43.LP
44.nf
45\fBzfs\fR \fBrollback\fR [\fB-rRf\fR] \fIsnapshot\fR
46.fi
47
48.LP
49.nf
50\fBzfs\fR \fBclone\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIsnapshot\fR \fIfilesystem\fR|\fIvolume\fR
51.fi
52
53.LP
54.nf
55\fBzfs\fR \fBpromote\fR \fIclone-filesystem\fR
56.fi
57
58.LP
59.nf
60\fBzfs\fR \fBrename\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR
61 \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR
62.fi
63
64.LP
65.nf
66\fBzfs\fR \fBrename\fR [\fB-p\fR] \fIfilesystem\fR|\fIvolume\fR \fIfilesystem\fR|\fIvolume\fR
67.fi
68
69.LP
70.nf
71\fBzfs\fR \fBrename\fR \fB-r\fR \fIsnapshot\fR \fIsnapshot\fR
72.fi
73
74.LP
75.nf
76\fBzfs\fR \fBlist\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-H\fR][\fB-o\fR \fIproperty\fR[,...]] [\fB-t\fR \fItype\fR[,...]]
cf81b00a 77 [\fB-s\fR \fIproperty\fR] ... [\fB-S\fR \fIproperty\fR] ... [\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR|\fIsnap\fR] ...
058ac9ba
BB
78.fi
79
80.LP
81.nf
82\fBzfs\fR \fBset\fR \fIproperty\fR=\fIvalue\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...
83.fi
84
85.LP
86.nf
87\fBzfs\fR \fBget\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-Hp\fR][\fB-o\fR \fIfield\fR[,...]] [\fB-s\fR \fIsource\fR[,...]]
88 "\fIall\fR" | \fIproperty\fR[,...] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...
89.fi
90
91.LP
92.nf
93\fBzfs\fR \fBinherit\fR [\fB-r\fR] \fIproperty\fR \fIfilesystem\fR|\fIvolume|snapshot\fR ...
94.fi
95
96.LP
97.nf
98\fBzfs\fR \fBupgrade\fR [\fB-v\fR]
99.fi
100
101.LP
102.nf
103\fBzfs\fR \fBupgrade\fR [\fB-r\fR] [\fB-V\fR \fIversion\fR] \fB-a\fR | \fIfilesystem\fR
104.fi
105
106.LP
107.nf
108\fBzfs\fR \fBuserspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR] ...
330d06f9 109 [\fB-t\fR \fItype\fR[,...]] \fIfilesystem\fR|\fIsnapshot\fR
058ac9ba
BB
110.fi
111
112.LP
113.nf
114\fBzfs\fR \fBgroupspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR] ...
330d06f9 115 [\fB-t\fR \fItype\fR[,...]] \fIfilesystem\fR|\fIsnapshot\fR
058ac9ba
BB
116.fi
117
118.LP
119.nf
120\fBzfs\fR \fBmount\fR
121.fi
122
123.LP
124.nf
125\fBzfs\fR \fBmount\fR [\fB-vO\fR] [\fB-o \fIoptions\fR\fR] \fB-a\fR | \fIfilesystem\fR
126.fi
127
128.LP
129.nf
10b75496 130\fBzfs\fR \fBunmount | umount\fR [\fB-f\fR] \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR
058ac9ba
BB
131.fi
132
133.LP
134.nf
135\fBzfs\fR \fBshare\fR \fB-a\fR | \fIfilesystem\fR
136.fi
137
138.LP
139.nf
140\fBzfs\fR \fBunshare\fR \fB-a\fR \fIfilesystem\fR|\fImountpoint\fR
141.fi
142
143.LP
144.nf
330d06f9 145\fBzfs\fR \fBsend\fR [\fB-DnPpRrv\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR] \fIsnapshot\fR
058ac9ba
BB
146.fi
147
148.LP
149.nf
10b75496 150\fBzfs\fR \fBreceive | recv\fR [\fB-vnFu\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR
058ac9ba
BB
151.fi
152
153.LP
154.nf
bb8b81ec 155\fBzfs\fR \fBreceive | recv\fR [\fB-vnFu\fR] [\fB-d\fR|\fB-e\fR] \fIfilesystem\fR
058ac9ba
BB
156.fi
157
158.LP
159.nf
160\fBzfs\fR \fBallow\fR \fIfilesystem\fR|\fIvolume\fR
161.fi
162
163.LP
164.nf
165\fBzfs\fR \fBallow\fR [\fB-ldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] \fIperm\fR|\fI@setname\fR[,...]
166 \fIfilesystem\fR|\fIvolume\fR
167.fi
168
169.LP
170.nf
171\fBzfs\fR \fBallow\fR [\fB-ld\fR] \fB-e\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR
172.fi
173
174.LP
175.nf
176\fBzfs\fR \fBallow\fR \fB-c\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR
177.fi
178
179.LP
180.nf
181\fBzfs\fR \fBallow\fR \fB-s\fR @\fIsetname\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR
182.fi
183
184.LP
185.nf
186\fBzfs\fR \fBunallow\fR [\fB-rldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] [\fIperm\fR|@\fIsetname\fR[,... ]]
187 \fIfilesystem\fR|\fIvolume\fR
188.fi
189
190.LP
191.nf
192\fBzfs\fR \fBunallow\fR [\fB-rld\fR] \fB-e\fR [\fIperm\fR|@\fIsetname\fR[,... ]] \fIfilesystem\fR|\fIvolume\fR
193.fi
194
195.LP
196.nf
197\fBzfs\fR \fBunallow\fR [\fB-r\fR] \fB-c\fR [\fIperm\fR|@\fIsetname\fR[ ... ]] \fIfilesystem\fR|\fIvolume\fR
198.fi
199
200.LP
201.nf
202\fBzfs\fR \fBunallow\fR [\fB-r\fR] \fB-s\fR @\fIsetname\fR [\fIperm\fR|@\fIsetname\fR[,... ]] \fIfilesystem\fR|\fIvolume\fR
203.fi
204
205.LP
206.nf
207\fBzfs\fR \fBhold\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...
208.fi
209
210.LP
211.nf
212\fBzfs\fR \fBholds\fR [\fB-r\fR] \fIsnapshot\fR...
213.fi
214
215.LP
216.nf
217\fBzfs\fR \fBrelease\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...
218.fi
219
220.SH DESCRIPTION
221.sp
222.LP
2d1b7b0b 223The \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
224.sp
225.in +2
226.nf
227pool/{filesystem,volume,snapshot}
228.fi
229.in -2
230.sp
231
232.sp
233.LP
234where the maximum length of a dataset name is \fBMAXNAMELEN\fR (256 bytes).
235.sp
236.LP
237A dataset can be one of the following:
238.sp
239.ne 2
240.mk
241.na
242\fB\fIfile system\fR\fR
243.ad
244.sp .6
245.RS 4n
246A \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.
247.RE
248
249.sp
250.ne 2
251.mk
252.na
253\fB\fIvolume\fR\fR
254.ad
255.sp .6
256.RS 4n
257A 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.
258.RE
259
260.sp
261.ne 2
262.mk
263.na
264\fB\fIsnapshot\fR\fR
265.ad
266.sp .6
267.RS 4n
268A 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.
269.RE
270
271.SS "ZFS File System Hierarchy"
272.sp
273.LP
274A \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.
275.sp
276.LP
2d1b7b0b 277The 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
278.sp
279.LP
2d1b7b0b 280See \fBzpool\fR(8) for more information on creating and administering pools.
058ac9ba
BB
281.SS "Snapshots"
282.sp
283.LP
284A 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.
285.sp
286.LP
287Snapshots can have arbitrary names. Snapshots of volumes can be cloned or rolled back, but cannot be accessed independently.
288.sp
289.LP
290File 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.
291.SS "Clones"
292.sp
293.LP
294A 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.
295.sp
296.LP
297Clones 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.
298.sp
299.LP
300The 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.
301.SS "Mount Points"
302.sp
303.LP
9a616b5d 304Creating 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
305.sp
306.LP
307By 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.
308.sp
309.LP
9a616b5d 310A 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
311.sp
312.LP
313A file system \fBmountpoint\fR property of \fBnone\fR prevents the file system from being mounted.
314.sp
315.LP
9a616b5d 316If 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.
058ac9ba
BB
317.SS "Native Properties"
318.sp
319.LP
320Properties are divided into two types, native properties and user-defined (or "user") properties. Native properties either export internal statistics or control \fBZFS\fR behavior. In addition, native properties are either editable or read-only. User properties have no effect on \fBZFS\fR behavior, but you can use them to annotate datasets in a way that is meaningful in your environment. For more information about user properties, see the "User Properties" section, below.
321.sp
322.LP
323Every dataset has a set of properties that export statistics about the dataset as well as control various behaviors. Properties are inherited from the parent unless overridden by the child. Some properties apply only to certain types of datasets (file systems, volumes, or snapshots).
324.sp
325.LP
326The values of numeric properties can be specified using human-readable suffixes (for example, \fBk\fR, \fBKB\fR, \fBM\fR, \fBGb\fR, and so forth, up to \fBZ\fR for zettabyte). The following are all valid (and equal) specifications:
327.sp
328.in +2
329.nf
3301536M, 1.5g, 1.50GB
331.fi
332.in -2
333.sp
334
335.sp
336.LP
337The values of non-numeric properties are case sensitive and must be lowercase, except for \fBmountpoint\fR, \fBsharenfs\fR, and \fBsharesmb\fR.
338.sp
339.LP
340The following native properties consist of read-only statistics about the dataset. These properties can be neither set, nor inherited. Native properties apply to all dataset types unless otherwise noted.
341.sp
342.ne 2
343.mk
344.na
345\fB\fBavailable\fR\fR
346.ad
347.sp .6
348.RS 4n
349The 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.
350.sp
351This property can also be referred to by its shortened column name, \fBavail\fR.
352.RE
353
354.sp
355.ne 2
356.mk
357.na
358\fB\fBcompressratio\fR\fR
359.ad
360.sp .6
361.RS 4n
f5fc4aca 362For 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
363.RE
364
365.sp
366.ne 2
367.mk
368.na
369\fB\fBcreation\fR\fR
370.ad
371.sp .6
372.RS 4n
373The time this dataset was created.
374.RE
375
376.sp
377.ne 2
378.mk
379.na
330d06f9
MA
380\fB\fBclones\fR\fR
381.ad
382.sp .6
383.RS 4n
384For snapshots, this property is a comma-separated list of filesystems or
385volumes which are clones of this snapshot. The clones' \fBorigin\fR property
386is this snapshot. If the \fBclones\fR property is not empty, then this
387snapshot can not be destroyed (even with the \fB-r\fR or \fB-f\fR options).
388.RE
389
390.sp
391.ne 2
392.na
058ac9ba
BB
393\fB\fBdefer_destroy\fR\fR
394.ad
395.sp .6
396.RS 4n
3b204150 397This 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
398.RE
399
400.sp
401.ne 2
402.mk
403.na
404\fB\fBmounted\fR\fR
405.ad
406.sp .6
407.RS 4n
408For file systems, indicates whether the file system is currently mounted. This property can be either \fByes\fR or \fBno\fR.
409.RE
410
411.sp
412.ne 2
413.mk
414.na
415\fB\fBorigin\fR\fR
416.ad
417.sp .6
418.RS 4n
330d06f9 419For cloned file systems or volumes, the snapshot from which the clone was created. See also the \fBclones\fR property.
058ac9ba
BB
420.RE
421
422.sp
423.ne 2
424.mk
425.na
426\fB\fBreferenced\fR\fR
427.ad
428.sp .6
429.RS 4n
430The 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.
431.sp
432This property can also be referred to by its shortened column name, \fBrefer\fR.
433.RE
434
f5fc4aca
MA
435.sp
436.ne 2
437.mk
438.na
439\fB\fBrefcompressratio\fR\fR
440.ad
441.sp .6
442.RS 4n
443The compression ratio achieved for the \fBreferenced\fR space of this
444dataset, expressed as a multiplier. See also the \fBcompressratio\fR
445property.
446.RE
447
058ac9ba
BB
448.sp
449.ne 2
450.mk
451.na
452\fB\fBtype\fR\fR
453.ad
454.sp .6
455.RS 4n
456The type of dataset: \fBfilesystem\fR, \fBvolume\fR, or \fBsnapshot\fR.
457.RE
458
459.sp
460.ne 2
461.mk
462.na
463\fB\fBused\fR\fR
464.ad
465.sp .6
466.RS 4n
467The 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.
468.sp
469When 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.
470.sp
2d1b7b0b 471The 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
472.RE
473
474.sp
475.ne 2
476.mk
477.na
478\fB\fBusedby*\fR\fR
479.ad
480.sp .6
481.RS 4n
482The \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" pools.
483.RE
484
485.sp
486.ne 2
487.mk
488.na
489\fB\fBusedbychildren\fR\fR
490.ad
491.sp .6
492.RS 4n
493The amount of space used by children of this dataset, which would be freed if all the dataset's children were destroyed.
494.RE
495
496.sp
497.ne 2
498.mk
499.na
500\fB\fBusedbydataset\fR\fR
501.ad
502.sp .6
503.RS 4n
504The 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).
505.RE
506
507.sp
508.ne 2
509.mk
510.na
511\fB\fBusedbyrefreservation\fR\fR
512.ad
513.sp .6
514.RS 4n
515The amount of space used by a \fBrefreservation\fR set on this dataset, which would be freed if the \fBrefreservation\fR was removed.
516.RE
517
518.sp
519.ne 2
520.mk
521.na
522\fB\fBusedbysnapshots\fR\fR
523.ad
524.sp .6
525.RS 4n
526The 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.
527.RE
528
529.sp
530.ne 2
531.mk
532.na
533\fB\fBuserused@\fR\fIuser\fR\fR
534.ad
535.sp .6
536.RS 4n
537The 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.
538.sp
539Unprivileged 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.
540.sp
541The \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:
542.RS +4
543.TP
544.ie t \(bu
545.el o
546\fIPOSIX name\fR (for example, \fBjoe\fR)
547.RE
548.RS +4
549.TP
550.ie t \(bu
551.el o
552\fIPOSIX numeric ID\fR (for example, \fB789\fR)
553.RE
554.RS +4
555.TP
556.ie t \(bu
557.el o
558\fISID name\fR (for example, \fBjoe.smith@mydomain\fR)
559.RE
560.RS +4
561.TP
562.ie t \(bu
563.el o
564\fISID numeric ID\fR (for example, \fBS-1-123-456-789\fR)
565.RE
566.RE
567
568.sp
569.ne 2
570.mk
571.na
572\fB\fBuserrefs\fR\fR
573.ad
574.sp .6
575.RS 4n
576This property is set to the number of user holds on this snapshot. User holds are set by using the \fBzfs hold\fR command.
577.RE
578
579.sp
580.ne 2
581.mk
582.na
583\fB\fBgroupused@\fR\fIgroup\fR\fR
584.ad
585.sp .6
586.RS 4n
587The 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.
588.sp
589Unprivileged 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.
590.RE
591
592.sp
593.ne 2
594.mk
595.na
596\fB\fBvolblocksize\fR=\fIblocksize\fR\fR
597.ad
598.sp .6
599.RS 4n
600For volumes, specifies the block size of the volume. The \fBblocksize\fR cannot be changed once the volume has been written, so it should be set at volume creation time. The default \fBblocksize\fR for volumes is 8 Kbytes. Any power of 2 from 512 bytes to 128 Kbytes is valid.
601.sp
602This property can also be referred to by its shortened column name, \fBvolblock\fR.
603.RE
604
330d06f9
MA
605.sp
606.ne 2
607.na
608\fB\fBwritten\fR\fR
609.ad
610.sp .6
611.RS 4n
612The amount of \fBreferenced\fR space written to this dataset since the
613previous snapshot.
614.RE
615
616.sp
617.ne 2
618.na
619\fB\fBwritten@\fR\fIsnapshot\fR\fR
620.ad
621.sp .6
622.RS 4n
623The amount of \fBreferenced\fR space written to this dataset since the
624specified snapshot. This is the space that is referenced by this dataset
625but was not referenced by the specified snapshot.
626.sp
627The \fIsnapshot\fR may be specified as a short snapshot name (just the part
628after the \fB@\fR), in which case it will be interpreted as a snapshot in
629the same filesystem as this dataset.
630The \fIsnapshot\fR be a full snapshot name (\fIfilesystem\fR@\fIsnapshot\fR),
631which for clones may be a snapshot in the origin's filesystem (or the origin
632of the origin's filesystem, etc).
633.RE
634
058ac9ba
BB
635.sp
636.LP
637The following native properties can be used to change the behavior of a \fBZFS\fR dataset.
638.sp
639.ne 2
640.mk
641.na
642\fB\fBaclinherit\fR=\fBdiscard\fR | \fBnoallow\fR | \fBrestricted\fR | \fBpassthrough\fR | \fBpassthrough-x\fR\fR
643.ad
644.sp .6
645.RS 4n
646Controls 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.
647.sp
648When 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.
649.RE
650
651.sp
652.ne 2
653.mk
654.na
655\fB\fBaclmode\fR=\fBdiscard\fR | \fBgroupmask\fR | \fBpassthrough\fR\fR
656.ad
657.sp .6
658.RS 4n
659Controls how an \fBACL\fR is modified during \fBchmod\fR(2). A file system with an \fBaclmode\fR property of \fBdiscard\fR deletes all \fBACL\fR entries that do not represent the mode of the file. An \fBaclmode\fR property of \fBgroupmask\fR (the default) reduces user or group permissions. The permissions are reduced, such that they are no greater than the group permission bits, unless it is a user entry that has the same \fBUID\fR as the owner of the file or directory. In this case, the \fBACL\fR permissions are reduced so that they are no greater than owner permission bits. A file system with an \fBaclmode\fR property of \fBpassthrough\fR indicates that no changes are made to the \fBACL\fR other than generating the necessary \fBACL\fR entries to represent the new mode of the file or directory.
660.RE
661
662.sp
663.ne 2
664.mk
665.na
666\fB\fBatime\fR=\fBon\fR | \fBoff\fR\fR
667.ad
668.sp .6
669.RS 4n
670Controls whether the access time for files is updated when they are read. Turning this property off 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.
671.RE
672
673.sp
674.ne 2
675.mk
676.na
677\fB\fBcanmount\fR=\fBon\fR | \fBoff\fR | \fBnoauto\fR\fR
678.ad
679.sp .6
680.RS 4n
681If 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.
682.sp
683When 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.
684.sp
685This property is not inherited.
686.RE
687
688.sp
689.ne 2
690.mk
691.na
692\fB\fBchecksum\fR=\fBon\fR | \fBoff\fR | \fBfletcher2,\fR| \fBfletcher4\fR | \fBsha256\fR\fR
693.ad
694.sp .6
695.RS 4n
696Controls the checksum used to verify data integrity. The default value is \fBon\fR, which automatically selects an appropriate algorithm (currently, \fBfletcher2\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.
697.sp
698Changing this property affects only newly-written data.
699.RE
700
701.sp
702.ne 2
703.mk
704.na
f4605f07 705\fBcompression\fR=\fBon\fR | \fBoff\fR | \fBlzjb\fR | \fBgzip\fR | \fBgzip-\fR\fIN\fR | \fBzle\fR
058ac9ba
BB
706.ad
707.sp .6
708.RS 4n
f4605f07
RL
709Controls the compression algorithm used for this dataset. The \fBlzjb\fR compression algorithm is optimized for performance while providing decent data compression. Setting compression to \fBon\fR uses the \fBlzjb\fR compression algorithm.
710.sp
711The \fBgzip\fR compression algorithm uses the same compression as the \fBgzip\fR(1) command. You can specify the \fBgzip\fR level by using the value \fBgzip-\fR\fIN\fR where \fIN\fR is an integer from 1 (fastest) to 9 (best compression ratio). Currently, \fBgzip\fR is equivalent to \fBgzip-6\fR (which is also the default for \fBgzip\fR(1)).
712.sp
713The \fBzle\fR (zero-length encoding) compression algorithm is a fast and simple algorithm to eliminate runs of zeroes.
058ac9ba
BB
714.sp
715This property can also be referred to by its shortened column name \fBcompress\fR. Changing this property affects only newly-written data.
716.RE
717
718.sp
719.ne 2
720.mk
721.na
722\fB\fBcopies\fR=\fB1\fR | \fB2\fR | \fB3\fR\fR
723.ad
724.sp .6
725.RS 4n
726Controls 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.
727.sp
728Changing 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.
729.RE
730
731.sp
732.ne 2
733.mk
734.na
735\fB\fBdevices\fR=\fBon\fR | \fBoff\fR\fR
736.ad
737.sp .6
738.RS 4n
739Controls whether device nodes can be opened on this file system. The default value is \fBon\fR.
740.RE
741
742.sp
743.ne 2
744.mk
745.na
746\fB\fBexec\fR=\fBon\fR | \fBoff\fR\fR
747.ad
748.sp .6
749.RS 4n
750Controls whether processes can be executed from within this file system. The default value is \fBon\fR.
751.RE
752
753.sp
754.ne 2
755.mk
756.na
757\fB\fBmountpoint\fR=\fIpath\fR | \fBnone\fR | \fBlegacy\fR\fR
758.ad
759.sp .6
760.RS 4n
761Controls the mount point used for this file system. See the "Mount Points" section for more information on how this property is used.
762.sp
763When 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.
764.RE
765
766.sp
767.ne 2
768.mk
769.na
770\fB\fBnbmand\fR=\fBon\fR | \fBoff\fR\fR
771.ad
772.sp .6
773.RS 4n
2d1b7b0b 774Controls 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(8) for more information on \fBnbmand\fR mounts.
058ac9ba
BB
775.RE
776
777.sp
778.ne 2
779.mk
780.na
781\fB\fBprimarycache\fR=\fBall\fR | \fBnone\fR | \fBmetadata\fR\fR
782.ad
783.sp .6
784.RS 4n
785Controls 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.
786.RE
787
788.sp
789.ne 2
790.mk
791.na
792\fB\fBquota\fR=\fIsize\fR | \fBnone\fR\fR
793.ad
794.sp .6
795.RS 4n
796Limits 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.
797.sp
798Quotas cannot be set on volumes, as the \fBvolsize\fR property acts as an implicit quota.
799.RE
800
801.sp
802.ne 2
803.mk
804.na
805\fB\fBuserquota@\fR\fIuser\fR=\fIsize\fR | \fBnone\fR\fR
806.ad
807.sp .6
808.RS 4n
809Limits the amount of space consumed by the specified user. User space consumption is identified by the \fBuserspace@\fR\fIuser\fR property.
810.sp
811Enforcement 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.
812.sp
813Unprivileged 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.
814.sp
815This 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:
816.RS +4
817.TP
818.ie t \(bu
819.el o
820\fIPOSIX name\fR (for example, \fBjoe\fR)
821.RE
822.RS +4
823.TP
824.ie t \(bu
825.el o
826\fIPOSIX numeric ID\fR (for example, \fB789\fR)
827.RE
828.RS +4
829.TP
830.ie t \(bu
831.el o
832\fISID name\fR (for example, \fBjoe.smith@mydomain\fR)
833.RE
834.RS +4
835.TP
836.ie t \(bu
837.el o
838\fISID numeric ID\fR (for example, \fBS-1-123-456-789\fR)
839.RE
840.RE
841
842.sp
843.ne 2
844.mk
845.na
846\fB\fBgroupquota@\fR\fIgroup\fR=\fIsize\fR | \fBnone\fR\fR
847.ad
848.sp .6
849.RS 4n
850Limits the amount of space consumed by the specified group. Group space consumption is identified by the \fBuserquota@\fR\fIuser\fR property.
851.sp
852Unprivileged 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.
853.RE
854
855.sp
856.ne 2
857.mk
858.na
859\fB\fBreadonly\fR=\fBon\fR | \fBoff\fR\fR
860.ad
861.sp .6
862.RS 4n
863Controls whether this dataset can be modified. The default value is \fBoff\fR.
864.sp
865This property can also be referred to by its shortened column name, \fBrdonly\fR.
866.RE
867
868.sp
869.ne 2
870.mk
871.na
872\fB\fBrecordsize\fR=\fIsize\fR\fR
873.ad
874.sp .6
875.RS 4n
876Specifies 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.
877.sp
878For 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.
879.sp
880The size specified must be a power of two greater than or equal to 512 and less than or equal to 128 Kbytes.
881.sp
882Changing the file system's \fBrecordsize\fR affects only files created afterward; existing files are unaffected.
883.sp
884This property can also be referred to by its shortened column name, \fBrecsize\fR.
885.RE
886
887.sp
888.ne 2
889.mk
890.na
891\fB\fBrefquota\fR=\fIsize\fR | \fBnone\fR\fR
892.ad
893.sp .6
894.RS 4n
895Limits 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.
896.RE
897
898.sp
899.ne 2
900.mk
901.na
902\fB\fBrefreservation\fR=\fIsize\fR | \fBnone\fR\fR
903.ad
904.sp .6
905.RS 4n
906The 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.
907.sp
908If \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.
909.sp
910This property can also be referred to by its shortened column name, \fBrefreserv\fR.
911.RE
912
913.sp
914.ne 2
915.mk
916.na
917\fB\fBreservation\fR=\fIsize\fR | \fBnone\fR\fR
918.ad
919.sp .6
920.RS 4n
921The 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.
922.sp
923This property can also be referred to by its shortened column name, \fBreserv\fR.
924.RE
925
926.sp
927.ne 2
928.mk
929.na
930\fB\fBsecondarycache\fR=\fBall\fR | \fBnone\fR | \fBmetadata\fR\fR
931.ad
932.sp .6
933.RS 4n
934Controls 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.
935.RE
936
937.sp
938.ne 2
939.mk
940.na
941\fB\fBsetuid\fR=\fBon\fR | \fBoff\fR\fR
942.ad
943.sp .6
944.RS 4n
945Controls whether the set-\fBUID\fR bit is respected for the file system. The default value is \fBon\fR.
946.RE
947
948.sp
949.ne 2
950.mk
951.na
952\fB\fBshareiscsi\fR=\fBon\fR | \fBoff\fR\fR
953.ad
954.sp .6
955.RS 4n
956Like the \fBsharenfs\fR property, \fBshareiscsi\fR indicates whether a \fBZFS\fR volume is exported as an \fBiSCSI\fR target. The acceptable values for this property are \fBon\fR, \fBoff\fR, and \fBtype=disk\fR. The default value is \fBoff\fR. In the future, other target types might be supported. For example, \fBtape\fR.
957.sp
958You might want to set \fBshareiscsi=on\fR for a file system so that all \fBZFS\fR volumes within the file system are shared by default. However, setting this property on a file system has no direct effect.
959.RE
960
961.sp
962.ne 2
963.mk
964.na
965\fB\fBsharesmb\fR=\fBon\fR | \fBoff\fR | \fIopts\fR\fR
966.ad
967.sp .6
968.RS 4n
969Controls whether the file system is shared by using the Solaris \fBCIFS\fR service, and what options are to be used. A file system with the \fBsharesmb\fR property set to \fBoff\fR is managed through traditional tools such as \fBsharemgr\fR(1M). 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 \fBsharemgr\fR(1M) command is invoked with no options. Otherwise, the \fBsharemgr\fR(1M) command is invoked with options equivalent to the contents of this property.
970.sp
971Because \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. A pseudo property "name" is also supported that allows you to replace the data set name with a specified name. The specified name is then used to replace the prefix dataset in the case of inheritance. For example, if the dataset \fBdata/home/john\fR is set to \fBname=john\fR, then \fBdata/home/john\fR has a resource name of \fBjohn\fR. If a child dataset of \fBdata/home/john/backups\fR, it has a resource name of \fBjohn_backups\fR.
972.sp
973When SMB shares are created, the SMB share name appears as an entry in the \fB\&.zfs/shares\fR directory. You can use the \fBls\fR or \fBchmod\fR command to display the share-level ACLs on the entries in this directory.
974.sp
975When the \fBsharesmb\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 set to \fBoff\fR, or if they were shared before the property was changed. If the new property is set to \fBoff\fR, the file systems are unshared.
976.RE
977
978.sp
979.ne 2
980.mk
981.na
982\fB\fBsharenfs\fR=\fBon\fR | \fBoff\fR | \fIopts\fR\fR
983.ad
984.sp .6
985.RS 4n
986Controls 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 through traditional tools such as \fBshare\fR(1M), \fBunshare\fR(1M), and \fBdfstab\fR(4). 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 \fBshare\fR(1M) command is invoked with no options. Otherwise, the \fBshare\fR(1M) command is invoked with options equivalent to the contents of this property.
987.sp
988When 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.
989.RE
990
991.sp
992.ne 2
993.mk
994.na
995\fB\fBlogbias\fR = \fBlatency\fR | \fBthroughput\fR\fR
996.ad
997.sp .6
998.RS 4n
999Provide 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.
1000.RE
1001
1002.sp
1003.ne 2
1004.mk
1005.na
1006\fB\fBsnapdir\fR=\fBhidden\fR | \fBvisible\fR\fR
1007.ad
1008.sp .6
1009.RS 4n
1010Controls 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.
1011.RE
1012
1013.sp
1014.ne 2
1015.mk
1016.na
330d06f9
MA
1017\fB\fBsync\fR=\fBdefault\fR | \fBalways\fR | \fBdisabled\fR\fR
1018.ad
1019.sp .6
1020.RS 4n
1021Controls the behavior of synchronous requests (e.g. fsync, O_DSYNC).
1022\fBdefault\fR is the POSIX specified behavior of ensuring all synchronous
1023requests are written to stable storage and all devices are flushed to ensure
1024data is not cached by device controllers (this is the default). \fBalways\fR
1025causes every file system transaction to be written and flushed before its
1026system call returns. This has a large performance penalty. \fBdisabled\fR
1027disables synchronous requests. File system transactions are only committed to
1028stable storage periodically. This option will give the highest performance.
1029However, it is very dangerous as ZFS would be ignoring the synchronous
1030transaction demands of applications such as databases or NFS. Administrators
1031should only use this option when the risks are understood.
1032.RE
1033
1034.sp
1035.ne 2
1036.na
058ac9ba
BB
1037\fB\fBversion\fR=\fB1\fR | \fB2\fR | \fBcurrent\fR\fR
1038.ad
1039.sp .6
1040.RS 4n
1041The 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.
1042.RE
1043
1044.sp
1045.ne 2
1046.mk
1047.na
1048\fB\fBvolsize\fR=\fIsize\fR\fR
1049.ad
1050.sp .6
1051.RS 4n
1052For 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.
1053.sp
1054The 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.
1055.sp
1056Though 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.
1057.RE
1058
1059.sp
1060.ne 2
1061.mk
1062.na
1063\fB\fBvscan\fR=\fBon\fR | \fBoff\fR\fR
1064.ad
1065.sp .6
1066.RS 4n
1067Controls 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.
1068.RE
1069
1070.sp
1071.ne 2
1072.mk
1073.na
1074\fB\fBxattr\fR=\fBon\fR | \fBoff\fR\fR
1075.ad
1076.sp .6
1077.RS 4n
1078Controls whether extended attributes are enabled for this file system. The default value is \fBon\fR.
1079.RE
1080
1081.sp
1082.ne 2
1083.mk
1084.na
1085\fB\fBzoned\fR=\fBon\fR | \fBoff\fR\fR
1086.ad
1087.sp .6
1088.RS 4n
4da4a9e1 1089Controls 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
1090.RE
1091
1092.sp
1093.LP
1094The 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.
1095.sp
1096.ne 2
1097.mk
1098.na
1099\fB\fBcasesensitivity\fR=\fBsensitive\fR | \fBinsensitive\fR | \fBmixed\fR\fR
1100.ad
1101.sp .6
1102.RS 4n
1103Indicates 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.
1104.sp
1105The \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. For more information about the \fBmixed\fR value behavior, see the \fISolaris ZFS Administration Guide\fR.
1106.RE
1107
1108.sp
1109.ne 2
1110.mk
1111.na
1112\fB\fBnormalization\fR = \fBnone\fR | \fBformC\fR | \fBformD\fR | \fBformKC\fR | \fBformKD\fR\fR
1113.ad
1114.sp .6
1115.RS 4n
1116Indicates 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.
1117.RE
1118
1119.sp
1120.ne 2
1121.mk
1122.na
1123\fB\fButf8only\fR=\fBon\fR | \fBoff\fR\fR
1124.ad
1125.sp .6
1126.RS 4n
1127Indicates 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.
1128.RE
1129
1130.sp
1131.LP
1132The \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.
1133.SS "Temporary Mount Point Properties"
1134.sp
1135.LP
2d1b7b0b 1136When 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
1137.sp
1138.in +2
1139.nf
1140 PROPERTY MOUNT OPTION
1141 devices devices/nodevices
1142 exec exec/noexec
1143 readonly ro/rw
1144 setuid setuid/nosetuid
1145 xattr xattr/noxattr
1146.fi
1147.in -2
1148.sp
1149
1150.sp
1151.LP
1152In 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.
1153.SS "User Properties"
1154.sp
1155.LP
1156In 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).
1157.sp
1158.LP
1159User 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).
1160.sp
1161.LP
4da4a9e1 1162When 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 use by Oracle Corporation (which acquired Sun Microsystems).
058ac9ba
BB
1163.sp
1164.LP
1165The 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 1166.SS "ZFS Volumes as Swap"
058ac9ba
BB
1167.sp
1168.LP
4da4a9e1 1169Do not swap to a file on a \fBZFS\fR file system. A \fBZFS\fR swap file configuration is not supported.
058ac9ba
BB
1170.SH SUBCOMMANDS
1171.sp
1172.LP
1173All subcommands that modify state are logged persistently to the pool in their original form.
1174.sp
1175.ne 2
1176.mk
1177.na
1178\fB\fBzfs ?\fR\fR
1179.ad
1180.sp .6
1181.RS 4n
1182Displays a help message.
1183.RE
1184
1185.sp
1186.ne 2
1187.mk
1188.na
1189\fB\fBzfs create\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem\fR\fR
1190.ad
1191.sp .6
1192.RS 4n
1193Creates a new \fBZFS\fR file system. The file system is automatically mounted according to the \fBmountpoint\fR property inherited from the parent.
1194.sp
1195.ne 2
1196.mk
1197.na
1198\fB\fB-p\fR\fR
1199.ad
1200.sp .6
1201.RS 4n
1202Creates 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.
1203.RE
1204
1205.sp
1206.ne 2
1207.mk
1208.na
1209\fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1210.ad
1211.sp .6
1212.RS 4n
1213Sets 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.
1214.RE
1215
1216.RE
1217
1218.sp
1219.ne 2
1220.mk
1221.na
1222\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
1223.ad
1224.sp .6
1225.RS 4n
1fe2e237 1226Creates 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
BB
1227.sp
1228\fIsize\fR is automatically rounded up to the nearest 128 Kbytes to ensure that the volume has an integral number of blocks regardless of \fIblocksize\fR.
1229.sp
1230.ne 2
1231.mk
1232.na
1233\fB\fB-p\fR\fR
1234.ad
1235.sp .6
1236.RS 4n
1237Creates 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.
1238.RE
1239
1240.sp
1241.ne 2
1242.mk
1243.na
1244\fB\fB-s\fR\fR
1245.ad
1246.sp .6
1247.RS 4n
1248Creates a sparse volume with no reservation. See \fBvolsize\fR in the Native Properties section for more information about sparse volumes.
1249.RE
1250
1251.sp
1252.ne 2
1253.mk
1254.na
1255\fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1256.ad
1257.sp .6
1258.RS 4n
1259Sets 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.
1260.RE
1261
1262.sp
1263.ne 2
1264.mk
1265.na
1266\fB\fB-b\fR \fIblocksize\fR\fR
1267.ad
1268.sp .6
1269.RS 4n
1270Equivalent 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.
1271.RE
1272
1273.RE
1274
1275.sp
1276.ne 2
1277.mk
1278.na
330d06f9 1279\fBzfs destroy\fR [\fB-fnpRrv\fR] \fIfilesystem\fR|\fIvolume\fR
058ac9ba
BB
1280.ad
1281.sp .6
1282.RS 4n
1283Destroys 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).
1284.sp
1285.ne 2
1286.mk
1287.na
1288\fB\fB-r\fR\fR
1289.ad
1290.sp .6
1291.RS 4n
1292Recursively destroy all children.
1293.RE
1294
1295.sp
1296.ne 2
1297.mk
1298.na
1299\fB\fB-R\fR\fR
1300.ad
1301.sp .6
1302.RS 4n
1303Recursively destroy all dependents, including cloned file systems outside the target hierarchy.
1304.RE
1305
1306.sp
1307.ne 2
1308.mk
1309.na
1310\fB\fB-f\fR\fR
1311.ad
1312.sp .6
1313.RS 4n
1314Force 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.
1315.RE
1316
330d06f9
MA
1317.sp
1318.ne 2
1319.na
1320\fB\fB-n\fR\fR
1321.ad
1322.sp .6
1323.RS 4n
1324Do a dry-run ("No-op") deletion. No data will be deleted. This is
1325useful in conjunction with the \fB-v\fR or \fB-p\fR flags to determine what
1326data would be deleted.
1327.RE
1328
1329.sp
1330.ne 2
1331.na
1332\fB\fB-p\fR\fR
1333.ad
1334.sp .6
1335.RS 4n
1336Print machine-parsable verbose information about the deleted data.
1337.RE
1338
1339.sp
1340.ne 2
1341.na
1342\fB\fB-v\fR\fR
1343.ad
1344.sp .6
1345.RS 4n
1346Print verbose information about the deleted data.
1347.RE
1348.sp
1349
f5fc4aca 1350Extreme 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
1351.RE
1352
1353.sp
1354.ne 2
1355.mk
1356.na
330d06f9 1357\fBzfs destroy\fR [\fB-dnpRrv\fR] \fIfilesystem\fR|\fIvolume\fR@\fIsnap\fR[%\fIsnap\fR][,...]
058ac9ba
BB
1358.ad
1359.sp .6
1360.RS 4n
330d06f9
MA
1361The 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.
1362.sp
1363If 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.
1364.sp
1365An inclusive range of snapshots may be specified by separating the
1366first and last snapshots with a percent sign.
1367The first and/or last snapshots may be left blank, in which case the
1368filesystem's oldest or newest snapshot will be implied.
058ac9ba 1369.sp
330d06f9
MA
1370Multiple snapshots
1371(or ranges of snapshots) of the same filesystem or volume may be specified
1372in a comma-separated list of snapshots.
1373Only the snapshot's short name (the
1374part after the \fB@\fR) should be specified when using a range or
1375comma-separated list to identify multiple snapshots.
058ac9ba
BB
1376.sp
1377.ne 2
1378.mk
1379.na
1380\fB\fB-d\fR\fR
1381.ad
1382.sp .6
1383.RS 4n
1384Defer snapshot deletion.
1385.RE
1386
1387.sp
1388.ne 2
1389.mk
1390.na
1391\fB\fB-r\fR\fR
1392.ad
1393.sp .6
1394.RS 4n
3b204150 1395Destroy (or mark for deferred destruction) all snapshots with this name in descendent file systems.
058ac9ba
BB
1396.RE
1397
1398.sp
1399.ne 2
1400.mk
1401.na
1402\fB\fB-R\fR\fR
1403.ad
1404.sp .6
1405.RS 4n
1406Recursively destroy all dependents.
1407.RE
1408
330d06f9
MA
1409.sp
1410.ne 2
1411.na
1412\fB\fB-n\fR\fR
1413.ad
1414.sp .6
1415.RS 4n
1416Do a dry-run ("No-op") deletion. No data will be deleted. This is
1417useful in conjunction with the \fB-v\fR or \fB-p\fR flags to determine what
1418data would be deleted.
1419.RE
1420
1421.sp
1422.ne 2
1423.na
1424\fB\fB-p\fR\fR
1425.ad
1426.sp .6
1427.RS 4n
1428Print machine-parsable verbose information about the deleted data.
1429.RE
1430
1431.sp
1432.ne 2
1433.na
1434\fB\fB-v\fR\fR
1435.ad
1436.sp .6
1437.RS 4n
1438Print verbose information about the deleted data.
1439.RE
1440
1441.sp
1442Extreme care should be taken when applying either the \fB-r\fR or the \fB-f\fR
1443options, as they can destroy large portions of a pool and cause unexpected
1444behavior for mounted file systems in use.
1445.RE
1446
058ac9ba
BB
1447.RE
1448
1449.sp
1450.ne 2
1451.mk
1452.na
1453\fB\fBzfs snapshot\fR [\fB-r\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem@snapname\fR|\fIvolume@snapname\fR\fR
1454.ad
1455.sp .6
1456.RS 4n
1457Creates a snapshot with the given name. All previous modifications by successful system calls to the file system are part of the snapshot. See the "Snapshots" section for details.
1458.sp
1459.ne 2
1460.mk
1461.na
1462\fB\fB-r\fR\fR
1463.ad
1464.sp .6
1465.RS 4n
1466Recursively create snapshots of all descendent datasets. Snapshots are taken atomically, so that all recursive snapshots correspond to the same moment in time.
1467.RE
1468
1469.sp
1470.ne 2
1471.mk
1472.na
1473\fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1474.ad
1475.sp .6
1476.RS 4n
1477Sets the specified property; see \fBzfs create\fR for details.
1478.RE
1479
1480.RE
1481
1482.sp
1483.ne 2
1484.mk
1485.na
1486\fB\fBzfs rollback\fR [\fB-rRf\fR] \fIsnapshot\fR\fR
1487.ad
1488.sp .6
1489.RS 4n
1490Roll 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 must be destroyed by specifying the \fB-r\fR option.
1491.sp
1492The \fB-rR\fR options do not recursively destroy the child snapshots of a recursive snapshot. Only the top-level recursive snapshot is destroyed by either of these options. To completely roll back a recursive snapshot, you must rollback the individual child snapshots.
1493.sp
1494.ne 2
1495.mk
1496.na
1497\fB\fB-r\fR\fR
1498.ad
1499.sp .6
1500.RS 4n
1501Recursively destroy any snapshots more recent than the one specified.
1502.RE
1503
1504.sp
1505.ne 2
1506.mk
1507.na
1508\fB\fB-R\fR\fR
1509.ad
1510.sp .6
1511.RS 4n
1512Recursively destroy any more recent snapshots, as well as any clones of those snapshots.
1513.RE
1514
1515.sp
1516.ne 2
1517.mk
1518.na
1519\fB\fB-f\fR\fR
1520.ad
1521.sp .6
1522.RS 4n
1523Used with the \fB-R\fR option to force an unmount of any clone file systems that are to be destroyed.
1524.RE
1525
1526.RE
1527
1528.sp
1529.ne 2
1530.mk
1531.na
1532\fB\fBzfs clone\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIsnapshot\fR \fIfilesystem\fR|\fIvolume\fR\fR
1533.ad
1534.sp .6
1535.RS 4n
1536Creates 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.
1537.sp
1538.ne 2
1539.mk
1540.na
1541\fB\fB-p\fR\fR
1542.ad
1543.sp .6
1544.RS 4n
1545Creates 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.
1546.RE
1547
1548.sp
1549.ne 2
1550.mk
1551.na
1552\fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1553.ad
1554.sp .6
1555.RS 4n
1556Sets the specified property; see \fBzfs create\fR for details.
1557.RE
1558
1559.RE
1560
1561.sp
1562.ne 2
1563.mk
1564.na
1565\fB\fBzfs promote\fR \fIclone-filesystem\fR\fR
1566.ad
1567.sp .6
1568.RS 4n
1569Promotes 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.
1570.sp
1571The 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.
1572.RE
1573
1574.sp
1575.ne 2
1576.mk
1577.na
1578\fB\fBzfs rename\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
1579.ad
1580.br
1581.na
1582\fB\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
1583.ad
1584.br
1585.na
1586\fB\fBzfs rename\fR [\fB-p\fR] \fIfilesystem\fR|\fIvolume\fR \fIfilesystem\fR|\fIvolume\fR\fR
1587.ad
1588.sp .6
1589.RS 4n
1590Renames 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.
1591.sp
1592.ne 2
1593.mk
1594.na
1595\fB\fB-p\fR\fR
1596.ad
1597.sp .6
1598.RS 4n
1599Creates all the nonexistent parent datasets. Datasets created in this manner are automatically mounted according to the \fBmountpoint\fR property inherited from their parent.
1600.RE
1601
1602.RE
1603
1604.sp
1605.ne 2
1606.mk
1607.na
1608\fB\fBzfs rename\fR \fB-r\fR \fIsnapshot\fR \fIsnapshot\fR\fR
1609.ad
1610.sp .6
1611.RS 4n
1612Recursively rename the snapshots of all descendent datasets. Snapshots are the only dataset that can be renamed recursively.
1613.RE
1614
1615.sp
1616.ne 2
1617.mk
1618.na
cf81b00a 1619\fB\fBzfs\fR \fBlist\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR] [\fB-H\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|\fIsnap\fR] ...\fR
058ac9ba
BB
1620.ad
1621.sp .6
1622.RS 4n
1623Lists the property information for the given datasets in tabular form. If specified, you can list property information by the absolute pathname or the relative pathname. 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) . The following fields are displayed, \fBname,used,available,referenced,mountpoint\fR.
1624.sp
1625.ne 2
1626.mk
1627.na
1628\fB\fB-H\fR\fR
1629.ad
1630.sp .6
1631.RS 4n
1632Used for scripting mode. Do not print headers and separate fields by a single tab instead of arbitrary white space.
1633.RE
1634
1635.sp
1636.ne 2
1637.mk
1638.na
1639\fB\fB-r\fR\fR
1640.ad
1641.sp .6
1642.RS 4n
1643Recursively display any children of the dataset on the command line.
1644.RE
1645
1646.sp
1647.ne 2
1648.mk
1649.na
1650\fB\fB-d\fR \fIdepth\fR\fR
1651.ad
1652.sp .6
1653.RS 4n
1654Recursively 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.
1655.RE
1656
1657.sp
1658.ne 2
1659.mk
1660.na
1661\fB\fB-o\fR \fIproperty\fR\fR
1662.ad
1663.sp .6
1664.RS 4n
1665A comma-separated list of properties to display. The property must be:
1666.RS +4
1667.TP
1668.ie t \(bu
1669.el o
1670One of the properties described in the "Native Properties" section
1671.RE
1672.RS +4
1673.TP
1674.ie t \(bu
1675.el o
1676A user property
1677.RE
1678.RS +4
1679.TP
1680.ie t \(bu
1681.el o
1682The value \fBname\fR to display the dataset name
1683.RE
1684.RS +4
1685.TP
1686.ie t \(bu
1687.el o
1688The 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.
1689.RE
1690.RE
1691
1692.sp
1693.ne 2
1694.mk
1695.na
1696\fB\fB-s\fR \fIproperty\fR\fR
1697.ad
1698.sp .6
1699.RS 4n
1700A 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.
1701.sp
1702The following is a list of sorting criteria:
1703.RS +4
1704.TP
1705.ie t \(bu
1706.el o
1707Numeric types sort in numeric order.
1708.RE
1709.RS +4
1710.TP
1711.ie t \(bu
1712.el o
1713String types sort in alphabetical order.
1714.RE
1715.RS +4
1716.TP
1717.ie t \(bu
1718.el o
1719Types inappropriate for a row sort that row to the literal bottom, regardless of the specified ordering.
1720.RE
1721.RS +4
1722.TP
1723.ie t \(bu
1724.el o
1725If no sorting options are specified the existing behavior of \fBzfs list\fR is preserved.
1726.RE
1727.RE
1728
1729.sp
1730.ne 2
1731.mk
1732.na
1733\fB\fB-S\fR \fIproperty\fR\fR
1734.ad
1735.sp .6
1736.RS 4n
1737Same as the \fB-s\fR option, but sorts by property in descending order.
1738.RE
1739
1740.sp
1741.ne 2
1742.mk
1743.na
1744\fB\fB-t\fR \fItype\fR\fR
1745.ad
1746.sp .6
1747.RS 4n
1748A comma-separated list of types to display, where \fItype\fR is one of \fBfilesystem\fR, \fBsnapshot\fR , \fBvolume\fR, or \fBall\fR. For example, specifying \fB-t snapshot\fR displays only snapshots.
1749.RE
1750
1751.RE
1752
1753.sp
1754.ne 2
1755.mk
1756.na
1757\fB\fBzfs set\fR \fIproperty\fR=\fIvalue\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
1758.ad
1759.sp .6
1760.RS 4n
1761Sets the property to the given value for each dataset. Only some properties can be edited. See the "Properties" section for more information on what properties can be set and acceptable values. Numeric values can be specified as exact values, or in a human-readable form with a suffix of \fBB\fR, \fBK\fR, \fBM\fR, \fBG\fR, \fBT\fR, \fBP\fR, \fBE\fR, \fBZ\fR (for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes, or zettabytes, respectively). User properties can be set on snapshots. For more information, see the "User Properties" section.
1762.RE
1763
1764.sp
1765.ne 2
1766.mk
1767.na
1768\fB\fBzfs get\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR] [\fB-Hp\fR] [\fB-o\fR \fIfield\fR[,...] [\fB-s\fR \fIsource\fR[,...] "\fIall\fR" | \fIproperty\fR[,...] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
1769.ad
1770.sp .6
1771.RS 4n
1772Displays 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:
1773.sp
1774.in +2
1775.nf
1776 name Dataset name
1777 property Property name
1778 value Property value
1779 source Property source. Can either be local, default,
1780 temporary, inherited, or none (-).
1781.fi
1782.in -2
1783.sp
1784
1785All 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.
1786.sp
1787The special value \fBall\fR can be used to display all properties that apply to the given dataset's type (filesystem, volume, or snapshot).
1788.sp
1789.ne 2
1790.mk
1791.na
1792\fB\fB-r\fR\fR
1793.ad
1794.sp .6
1795.RS 4n
1796Recursively display properties for any children.
1797.RE
1798
1799.sp
1800.ne 2
1801.mk
1802.na
1803\fB\fB-d\fR \fIdepth\fR\fR
1804.ad
1805.sp .6
1806.RS 4n
1807Recursively 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.
1808.RE
1809
1810.sp
1811.ne 2
1812.mk
1813.na
1814\fB\fB-H\fR\fR
1815.ad
1816.sp .6
1817.RS 4n
1818Display 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.
1819.RE
1820
1821.sp
1822.ne 2
1823.mk
1824.na
1825\fB\fB-o\fR \fIfield\fR\fR
1826.ad
1827.sp .6
1828.RS 4n
1829A comma-separated list of columns to display. \fBname,property,value,source\fR is the default value.
1830.RE
1831
1832.sp
1833.ne 2
1834.mk
1835.na
1836\fB\fB-s\fR \fIsource\fR\fR
1837.ad
1838.sp .6
1839.RS 4n
1840A 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,temporary,none\fR. The default value is all sources.
1841.RE
1842
1843.sp
1844.ne 2
1845.mk
1846.na
1847\fB\fB-p\fR\fR
1848.ad
1849.sp .6
1850.RS 4n
1851Display numbers in parseable (exact) values.
1852.RE
1853
1854.RE
1855
1856.sp
1857.ne 2
1858.mk
1859.na
1860\fB\fBzfs inherit\fR [\fB-r\fR] \fIproperty\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
1861.ad
1862.sp .6
1863.RS 4n
1864Clears the specified property, causing it to be inherited from an ancestor. If no ancestor has the property set, then the default value is used. See the "Properties" section for a listing of default values, and details on which properties can be inherited.
1865.sp
1866.ne 2
1867.mk
1868.na
1869\fB\fB-r\fR\fR
1870.ad
1871.sp .6
1872.RS 4n
1873Recursively inherit the given property for all children.
1874.RE
1875
1876.RE
1877
1878.sp
1879.ne 2
1880.mk
1881.na
1882\fB\fBzfs upgrade\fR [\fB-v\fR]\fR
1883.ad
1884.sp .6
1885.RS 4n
1886Displays a list of file systems that are not the most recent version.
1887.RE
1888
1889.sp
1890.ne 2
1891.mk
1892.na
1893\fB\fBzfs upgrade\fR [\fB-r\fR] [\fB-V\fR \fIversion\fR] [\fB-a\fR | \fIfilesystem\fR]\fR
1894.ad
1895.sp .6
1896.RS 4n
1897Upgrades 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.
1898.sp
2d1b7b0b 1899In 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
1900.sp
1901In 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.
1902.sp
1903.ne 2
1904.mk
1905.na
1906\fB\fB-a\fR\fR
1907.ad
1908.sp .6
1909.RS 4n
1910Upgrade all file systems on all imported pools.
1911.RE
1912
1913.sp
1914.ne 2
1915.mk
1916.na
1917\fB\fIfilesystem\fR\fR
1918.ad
1919.sp .6
1920.RS 4n
1921Upgrade the specified file system.
1922.RE
1923
1924.sp
1925.ne 2
1926.mk
1927.na
1928\fB\fB-r\fR\fR
1929.ad
1930.sp .6
1931.RS 4n
1932Upgrade the specified file system and all descendent file systems
1933.RE
1934
1935.sp
1936.ne 2
1937.mk
1938.na
1939\fB\fB-V\fR \fIversion\fR\fR
1940.ad
1941.sp .6
1942.RS 4n
1943Upgrade 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.
1944.RE
1945
1946.RE
1947
1948.sp
1949.ne 2
1950.mk
1951.na
1952\fB\fBzfs userspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR]... [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR | \fIsnapshot\fR\fR
1953.ad
1954.sp .6
1955.RS 4n
1956Displays space consumed by, and quotas on, each user in the specified filesystem or snapshot. This corresponds to the \fBuserused@\fR\fIuser\fR and \fBuserquota@\fR\fIuser\fR properties.
1957.sp
1958.ne 2
1959.mk
1960.na
1961\fB\fB-n\fR\fR
1962.ad
1963.sp .6
1964.RS 4n
1965Print numeric ID instead of user/group name.
1966.RE
1967
1968.sp
1969.ne 2
1970.mk
1971.na
1972\fB\fB-H\fR\fR
1973.ad
1974.sp .6
1975.RS 4n
1976Do not print headers, use tab-delimited output.
1977.RE
1978
1979.sp
1980.ne 2
1981.mk
1982.na
1983\fB\fB-p\fR\fR
1984.ad
1985.sp .6
1986.RS 4n
1987Use exact (parseable) numeric output.
1988.RE
1989
1990.sp
1991.ne 2
1992.mk
1993.na
1994\fB\fB-o\fR \fIfield\fR[,...]\fR
1995.ad
1996.sp .6
1997.RS 4n
1998Display only the specified fields from the following set, \fBtype,name,used,quota\fR.The default is to display all fields.
1999.RE
2000
2001.sp
2002.ne 2
2003.mk
2004.na
2005\fB\fB-s\fR \fIfield\fR\fR
2006.ad
2007.sp .6
2008.RS 4n
2009Sort output by this field. The \fIs\fR and \fIS\fR flags may be specified multiple times to sort first by one field, then by another. The default is \fB-s type\fR \fB-s name\fR.
2010.RE
2011
2012.sp
2013.ne 2
2014.mk
2015.na
2016\fB\fB-S\fR \fIfield\fR\fR
2017.ad
2018.sp .6
2019.RS 4n
2020Sort by this field in reverse order. See \fB-s\fR.
2021.RE
2022
2023.sp
2024.ne 2
2025.mk
2026.na
2027\fB\fB-t\fR \fItype\fR[,...]\fR
2028.ad
2029.sp .6
2030.RS 4n
2031Print only the specified types from the following set, \fBall,posixuser,smbuser,posixgroup,smbgroup\fR.
2032.sp
2033The default is \fB-t posixuser,smbuser\fR
2034.sp
2035The default can be changed to include group types.
2036.RE
2037
2038.sp
2039.ne 2
2040.mk
2041.na
2042\fB\fB-i\fR\fR
2043.ad
2044.sp .6
2045.RS 4n
2046Translate SID to POSIX ID. The POSIX ID may be ephemeral if no mapping exists. Normal POSIX interfaces (for example, \fBstat\fR(2), \fBls\fR \fB-l\fR) perform this translation, so the \fB-i\fR option allows the output from \fBzfs userspace\fR to be compared directly with those utilities. However, \fB-i\fR may lead to confusion if some files were created by an SMB user before a SMB-to-POSIX name mapping was established. In such a case, some files are owned by the SMB entity and some by the POSIX entity. However, the \fB-i\fR option will report that the POSIX entity has the total usage and quota for both.
2047.RE
2048
2049.RE
2050
2051.sp
2052.ne 2
2053.mk
2054.na
2055\fB\fBzfs groupspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR]... [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR | \fIsnapshot\fR\fR
2056.ad
2057.sp .6
2058.RS 4n
2059Displays space consumed by, and quotas on, each group in the specified filesystem or snapshot. This subcommand is identical to \fBzfs userspace\fR, except that the default types to display are \fB-t posixgroup,smbgroup\fR.
2060.sp
2061.in +2
2062.nf
2063-
2064.fi
2065.in -2
2066.sp
2067
2068.RE
2069
2070.sp
2071.ne 2
2072.mk
2073.na
2074\fB\fBzfs mount\fR\fR
2075.ad
2076.sp .6
2077.RS 4n
2078Displays all \fBZFS\fR file systems currently mounted.
2079.RE
2080
2081.sp
2082.ne 2
2083.mk
2084.na
2085\fB\fBzfs mount\fR [\fB-vO\fR] [\fB-o\fR \fIoptions\fR] \fB-a\fR | \fIfilesystem\fR\fR
2086.ad
2087.sp .6
2088.RS 4n
2089Mounts \fBZFS\fR file systems. Invoked automatically as part of the boot process.
2090.sp
2091.ne 2
2092.mk
2093.na
2094\fB\fB-o\fR \fIoptions\fR\fR
2095.ad
2096.sp .6
2097.RS 4n
2098An optional, comma-separated list of mount options to use temporarily for the duration of the mount. See the "Temporary Mount Point Properties" section for details.
2099.RE
2100
2101.sp
2102.ne 2
2103.mk
2104.na
2105\fB\fB-O\fR\fR
2106.ad
2107.sp .6
2108.RS 4n
2d1b7b0b 2109Perform an overlay mount. See \fBmount\fR(8) for more information.
058ac9ba
BB
2110.RE
2111
2112.sp
2113.ne 2
2114.mk
2115.na
2116\fB\fB-v\fR\fR
2117.ad
2118.sp .6
2119.RS 4n
2120Report mount progress.
2121.RE
2122
2123.sp
2124.ne 2
2125.mk
2126.na
2127\fB\fB-a\fR\fR
2128.ad
2129.sp .6
2130.RS 4n
2131Mount all available \fBZFS\fR file systems. Invoked automatically as part of the boot process.
2132.RE
2133
2134.sp
2135.ne 2
2136.mk
2137.na
2138\fB\fIfilesystem\fR\fR
2139.ad
2140.sp .6
2141.RS 4n
2142Mount the specified filesystem.
2143.RE
2144
2145.RE
2146
2147.sp
2148.ne 2
2149.mk
2150.na
2151\fB\fBzfs unmount\fR [\fB-f\fR] \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR\fR
2152.ad
2153.sp .6
2154.RS 4n
2155Unmounts currently mounted \fBZFS\fR file systems. Invoked automatically as part of the shutdown process.
2156.sp
2157.ne 2
2158.mk
2159.na
2160\fB\fB-f\fR\fR
2161.ad
2162.sp .6
2163.RS 4n
2164Forcefully unmount the file system, even if it is currently in use.
2165.RE
2166
2167.sp
2168.ne 2
2169.mk
2170.na
2171\fB\fB-a\fR\fR
2172.ad
2173.sp .6
2174.RS 4n
2175Unmount all available \fBZFS\fR file systems. Invoked automatically as part of the boot process.
2176.RE
2177
2178.sp
2179.ne 2
2180.mk
2181.na
2182\fB\fIfilesystem\fR|\fImountpoint\fR\fR
2183.ad
2184.sp .6
2185.RS 4n
2186Unmount the specified filesystem. The command can also be given a path to a \fBZFS\fR file system mount point on the system.
2187.RE
2188
2189.RE
2190
2191.sp
2192.ne 2
2193.mk
2194.na
2195\fB\fBzfs share\fR \fB-a\fR | \fIfilesystem\fR\fR
2196.ad
2197.sp .6
2198.RS 4n
2199Shares available \fBZFS\fR file systems.
2200.sp
2201.ne 2
2202.mk
2203.na
2204\fB\fB-a\fR\fR
2205.ad
2206.sp .6
2207.RS 4n
2208Share all available \fBZFS\fR file systems. Invoked automatically as part of the boot process.
2209.RE
2210
2211.sp
2212.ne 2
2213.mk
2214.na
2215\fB\fIfilesystem\fR\fR
2216.ad
2217.sp .6
2218.RS 4n
2219Share 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.
2220.RE
2221
2222.RE
2223
2224.sp
2225.ne 2
2226.mk
2227.na
2228\fB\fBzfs unshare\fR \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR\fR
2229.ad
2230.sp .6
2231.RS 4n
2232Unshares currently shared \fBZFS\fR file systems. This is invoked automatically as part of the shutdown process.
2233.sp
2234.ne 2
2235.mk
2236.na
2237\fB\fB-a\fR\fR
2238.ad
2239.sp .6
2240.RS 4n
2241Unshare all available \fBZFS\fR file systems. Invoked automatically as part of the boot process.
2242.RE
2243
2244.sp
2245.ne 2
2246.mk
2247.na
2248\fB\fIfilesystem\fR|\fImountpoint\fR\fR
2249.ad
2250.sp .6
2251.RS 4n
2252Unshare the specified filesystem. The command can also be given a path to a \fBZFS\fR file system shared on the system.
2253.RE
2254
2255.RE
2256
2257.sp
2258.ne 2
2259.mk
2260.na
330d06f9 2261\fBzfs send\fR [\fB-DnPpRrv\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR] \fIsnapshot\fR
058ac9ba
BB
2262.ad
2263.sp .6
2264.RS 4n
2265Creates 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.
2266.sp
2267.ne 2
2268.mk
2269.na
2270\fB\fB-i\fR \fIsnapshot\fR\fR
2271.ad
2272.sp .6
2273.RS 4n
2274Generate an incremental stream from the first \fIsnapshot\fR to the second \fIsnapshot\fR. The incremental source (the first \fIsnapshot\fR) can be specified as the last component of the snapshot name (for example, the part after the \fB@\fR), and it is assumed to be from the same file system as the second \fIsnapshot\fR.
2275.sp
2276If 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).
2277.RE
2278
2279.sp
2280.ne 2
2281.mk
2282.na
2283\fB\fB-I\fR \fIsnapshot\fR\fR
2284.ad
2285.sp .6
2286.RS 4n
2287Generate 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 snapshot may be specified as with the \fB-i\fR option.
2288.RE
2289
e0f86c98
BB
2290.sp
2291.ne 2
2292.mk
2293.na
2294\fB\fB-v\fR\fR
2295.ad
2296.sp .6
2297.RS 4n
2298Print verbose information about the stream package generated.
2299.RE
2300
058ac9ba
BB
2301.sp
2302.ne 2
2303.mk
2304.na
2305\fB\fB-R\fR\fR
2306.ad
2307.sp .6
2308.RS 4n
2309Generate 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.
2310.sp
2311If 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.
2312.RE
2313
2314.sp
2315.ne 2
2316.mk
2317.na
e0f86c98 2318\fB\fB-D\fR\fR
058ac9ba
BB
2319.ad
2320.sp .6
2321.RS 4n
e0f86c98
BB
2322This option will cause dedup processing to be performed on the data being written to a send stream. Dedup processing is optional because it isn't always appropriate (some kinds of data have very little duplication) and it has significant costs: the checksumming required to detect duplicate blocks is CPU-intensive and the data that must be maintained while the stream is being processed can occupy a very large amount of memory.
2323.sp
2324Duplicate blocks are detected by calculating a cryptographically strong checksum on each data block. Blocks that have the same checksum are presumed to be identical. The checksum type used at this time is SHA256. However, the stream format contains a field which identifies the checksum type, permitting other checksums to be used in the future.
2325.RE
2326
2327.sp
2328.ne 2
2329.mk
2330.na
2331\fB\fB-p\fR\fR
2332.ad
2333.sp .6
2334.RS 4n
2335Include properties in the send stream without the -R option.
058ac9ba
BB
2336.RE
2337
2338The format of the stream is committed. You will be able to receive your streams on future versions of \fBZFS\fR.
2339.RE
2340
2341.sp
2342.ne 2
2343.mk
2344.na
2345\fB\fBzfs receive\fR [\fB-vnFu\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
2346.ad
2347.br
2348.na
bb8b81ec 2349\fB\fBzfs receive\fR [\fB-vnFu\fR] [\fB-d\fR|\fB-e\fR] \fIfilesystem\fR\fR
058ac9ba
BB
2350.ad
2351.sp .6
2352.RS 4n
2353Creates 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.
2354.sp
2355If 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.
2356.sp
2357When 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.
2358.sp
bb8b81ec 2359The 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 2360.sp
bb8b81ec
BB
2361If 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.
2362.sp
2363The \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
2364.sp
2365.ne 2
2366.mk
2367.na
2368\fB\fB-d\fR\fR
2369.ad
2370.sp .6
2371.RS 4n
bb8b81ec
BB
2372Discard 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.
2373.RE
2374
2375.sp
2376.ne 2
2377.na
2378\fB\fB-e\fR\fR
2379.ad
2380.sp .6
2381.RS 4n
2382Discard 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
2383.RE
2384
2385.sp
2386.ne 2
2387.mk
2388.na
2389\fB\fB-u\fR\fR
2390.ad
2391.sp .6
2392.RS 4n
2393File system that is associated with the received stream is not mounted.
2394.RE
2395
2396.sp
2397.ne 2
2398.mk
2399.na
330d06f9
MA
2400\fB\fB-D\fR\fR
2401.ad
2402.sp .6
2403.RS 4n
2404Generate a deduplicated stream. Blocks which would have been sent multiple
2405times in the send stream will only be sent once. The receiving system must
2406also support this feature to recieve a deduplicated stream. This flag can
2407be used regardless of the dataset's \fBdedup\fR property, but performance
2408will be much better if the filesystem uses a dedup-capable checksum (eg.
2409\fBsha256\fR).
2410.RE
2411
2412.sp
2413.ne 2
2414.na
2415\fB\fB-r\fR\fR
2416.ad
2417.sp .6
2418.RS 4n
2419Recursively send all descendant snapshots. This is similar to the \fB-R\fR
2420flag, but information about deleted and renamed datasets is not included, and
2421property information is only included if the \fB-p\fR flag is specified.
2422.RE
2423
2424.sp
2425.ne 2
2426.na
2427\fB\fB-p\fR\fR
2428.ad
2429.sp .6
2430.RS 4n
2431Include the dataset's properties in the stream. This flag is implicit when
2432\fB-R\fR is specified. The receiving system must also support this feature.
2433.RE
2434
2435.sp
2436.ne 2
2437.na
2438\fB\fB-n\fR\fR
2439.ad
2440.sp .6
2441.RS 4n
2442Do a dry-run ("No-op") send. Do not generate any actual send data. This is
2443useful in conjunction with the \fB-v\fR or \fB-P\fR flags to determine what
2444data will be sent.
2445.RE
2446
2447.sp
2448.ne 2
2449.na
2450\fB\fB-P\fR\fR
2451.ad
2452.sp .6
2453.RS 4n
2454Print machine-parsable verbose information about the stream package generated.
2455.RE
2456
2457.sp
2458.ne 2
2459.na
058ac9ba
BB
2460\fB\fB-v\fR\fR
2461.ad
2462.sp .6
2463.RS 4n
2464Print verbose information about the stream and the time required to perform the receive operation.
2465.RE
2466
2467.sp
2468.ne 2
2469.mk
2470.na
2471\fB\fB-n\fR\fR
2472.ad
2473.sp .6
2474.RS 4n
2475Do 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.
2476.RE
2477
2478.sp
2479.ne 2
2480.mk
2481.na
2482\fB\fB-F\fR\fR
2483.ad
2484.sp .6
2485.RS 4n
2486Force 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.
2487.RE
2488
2489.RE
2490
2491.sp
2492.ne 2
2493.mk
2494.na
2495\fB\fBzfs allow\fR \fIfilesystem\fR | \fIvolume\fR\fR
2496.ad
2497.sp .6
2498.RS 4n
2499Displays permissions that have been delegated on the specified filesystem or volume. See the other forms of \fBzfs allow\fR for more information.
2500.RE
2501
2502.sp
2503.ne 2
2504.mk
2505.na
2506\fB\fBzfs allow\fR [\fB-ldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR| \fIvolume\fR\fR
2507.ad
2508.br
2509.na
2510\fB\fBzfs allow\fR [\fB-ld\fR] \fB-e\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR | \fIvolume\fR\fR
2511.ad
2512.sp .6
2513.RS 4n
2514Delegates \fBZFS\fR administration permission for the file systems to non-privileged users.
2515.sp
2516.ne 2
2517.mk
2518.na
2519\fB[\fB-ug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...]\fR
2520.ad
2521.sp .6
2522.RS 4n
2523Specifies 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.
2524.RE
2525
2526.sp
2527.ne 2
2528.mk
2529.na
2530\fB[\fB-e\fR] \fIperm\fR|@\fIsetname\fR[,...]\fR
2531.ad
2532.sp .6
2533.RS 4n
2534Specifies 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.
2535.RE
2536
2537.sp
2538.ne 2
2539.mk
2540.na
2541\fB[\fB-ld\fR] \fIfilesystem\fR|\fIvolume\fR\fR
2542.ad
2543.sp .6
2544.RS 4n
2545Specifies 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.
2546.RE
2547
2548.RE
2549
2550.sp
2551.LP
2552Permissions are generally the ability to use a \fBZFS\fR subcommand or change a \fBZFS\fR property. The following permissions are available:
2553.sp
2554.in +2
2555.nf
2556NAME TYPE NOTES
2557allow subcommand Must also have the permission that is being
2558 allowed
2559clone subcommand Must also have the 'create' ability and 'mount'
2560 ability in the origin file system
2561create subcommand Must also have the 'mount' ability
2562destroy subcommand Must also have the 'mount' ability
2563mount subcommand Allows mount/umount of ZFS datasets
2564promote subcommand Must also have the 'mount'
2565 and 'promote' ability in the origin file system
2566receive subcommand Must also have the 'mount' and 'create' ability
2567rename subcommand Must also have the 'mount' and 'create'
2568 ability in the new parent
2569rollback subcommand Must also have the 'mount' ability
2570send subcommand
2571share subcommand Allows sharing file systems over NFS or SMB
2572 protocols
2573snapshot subcommand Must also have the 'mount' ability
2574groupquota other Allows accessing any groupquota@... property
2575groupused other Allows reading any groupused@... property
2576userprop other Allows changing any user property
2577userquota other Allows accessing any userquota@... property
2578userused other Allows reading any userused@... property
2579
2580aclinherit property
2581aclmode property
2582atime property
2583canmount property
2584casesensitivity property
2585checksum property
2586compression property
2587copies property
2588devices property
2589exec property
2590mountpoint property
2591nbmand property
2592normalization property
2593primarycache property
2594quota property
2595readonly property
2596recordsize property
2597refquota property
2598refreservation property
2599reservation property
2600secondarycache property
2601setuid property
2602shareiscsi property
2603sharenfs property
2604sharesmb property
2605snapdir property
2606utf8only property
2607version property
2608volblocksize property
2609volsize property
2610vscan property
2611xattr property
2612zoned property
2613.fi
2614.in -2
2615.sp
2616
2617.sp
2618.ne 2
2619.mk
2620.na
2621\fB\fBzfs allow\fR \fB-c\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR\fR
2622.ad
2623.sp .6
2624.RS 4n
2625Sets "create time" permissions. These permissions are granted (locally) to the creator of any newly-created descendent file system.
2626.RE
2627
2628.sp
2629.ne 2
2630.mk
2631.na
2632\fB\fBzfs allow\fR \fB-s\fR @\fIsetname\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR\fR
2633.ad
2634.sp .6
2635.RS 4n
2636Defines 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.
2637.RE
2638
2639.sp
2640.ne 2
2641.mk
2642.na
2643\fB\fBzfs unallow\fR [\fB-rldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] [\fIperm\fR|@\fIsetname\fR[, ...]] \fIfilesystem\fR|\fIvolume\fR\fR
2644.ad
2645.br
2646.na
2647\fB\fBzfs unallow\fR [\fB-rld\fR] \fB-e\fR [\fIperm\fR|@\fIsetname\fR [,...]] \fIfilesystem\fR|\fIvolume\fR\fR
2648.ad
2649.br
2650.na
2651\fB\fBzfs unallow\fR [\fB-r\fR] \fB-c\fR [\fIperm\fR|@\fIsetname\fR[,...]]\fR
2652.ad
2653.br
2654.na
2655\fB\fIfilesystem\fR|\fIvolume\fR\fR
2656.ad
2657.sp .6
2658.RS 4n
2659Removes 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.
2660.sp
2661.ne 2
2662.mk
2663.na
2664\fB\fB-r\fR\fR
2665.ad
2666.sp .6
2667.RS 4n
2668Recursively remove the permissions from this file system and all descendents.
2669.RE
2670
2671.RE
2672
2673.sp
2674.ne 2
2675.mk
2676.na
2677\fB\fBzfs unallow\fR [\fB-r\fR] \fB-s\fR @\fIsetname\fR [\fIperm\fR|@\fIsetname\fR[,...]]\fR
2678.ad
2679.br
2680.na
2681\fB\fIfilesystem\fR|\fIvolume\fR\fR
2682.ad
2683.sp .6
2684.RS 4n
2685Removes permissions from a permission set. If no permissions are specified, then all permissions are removed, thus removing the set entirely.
2686.RE
2687
2688.sp
2689.ne 2
2690.mk
2691.na
2692\fB\fBzfs hold\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
2693.ad
2694.sp .6
2695.RS 4n
2696Adds 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.
2697.sp
2698If a hold exists on a snapshot, attempts to destroy that snapshot by using the \fBzfs destroy\fR command return \fBEBUSY\fR.
2699.sp
2700.ne 2
2701.mk
2702.na
2703\fB\fB-r\fR\fR
2704.ad
2705.sp .6
2706.RS 4n
2707Specifies that a hold with the given tag is applied recursively to the snapshots of all descendent file systems.
2708.RE
2709
2710.RE
2711
2712.sp
2713.ne 2
2714.mk
2715.na
2716\fB\fBzfs holds\fR [\fB-r\fR] \fIsnapshot\fR...\fR
2717.ad
2718.sp .6
2719.RS 4n
2720Lists all existing user references for the given snapshot or snapshots.
2721.sp
2722.ne 2
2723.mk
2724.na
2725\fB\fB-r\fR\fR
2726.ad
2727.sp .6
2728.RS 4n
2729Lists the holds that are set on the named descendent snapshots, in addition to listing the holds on the named snapshot.
2730.RE
2731
2732.RE
2733
2734.sp
2735.ne 2
2736.mk
2737.na
2738\fB\fBzfs release\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
2739.ad
2740.sp .6
2741.RS 4n
2742Removes a single reference, named with the \fItag\fR argument, from the specified snapshot or snapshots. The tag must already exist for each snapshot.
2743.sp
2744If a hold exists on a snapshot, attempts to destroy that snapshot by using the \fBzfs destroy\fR command return \fBEBUSY\fR.
2745.sp
2746.ne 2
2747.mk
2748.na
2749\fB\fB-r\fR\fR
2750.ad
2751.sp .6
2752.RS 4n
2753Recursively releases a hold with the given tag on the snapshots of all descendent file systems.
2754.RE
2755
2756.RE
2757
2758.SH EXAMPLES
2759.LP
2760\fBExample 1 \fRCreating a ZFS File System Hierarchy
2761.sp
2762.LP
2763The 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.
2764
2765.sp
2766.in +2
2767.nf
2768# \fBzfs create pool/home\fR
2769# \fBzfs set mountpoint=/export/home pool/home\fR
2770# \fBzfs create pool/home/bob\fR
2771.fi
2772.in -2
2773.sp
2774
2775.LP
2776\fBExample 2 \fRCreating a ZFS Snapshot
2777.sp
2778.LP
2779The 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.
2780
2781.sp
2782.in +2
2783.nf
2784# \fBzfs snapshot pool/home/bob@yesterday\fR
2785.fi
2786.in -2
2787.sp
2788
2789.LP
2790\fBExample 3 \fRCreating and Destroying Multiple Snapshots
2791.sp
2792.LP
2793The 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.
2794
2795.sp
2796.in +2
2797.nf
2798# \fBzfs snapshot -r pool/home@yesterday\fR
2799# \fBzfs destroy -r pool/home@yesterday\fR
2800.fi
2801.in -2
2802.sp
2803
2804.LP
2805\fBExample 4 \fRDisabling and Enabling File System Compression
2806.sp
2807.LP
2808The 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.
2809
2810.sp
2811.in +2
2812.nf
2813# \fBzfs set compression=off pool/home\fR
2814# \fBzfs set compression=on pool/home/anne\fR
2815.fi
2816.in -2
2817.sp
2818
2819.LP
2820\fBExample 5 \fRListing ZFS Datasets
2821.sp
2822.LP
2d1b7b0b 2823The 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
2824
2825.sp
2826.in +2
2827.nf
2828# \fBzfs list\fR
2829 NAME USED AVAIL REFER MOUNTPOINT
2830 pool 450K 457G 18K /pool
2831 pool/home 315K 457G 21K /export/home
2832 pool/home/anne 18K 457G 18K /export/home/anne
2833 pool/home/bob 276K 457G 276K /export/home/bob
2834.fi
2835.in -2
2836.sp
2837
2838.LP
2839\fBExample 6 \fRSetting a Quota on a ZFS File System
2840.sp
2841.LP
2842The following command sets a quota of 50 Gbytes for \fBpool/home/bob\fR.
2843
2844.sp
2845.in +2
2846.nf
2847# \fBzfs set quota=50G pool/home/bob\fR
2848.fi
2849.in -2
2850.sp
2851
2852.LP
2853\fBExample 7 \fRListing ZFS Properties
2854.sp
2855.LP
2856The following command lists all properties for \fBpool/home/bob\fR.
2857
2858.sp
2859.in +2
2860.nf
2861# \fBzfs get all pool/home/bob\fR
2862NAME PROPERTY VALUE SOURCE
2863pool/home/bob type filesystem -
2864pool/home/bob creation Tue Jul 21 15:53 2009 -
2865pool/home/bob used 21K -
2866pool/home/bob available 20.0G -
2867pool/home/bob referenced 21K -
2868pool/home/bob compressratio 1.00x -
2869pool/home/bob mounted yes -
2870pool/home/bob quota 20G local
2871pool/home/bob reservation none default
2872pool/home/bob recordsize 128K default
2873pool/home/bob mountpoint /pool/home/bob default
2874pool/home/bob sharenfs off default
2875pool/home/bob checksum on default
2876pool/home/bob compression on local
2877pool/home/bob atime on default
2878pool/home/bob devices on default
2879pool/home/bob exec on default
2880pool/home/bob setuid on default
2881pool/home/bob readonly off default
2882pool/home/bob zoned off default
2883pool/home/bob snapdir hidden default
2884pool/home/bob aclmode groupmask default
2885pool/home/bob aclinherit restricted default
2886pool/home/bob canmount on default
2887pool/home/bob shareiscsi off default
2888pool/home/bob xattr on default
2889pool/home/bob copies 1 default
2890pool/home/bob version 4 -
2891pool/home/bob utf8only off -
2892pool/home/bob normalization none -
2893pool/home/bob casesensitivity sensitive -
2894pool/home/bob vscan off default
2895pool/home/bob nbmand off default
2896pool/home/bob sharesmb off default
2897pool/home/bob refquota none default
2898pool/home/bob refreservation none default
2899pool/home/bob primarycache all default
2900pool/home/bob secondarycache all default
2901pool/home/bob usedbysnapshots 0 -
2902pool/home/bob usedbydataset 21K -
2903pool/home/bob usedbychildren 0 -
2904pool/home/bob usedbyrefreservation 0 -
2905.fi
2906.in -2
2907.sp
2908
2909.sp
2910.LP
2911The following command gets a single property value.
2912
2913.sp
2914.in +2
2915.nf
2916# \fBzfs get -H -o value compression pool/home/bob\fR
2917on
2918.fi
2919.in -2
2920.sp
2921
2922.sp
2923.LP
2924The following command lists all properties with local settings for \fBpool/home/bob\fR.
2925
2926.sp
2927.in +2
2928.nf
2929# \fBzfs get -r -s local -o name,property,value all pool/home/bob\fR
2930NAME PROPERTY VALUE
2931pool/home/bob quota 20G
2932pool/home/bob compression on
2933.fi
2934.in -2
2935.sp
2936
2937.LP
2938\fBExample 8 \fRRolling Back a ZFS File System
2939.sp
2940.LP
2941The following command reverts the contents of \fBpool/home/anne\fR to the snapshot named \fByesterday\fR, deleting all intermediate snapshots.
2942
2943.sp
2944.in +2
2945.nf
2946# \fBzfs rollback -r pool/home/anne@yesterday\fR
2947.fi
2948.in -2
2949.sp
2950
2951.LP
2952\fBExample 9 \fRCreating a ZFS Clone
2953.sp
2954.LP
2955The following command creates a writable file system whose initial contents are the same as \fBpool/home/bob@yesterday\fR.
2956
2957.sp
2958.in +2
2959.nf
2960# \fBzfs clone pool/home/bob@yesterday pool/clone\fR
2961.fi
2962.in -2
2963.sp
2964
2965.LP
2966\fBExample 10 \fRPromoting a ZFS Clone
2967.sp
2968.LP
2969The 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:
2970
2971.sp
2972.in +2
2973.nf
2974# \fBzfs create pool/project/production\fR
2975 populate /pool/project/production with data
2976# \fBzfs snapshot pool/project/production@today\fR
2977# \fBzfs clone pool/project/production@today pool/project/beta\fR
2978make changes to /pool/project/beta and test them
2979# \fBzfs promote pool/project/beta\fR
2980# \fBzfs rename pool/project/production pool/project/legacy\fR
2981# \fBzfs rename pool/project/beta pool/project/production\fR
2982once the legacy version is no longer needed, it can be destroyed
2983# \fBzfs destroy pool/project/legacy\fR
2984.fi
2985.in -2
2986.sp
2987
2988.LP
2989\fBExample 11 \fRInheriting ZFS Properties
2990.sp
2991.LP
2992The following command causes \fBpool/home/bob\fR and \fBpool/home/anne\fR to inherit the \fBchecksum\fR property from their parent.
2993
2994.sp
2995.in +2
2996.nf
2997# \fBzfs inherit checksum pool/home/bob pool/home/anne\fR
2998.fi
2999.in -2
3000.sp
3001
3002.LP
3003\fBExample 12 \fRRemotely Replicating ZFS Data
3004.sp
3005.LP
3006The 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.
3007
3008.sp
3009.in +2
3010.nf
3011# \fBzfs send pool/fs@a | \e\fR
3012 \fBssh host zfs receive poolB/received/fs@a\fR
3013# \fBzfs send -i a pool/fs@b | ssh host \e\fR
3014 \fBzfs receive poolB/received/fs\fR
3015.fi
3016.in -2
3017.sp
3018
3019.LP
3020\fBExample 13 \fRUsing the \fBzfs receive\fR \fB-d\fR Option
3021.sp
3022.LP
3023The 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.
3024
3025.sp
3026.in +2
3027.nf
3028# \fBzfs send poolA/fsA/fsB@snap | \e
3029 ssh host zfs receive -d poolB/received\fR
3030.fi
3031.in -2
3032.sp
3033
3034.LP
3035\fBExample 14 \fRSetting User Properties
3036.sp
3037.LP
3038The following example sets the user-defined \fBcom.example:department\fR property for a dataset.
3039
3040.sp
3041.in +2
3042.nf
3043# \fBzfs set com.example:department=12345 tank/accounting\fR
3044.fi
3045.in -2
3046.sp
3047
3048.LP
3049\fBExample 15 \fRCreating a ZFS Volume as an iSCSI Target Device
3050.sp
3051.LP
3052The following example shows how to create a \fBZFS\fR volume as an \fBiSCSI\fR target.
3053
3054.sp
3055.in +2
3056.nf
3057# \fBzfs create -V 2g pool/volumes/vol1\fR
3058# \fBzfs set shareiscsi=on pool/volumes/vol1\fR
3059# \fBiscsitadm list target\fR
3060Target: pool/volumes/vol1
3061 iSCSI Name:
3062 iqn.1986-03.com.sun:02:7b4b02a6-3277-eb1b-e686-a24762c52a8c
3063 Connections: 0
3064.fi
3065.in -2
3066.sp
3067
3068.sp
3069.LP
3070After the \fBiSCSI\fR target is created, set up the \fBiSCSI\fR initiator. For more information about the Solaris \fBiSCSI\fR initiator, see \fBiscsitadm\fR(1M).
3071.LP
3072\fBExample 16 \fRPerforming a Rolling Snapshot
3073.sp
3074.LP
3075The 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:
3076
3077.sp
3078.in +2
3079.nf
3080# \fBzfs destroy -r pool/users@7daysago\fR
3081# \fBzfs rename -r pool/users@6daysago @7daysago\fR
3082# \fBzfs rename -r pool/users@5daysago @6daysago\fR
3083# \fBzfs rename -r pool/users@yesterday @5daysago\fR
3084# \fBzfs rename -r pool/users@yesterday @4daysago\fR
3085# \fBzfs rename -r pool/users@yesterday @3daysago\fR
3086# \fBzfs rename -r pool/users@yesterday @2daysago\fR
3087# \fBzfs rename -r pool/users@today @yesterday\fR
3088# \fBzfs snapshot -r pool/users@today\fR
3089.fi
3090.in -2
3091.sp
3092
3093.LP
3094\fBExample 17 \fRSetting \fBsharenfs\fR Property Options on a ZFS File System
3095.sp
3096.LP
3097The 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.
3098
3099.sp
3100.in +2
3101.nf
3102# \fB# zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home\fR
3103.fi
3104.in -2
3105.sp
3106
3107.sp
3108.LP
3109If you are using \fBDNS\fR for host name resolution, specify the fully qualified hostname.
3110
3111.LP
3112\fBExample 18 \fRDelegating ZFS Administration Permissions on a ZFS Dataset
3113.sp
3114.LP
3115The 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.
3116
3117.sp
3118.in +2
3119.nf
3120# \fBzfs allow cindys create,destroy,mount,snapshot tank/cindys\fR
3121# \fBzfs allow tank/cindys\fR
3122-------------------------------------------------------------
3123Local+Descendent permissions on (tank/cindys)
3124 user cindys create,destroy,mount,snapshot
3125-------------------------------------------------------------
3126.fi
3127.in -2
3128.sp
3129
3130.sp
3131.LP
3132Because 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:
3133.sp
3134.in +2
3135.nf
3136# \fBchmod A+user:cindys:add_subdirectory:allow /tank/cindys\fR
3137.fi
3138.in -2
3139.sp
3140
3141.LP
3142\fBExample 19 \fRDelegating Create Time Permissions on a ZFS Dataset
3143.sp
3144.LP
3145The 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.
3146
3147.sp
3148.in +2
3149.nf
3150# \fB# zfs allow staff create,mount tank/users\fR
3151# \fBzfs allow -c destroy tank/users\fR
3152# \fBzfs allow tank/users\fR
3153-------------------------------------------------------------
3154Create time permissions on (tank/users)
3155 create,destroy
3156Local+Descendent permissions on (tank/users)
3157 group staff create,mount
3158-------------------------------------------------------------
3159.fi
3160.in -2
3161.sp
3162
3163.LP
3164\fBExample 20 \fRDefining and Granting a Permission Set on a ZFS Dataset
3165.sp
3166.LP
3167The 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.
3168
3169.sp
3170.in +2
3171.nf
3172# \fBzfs allow -s @pset create,destroy,snapshot,mount tank/users\fR
3173# \fBzfs allow staff @pset tank/users\fR
3174# \fBzfs allow tank/users\fR
3175-------------------------------------------------------------
3176Permission sets on (tank/users)
3177 @pset create,destroy,mount,snapshot
3178Create time permissions on (tank/users)
3179 create,destroy
3180Local+Descendent permissions on (tank/users)
3181 group staff @pset,create,mount
3182-------------------------------------------------------------
3183.fi
3184.in -2
3185.sp
3186
3187.LP
3188\fBExample 21 \fRDelegating Property Permissions on a ZFS Dataset
3189.sp
3190.LP
3191The 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.
3192
3193.sp
3194.in +2
3195.nf
3196# \fBzfs allow cindys quota,reservation users/home\fR
3197# \fBzfs allow users/home\fR
3198-------------------------------------------------------------
3199Local+Descendent permissions on (users/home)
3200 user cindys quota,reservation
3201-------------------------------------------------------------
3202cindys% \fBzfs set quota=10G users/home/marks\fR
3203cindys% \fBzfs get quota users/home/marks\fR
3204NAME PROPERTY VALUE SOURCE
3205users/home/marks quota 10G local
3206.fi
3207.in -2
3208.sp
3209
3210.LP
3211\fBExample 22 \fRRemoving ZFS Delegated Permissions on a ZFS Dataset
3212.sp
3213.LP
3214The 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.
3215
3216.sp
3217.in +2
3218.nf
3219# \fBzfs unallow staff snapshot tank/users\fR
3220# \fBzfs allow tank/users\fR
3221-------------------------------------------------------------
3222Permission sets on (tank/users)
3223 @pset create,destroy,mount,snapshot
3224Create time permissions on (tank/users)
3225 create,destroy
3226Local+Descendent permissions on (tank/users)
3227 group staff @pset,create,mount
3228-------------------------------------------------------------
3229.fi
3230.in -2
3231.sp
3232
3233.SH EXIT STATUS
3234.sp
3235.LP
3236The following exit values are returned:
3237.sp
3238.ne 2
3239.mk
3240.na
3241\fB\fB0\fR\fR
3242.ad
3243.sp .6
3244.RS 4n
3245Successful completion.
3246.RE
3247
3248.sp
3249.ne 2
3250.mk
3251.na
3252\fB\fB1\fR\fR
3253.ad
3254.sp .6
3255.RS 4n
3256An error occurred.
3257.RE
3258
3259.sp
3260.ne 2
3261.mk
3262.na
3263\fB\fB2\fR\fR
3264.ad
3265.sp .6
3266.RS 4n
3267Invalid command line options were specified.
3268.RE
3269
058ac9ba
BB
3270.SH SEE ALSO
3271.sp
3272.LP
4da4a9e1 3273\fBchmod\fR(2), \fBfsync\fR(2), \fBgzip\fR(1), \fBmount\fR(8), \fBssh\fR(1), \fBstat\fR(2), \fBwrite\fR(2), \fBzpool\fR(8)