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