xref: /NextBSD/cddl/contrib/opensolaris/cmd/zfs/zfs.8 (revision 4557fabb34e865d7f40be64b39c9e34fa41dbb60)
1'\" te
2.\" Copyright (c) 2013, Martin Matuska <mm@FreeBSD.org>.
3.\" All Rights Reserved.
4.\"
5.\" The contents of this file are subject to the terms of the
6.\" Common Development and Distribution License (the "License").
7.\" You may not use this file except in compliance with the License.
8.\"
9.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10.\" or http://www.opensolaris.org/os/licensing.
11.\" See the License for the specific language governing permissions
12.\" and limitations under the License.
13.\"
14.\" When distributing Covered Code, include this CDDL HEADER in each
15.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16.\" If applicable, add the following below this CDDL HEADER, with the
17.\" fields enclosed by brackets "[]" replaced with your own identifying
18.\" information: Portions Copyright [yyyy] [name of copyright owner]
19.\"
20.\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved.
21.\" Copyright (c) 2011, 2014 by Delphix. All rights reserved.
22.\" Copyright (c) 2011, Pawel Jakub Dawidek <pjd@FreeBSD.org>
23.\" Copyright (c) 2012, Glen Barber <gjb@FreeBSD.org>
24.\" Copyright (c) 2012, Bryan Drewery <bdrewery@FreeBSD.org>
25.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
26.\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
27.\" Copyright (c) 2013, Steven Hartland <smh@FreeBSD.org>
28.\" Copyright (c) 2014 Nexenta Systems, Inc. All Rights Reserved.
29.\" Copyright (c) 2014, Xin LI <delphij@FreeBSD.org>
30.\" Copyright (c) 2014-2015, The FreeBSD Foundation, All Rights Reserved.
31.\"
32.\" $FreeBSD$
33.\"
34.Dd October 24, 2015
35.Dt ZFS 8
36.Os
37.Sh NAME
38.Nm zfs
39.Nd configures ZFS file systems
40.Sh SYNOPSIS
41.Nm
42.Op Fl \&?
43.Nm
44.Cm create
45.Op Fl pu
46.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... Ar filesystem
47.Nm
48.Cm create
49.Op Fl ps
50.Op Fl b Ar blocksize
51.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
52.Fl V
53.Ar size volume
54.Nm
55.Cm destroy
56.Op Fl fnpRrv
57.Ar filesystem Ns | Ns Ar volume
58.Nm
59.Cm destroy
60.Op Fl dnpRrv
61.Sm off
62.Ar filesystem Ns | Ns volume
63.Ns @snap
64.Op % Ns Ar snap
65.Op , Ns Ar snap Op % Ns Ar snap
66.Op , Ns ...
67.Sm on
68.Nm
69.Cm destroy
70.Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
71.Nm
72.Cm snapshot Ns | Ns Cm snap
73.Op Fl r
74.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
75.Ar filesystem@snapname Ns | Ns Ar volume@snapname
76.Ar filesystem@snapname Ns | Ns Ar volume@snapname Ns ...
77.Nm
78.Cm rollback
79.Op Fl rRf
80.Ar snapshot
81.Nm
82.Cm clone
83.Op Fl p
84.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
85.Ar snapshot filesystem Ns | Ns Ar volume
86.Nm
87.Cm promote
88.Ar clone-filesystem
89.Nm
90.Cm rename
91.Op Fl f
92.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
93.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
94.Nm
95.Cm rename
96.Op Fl f
97.Fl p
98.Ar filesystem Ns | Ns Ar volume
99.Ar filesystem Ns | Ns Ar volume
100.Nm
101.Cm rename
102.Fl r
103.Ar snapshot snapshot
104.Nm
105.Cm rename
106.Fl u
107.Op Fl p
108.Ar filesystem filesystem
109.Nm
110.Cm list
111.Op Fl r Ns | Ns Fl d Ar depth
112.Op Fl Hp
113.Op Fl o Ar property Ns Oo , Ns property Ns Oc Ns ...
114.Op Fl t Ar type Ns Oo , Ns type Ns Oc Ns ...
115.Oo Fl s Ar property Oc Ns ...
116.Oo Fl S Ar property Oc Ns ...
117.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
118.Nm
119.Cm set
120.Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ...
121.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
122.Nm
123.Cm get
124.Op Fl r Ns | Ns Fl d Ar depth
125.Op Fl Hp
126.Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ...
127.Op Fl t Ar type Ns Oo Ns , Ar type Oc Ns ...
128.Op Fl s Ar source Ns Oo Ns , Ns Ar source Oc Ns ...
129.Ar all | property Ns Oo Ns , Ns Ar property Oc Ns ...
130.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
131.Nm
132.Cm inherit
133.Op Fl rS
134.Ar property
135.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
136.Nm
137.Cm upgrade
138.Op Fl v
139.Nm
140.Cm upgrade
141.Op Fl r
142.Op Fl V Ar version
143.Fl a | Ar filesystem
144.Nm
145.Cm userspace
146.Op Fl Hinp
147.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
148.Oo Fl s Ar field Oc Ns ...
149.Oo Fl S Ar field Oc Ns ...
150.Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ...
151.Ar filesystem Ns | Ns Ar snapshot
152.Nm
153.Cm groupspace
154.Op Fl Hinp
155.Op Fl o Ar field Ns Oo , Ns field Oc Ns ...
156.Oo Fl s Ar field Oc Ns ...
157.Oo Fl S Ar field Oc Ns ...
158.Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ...
159.Ar filesystem Ns | Ns Ar snapshot
160.Nm
161.Cm mount
162.Nm
163.Cm mount
164.Op Fl vO
165.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
166.Fl a | Ar filesystem
167.Nm
168.Cm unmount Ns | Ns Cm umount
169.Op Fl f
170.Fl a | Ar filesystem Ns | Ns Ar mountpoint
171.Nm
172.Cm share
173.Fl a | Ar filesystem
174.Nm
175.Cm unshare
176.Fl a | Ar filesystem Ns | Ns Ar mountpoint
177.Nm
178.Cm bookmark
179.Ar snapshot
180.Ar bookmark
181.Nm
182.Cm send
183.Op Fl DnPpRveL
184.Op Fl i Ar snapshot | Fl I Ar snapshot
185.Ar snapshot
186.Nm
187.Cm send
188.Op Fl eL
189.Op Fl i Ar snapshot Ns | Ns bookmark
190.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
191.Nm
192.Cm send
193.Op Fl Penv
194.Fl t Ar receive_resume_token
195.Nm
196.Cm receive Ns | Ns Cm recv
197.Op Fl vnsFu
198.Op Fl o Sy origin Ns = Ns Ar snapshot
199.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
200.Nm
201.Cm receive Ns | Ns Cm recv
202.Op Fl vnsFu
203.Op Fl d | e
204.Op Fl o Sy origin Ns = Ns Ar snapshot
205.Ar filesystem
206.Nm
207.Cm receive Ns | Ns Cm recv
208.Fl A
209.Ar filesystem Ns | Ns Ar volume
210.Nm
211.Cm allow
212.Ar filesystem Ns | Ns Ar volume
213.Nm
214.Cm allow
215.Op Fl ldug
216.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
217.Ar perm Ns | Ns Ar @setname Ns
218.Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ...
219.Ar filesystem Ns | Ns Ar volume
220.Nm
221.Cm allow
222.Op Fl ld
223.Fl e Ns | Ns Cm everyone
224.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
225.Ns ...
226.Ar filesystem Ns | Ns Ar volume
227.Nm
228.Cm allow
229.Fl c
230.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
231.Ns ...
232.Ar filesystem Ns | Ns Ar volume
233.Nm
234.Cm allow
235.Fl s
236.Ar @setname
237.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
238.Ns ...
239.Ar filesystem Ns | Ns Ar volume
240.Nm
241.Cm unallow
242.Op Fl rldug
243.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
244.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
245.Ns ... Oc
246.Ar filesystem Ns | Ns Ar volume
247.Nm
248.Cm unallow
249.Op Fl rld
250.Fl e Ns | Ns Cm everyone
251.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
252.Ns ... Oc
253.Ar filesystem Ns | Ns Ar volume
254.Nm
255.Cm unallow
256.Op Fl r
257.Fl c
258.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
259.Ns ... Oc
260.Ar filesystem Ns | Ns Ar volume
261.Nm
262.Cm unallow
263.Op Fl r
264.Fl s
265.Ar @setname
266.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
267.Ns ... Oc
268.Ar filesystem Ns | Ns Ar volume
269.Nm
270.Cm hold
271.Op Fl r
272.Ar tag snapshot Ns ...
273.Nm
274.Cm holds
275.Op Fl Hp
276.Op Fl r Ns | Ns Fl d Ar depth
277.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns
278.Ns ...
279.Nm
280.Cm release
281.Op Fl r
282.Ar tag snapshot Ns ...
283.Nm
284.Cm diff
285.Op Fl FHt
286.Ar snapshot
287.Op Ar snapshot Ns | Ns Ar filesystem
288.Nm
289.Cm jail
290.Ar jailid Ns | Ns Ar jailname filesystem
291.Nm
292.Cm unjail
293.Ar jailid Ns | Ns Ar jailname filesystem
294.Sh DESCRIPTION
295The
296.Nm
297command configures
298.Tn ZFS
299datasets within a
300.Tn ZFS
301storage pool, as described in
302.Xr zpool 8 .
303A dataset is identified by a unique path within the
304.Tn ZFS
305namespace. For example:
306.Bd -ragged -offset 4n
307.No pool/ Ns Brq filesystem,volume,snapshot
308.Ed
309.Pp
310where the maximum length of a dataset name is
311.Dv MAXNAMELEN
312(256 bytes).
313.Pp
314A dataset can be one of the following:
315.Bl -hang -width 12n
316.It Sy file system
317A
318.Tn ZFS
319dataset of type
320.Em filesystem
321can be mounted within the standard system namespace and behaves like other file
322systems. While
323.Tn ZFS
324file systems are designed to be
325.Tn POSIX
326compliant, known issues exist that prevent compliance in some cases.
327Applications that depend on standards conformance might fail due to nonstandard
328behavior when checking file system free space.
329.It Sy volume
330A logical volume exported as a raw or block device. This type of dataset should
331only be used under special circumstances. File systems are typically used in
332most environments.
333.It Sy snapshot
334A read-only version of a file system or volume at a given point in time. It is
335specified as
336.Em filesystem@name
337or
338.Em volume@name .
339.El
340.Ss ZFS File System Hierarchy
341A
342.Tn ZFS
343storage pool is a logical collection of devices that provide space for
344datasets. A storage pool is also the root of the
345.Tn ZFS
346file system hierarchy.
347.Pp
348The root of the pool can be accessed as a file system, such as mounting and
349unmounting, taking snapshots, and setting properties. The physical storage
350characteristics, however, are managed by the
351.Xr zpool 8
352command.
353.Pp
354See
355.Xr zpool 8
356for more information on creating and administering pools.
357.Ss Snapshots
358A snapshot is a read-only copy of a file system or volume. Snapshots can be
359created extremely quickly, and initially consume no additional space within the
360pool. As data within the active dataset changes, the snapshot consumes more
361data than would otherwise be shared with the active dataset.
362.Pp
363Snapshots can have arbitrary names. Snapshots of volumes can be cloned or
364rolled back, but cannot be accessed independently.
365.Pp
366File system snapshots can be accessed under the
367.Pa \&.zfs/snapshot
368directory in the root of the file system. Snapshots are automatically mounted
369on demand and may be unmounted at regular intervals. The visibility of the
370.Pa \&.zfs
371directory can be controlled by the
372.Sy snapdir
373property.
374.Ss Clones
375A clone is a writable volume or file system whose initial contents are the same
376as another dataset. As with snapshots, creating a clone is nearly
377instantaneous, and initially consumes no additional space.
378.Pp
379Clones can only be created from a snapshot. When a snapshot is cloned, it
380creates an implicit dependency between the parent and child. Even though the
381clone is created somewhere else in the dataset hierarchy, the original snapshot
382cannot be destroyed as long as a clone exists. The
383.Sy origin
384property exposes this dependency, and the
385.Cm destroy
386command lists any such dependencies, if they exist.
387.Pp
388The clone parent-child dependency relationship can be reversed by using the
389.Cm promote
390subcommand. This causes the "origin" file system to become a clone of the
391specified file system, which makes it possible to destroy the file system that
392the clone was created from.
393.Ss Mount Points
394Creating a
395.Tn ZFS
396file system is a simple operation, so the number of file systems per system is
397likely to be numerous. To cope with this,
398.Tn ZFS
399automatically manages mounting and unmounting file systems without the need to
400edit the
401.Pa /etc/fstab
402file. All automatically managed file systems are mounted by
403.Tn ZFS
404at boot time.
405.Pp
406By default, file systems are mounted under
407.Pa /path ,
408where
409.Ar path
410is the name of the file system in the
411.Tn ZFS
412namespace. Directories are created and destroyed as needed.
413.Pp
414A file system can also have a mount point set in the
415.Sy mountpoint
416property. This directory is created as needed, and
417.Tn ZFS
418automatically mounts the file system when the
419.Qq Nm Cm mount Fl a
420command is invoked (without editing
421.Pa /etc/fstab ) .
422The
423.Sy mountpoint
424property can be inherited, so if
425.Em pool/home
426has a mount point of
427.Pa /home ,
428then
429.Em pool/home/user
430automatically inherits a mount point of
431.Pa /home/user .
432.Pp
433A file system
434.Sy mountpoint
435property of
436.Cm none
437prevents the file system from being mounted.
438.Pp
439If needed,
440.Tn ZFS
441file systems can also be managed with traditional tools
442.Pq Xr mount 8 , Xr umount 8 , Xr fstab 5 .
443If a file system's mount point is set to
444.Cm legacy ,
445.Tn ZFS
446makes no attempt to manage the file system, and the administrator is
447responsible for mounting and unmounting the file system.
448.Ss Jails
449.No A Tn ZFS
450dataset can be attached to a jail by using the
451.Qq Nm Cm jail
452subcommand. You cannot attach a dataset to one jail and the children of the
453same dataset to another jails. To allow management of the dataset from within
454a jail, the
455.Sy jailed
456property has to be set and the jail needs access to the
457.Pa /dev/zfs
458device. The
459.Sy quota
460property cannot be changed from within a jail. See
461.Xr jail 8
462for information on how to allow mounting
463.Tn ZFS
464datasets from within a jail.
465.Pp
466.No A Tn ZFS
467dataset can be detached from a jail using the
468.Qq Nm Cm unjail
469subcommand.
470.Pp
471After a dataset is attached to a jail and the jailed property is set, a jailed
472file system cannot be mounted outside the jail, since the jail administrator
473might have set the mount point to an unacceptable value.
474.Ss Deduplication
475Deduplication is the process for removing redundant data at the block-level,
476reducing the total amount of data stored. If a file system has the
477.Cm dedup
478property enabled, duplicate data blocks are removed synchronously. The result
479is that only unique data is stored and common components are shared among
480files.
481.Ss Native Properties
482Properties are divided into two types, native properties and user-defined (or
483"user") properties. Native properties either export internal statistics or
484control
485.Tn ZFS
486behavior. In addition, native properties are either editable or read-only. User
487properties have no effect on
488.Tn ZFS
489behavior, but you can use them to annotate datasets in a way that is meaningful
490in your environment. For more information about user properties, see the
491.Qq Sx User Properties
492section, below.
493.Pp
494Every dataset has a set of properties that export statistics about the dataset
495as well as control various behaviors. Properties are inherited from the parent
496unless overridden by the child. Some properties apply only to certain types of
497datasets (file systems, volumes, or snapshots).
498.Pp
499The values of numeric properties can be specified using human-readable suffixes
500(for example,
501.Sy k , KB , M , Gb ,
502and so forth, up to
503.Sy Z
504for zettabyte). The following are all valid (and equal) specifications:
505.Bd -ragged -offset 4n
5061536M, 1.5g, 1.50GB
507.Ed
508.Pp
509The values of non-numeric properties are case sensitive and must be lowercase,
510except for
511.Sy mountpoint , sharenfs , No and Sy sharesmb .
512.Pp
513The following native properties consist of read-only statistics about the
514dataset. These properties can be neither set, nor inherited. Native properties
515apply to all dataset types unless otherwise noted.
516.Bl -tag -width 2n
517.It Sy available
518The amount of space available to the dataset and all its children, assuming
519that there is no other activity in the pool. Because space is shared within a
520pool, availability can be limited by any number of factors, including physical
521pool size, quotas, reservations, or other datasets within the pool.
522.Pp
523This property can also be referred to by its shortened column name,
524.Sy avail .
525.It Sy compressratio
526For non-snapshots, the compression ratio achieved for the
527.Sy used
528space of this dataset, expressed as a multiplier.  The
529.Sy used
530property includes descendant datasets, and, for clones, does not include
531the space shared with the origin snapshot.  For snapshots, the
532.Sy compressratio
533is the same as the
534.Sy refcompressratio
535property. Compression can be turned on by running:
536.Qq Nm Cm set compression=on Ar dataset
537The default value is
538.Cm off .
539.It Sy creation
540The time this dataset was created.
541.It Sy clones
542For snapshots, this property is a comma-separated list of filesystems or
543volumes which are clones of this snapshot.  The clones'
544.Sy origin
545property is this snapshot.  If the
546.Sy clones
547property is not empty, then this snapshot can not be destroyed (even with the
548.Fl r
549or
550.Fl f
551options).
552.It Sy defer_destroy
553This property is
554.Cm on
555if the snapshot has been marked for deferred destroy by using the
556.Qq Nm Cm destroy -d
557command. Otherwise, the property is
558.Cm off .
559.It Sy filesystem_count
560The total number of filesystems and volumes that exist under this location in the
561dataset tree.
562This value is only available when a
563.Sy filesystem_limit
564has
565been set somewhere in the tree under which the dataset resides.
566.It Sy logicalreferenced
567The amount of space that is
568.Qq logically
569accessible by this dataset.
570See the
571.Sy referenced
572property.
573The logical space ignores the effect of the
574.Sy compression
575and
576.Sy copies
577properties, giving a quantity closer to the amount of data that applications
578see.
579However, it does include space consumed by metadata.
580.Pp
581This property can also be referred to by its shortened column name,
582.Sy lrefer .
583.It Sy logicalused
584The amount of space that is
585.Qq logically
586consumed by this dataset and all its descendents.
587See the
588.Sy used
589property.
590The logical space ignores the effect of the
591.Sy compression
592and
593.Sy copies
594properties, giving a quantity closer to the amount of data that applications
595see.
596.Pp
597This property can also be referred to by its shortened column name,
598.Sy lused .
599.It Sy mounted
600For file systems, indicates whether the file system is currently mounted. This
601property can be either
602.Cm yes
603or
604.Cm no .
605.It Sy origin
606For cloned file systems or volumes, the snapshot from which the clone was
607created. See also the
608.Sy clones
609property.
610.It Sy receive_resume_token
611For filesystems or volumes which have saved partially-completed state from
612.Sy zfs receive -s ,
613this opaque token can be provided to
614.Sy zfs send -t
615to resume and complete the
616.Sy zfs receive .
617.It Sy referenced
618The amount of data that is accessible by this dataset, which may or may not be
619shared with other datasets in the pool. When a snapshot or clone is created, it
620initially references the same amount of space as the file system or snapshot it
621was created from, since its contents are identical.
622.Pp
623This property can also be referred to by its shortened column name,
624.Sy refer .
625.It Sy refcompressratio
626The compression ratio achieved for the
627.Sy referenced
628space of this dataset, expressed as a multiplier.  See also the
629.Sy compressratio
630property.
631.It Sy snapshot_count
632The total number of snapshots that exist under this location in the dataset tree.
633This value is only available when a
634.Sy snapshot_limit
635has been set somewhere
636in the tree under which the dataset resides.
637.It Sy type
638The type of dataset:
639.Sy filesystem , volume , No or Sy snapshot .
640.It Sy used
641The amount of space consumed by this dataset and all its descendents. This is
642the value that is checked against this dataset's quota and reservation. The
643space used does not include this dataset's reservation, but does take into
644account the reservations of any descendent datasets. The amount of space that a
645dataset consumes from its parent, as well as the amount of space that are freed
646if this dataset is recursively destroyed, is the greater of its space used and
647its reservation.
648.Pp
649When snapshots (see the
650.Qq Sx Snapshots
651section) are created, their space is
652initially shared between the snapshot and the file system, and possibly with
653previous snapshots. As the file system changes, space that was previously
654shared becomes unique to the snapshot, and counted in the snapshot's space
655used. Additionally, deleting snapshots can increase the amount of space unique
656to (and used by) other snapshots.
657.Pp
658The amount of space used, available, or referenced does not take into account
659pending changes. Pending changes are generally accounted for within a few
660seconds. Committing a change to a disk using
661.Xr fsync 2
662or
663.Sy O_SYNC
664does not necessarily guarantee that the space usage information is updated
665immediately.
666.It Sy usedby*
667The
668.Sy usedby*
669properties decompose the
670.Sy used
671properties into the various reasons that space is used. Specifically,
672.Sy used No =
673.Sy usedbysnapshots + usedbydataset + usedbychildren + usedbyrefreservation .
674These properties are only available for datasets created
675with
676.Tn ZFS
677pool version 13 pools and higher.
678.It Sy usedbysnapshots
679The amount of space consumed by snapshots of this dataset. In particular, it is
680the amount of space that would be freed if all of this dataset's snapshots were
681destroyed. Note that this is not simply the sum of the snapshots'
682.Sy used
683properties because space can be shared by multiple snapshots.
684.It Sy usedbydataset
685The amount of space used by this dataset itself, which would be freed if the
686dataset were destroyed (after first removing any
687.Sy refreservation
688and destroying any necessary snapshots or descendents).
689.It Sy usedbychildren
690The amount of space used by children of this dataset, which would be freed if
691all the dataset's children were destroyed.
692.It Sy usedbyrefreservation
693The amount of space used by a
694.Sy refreservation
695set on this dataset, which would be freed if the
696.Sy refreservation
697was removed.
698.It Sy userused@ Ns Ar user
699The amount of space consumed by the specified user in this dataset. Space is
700charged to the owner of each file, as displayed by
701.Qq Nm ls Fl l .
702The amount of space charged is displayed by
703.Qq Nm du
704and
705.Qq Nm ls Fl s .
706See the
707.Qq Nm Cm userspace
708subcommand for more information.
709.Pp
710Unprivileged users can access only their own space usage. The root user, or a
711user who has been granted the
712.Sy userused
713privilege with
714.Qq Nm Cm allow ,
715can access everyone's usage.
716.Pp
717The
718.Sy userused@ Ns ...
719properties are not displayed by
720.Qq Nm Cm get all .
721The user's name must be appended after the
722.Sy @
723symbol, using one of the following forms:
724.Bl -bullet -offset 2n
725.It
726POSIX name (for example,
727.Em joe )
728.It
729POSIX numeric ID (for example,
730.Em 1001 )
731.El
732.It Sy userrefs
733This property is set to the number of user holds on this snapshot. User holds
734are set by using the
735.Qq Nm Cm hold
736command.
737.It Sy groupused@ Ns Ar group
738The amount of space consumed by the specified group in this dataset. Space is
739charged to the group of each file, as displayed by
740.Nm ls Fl l .
741See the
742.Sy userused@ Ns Ar user
743property for more information.
744.Pp
745Unprivileged users can only access their own groups' space usage. The root
746user, or a user who has been granted the
747.Sy groupused
748privilege with
749.Qq Nm Cm allow ,
750can access all groups' usage.
751.It Sy volblocksize Ns = Ns Ar blocksize
752For volumes, specifies the block size of the volume. The
753.Ar blocksize
754cannot be changed once the volume has been written, so it should be set at
755volume creation time. The default
756.Ar blocksize
757for volumes is 8 Kbytes. Any
758power of 2 from 512 bytes to 128 Kbytes is valid.
759.Pp
760This property can also be referred to by its shortened column name,
761.Sy volblock .
762.It Sy written
763The amount of
764.Sy referenced
765space written to this dataset since the previous snapshot.
766.It Sy written@ Ns Ar snapshot
767The amount of
768.Sy referenced
769space written to this dataset since the specified snapshot.  This is the space
770that is referenced by this dataset but was not referenced by the specified
771snapshot.
772.Pp
773The
774.Ar snapshot
775may be specified as a short snapshot name (just the part after the
776.Sy @ ) ,
777in which case it will be interpreted as a snapshot in the same filesystem as
778this dataset. The
779.Ar snapshot
780may be a full snapshot name
781.Pq Em filesystem@snapshot ,
782which for clones may be a snapshot in the origin's filesystem (or the origin of
783the origin's filesystem, etc).
784.El
785.Pp
786The following native properties can be used to change the behavior of a
787.Tn ZFS
788dataset.
789.Bl -tag -width 2n
790.It Xo
791.Sy aclinherit Ns = Ns Cm discard |
792.Cm noallow |
793.Cm restricted |
794.Cm passthrough |
795.Cm passthrough-x
796.Xc
797Controls how
798.Tn ACL
799entries are inherited when files and directories are created. A file system
800with an
801.Sy aclinherit
802property of
803.Cm discard
804does not inherit any
805.Tn ACL
806entries. A file system with an
807.Sy aclinherit
808property value of
809.Cm noallow
810only inherits inheritable
811.Tn ACL
812entries that specify "deny" permissions. The property value
813.Cm restricted
814(the default) removes the
815.Em write_acl
816and
817.Em write_owner
818permissions when the
819.Tn ACL
820entry is inherited. A file system with an
821.Sy aclinherit
822property value of
823.Cm passthrough
824inherits all inheritable
825.Tn ACL
826entries without any modifications made to the
827.Tn ACL
828entries when they are inherited. A file system with an
829.Sy aclinherit
830property value of
831.Cm passthrough-x
832has the same meaning as
833.Cm passthrough ,
834except that the
835.Em owner@ , group@ , No and Em everyone@ Tn ACE Ns s
836inherit the execute permission only if the file creation mode also requests the
837execute bit.
838.Pp
839When the property value is set to
840.Cm passthrough ,
841files are created with a mode determined by the inheritable
842.Tn ACE Ns s.
843If no inheritable
844.Tn ACE Ns s
845exist that affect the mode, then the mode is set in accordance to the requested
846mode from the application.
847.It Sy aclmode Ns = Ns Cm discard | groupmask | passthrough | restricted
848Controls how an
849.Tn ACL
850is modified during
851.Xr chmod 2 .
852A file system with an
853.Sy aclmode
854property of
855.Cm discard
856(the default) deletes all
857.Tn ACL
858entries that do not represent the mode of the file. An
859.Sy aclmode
860property of
861.Cm groupmask
862reduces permissions granted in all
863.Em ALLOW
864entries found in the
865.Tn ACL
866such that they are no greater than the group permissions specified by
867.Xr chmod 2 .
868A file system with an
869.Sy aclmode
870property of
871.Cm passthrough
872indicates that no changes are made to the
873.Tn ACL
874other than creating or updating the necessary
875.Tn ACL
876entries to represent the new mode of the file or directory.
877An
878.Sy aclmode
879property of
880.Cm restricted
881will cause the
882.Xr chmod 2
883operation to return an error when used on any file or directory which has
884a non-trivial
885.Tn ACL
886whose entries can not be represented by a mode.
887.Xr chmod 2
888is required to change the set user ID, set group ID, or sticky bits on a file
889or directory, as they do not have equivalent
890.Tn ACL
891entries.
892In order to use
893.Xr chmod 2
894on a file or directory with a non-trivial
895.Tn ACL
896when
897.Sy aclmode
898is set to
899.Cm restricted ,
900you must first remove all
901.Tn ACL
902entries which do not represent the current mode.
903.It Sy atime Ns = Ns Cm on | off
904Controls whether the access time for files is updated when they are read.
905Turning this property off avoids producing write traffic when reading files and
906can result in significant performance gains, though it might confuse mailers
907and other similar utilities. The default value is
908.Cm on .
909.It Sy canmount Ns = Ns Cm on | off | noauto
910If this property is set to
911.Cm off ,
912the file system cannot be mounted, and is ignored by
913.Qq Nm Cm mount Fl a .
914Setting this property to
915.Cm off
916is similar to setting the
917.Sy mountpoint
918property to
919.Cm none ,
920except that the dataset still has a normal
921.Sy mountpoint
922property, which can be inherited. Setting this property to
923.Cm off
924allows datasets to be used solely as a mechanism to inherit properties. One
925example of setting
926.Sy canmount Ns = Ns Cm off
927is to have two datasets with the same
928.Sy mountpoint ,
929so that the children of both datasets appear in the same directory, but might
930have different inherited characteristics.
931.Pp
932When the
933.Cm noauto
934value is set, a dataset can only be mounted and unmounted explicitly. The
935dataset is not mounted automatically when the dataset is created or imported,
936nor is it mounted by the
937.Qq Nm Cm mount Fl a
938command or unmounted by the
939.Qq Nm Cm umount Fl a
940command.
941.Pp
942This property is not inherited.
943.It Sy checksum Ns = Ns Cm on | off | fletcher2 | fletcher4 | sha256 | noparity
944Controls the checksum used to verify data integrity. The default value is
945.Cm on ,
946which automatically selects an appropriate algorithm (currently,
947.Cm fletcher4 ,
948but this may change in future releases). The value
949.Cm off
950disables integrity checking on user data.
951The value
952.Cm noparity
953not only
954disables integrity but also disables maintaining parity for user data.  This
955setting is used internally by a dump device residing on a RAID-Z pool and should
956not be used by any other dataset.
957Disabling checksums is
958.Em NOT
959a recommended practice.
960.It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | Cm zle | Cm lz4
961Controls the compression algorithm used for this dataset.
962Setting compression to
963.Cm on
964indicates that the current default compression algorithm should be used.
965The default balances compression and decompression speed, with compression
966ratio and is expected to work well on a wide variety of workloads.
967Unlike all other settings for this property, on does not select a fixed
968compression type.
969As new compression algorithms are added to ZFS and enabled on a pool, the
970default compression algorithm may change.
971The current default compression algorthm is either
972.Cm lzjb
973or, if the
974.Sy lz4_compress
975feature is enabled,
976.Cm lz4 .
977The
978.Cm lzjb
979compression algorithm is optimized for performance while providing decent data
980compression. Setting compression to
981.Cm on
982uses the
983.Cm lzjb
984compression algorithm. The
985.Cm gzip
986compression algorithm uses the same compression as the
987.Xr gzip 1
988command. You can specify the
989.Cm gzip
990level by using the value
991.Cm gzip- Ns Ar N
992where
993.Ar N
994is an integer from 1 (fastest) to 9 (best compression ratio). Currently,
995.Cm gzip
996is equivalent to
997.Cm gzip-6
998(which is also the default for
999.Xr gzip 1 ) .
1000The
1001.Cm zle
1002compression algorithm compresses runs of zeros.
1003.Pp
1004The
1005.Sy lz4
1006compression algorithm is a high-performance replacement
1007for the
1008.Sy lzjb
1009algorithm. It features significantly faster
1010compression and decompression, as well as a moderately higher
1011compression ratio than
1012.Sy lzjb ,
1013but can only be used on pools with
1014the
1015.Sy lz4_compress
1016feature set to
1017.Sy enabled .
1018See
1019.Xr zpool-features 7
1020for details on ZFS feature flags and the
1021.Sy lz4_compress
1022feature.
1023.Pp
1024This property can also be referred to by its shortened column name
1025.Cm compress .
1026Changing this property affects only newly-written data.
1027.It Sy copies Ns = Ns Cm 1 | 2 | 3
1028Controls the number of copies of data stored for this dataset. These copies are
1029in addition to any redundancy provided by the pool, for example, mirroring or
1030RAID-Z. The copies are stored on different disks, if possible. The space used
1031by multiple copies is charged to the associated file and dataset, changing the
1032.Sy used
1033property and counting against quotas and reservations.
1034.Pp
1035Changing this property only affects newly-written data. Therefore, set this
1036property at file system creation time by using the
1037.Fl o Cm copies= Ns Ar N
1038option.
1039.It Sy dedup Ns = Ns Cm on | off | verify | sha256 Ns Op Cm ,verify
1040Configures deduplication for a dataset. The default value is
1041.Cm off .
1042The default deduplication checksum is
1043.Cm sha256
1044(this may change in the future).
1045When
1046.Sy dedup
1047is enabled, the checksum defined here overrides the
1048.Sy checksum
1049property. Setting the value to
1050.Cm verify
1051has the same effect as the setting
1052.Cm sha256,verify .
1053.Pp
1054If set to
1055.Cm verify ,
1056.Tn ZFS
1057will do a byte-to-byte comparsion in case of two blocks having the same
1058signature to make sure the block contents are identical.
1059.It Sy devices Ns = Ns Cm on | off
1060The
1061.Sy devices
1062property is currently not supported on
1063.Fx .
1064.It Sy exec Ns = Ns Cm on | off
1065Controls whether processes can be executed from within this file system. The
1066default value is
1067.Cm on .
1068.It Sy mlslabel Ns = Ns Ar label | Cm none
1069The
1070.Sy mlslabel
1071property is currently not supported on
1072.Fx .
1073.It Sy filesystem_limit Ns = Ns Ar count | Cm none
1074Limits the number of filesystems and volumes that can exist under this point in
1075the dataset tree.
1076The limit is not enforced if the user is allowed to change
1077the limit.
1078Setting a
1079.Sy filesystem_limit
1080on a descendent of a filesystem that
1081already has a
1082.Sy filesystem_limit
1083does not override the ancestor's
1084.Sy filesystem_limit ,
1085but rather imposes an additional limit.
1086This feature must be enabled to be used
1087.Po see
1088.Xr zpool-features 7
1089.Pc .
1090.It Sy mountpoint Ns = Ns Ar path | Cm none | legacy
1091Controls the mount point used for this file system. See the
1092.Qq Sx Mount Points
1093section for more information on how this property is used.
1094.Pp
1095When the
1096.Sy mountpoint
1097property is changed for a file system, the file system and any children that
1098inherit the mount point are unmounted. If the new value is
1099.Cm legacy ,
1100then they remain unmounted. Otherwise, they are automatically remounted in the
1101new location if the property was previously
1102.Cm legacy
1103or
1104.Cm none ,
1105or if they were mounted before the property was changed. In addition, any
1106shared file systems are unshared and shared in the new location.
1107.It Sy nbmand Ns = Ns Cm on | off
1108The
1109.Sy nbmand
1110property is currently not supported on
1111.Fx .
1112.It Sy primarycache Ns = Ns Cm all | none | metadata
1113Controls what is cached in the primary cache (ARC). If this property is set to
1114.Cm all ,
1115then both user data and metadata is cached. If this property is set to
1116.Cm none ,
1117then neither user data nor metadata is cached. If this property is set to
1118.Cm metadata ,
1119then only metadata is cached. The default value is
1120.Cm all .
1121.It Sy quota Ns = Ns Ar size | Cm none
1122Limits the amount of space a dataset and its descendents can consume. This
1123property enforces a hard limit on the amount of space used. This includes all
1124space consumed by descendents, including file systems and snapshots. Setting a
1125quota on a descendent of a dataset that already has a quota does not override
1126the ancestor's quota, but rather imposes an additional limit.
1127.Pp
1128Quotas cannot be set on volumes, as the
1129.Sy volsize
1130property acts as an implicit quota.
1131.It Sy snapshot_limit Ns = Ns Ar count | Cm none
1132Limits the number of snapshots that can be created on a dataset and its
1133descendents.
1134Setting a
1135.Sy snapshot_limit
1136on a descendent of a dataset that already
1137has a
1138.Sy snapshot_limit
1139does not override the ancestor's
1140.Sy snapshot_limit ,
1141but
1142rather imposes an additional limit.
1143The limit is not enforced if the user is
1144allowed to change the limit.
1145For example, this means that recursive snapshots
1146taken from the global zone are counted against each delegated dataset within
1147a jail.
1148This feature must be enabled to be used
1149.Po see
1150.Xr zpool-features 7
1151.Pc .
1152.It Sy userquota@ Ns Ar user Ns = Ns Ar size | Cm none
1153Limits the amount of space consumed by the specified user.
1154Similar to the
1155.Sy refquota
1156property, the
1157.Sy userquota
1158space calculation does not include space that is used by descendent datasets,
1159such as snapshots and clones. User space consumption is identified by the
1160.Sy userspace@ Ns Ar user
1161property.
1162.Pp
1163Enforcement of user quotas may be delayed by several seconds. This delay means
1164that a user might exceed their quota before the system notices that they are
1165over quota and begins to refuse additional writes with the
1166.Em EDQUOT
1167error message. See the
1168.Cm userspace
1169subcommand for more information.
1170.Pp
1171Unprivileged users can only access their own groups' space usage. The root
1172user, or a user who has been granted the
1173.Sy userquota
1174privilege with
1175.Qq Nm Cm allow ,
1176can get and set everyone's quota.
1177.Pp
1178This property is not available on volumes, on file systems before version 4, or
1179on pools before version 15. The
1180.Sy userquota@ Ns ...
1181properties are not displayed by
1182.Qq Nm Cm get all .
1183The user's name must be appended after the
1184.Sy @
1185symbol, using one of the following forms:
1186.Bl -bullet -offset 2n
1187.It
1188POSIX name (for example,
1189.Em joe )
1190.It
1191POSIX numeric ID (for example,
1192.Em 1001 )
1193.El
1194.It Sy groupquota@ Ns Ar group Ns = Ns Ar size | Cm none
1195Limits the amount of space consumed by the specified group. Group space
1196consumption is identified by the
1197.Sy userquota@ Ns Ar user
1198property.
1199.Pp
1200Unprivileged users can access only their own groups' space usage. The root
1201user, or a user who has been granted the
1202.Sy groupquota
1203privilege with
1204.Qq Nm Cm allow ,
1205can get and set all groups' quotas.
1206.It Sy readonly Ns = Ns Cm on | off
1207Controls whether this dataset can be modified. The default value is
1208.Cm off .
1209.It Sy recordsize Ns = Ns Ar size
1210Specifies a suggested block size for files in the file system. This property is
1211designed solely for use with database workloads that access files in fixed-size
1212records.
1213.Tn ZFS
1214automatically tunes block sizes according to internal algorithms optimized for
1215typical access patterns.
1216.Pp
1217For databases that create very large files but access them in small random
1218chunks, these algorithms may be suboptimal. Specifying a
1219.Sy recordsize
1220greater than or equal to the record size of the database can result in
1221significant performance gains. Use of this property for general purpose file
1222systems is strongly discouraged, and may adversely affect performance.
1223.Pp
1224The size specified must be a power of two greater than or equal to 512 and less
1225than or equal to 128 Kbytes.
1226If the
1227.Sy large_blocks
1228feature is enabled on the pool, the size may be up to 1 Mbyte.
1229See
1230.Xr zpool-features 7
1231for details on ZFS feature flags.
1232.Pp
1233Changing the file system's
1234.Sy recordsize
1235affects only files created afterward; existing files are unaffected.
1236.Pp
1237This property can also be referred to by its shortened column name,
1238.Sy recsize .
1239.It Sy redundant_metadata Ns = Ns Cm all | most
1240Controls what types of metadata are stored redundantly.
1241ZFS stores an extra copy of metadata, so that if a single block is corrupted,
1242the amount of user data lost is limited.
1243This extra copy is in addition to any redundancy provided at the pool level
1244.Pq e.g. by mirroring or RAID-Z ,
1245and is in addition to an extra copy specified by the
1246.Sy copies
1247property
1248.Pq up to a total of 3 copies .
1249For example if the pool is mirrored,
1250.Cm copies Ns = Ns Ar 2 ,
1251and
1252.Cm redundant_metadata Ns = Ns Ar most ,
1253then ZFS
1254stores 6 copies of most metadata, and 4 copies of data and some
1255metadata.
1256.Pp
1257When set to
1258.Cm all ,
1259ZFS stores an extra copy of all metadata.
1260If a
1261single on-disk block is corrupt, at worst a single block of user data
1262.Po which is
1263.Cm recordsize
1264bytes long
1265can be lost.
1266.Pc
1267.Pp
1268When set to
1269.Cm most ,
1270ZFS stores an extra copy of most types of
1271metadata.
1272This can improve performance of random writes, because less
1273metadata must be written.
1274In practice, at worst about 100 blocks
1275.Po of
1276.Cm recordsize
1277bytes each
1278.Pc
1279of user data can be lost if a single
1280on-disk block is corrupt.
1281The exact behavior of which metadata blocks
1282are stored redundantly may change in future releases.
1283.Pp
1284The default value is
1285.Cm all .
1286.It Sy refquota Ns = Ns Ar size | Cm none
1287Limits the amount of space a dataset can consume. This property enforces a hard
1288limit on the amount of space used. This hard limit does not include space used
1289by descendents, including file systems and snapshots.
1290.It Sy refreservation Ns = Ns Ar size | Cm none
1291The minimum amount of space guaranteed to a dataset, not including its
1292descendents. When the amount of space used is below this value, the dataset is
1293treated as if it were taking up the amount of space specified by
1294.Sy refreservation .
1295The
1296.Sy refreservation
1297reservation is accounted for in the parent datasets' space used, and counts
1298against the parent datasets' quotas and reservations.
1299.Pp
1300If
1301.Sy refreservation
1302is set, a snapshot is only allowed if there is enough free pool space outside
1303of this reservation to accommodate the current number of "referenced" bytes in
1304the dataset.
1305.Pp
1306This property can also be referred to by its shortened column name,
1307.Sy refreserv .
1308.It Sy reservation Ns = Ns Ar size | Cm none
1309The minimum amount of space guaranteed to a dataset and its descendents. When
1310the amount of space used is below this value, the dataset is treated as if it
1311were taking up the amount of space specified by its reservation. Reservations
1312are accounted for in the parent datasets' space used, and count against the
1313parent datasets' quotas and reservations.
1314.Pp
1315This property can also be referred to by its shortened column name,
1316.Sy reserv .
1317.It Sy secondarycache Ns = Ns Cm all | none | metadata
1318Controls what is cached in the secondary cache (L2ARC). If this property is set
1319to
1320.Cm all ,
1321then both user data and metadata is cached. If this property is set to
1322.Cm none ,
1323then neither user data nor metadata is cached. If this property is set to
1324.Cm metadata ,
1325then only metadata is cached. The default value is
1326.Cm all .
1327.It Sy setuid Ns = Ns Cm on | off
1328Controls whether the
1329.No set- Ns Tn UID
1330bit is respected for the file system. The default value is
1331.Cm on .
1332.It Sy sharesmb Ns = Ns Cm on | off | Ar opts
1333The
1334.Sy sharesmb
1335property currently has no effect on
1336.Fx .
1337.It Sy sharenfs Ns = Ns Cm on | off | Ar opts
1338Controls whether the file system is shared via
1339.Tn NFS ,
1340and what options are used. A file system with a
1341.Sy sharenfs
1342property of
1343.Cm off
1344is managed the traditional way via
1345.Xr exports 5 .
1346Otherwise, the file system is automatically shared and unshared with the
1347.Qq Nm Cm share
1348and
1349.Qq Nm Cm unshare
1350commands. If the property is set to
1351.Cm on
1352no
1353.Tn NFS
1354export options are used. Otherwise,
1355.Tn NFS
1356export options are equivalent to the contents of this property. The export
1357options may be comma-separated. See
1358.Xr exports 5
1359for a list of valid options.
1360.Pp
1361When the
1362.Sy sharenfs
1363property is changed for a dataset, the
1364.Xr mountd 8
1365daemon is reloaded.
1366.It Sy logbias Ns = Ns Cm latency | throughput
1367Provide a hint to
1368.Tn ZFS
1369about handling of synchronous requests in this dataset.
1370If
1371.Sy logbias
1372is set to
1373.Cm latency
1374(the default),
1375.Tn ZFS
1376will use pool log devices (if configured) to handle the requests at low
1377latency. If
1378.Sy logbias
1379is set to
1380.Cm throughput ,
1381.Tn ZFS
1382will not use configured pool log devices.
1383.Tn ZFS
1384will instead optimize synchronous operations for global pool throughput and
1385efficient use of resources.
1386.It Sy snapdir Ns = Ns Cm hidden | visible
1387Controls whether the
1388.Pa \&.zfs
1389directory is hidden or visible in the root of the file system as discussed in
1390the
1391.Qq Sx Snapshots
1392section. The default value is
1393.Cm hidden .
1394.It Sy sync Ns = Ns Cm standard | always | disabled
1395Controls the behavior of synchronous requests (e.g.
1396.Xr fsync 2 ,
1397O_DSYNC). This property accepts the following values:
1398.Bl -tag -offset 4n -width 8n
1399.It Sy standard
1400This is the POSIX specified behavior of ensuring all synchronous requests are
1401written to stable storage and all devices are flushed to ensure data is not
1402cached by device controllers (this is the default).
1403.It Sy always
1404All file system transactions are written and flushed before their system calls
1405return. This has a large performance penalty.
1406.It Sy disabled
1407Disables synchronous requests. File system transactions are only committed to
1408stable storage periodically. This option will give the highest performance.
1409However, it is very dangerous as
1410.Tn ZFS
1411would be ignoring the synchronous transaction demands of applications such as
1412databases or
1413.Tn NFS .
1414Administrators should only use this option when the risks are understood.
1415.El
1416.It Sy volsize Ns = Ns Ar size
1417For volumes, specifies the logical size of the volume. By default, creating a
1418volume establishes a reservation of equal size. For storage pools with a
1419version number of 9 or higher, a
1420.Sy refreservation
1421is set instead. Any changes to
1422.Sy volsize
1423are reflected in an equivalent change to the reservation (or
1424.Sy refreservation ) .
1425The
1426.Sy volsize
1427can only be set to a multiple of
1428.Cm volblocksize ,
1429and cannot be zero.
1430.Pp
1431The reservation is kept equal to the volume's logical size to prevent
1432unexpected behavior for consumers. Without the reservation, the volume could
1433run out of space, resulting in undefined behavior or data corruption, depending
1434on how the volume is used. These effects can also occur when the volume size is
1435changed while it is in use (particularly when shrinking the size). Extreme care
1436should be used when adjusting the volume size.
1437.Pp
1438Though not recommended, a "sparse volume" (also known as "thin provisioning")
1439can be created by specifying the
1440.Fl s
1441option to the
1442.Qq Nm Cm create Fl V
1443command, or by changing the reservation after the volume has been created. A
1444"sparse volume" is a volume where the reservation is less then the volume size.
1445Consequently, writes to a sparse volume can fail with
1446.Sy ENOSPC
1447when the pool is low on space. For a sparse volume, changes to
1448.Sy volsize
1449are not reflected in the reservation.
1450.It Sy volmode Ns = Ns Cm default | geom | dev | none
1451This property specifies how volumes should be exposed to the OS.
1452Setting it to
1453.Sy geom
1454exposes volumes as
1455.Xr geom 4
1456providers, providing maximal functionality.
1457Setting it to
1458.Sy dev
1459exposes volumes only as cdev device in devfs.
1460Such volumes can be accessed only as raw disk device files, i.e. they
1461can not be partitioned, mounted, participate in RAIDs, etc, but they
1462are faster, and in some use scenarios with untrusted consumer, such as
1463NAS or VM storage, can be more safe.
1464Volumes with property set to
1465.Sy none
1466are not exposed outside ZFS, but can be snapshoted, cloned, replicated, etc,
1467that can be suitable for backup purposes.
1468Value
1469.Sy default
1470means that volumes exposition is controlled by system-wide sysctl/tunable
1471.Va vfs.zfs.vol.mode ,
1472where
1473.Sy geom ,
1474.Sy dev
1475and
1476.Sy none
1477are encoded as 1, 2 and 3 respectively.
1478The default values is
1479.Sy geom .
1480This property can be changed any time, but so far it is processed only
1481during volume creation and pool import.
1482.It Sy vscan Ns = Ns Cm off | on
1483The
1484.Sy vscan
1485property is currently not supported on
1486.Fx .
1487.It Sy xattr Ns = Ns Cm off | on
1488The
1489.Sy xattr
1490property is currently not supported on
1491.Fx .
1492.It Sy jailed Ns = Ns Cm off | on
1493Controls whether the dataset is managed from a jail. See the
1494.Qq Sx Jails
1495section for more information. The default value is
1496.Cm off .
1497.El
1498.Pp
1499The following three properties cannot be changed after the file system is
1500created, and therefore, should be set when the file system is created. If the
1501properties are not set with the
1502.Qq Nm Cm create
1503or
1504.Nm zpool Cm create
1505commands, these properties are inherited from the parent dataset. If the parent
1506dataset lacks these properties due to having been created prior to these
1507features being supported, the new file system will have the default values for
1508these properties.
1509.Bl -tag -width 4n
1510.It Sy casesensitivity Ns = Ns Cm sensitive | insensitive | mixed
1511Indicates whether the file name matching algorithm used by the file system
1512should be case-sensitive, case-insensitive, or allow a combination of both
1513styles of matching. The default value for the
1514.Sy casesensitivity
1515property is
1516.Cm sensitive .
1517Traditionally, UNIX and POSIX file systems have case-sensitive file names.
1518.Pp
1519The
1520.Cm mixed
1521value for the
1522.Sy casesensitivity
1523property indicates that the
1524file system can support requests for both case-sensitive and case-insensitive
1525matching behavior.
1526.It Sy normalization Ns = Ns Cm none | formC | formD | formKC | formKD
1527Indicates whether the file system should perform a
1528.Sy unicode
1529normalization of file names whenever two file names are compared, and which
1530normalization algorithm should be used. File names are always stored
1531unmodified, names are normalized as part of any comparison process. If this
1532property is set to a legal value other than
1533.Cm none ,
1534and the
1535.Sy utf8only
1536property was left unspecified, the
1537.Sy utf8only
1538property is automatically set to
1539.Cm on .
1540The default value of the
1541.Sy normalization
1542property is
1543.Cm none .
1544This property cannot be changed after the file system is created.
1545.It Sy utf8only Ns = Ns Cm on | off
1546Indicates whether the file system should reject file names that include
1547characters that are not present in the
1548.Sy UTF-8
1549character code set. If this property is explicitly set to
1550.Cm off ,
1551the normalization property must either not be explicitly set or be set to
1552.Cm none .
1553The default value for the
1554.Sy utf8only
1555property is
1556.Cm off .
1557This property cannot be changed after the file system is created.
1558.El
1559.Pp
1560The
1561.Sy casesensitivity , normalization , No and Sy utf8only
1562properties are also new permissions that can be assigned to non-privileged
1563users by using the
1564.Tn ZFS
1565delegated administration feature.
1566.Ss Temporary Mount Point Properties
1567When a file system is mounted, either through
1568.Xr mount 8
1569for legacy mounts or the
1570.Qq Nm Cm mount
1571command for normal file systems, its mount options are set according to its
1572properties. The correlation between properties and mount options is as follows:
1573.Bl -column -offset 4n "PROPERTY" "MOUNT OPTION"
1574.It "PROPERTY	MOUNT OPTION"
1575.It "atime	atime/noatime"
1576.It "exec	exec/noexec"
1577.It "readonly	ro/rw"
1578.It "setuid	suid/nosuid"
1579.El
1580.Pp
1581In addition, these options can be set on a per-mount basis using the
1582.Fl o
1583option, without affecting the property that is stored on disk. The values
1584specified on the command line override the values stored in the dataset. These
1585properties are reported as "temporary" by the
1586.Qq Nm Cm get
1587command. If the properties are changed while the dataset is mounted, the new
1588setting overrides any temporary settings.
1589.Ss User Properties
1590In addition to the standard native properties,
1591.Tn ZFS
1592supports arbitrary user properties. User properties have no effect on
1593.Tn ZFS
1594behavior, but applications or administrators can use them to annotate datasets
1595(file systems, volumes, and snapshots).
1596.Pp
1597User property names must contain a colon
1598.Pq Sy \&:
1599character to distinguish them from native properties. They may contain
1600lowercase letters, numbers, and the following punctuation characters: colon
1601.Pq Sy \&: ,
1602dash
1603.Pq Sy \&- ,
1604period
1605.Pq Sy \&.
1606and underscore
1607.Pq Sy \&_ .
1608The expected convention is that the property name is divided into two portions
1609such as
1610.Em module Ns Sy \&: Ns Em property ,
1611but this namespace is not enforced by
1612.Tn ZFS .
1613User property names can be at most 256 characters, and cannot begin with a dash
1614.Pq Sy \&- .
1615.Pp
1616When making programmatic use of user properties, it is strongly suggested to
1617use a reversed
1618.Tn DNS
1619domain name for the
1620.Ar module
1621component of property names to reduce the chance that two
1622independently-developed packages use the same property name for different
1623purposes. Property names beginning with
1624.Em com.sun
1625are reserved for use by Sun Microsystems.
1626.Pp
1627The values of user properties are arbitrary strings, are always inherited, and
1628are never validated. All of the commands that operate on properties
1629.Po
1630.Qq Nm Cm list ,
1631.Qq Nm Cm get ,
1632.Qq Nm Cm set
1633and so forth
1634.Pc
1635can be used to manipulate both native properties and user properties. Use the
1636.Qq Nm Cm inherit
1637command to clear a user property. If the property is not defined in any parent
1638dataset, it is removed entirely. Property values are limited to 1024
1639characters.
1640.Sh SUBCOMMANDS
1641All subcommands that modify state are logged persistently to the pool in their
1642original form.
1643.Bl -tag -width 2n
1644.It Xo
1645.Nm
1646.Op Fl \&?
1647.Xc
1648.Pp
1649Displays a help message.
1650.It Xo
1651.Nm
1652.Cm create
1653.Op Fl pu
1654.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1655.Ar filesystem
1656.Xc
1657.Pp
1658Creates a new
1659.Tn ZFS
1660file system. The file system is automatically mounted according to the
1661.Sy mountpoint
1662property inherited from the parent.
1663.Bl -tag -width indent
1664.It Fl p
1665Creates all the non-existing parent datasets. Datasets created in this manner
1666are automatically mounted according to the
1667.Sy mountpoint
1668property inherited from their parent. Any property specified on the command
1669line using the
1670.Fl o
1671option is ignored. If the target filesystem already exists, the operation
1672completes successfully.
1673.It Fl u
1674Newly created file system is not mounted.
1675.It Fl o Ar property Ns = Ns Ar value
1676Sets the specified property as if the command
1677.Qq Nm Cm set Ar property Ns = Ns Ar value
1678was invoked at the same time the dataset was created. Any editable
1679.Tn ZFS
1680property can also be set at creation time. Multiple
1681.Fl o
1682options can be specified. An error results if the same property is specified in
1683multiple
1684.Fl o
1685options.
1686.El
1687.It Xo
1688.Nm
1689.Cm create
1690.Op Fl ps
1691.Op Fl b Ar blocksize
1692.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1693.Fl V
1694.Ar size volume
1695.Xc
1696.Pp
1697Creates a volume of the given size. The volume is exported as a block device in
1698.Pa /dev/zvol/path ,
1699where
1700.Ar path
1701is the name of the volume in the
1702.Tn ZFS
1703namespace. The size represents the logical size as exported by the device. By
1704default, a reservation of equal size is created.
1705.Pp
1706.Ar size
1707is automatically rounded up to the nearest 128 Kbytes to ensure that
1708the volume has an integral number of blocks regardless of
1709.Ar blocksize .
1710.Bl -tag -width indent
1711.It Fl p
1712Creates all the non-existing parent datasets. Datasets created in this manner
1713are automatically mounted according to the
1714.Sy mountpoint
1715property inherited from their parent. Any property specified on the command
1716line using the
1717.Fl o
1718option is ignored. If the target filesystem already exists, the operation
1719completes successfully.
1720.It Fl s
1721Creates a sparse volume with no reservation. See
1722.Sy volsize
1723in the
1724.Qq Sx Native Properties
1725section for more information about sparse volumes.
1726.It Fl b Ar blocksize
1727Equivalent to
1728.Fl o Cm volblocksize Ns = Ns Ar blocksize .
1729If this option is specified in conjunction with
1730.Fl o Cm volblocksize ,
1731the resulting behavior is undefined.
1732.It Fl o Ar property Ns = Ns Ar value
1733Sets the specified property as if the
1734.Qq Nm Cm set Ar property Ns = Ns Ar value
1735command was invoked at the same time the dataset was created. Any editable
1736.Tn ZFS
1737property can also be set at creation time. Multiple
1738.Fl o
1739options can be specified. An error results if the same property is specified in
1740multiple
1741.Fl o
1742options.
1743.El
1744.It Xo
1745.Nm
1746.Cm destroy
1747.Op Fl fnpRrv
1748.Ar filesystem Ns | Ns Ar volume
1749.Xc
1750.Pp
1751Destroys the given dataset. By default, the command unshares any file systems
1752that are currently shared, unmounts any file systems that are currently
1753mounted, and refuses to destroy a dataset that has active dependents (children
1754or clones).
1755.Bl -tag -width indent
1756.It Fl r
1757Recursively destroy all children.
1758.It Fl R
1759Recursively destroy all dependents, including cloned file systems outside the
1760target hierarchy.
1761.It Fl f
1762Force an unmount of any file systems using the
1763.Qq Nm Cm unmount Fl f
1764command. This option has no effect on non-file systems or unmounted file
1765systems.
1766.It Fl n
1767Do a dry-run ("No-op") deletion. No data will be deleted. This is useful in
1768conjunction with the
1769.Fl v
1770or
1771.Fl p
1772flags to determine what data would be deleted.
1773.It Fl p
1774Print machine-parsable verbose information about the deleted data.
1775.It Fl v
1776Print verbose information about the deleted data.
1777.El
1778.Pp
1779Extreme care should be taken when applying either the
1780.Fl r
1781or the
1782.Fl R
1783options, as they can destroy large portions of a pool and cause unexpected
1784behavior for mounted file systems in use.
1785.It Xo
1786.Nm
1787.Cm destroy
1788.Op Fl dnpRrv
1789.Sm off
1790.Ar snapshot
1791.Op % Ns Ar snapname
1792.Op , Ns ...
1793.Sm on
1794.Xc
1795.Pp
1796The given snapshots are destroyed immediately if and only if the
1797.Qq Nm Cm destroy
1798command without the
1799.Fl d
1800option would have destroyed it. Such immediate destruction would occur, for
1801example, if the snapshot had no clones and the user-initiated reference count
1802were zero.
1803.Pp
1804If a snapshot does not qualify for immediate destruction, it is marked for
1805deferred deletion. In this state, it exists as a usable, visible snapshot until
1806both of the preconditions listed above are met, at which point it is destroyed.
1807.Pp
1808An inclusive range of snapshots may be specified by separating the
1809first and last snapshots with a percent sign
1810.Pq Sy % .
1811The first and/or last snapshots may be left blank, in which case the
1812filesystem's oldest or newest snapshot will be implied.
1813.Pp
1814Multiple snapshots
1815(or ranges of snapshots) of the same filesystem or volume may be specified
1816in a comma-separated list of snapshots.
1817Only the snapshot's short name (the
1818part after the
1819.Sy @ )
1820should be specified when using a range or comma-separated list to identify
1821multiple snapshots.
1822.Bl -tag -width indent
1823.It Fl r
1824Destroy (or mark for deferred deletion) all snapshots with this name in
1825descendent file systems.
1826.It Fl R
1827Recursively destroy all clones of these snapshots, including the clones,
1828snapshots, and children.
1829If this flag is specified, the
1830.Fl d
1831flag will have no effect.
1832.It Fl n
1833Do a dry-run ("No-op") deletion. No data will be deleted. This is useful in
1834conjunction with the
1835.Fl v
1836or
1837.Fl p
1838flags to determine what data would be deleted.
1839.It Fl p
1840Print machine-parsable verbose information about the deleted data.
1841.It Fl v
1842Print verbose information about the deleted data.
1843.It Fl d
1844Defer snapshot deletion.
1845.El
1846.Pp
1847Extreme care should be taken when applying either the
1848.Fl r
1849or the
1850.Fl R
1851options, as they can destroy large portions of a pool and cause unexpected
1852behavior for mounted file systems in use.
1853.It Xo
1854.Nm
1855.Cm destroy
1856.Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
1857.Xc
1858.Pp
1859The given bookmark is destroyed.
1860.It Xo
1861.Nm
1862.Cm snapshot Ns | Ns Cm snap
1863.Op Fl r
1864.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1865.Ar filesystem@snapname Ns | Ns volume@snapname
1866.Ar filesystem@snapname Ns | Ns volume@snapname Ns ...
1867.Xc
1868.Pp
1869Creates snapshots with the given names. All previous modifications by
1870successful system calls to the file system are part of the snapshots.
1871Snapshots are taken atomically, so that all snapshots correspond to the same
1872moment in time. See the
1873.Qq Sx Snapshots
1874section for details.
1875.Bl -tag -width indent
1876.It Fl r
1877Recursively create snapshots of all descendent datasets
1878.It Fl o Ar property Ns = Ns Ar value
1879Sets the specified property; see
1880.Qq Nm Cm create
1881for details.
1882.El
1883.It Xo
1884.Nm
1885.Cm rollback
1886.Op Fl rRf
1887.Ar snapshot
1888.Xc
1889.Pp
1890Roll back the given dataset to a previous snapshot. When a dataset is rolled
1891back, all data that has changed since the snapshot is discarded, and the
1892dataset reverts to the state at the time of the snapshot. By default, the
1893command refuses to roll back to a snapshot other than the most recent one. In
1894order to do so, all intermediate snapshots and bookmarks must be destroyed
1895by specifying the
1896.Fl r
1897option.
1898.Pp
1899The
1900.Fl rR
1901options do not recursively destroy the child snapshots of a
1902recursive snapshot.
1903Only direct snapshots of the specified filesystem
1904are destroyed by either of these options.
1905To completely roll back a
1906recursive snapshot, you must rollback the individual child snapshots.
1907.Bl -tag -width indent
1908.It Fl r
1909Destroy any snapshots and bookmarks more recent than the one specified.
1910.It Fl R
1911Destroy any more recent snapshots and bookmarks, as well as any clones of those
1912snapshots.
1913.It Fl f
1914Used with the
1915.Fl R
1916option to force an unmount of any clone file systems that are to be destroyed.
1917.El
1918.It Xo
1919.Nm
1920.Cm clone
1921.Op Fl p
1922.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1923.Ar snapshot filesystem Ns | Ns Ar volume
1924.Xc
1925.Pp
1926Creates a clone of the given snapshot. See the
1927.Qq Sx Clones
1928section for details. The target dataset can be located anywhere in the
1929.Tn ZFS
1930hierarchy, and is created as the same type as the original.
1931.Bl -tag -width indent
1932.It Fl p
1933Creates all the non-existing parent datasets. Datasets created in this manner
1934are automatically mounted according to the
1935.Sy mountpoint
1936property inherited from their parent. If the target filesystem or volume
1937already exists, the operation completes successfully.
1938.It Fl o Ar property Ns = Ns Ar value
1939Sets the specified property; see
1940.Qq Nm Cm create
1941for details.
1942.El
1943.It Xo
1944.Nm
1945.Cm promote
1946.Ar clone-filesystem
1947.Xc
1948.Pp
1949Promotes a clone file system to no longer be dependent on its "origin"
1950snapshot. This makes it possible to destroy the file system that the clone was
1951created from. The clone parent-child dependency relationship is reversed, so
1952that the origin file system becomes a clone of the specified file system.
1953.Pp
1954The snapshot that was cloned, and any snapshots previous to this snapshot, are
1955now owned by the promoted clone. The space they use moves from the origin file
1956system to the promoted clone, so enough space must be available to accommodate
1957these snapshots. No new space is consumed by this operation, but the space
1958accounting is adjusted. The promoted clone must not have any conflicting
1959snapshot names of its own. The
1960.Cm rename
1961subcommand can be used to rename any conflicting snapshots.
1962.It Xo
1963.Nm
1964.Cm rename
1965.Op Fl f
1966.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1967.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1968.Xc
1969.It Xo
1970.Nm
1971.Cm rename
1972.Op Fl f
1973.Fl p
1974.Ar filesystem Ns | Ns Ar volume
1975.Ar filesystem Ns | Ns Ar volume
1976.Xc
1977.It Xo
1978.Nm
1979.Cm rename
1980.Fl u
1981.Op Fl p
1982.Ar filesystem filesystem
1983.Xc
1984.Pp
1985Renames the given dataset. The new target can be located anywhere in the
1986.Tn ZFS
1987hierarchy, with the exception of snapshots. Snapshots can only be renamed
1988within the parent file system or volume. When renaming a snapshot, the parent
1989file system of the snapshot does not need to be specified as part of the second
1990argument. Renamed file systems can inherit new mount points, in which case they
1991are unmounted and remounted at the new mount point.
1992.Bl -tag -width indent
1993.It Fl p
1994Creates all the nonexistent parent datasets. Datasets created in this manner
1995are automatically mounted according to the
1996.Sy mountpoint
1997property inherited from their parent.
1998.It Fl u
1999Do not remount file systems during rename. If a file system's
2000.Sy mountpoint
2001property is set to
2002.Cm legacy
2003or
2004.Cm none ,
2005file system is not unmounted even if this option is not given.
2006.It Fl f
2007Force unmount any filesystems that need to be unmounted in the process.
2008This flag has no effect if used together with the
2009.Fl u
2010flag.
2011.El
2012.It Xo
2013.Nm
2014.Cm rename
2015.Fl r
2016.Ar snapshot snapshot
2017.Xc
2018.Pp
2019Recursively rename the snapshots of all descendent datasets. Snapshots are the
2020only dataset that can be renamed recursively.
2021.It Xo
2022.Nm
2023.Cm list
2024.Op Fl r Ns | Ns Fl d Ar depth
2025.Op Fl Hp
2026.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
2027.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2028.Oo Fl s Ar property Oc Ns ...
2029.Oo Fl S Ar property Oc Ns ...
2030.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2031.Xc
2032.Pp
2033Lists the property information for the given datasets in tabular form. If
2034specified, you can list property information by the absolute pathname or the
2035relative pathname. By default, all file systems and volumes are displayed.
2036Snapshots are displayed if the
2037.Sy listsnaps
2038property is
2039.Cm on
2040(the default is
2041.Cm off ) .
2042The following fields are displayed,
2043.Sy name , used , available , referenced , mountpoint .
2044.Bl -tag -width indent
2045.It Fl r
2046Recursively display any children of the dataset on the command line.
2047.It Fl d Ar depth
2048Recursively display any children of the dataset, limiting the recursion to
2049.Ar depth .
2050A depth of
2051.Sy 1
2052will display only the dataset and its direct children.
2053.It Fl H
2054Used for scripting mode. Do not print headers and separate fields by a single
2055tab instead of arbitrary white space.
2056.It Fl p
2057Display numbers in parsable (exact) values.
2058.It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
2059A comma-separated list of properties to display. The property must be:
2060.Bl -bullet -offset 2n
2061.It
2062One of the properties described in the
2063.Qq Sx Native Properties
2064section
2065.It
2066A user property
2067.It
2068The value
2069.Cm name
2070to display the dataset name
2071.It
2072The value
2073.Cm space
2074to display space usage properties on file systems and volumes. This is a
2075shortcut for specifying
2076.Fl o
2077.Sy name,avail,used,usedsnap,usedds,usedrefreserv,usedchild
2078.Fl t
2079.Sy filesystem,volume
2080syntax.
2081.El
2082.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2083A comma-separated list of types to display, where
2084.Ar type
2085is one of
2086.Sy filesystem , snapshot , snap , volume , bookmark , No or Sy all .
2087For example, specifying
2088.Fl t Cm snapshot
2089displays only snapshots.
2090.It Fl s Ar property
2091A property for sorting the output by column in ascending order based on the
2092value of the property. The property must be one of the properties described in
2093the
2094.Qq Sx Properties
2095section, or the special value
2096.Cm name
2097to sort by the dataset name. Multiple properties can be specified at one time
2098using multiple
2099.Fl s
2100property options. Multiple
2101.Fl s
2102options are evaluated from left to right in decreasing order of importance.
2103.Pp
2104The following is a list of sorting criteria:
2105.Bl -bullet -offset 2n
2106.It
2107Numeric types sort in numeric order.
2108.It
2109String types sort in alphabetical order.
2110.It
2111Types inappropriate for a row sort that row to the literal bottom, regardless
2112of the specified ordering.
2113.It
2114If no sorting options are specified the existing behavior of
2115.Qq Nm Cm list
2116is preserved.
2117.El
2118.It Fl S Ar property
2119Same as the
2120.Fl s
2121option, but sorts by property in descending order.
2122.El
2123.It Xo
2124.Nm
2125.Cm set
2126.Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ...
2127.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2128.Xc
2129.Pp
2130Sets the property or list of properties to the given value(s) for each dataset.
2131Only some properties can be edited. See the "Properties" section for more
2132information on what properties can be set and acceptable values. Numeric values
2133can be specified as exact values, or in a human-readable form with a suffix of
2134.Sy B , K , M , G , T , P , E , Z
2135(for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes, or
2136zettabytes, respectively). User properties can be set on snapshots. For more
2137information, see the
2138.Qq Sx User Properties
2139section.
2140.It Xo
2141.Nm
2142.Cm get
2143.Op Fl r Ns | Ns Fl d Ar depth
2144.Op Fl Hp
2145.Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ...
2146.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2147.Op Fl s Ar source Ns Oo , Ns Ar source Oc Ns ...
2148.Ar all | property Ns Oo , Ns Ar property Oc Ns ...
2149.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2150.Xc
2151.Pp
2152Displays properties for the given datasets. If no datasets are specified, then
2153the command displays properties for all datasets on the system. For each
2154property, the following columns are displayed:
2155.Pp
2156.Bl -hang -width "property" -offset indent -compact
2157.It name
2158Dataset name
2159.It property
2160Property name
2161.It value
2162Property value
2163.It source
2164Property source. Can either be local, default, temporary, inherited, received,
2165or none
2166(\&-).
2167.El
2168.Pp
2169All columns except the
2170.Sy RECEIVED
2171column are displayed by default. The columns to display can be specified
2172by using the
2173.Fl o
2174option. This command takes a comma-separated list of properties as described in
2175the
2176.Qq Sx Native Properties
2177and
2178.Qq Sx User Properties
2179sections.
2180.Pp
2181The special value
2182.Cm all
2183can be used to display all properties that apply to the given dataset's type
2184(filesystem, volume, snapshot, or bookmark).
2185.Bl -tag -width indent
2186.It Fl r
2187Recursively display properties for any children.
2188.It Fl d Ar depth
2189Recursively display any children of the dataset, limiting the recursion to
2190.Ar depth .
2191A depth of
2192.Sy 1
2193will display only the dataset and its direct children.
2194.It Fl H
2195Display output in a form more easily parsed by scripts. Any headers are
2196omitted, and fields are explicitly separated by a single tab instead of an
2197arbitrary amount of space.
2198.It Fl p
2199Display numbers in parsable (exact) values.
2200.It Fl o Cm all | Ar field Ns Oo , Ns Ar field Oc Ns ...
2201A comma-separated list of columns to display. Supported values are
2202.Sy name,property,value,received,source .
2203Default values are
2204.Sy name,property,value,source .
2205The keyword
2206.Cm all
2207specifies all columns.
2208.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2209A comma-separated list of types to display, where
2210.Ar type
2211is one of
2212.Sy filesystem , snapshot , volume , No or Sy all .
2213For example, specifying
2214.Fl t Cm snapshot
2215displays only snapshots.
2216.It Fl s Ar source Ns Oo , Ns Ar source Oc Ns ...
2217A comma-separated list of sources to display. Those properties coming from a
2218source other than those in this list are ignored. Each source must be one of
2219the following:
2220.Sy local,default,inherited,temporary,received,none .
2221The default value is all sources.
2222.El
2223.It Xo
2224.Nm
2225.Cm inherit
2226.Op Fl rS
2227.Ar property
2228.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2229.Xc
2230.Pp
2231Clears the specified property, causing it to be inherited from an ancestor,
2232restored to default if no ancestor has the property set, or with the
2233.Fl S
2234option reverted to the received value if one exists.
2235See the
2236.Qq Sx Properties
2237section for a listing of default values, and details on which properties can be
2238inherited.
2239.Bl -tag -width indent
2240.It Fl r
2241Recursively inherit the given property for all children.
2242.It Fl S
2243Revert the property to the received value if one exists; otherwise operate as
2244if the
2245.Fl S
2246option was not specified.
2247.El
2248.It Xo
2249.Nm
2250.Cm upgrade
2251.Op Fl v
2252.Xc
2253.Pp
2254Displays a list of file systems that are not the most recent version.
2255.Bl -tag -width indent
2256.It Fl v
2257Displays
2258.Tn ZFS
2259filesystem versions supported by the current software. The current
2260.Tn ZFS
2261filesystem version and all previous supported versions are displayed, along
2262with an explanation of the features provided with each version.
2263.El
2264.It Xo
2265.Nm
2266.Cm upgrade
2267.Op Fl r
2268.Op Fl V Ar version
2269.Fl a | Ar filesystem
2270.Xc
2271.Pp
2272Upgrades file systems to a new on-disk version. Once this is done, the file
2273systems will no longer be accessible on systems running older versions of the
2274software.
2275.Qq Nm Cm send
2276streams generated from new snapshots of these file systems cannot be accessed
2277on systems running older versions of the software.
2278.Pp
2279In general, the file system version is independent of the pool version. See
2280.Xr zpool 8
2281for information on the
2282.Nm zpool Cm upgrade
2283command.
2284.Pp
2285In some cases, the file system version and the pool version are interrelated
2286and the pool version must be upgraded before the file system version can be
2287upgraded.
2288.Bl -tag -width indent
2289.It Fl r
2290Upgrade the specified file system and all descendent file systems.
2291.It Fl V Ar version
2292Upgrade to the specified
2293.Ar version .
2294If the
2295.Fl V
2296flag is not specified, this command upgrades to the most recent version. This
2297option can only be used to increase the version number, and only up to the most
2298recent version supported by this software.
2299.It Fl a
2300Upgrade all file systems on all imported pools.
2301.It Ar filesystem
2302Upgrade the specified file system.
2303.El
2304.It Xo
2305.Nm
2306.Cm userspace
2307.Op Fl Hinp
2308.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2309.Oo Fl s Ar field Oc Ns ...
2310.Oo Fl S Ar field Oc Ns ...
2311.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2312.Ar filesystem Ns | Ns Ar snapshot
2313.Xc
2314.Pp
2315Displays space consumed by, and quotas on, each user in the specified
2316filesystem or snapshot. This corresponds to the
2317.Sy userused@ Ns Ar user
2318and
2319.Sy userquota@ Ns Ar user
2320properties.
2321.Bl -tag -width indent
2322.It Fl n
2323Print numeric ID instead of user/group name.
2324.It Fl H
2325Do not print headers, use tab-delimited output.
2326.It Fl p
2327Use exact (parsable) numeric output.
2328.It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2329Display only the specified fields from the following set:
2330.Sy type,name,used,quota .
2331The default is to display all fields.
2332.It Fl s Ar field
2333Sort output by this field. The
2334.Fl s
2335and
2336.Fl S
2337flags may be specified multiple times to sort first by one field, then by
2338another. The default is
2339.Fl s Cm type Fl s Cm name .
2340.It Fl S Ar field
2341Sort by this field in reverse order. See
2342.Fl s .
2343.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2344Print only the specified types from the following set:
2345.Sy all,posixuser,smbuser,posixgroup,smbgroup .
2346.Pp
2347The default is
2348.Fl t Cm posixuser,smbuser .
2349.Pp
2350The default can be changed to include group types.
2351.It Fl i
2352Translate SID to POSIX ID. This flag currently has no effect on
2353.Fx .
2354.El
2355.It Xo
2356.Nm
2357.Cm groupspace
2358.Op Fl Hinp
2359.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2360.Oo Fl s Ar field Oc Ns ...
2361.Oo Fl S Ar field Oc Ns ...
2362.Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2363.Ar filesystem Ns | Ns Ar snapshot
2364.Xc
2365.Pp
2366Displays space consumed by, and quotas on, each group in the specified
2367filesystem or snapshot. This subcommand is identical to
2368.Qq Nm Cm userspace ,
2369except that the default types to display are
2370.Fl t Sy posixgroup,smbgroup .
2371.It Xo
2372.Nm
2373.Cm mount
2374.Xc
2375.Pp
2376Displays all
2377.Tn ZFS
2378file systems currently mounted.
2379.Bl -tag -width indent
2380.It Fl f
2381.El
2382.It Xo
2383.Nm
2384.Cm mount
2385.Op Fl vO
2386.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
2387.Fl a | Ar filesystem
2388.Xc
2389.Pp
2390Mounts
2391.Tn ZFS
2392file systems.
2393.Bl -tag -width indent
2394.It Fl v
2395Report mount progress.
2396.It Fl O
2397Perform an overlay mount. Overlay mounts are not supported on
2398.Fx .
2399.It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
2400An optional, comma-separated list of mount options to use temporarily for the
2401duration of the mount. See the
2402.Qq Sx Temporary Mount Point Properties
2403section for details.
2404.It Fl a
2405Mount all available
2406.Tn ZFS
2407file systems.
2408This command may be executed on
2409.Fx
2410system startup by
2411.Pa /etc/rc.d/zfs .
2412For more information, see variable
2413.Va zfs_enable
2414in
2415.Xr rc.conf 5 .
2416.It Ar filesystem
2417Mount the specified filesystem.
2418.El
2419.It Xo
2420.Nm
2421.Cm unmount Ns | Ns Cm umount
2422.Op Fl f
2423.Fl a | Ar filesystem Ns | Ns Ar mountpoint
2424.Xc
2425.Pp
2426Unmounts currently mounted
2427.Tn ZFS
2428file systems.
2429.Bl -tag -width indent
2430.It Fl f
2431Forcefully unmount the file system, even if it is currently in use.
2432.It Fl a
2433Unmount all available
2434.Tn ZFS
2435file systems.
2436.It Ar filesystem | mountpoint
2437Unmount the specified filesystem. The command can also be given a path to a
2438.Tn ZFS
2439file system mount point on the system.
2440.El
2441.It Xo
2442.Nm
2443.Cm share
2444.Fl a | Ar filesystem
2445.Xc
2446.Pp
2447Shares
2448.Tn ZFS
2449file systems that have the
2450.Sy sharenfs
2451property set.
2452.Bl -tag -width indent
2453.It Fl a
2454Share all
2455.Tn ZFS
2456file systems that have the
2457.Sy sharenfs
2458property set.
2459This command may be executed on
2460.Fx
2461system startup by
2462.Pa /etc/rc.d/zfs .
2463For more information, see variable
2464.Va zfs_enable
2465in
2466.Xr rc.conf 5 .
2467.It Ar filesystem
2468Share the specified filesystem according to the
2469.Tn sharenfs
2470property. File systems are shared when the
2471.Tn sharenfs
2472property is set.
2473.El
2474.It Xo
2475.Nm
2476.Cm unshare
2477.Fl a | Ar filesystem Ns | Ns Ar mountpoint
2478.Xc
2479.Pp
2480Unshares
2481.Tn ZFS
2482file systems that have the
2483.Tn sharenfs
2484property set.
2485.Bl -tag -width indent
2486.It Fl a
2487Unshares
2488.Tn ZFS
2489file systems that have the
2490.Sy sharenfs
2491property set.
2492This command may be executed on
2493.Fx
2494system shutdown by
2495.Pa /etc/rc.d/zfs .
2496For more information, see variable
2497.Va zfs_enable
2498in
2499.Xr rc.conf 5 .
2500.It Ar filesystem | mountpoint
2501Unshare the specified filesystem. The command can also be given a path to a
2502.Tn ZFS
2503file system shared on the system.
2504.El
2505.It Xo
2506.Nm
2507.Cm bookmark
2508.Ar snapshot
2509.Ar bookmark
2510.Xc
2511.Pp
2512Creates a bookmark of the given snapshot.
2513Bookmarks mark the point in time
2514when the snapshot was created, and can be used as the incremental source for
2515a
2516.Qq Nm Cm send
2517command.
2518.Pp
2519This feature must be enabled to be used.
2520See
2521.Xr zpool-features 7
2522for details on ZFS feature flags and the
2523.Sy bookmark
2524feature.
2525.It Xo
2526.Nm
2527.Cm send
2528.Op Fl DnPpRveL
2529.Op Fl i Ar snapshot | Fl I Ar snapshot
2530.Ar snapshot
2531.Xc
2532.Pp
2533Creates a stream representation of the last
2534.Ar snapshot
2535argument (not part of
2536.Fl i
2537or
2538.Fl I )
2539which is written to standard output. The output can be redirected to
2540a file or to a different system (for example, using
2541.Xr ssh 1 ) .
2542By default, a full stream is generated.
2543.Bl -tag -width indent
2544.It Fl i Ar snapshot
2545Generate an incremental stream from the first
2546.Ar snapshot Pq the incremental source
2547to the second
2548.Ar snapshot Pq the incremental target .
2549The incremental source can be specified as the last component of the
2550snapshot name
2551.Pq the Em @ No character and following
2552and
2553it is assumed to be from the same file system as the incremental target.
2554.Pp
2555If the destination is a clone, the source may be the origin snapshot, which
2556must be fully specified (for example,
2557.Cm pool/fs@origin ,
2558not just
2559.Cm @origin ) .
2560.It Fl I Ar snapshot
2561Generate a stream package that sends all intermediary snapshots from the first
2562.Ar snapshot
2563to the second
2564.Ar snapshot .
2565For example,
2566.Ic -I @a fs@d
2567is similar to
2568.Ic -i @a fs@b; -i @b fs@c; -i @c fs@d .
2569The incremental
2570source may be specified as with the
2571.Fl i
2572option.
2573.It Fl R
2574Generate a replication stream package, which will replicate the specified
2575filesystem, and all descendent file systems, up to the named snapshot. When
2576received, all properties, snapshots, descendent file systems, and clones are
2577preserved.
2578.Pp
2579If the
2580.Fl i
2581or
2582.Fl I
2583flags are used in conjunction with the
2584.Fl R
2585flag, an incremental replication stream is generated. The current values of
2586properties, and current snapshot and file system names are set when the stream
2587is received. If the
2588.Fl F
2589flag is specified when this stream is received, snapshots and file systems that
2590do not exist on the sending side are destroyed.
2591.It Fl D
2592Generate a deduplicated stream. Blocks which would have been sent multiple
2593times in the send stream will only be sent once.  The receiving system must
2594also support this feature to receive a deduplicated stream.  This flag can
2595be used regardless of the dataset's
2596.Sy dedup
2597property, but performance will be much better if the filesystem uses a
2598dedup-capable checksum (eg.
2599.Sy sha256 ) .
2600.It Fl L
2601Generate a stream which may contain blocks larger than 128KB.
2602This flag
2603has no effect if the
2604.Sy large_blocks
2605pool feature is disabled, or if the
2606.Sy recordsize
2607property of this filesystem has never been set above 128KB.
2608The receiving system must have the
2609.Sy large_blocks
2610pool feature enabled as well.
2611See
2612.Xr zpool-features 7
2613for details on ZFS feature flags and the
2614.Sy large_blocks
2615feature.
2616.It Fl e
2617Generate a more compact stream by using WRITE_EMBEDDED records for blocks
2618which are stored more compactly on disk by the
2619.Sy embedded_data
2620pool
2621feature.
2622This flag has no effect if the
2623.Sy embedded_data
2624feature is
2625disabled.
2626The receiving system must have the
2627.Sy embedded_data
2628feature
2629enabled.
2630If the
2631.Sy lz4_compress
2632feature is active on the sending system,
2633then the receiving system must have that feature enabled as well.
2634See
2635.Xr zpool-features 7
2636for details on ZFS feature flags and the
2637.Sy embedded_data
2638feature.
2639.It Fl p
2640Include the dataset's properties in the stream. This flag is implicit when
2641.Fl R
2642is specified. The receiving system must also support this feature.
2643.It Fl n
2644Do a dry-run ("No-op") send.  Do not generate any actual send data.  This is
2645useful in conjunction with the
2646.Fl v
2647or
2648.Fl P
2649flags to determine what data will be sent.
2650In this case, the verbose output will be written to
2651standard output (contrast with a non-dry-run, where the stream is written
2652to standard output and the verbose output goes to standard error).
2653.It Fl P
2654Print machine-parsable verbose information about the stream package generated.
2655.It Fl v
2656Print verbose information about the stream package generated.
2657This information includes a per-second report of how much data has been sent.
2658.El
2659.Pp
2660The format of the stream is committed. You will be able to receive your streams
2661on future versions of
2662.Tn ZFS .
2663.It Xo
2664.Nm
2665.Cm send
2666.Op Fl eL
2667.Op Fl i Ar snapshot Ns | Ns Ar bookmark
2668.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2669.Xc
2670.Pp
2671Generate a send stream, which may be of a filesystem, and may be
2672incremental from a bookmark.
2673If the destination is a filesystem or volume,
2674the pool must be read-only, or the filesystem must not be mounted.
2675When the
2676stream generated from a filesystem or volume is received, the default snapshot
2677name will be
2678.Pq --head-- .
2679.Bl -tag -width indent
2680.It Fl i Ar snapshot Ns | Ns bookmark
2681Generate an incremental send stream.
2682The incremental source must be an earlier
2683snapshot in the destination's history.
2684It will commonly be an earlier
2685snapshot in the destination's filesystem, in which case it can be
2686specified as the last component of the name
2687.Pq the Em # No or Em @ No character and following .
2688.Pp
2689If the incremental target is a clone, the incremental source can
2690be the origin snapshot, or an earlier snapshot in the origin's filesystem,
2691or the origin's origin, etc.
2692.It Fl L
2693Generate a stream which may contain blocks larger than 128KB.
2694This flag
2695has no effect if the
2696.Sy large_blocks
2697pool feature is disabled, or if the
2698.Sy recordsize
2699property of this filesystem has never been set above 128KB.
2700The receiving system must have the
2701.Sy large_blocks
2702pool feature enabled as well.
2703See
2704.Xr zpool-features 7
2705for details on ZFS feature flags and the
2706.Sy large_blocks
2707feature.
2708.It Fl e
2709Generate a more compact stream by using WRITE_EMBEDDED records for blocks
2710which are stored more compactly on disk by the
2711.Sy embedded_data
2712pool
2713feature.
2714This flag has no effect if the
2715.Sy embedded_data
2716feature is
2717disabled.
2718The receiving system must have the
2719.Sy embedded_data
2720feature
2721enabled.
2722If the
2723.Sy lz4_compress
2724feature is active on the sending system,
2725then the receiving system must have that feature enabled as well.
2726See
2727.Xr zpool-features 7
2728for details on ZFS feature flags and the
2729.Sy embedded_data
2730feature.
2731.El
2732.It Xo
2733.Nm
2734.Cm send
2735.Op Fl Penv
2736.Fl t
2737.Ar receive_resume_token
2738.Xc
2739Creates a send stream which resumes an interrupted receive.  The
2740.Ar receive_resume_token
2741is the value of this property on the filesystem
2742or volume that was being received into.  See the documentation for
2743.Sy zfs receive -s
2744for more details.
2745.It Xo
2746.Nm
2747.Cm receive Ns | Ns Cm recv
2748.Op Fl vnsFu
2749.Op Fl o Sy origin Ns = Ns Ar snapshot
2750.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2751.Xc
2752.It Xo
2753.Nm
2754.Cm receive Ns | Ns Cm recv
2755.Op Fl vnsFu
2756.Op Fl d | e
2757.Op Fl o Sy origin Ns = Ns Ar snapshot
2758.Ar filesystem
2759.Xc
2760.Pp
2761Creates a snapshot whose contents are as specified in the stream provided on
2762standard input. If a full stream is received, then a new file system is created
2763as well. Streams are created using the
2764.Qq Nm Cm send
2765subcommand, which by default creates a full stream.
2766.Qq Nm Cm recv
2767can be used as an alias for
2768.Qq Nm Cm receive .
2769.Pp
2770If an incremental stream is received, then the destination file system must
2771already exist, and its most recent snapshot must match the incremental stream's
2772source. For
2773.Sy zvol Ns s,
2774the destination device link is destroyed and recreated, which means the
2775.Sy zvol
2776cannot be accessed during the
2777.Sy receive
2778operation.
2779.Pp
2780When a snapshot replication package stream that is generated by using the
2781.Qq Nm Cm send Fl R
2782command is received, any snapshots that do not exist on the sending location
2783are destroyed by using the
2784.Qq Nm Cm destroy Fl d
2785command.
2786.Pp
2787The name of the snapshot (and file system, if a full stream is received) that
2788this subcommand creates depends on the argument type and the
2789.Fl d
2790or
2791.Fl e
2792option.
2793.Pp
2794If the argument is a snapshot name, the specified
2795.Ar snapshot
2796is created. If the argument is a file system or volume name, a snapshot with
2797the same name as the sent snapshot is created within the specified
2798.Ar filesystem
2799or
2800.Ar volume .
2801If the
2802.Fl d
2803or
2804.Fl e
2805option is specified, the snapshot name is determined by appending the sent
2806snapshot's name to the specified
2807.Ar filesystem .
2808If the
2809.Fl d
2810option is specified, all but the pool name of the sent snapshot path is
2811appended (for example,
2812.Sy b/c@1
2813appended from sent snapshot
2814.Sy a/b/c@1 ) ,
2815and if the
2816.Fl e
2817option is specified, only the tail of the sent snapshot path is appended (for
2818example,
2819.Sy c@1
2820appended from sent snapshot
2821.Sy a/b/c@1 ) .
2822In the case of
2823.Fl d ,
2824any file systems needed to replicate the path of the sent snapshot are created
2825within the specified file system.
2826.Bl -tag -width indent
2827.It Fl d
2828Use the full sent snapshot path without the first element (without pool name)
2829to determine the name of the new snapshot as described in the paragraph above.
2830.It Fl e
2831Use only the last element of the sent snapshot path to determine the name of
2832the new snapshot as described in the paragraph above.
2833.It Fl u
2834File system that is associated with the received stream is not mounted.
2835.It Fl v
2836Print verbose information about the stream and the time required to perform the
2837receive operation.
2838.It Fl n
2839Do not actually receive the stream. This can be useful in conjunction with the
2840.Fl v
2841option to verify the name the receive operation would use.
2842.It Fl o Sy origin Ns = Ns Ar snapshot
2843Forces the stream to be received as a clone of the given snapshot.
2844This is only valid if the stream is an incremental stream whose source
2845is the same as the provided origin.
2846.It Fl F
2847Force a rollback of the file system to the most recent snapshot before
2848performing the receive operation. If receiving an incremental replication
2849stream (for example, one generated by
2850.Qq Nm Cm send Fl R Bro Fl i | Fl I Brc ) ,
2851destroy snapshots and file systems that do not exist on the sending side.
2852.It Fl s
2853If the receive is interrupted, save the partially received state, rather
2854than deleting it.  Interruption may be due to premature termination of
2855the stream
2856.Po e.g. due to network failure or failure of the remote system
2857if the stream is being read over a network connection
2858.Pc ,
2859a checksum error in the stream, termination of the
2860.Nm zfs Cm receive
2861process, or unclean shutdown of the system.
2862.Pp
2863The receive can be resumed with a stream generated by
2864.Nm zfs Cm send Fl t Ar token ,
2865where the
2866.Ar token
2867is the value of the
2868.Sy receive_resume_token
2869property of the filesystem or volume which is received into.
2870.Pp
2871To use this flag, the storage pool must have the
2872.Sy extensible_dataset
2873feature enabled.  See
2874.Xr zpool-features 5
2875for details on ZFS feature flags.
2876.El
2877.It Xo
2878.Nm
2879.Cm receive Ns | Ns Cm recv
2880.Fl A
2881.Ar filesystem Ns | Ns Ar volume
2882.Xc
2883Abort an interrupted
2884.Nm zfs Cm receive Fl s ,
2885deleting its saved partially received state.
2886.It Xo
2887.Nm
2888.Cm allow
2889.Ar filesystem Ns | Ns Ar volume
2890.Xc
2891.Pp
2892Displays permissions that have been delegated on the specified filesystem or
2893volume. See the other forms of
2894.Qq Nm Cm allow
2895for more information.
2896.It Xo
2897.Nm
2898.Cm allow
2899.Op Fl ldug
2900.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
2901.Ar perm Ns | Ns Ar @setname Ns
2902.Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ...
2903.Ar filesystem Ns | Ns Ar volume
2904.Xc
2905.It Xo
2906.Nm
2907.Cm allow
2908.Op Fl ld
2909.Fl e Ns | Ns Cm everyone
2910.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
2911.Ns ...
2912.Ar filesystem Ns | Ns Ar volume
2913.Xc
2914.Pp
2915Delegates
2916.Tn ZFS
2917administration permission for the file systems to non-privileged users.
2918.Bl -tag -width indent
2919.It Xo
2920.Op Fl ug
2921.Ar user Ns | Ns Ar group Ns Oo , Ar user Ns | Ns Ar group Oc Ns ...
2922.Xc
2923Specifies to whom the permissions are delegated. Multiple entities can be
2924specified as a comma-separated list. If neither of the
2925.Fl ug
2926options are specified, then the argument is interpreted preferentially as the
2927keyword
2928.Cm everyone ,
2929then as a user name, and lastly as a group name. To specify
2930a user or group named
2931.Qq everyone ,
2932use the
2933.Fl u
2934or
2935.Fl g
2936options. To specify a group with the same name as a user, use the
2937.Fl g
2938option.
2939.It Op Fl e Ns | Ns Cm everyone
2940Specifies that the permissions be delegated to
2941.Qq everyone .
2942.It Xo
2943.Ar perm Ns | Ns Ar @setname Ns Oo , Ns Ar perm Ns | Ns Ar @setname Oc Ns ...
2944.Xc
2945The permissions to delegate. Multiple permissions
2946may be specified as a comma-separated list. Permission names are the same as
2947.Tn ZFS
2948subcommand and property names. See the property list below. Property set names,
2949which begin with an at sign
2950.Pq Sy @ ,
2951may be specified. See the
2952.Fl s
2953form below for details.
2954.It Xo
2955.Op Fl ld
2956.Ar filesystem Ns | Ns Ar volume
2957.Xc
2958Specifies where the permissions are delegated. If neither of the
2959.Fl ld
2960options are specified, or both are, then the permissions are allowed for the
2961file system or volume, and all of its descendents. If only the
2962.Fl l
2963option is used, then is allowed "locally" only for the specified file system.
2964If only the
2965.Fl d
2966option is used, then is allowed only for the descendent file systems.
2967.El
2968.Pp
2969Permissions are generally the ability to use a
2970.Tn ZFS
2971subcommand or change a
2972.Tn ZFS
2973property. The following permissions are available:
2974.Bl -column -offset 4n "secondarycache" "subcommand"
2975.It NAME Ta TYPE Ta NOTES
2976.It allow Ta subcommand Ta Must Xo
2977also have the permission that is being allowed
2978.Xc
2979.It clone Ta subcommand Ta Must Xo
2980also have the 'create' ability and 'mount' ability in the origin file system
2981.Xc
2982.It create Ta subcommand Ta Must also have the 'mount' ability
2983.It destroy Ta subcommand Ta Must also have the 'mount' ability
2984.It diff Ta subcommand Ta Allows lookup of paths within a dataset given an
2985object number, and the ability to create snapshots necessary to 'zfs diff'
2986.It hold Ta subcommand Ta Allows adding a user hold to a snapshot
2987.It mount Ta subcommand Ta Allows mount/umount of Tn ZFS No datasets
2988.It promote Ta subcommand Ta Must Xo
2989also have the 'mount' and 'promote' ability in the origin file system
2990.Xc
2991.It receive Ta subcommand Ta Must also have the 'mount' and 'create' ability
2992.It release Ta subcommand Ta Allows Xo
2993releasing a user hold which might destroy the snapshot
2994.Xc
2995.It rename Ta subcommand Ta Must Xo
2996also have the 'mount' and 'create' ability in the new parent
2997.Xc
2998.It rollback Ta subcommand Ta Must also have the 'mount' ability
2999.It send Ta subcommand
3000.It share Ta subcommand Ta Allows Xo
3001sharing file systems over the
3002.Tn NFS
3003protocol
3004.Xc
3005.It snapshot Ta subcommand Ta Must also have the 'mount' ability
3006.It groupquota Ta other Ta Allows accessing any groupquota@... property
3007.It groupused Ta other Ta Allows reading any groupused@... property
3008.It userprop Ta other Ta Allows changing any user property
3009.It userquota Ta other Ta Allows accessing any userquota@... property
3010.It userused Ta other Ta Allows reading any userused@... property
3011.It aclinherit Ta property
3012.It aclmode Ta property
3013.It atime Ta property
3014.It canmount Ta property
3015.It casesensitivity Ta property
3016.It checksum Ta property
3017.It compression Ta property
3018.It copies Ta property
3019.It dedup Ta property
3020.It devices Ta property
3021.It exec Ta property
3022.It filesystem_limit Ta property
3023.It logbias Ta property
3024.It jailed Ta property
3025.It mlslabel Ta property
3026.It mountpoint Ta property
3027.It nbmand Ta property
3028.It normalization Ta property
3029.It primarycache Ta property
3030.It quota Ta property
3031.It readonly Ta property
3032.It recordsize Ta property
3033.It refquota Ta property
3034.It refreservation Ta property
3035.It reservation Ta property
3036.It secondarycache Ta property
3037.It setuid Ta property
3038.It sharenfs Ta property
3039.It sharesmb Ta property
3040.It snapdir Ta property
3041.It snapshot_limit Ta property
3042.It sync Ta property
3043.It utf8only Ta property
3044.It version Ta property
3045.It volblocksize Ta property
3046.It volsize Ta property
3047.It vscan Ta property
3048.It xattr Ta property
3049.El
3050.It Xo
3051.Nm
3052.Cm allow
3053.Fl c
3054.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
3055.Ns ...
3056.Ar filesystem Ns | Ns Ar volume
3057.Xc
3058.Pp
3059Sets "create time" permissions. These permissions are granted (locally) to the
3060creator of any newly-created descendent file system.
3061.It Xo
3062.Nm
3063.Cm allow
3064.Fl s
3065.Ar @setname
3066.Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
3067.Ns ...
3068.Ar filesystem Ns | Ns Ar volume
3069.Xc
3070.Pp
3071Defines or adds permissions to a permission set. The set can be used by other
3072.Qq Nm Cm allow
3073commands for the specified file system and its descendents. Sets are evaluated
3074dynamically, so changes to a set are immediately reflected. Permission sets
3075follow the same naming restrictions as ZFS file systems, but the name must
3076begin with an "at sign"
3077.Pq Sy @ ,
3078and can be no more than 64 characters long.
3079.It Xo
3080.Nm
3081.Cm unallow
3082.Op Fl rldug
3083.Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
3084.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
3085.Ns ... Oc
3086.Ar filesystem Ns | Ns Ar volume
3087.Xc
3088.It Xo
3089.Nm
3090.Cm unallow
3091.Op Fl rld
3092.Fl e Ns | Ns Cm everyone
3093.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
3094.Ns ... Oc
3095.Ar filesystem Ns | Ns Ar volume
3096.Xc
3097.It Xo
3098.Nm
3099.Cm unallow
3100.Op Fl r
3101.Fl c
3102.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
3103.Ns ... Oc
3104.Ar filesystem Ns | Ns Ar volume
3105.Xc
3106.Pp
3107Removes permissions that were granted with the
3108.Qq Nm Cm allow
3109command. No permissions are explicitly denied, so other permissions granted are
3110still in effect. For example, if the permission is granted by an ancestor. If
3111no permissions are specified, then all permissions for the specified
3112.Ar user , group , No or everyone
3113are removed. Specifying
3114.Cm everyone
3115.Po or using the Fl e
3116option
3117.Pc only removes the permissions that were granted to everyone ,
3118not all permissions for every user and group. See the
3119.Qq Nm Cm allow
3120command for a description of the
3121.Fl ldugec
3122options.
3123.Bl -tag -width indent
3124.It Fl r
3125Recursively remove the permissions from this file system and all descendents.
3126.El
3127.It Xo
3128.Nm
3129.Cm unallow
3130.Op Fl r
3131.Fl s
3132.Ar @setname
3133.Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
3134.Ns ... Oc
3135.Ar filesystem Ns | Ns Ar volume
3136.Xc
3137.Pp
3138Removes permissions from a permission set. If no permissions are specified,
3139then all permissions are removed, thus removing the set entirely.
3140.It Xo
3141.Nm
3142.Cm hold
3143.Op Fl r
3144.Ar tag snapshot Ns ...
3145.Xc
3146.Pp
3147Adds a single reference, named with the
3148.Ar tag
3149argument, to the specified snapshot or snapshots. Each snapshot has its own tag
3150namespace, and tags must be unique within that space.
3151.Pp
3152If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3153.Qq Nm Cm destroy
3154command returns
3155.Em EBUSY .
3156.Bl -tag -width indent
3157.It Fl r
3158Specifies that a hold with the given tag is applied recursively to the
3159snapshots of all descendent file systems.
3160.El
3161.It Xo
3162.Nm
3163.Cm holds
3164.Op Fl Hp
3165.Op Fl r Ns | Ns Fl d Ar depth
3166.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns
3167.Ns ...
3168.Xc
3169.Pp
3170Lists all existing user references for the given dataset or datasets.
3171.Bl -tag -width indent
3172.It Fl H
3173Used for scripting mode. Do not print headers and separate fields by a single
3174tab instead of arbitrary white space.
3175.It Fl p
3176Display numbers in parsable (exact) values.
3177.It Fl r
3178Lists the holds that are set on the descendent snapshots of the named datasets
3179or snapshots, in addition to listing the holds on the named snapshots, if any.
3180.It Fl d Ar depth
3181Recursively display any holds on the named snapshots, or descendent snapshots of
3182the named datasets or snapshots, limiting the recursion to
3183.Ar depth .
3184.El
3185.It Xo
3186.Nm
3187.Cm release
3188.Op Fl r
3189.Ar tag snapshot Ns ...
3190.Xc
3191.Pp
3192Removes a single reference, named with the
3193.Ar tag
3194argument, from the specified snapshot or snapshots. The tag must already exist
3195for each snapshot.
3196.Bl -tag -width indent
3197.It Fl r
3198Recursively releases a hold with the given tag on the snapshots of all
3199descendent file systems.
3200.El
3201.It Xo
3202.Nm
3203.Cm diff
3204.Op Fl FHt
3205.Ar snapshot
3206.Op Ar snapshot Ns | Ns Ar filesystem
3207.Xc
3208.Pp
3209Display the difference between a snapshot of a given filesystem and another
3210snapshot of that filesystem from a later time or the current contents of the
3211filesystem.  The first column is a character indicating the type of change,
3212the other columns indicate pathname, new pathname
3213.Pq in case of rename ,
3214change in link count, and optionally file type and/or change time.
3215.Pp
3216The types of change are:
3217.Bl -column -offset 2n indent
3218.It \&- Ta path was removed
3219.It \&+ Ta path was added
3220.It \&M Ta path was modified
3221.It \&R Ta path was renamed
3222.El
3223.Bl -tag -width indent
3224.It Fl F
3225Display an indication of the type of file, in a manner similar to the
3226.Fl F
3227option of
3228.Xr ls 1 .
3229.Bl -column -offset 2n indent
3230.It \&B Ta block device
3231.It \&C Ta character device
3232.It \&F Ta regular file
3233.It \&/ Ta directory
3234.It \&@ Ta symbolic link
3235.It \&= Ta socket
3236.It \&> Ta door (not supported on Fx )
3237.It \&| Ta named pipe (not supported on Fx )
3238.It \&P Ta event port (not supported on Fx )
3239.El
3240.It Fl H
3241Give more parsable tab-separated output, without header lines and without
3242arrows.
3243.It Fl t
3244Display the path's inode change time as the first column of output.
3245.El
3246.It Xo
3247.Nm
3248.Cm jail
3249.Ar jailid filesystem
3250.Xc
3251.Pp
3252Attaches the specified
3253.Ar filesystem
3254to the jail identified by JID
3255.Ar jailid .
3256From now on this file system tree can be managed from within a jail if the
3257.Sy jailed
3258property has been set. To use this functionality, the jail needs the
3259.Va allow.mount
3260and
3261.Va allow.mount.zfs
3262parameters set to 1 and the
3263.Va enforce_statfs
3264parameter set to a value lower than 2.
3265.Pp
3266See
3267.Xr jail 8
3268for more information on managing jails and configuring the parameters above.
3269.It Xo
3270.Nm
3271.Cm unjail
3272.Ar jailid filesystem
3273.Xc
3274.Pp
3275Detaches the specified
3276.Ar filesystem
3277from the jail identified by JID
3278.Ar jailid .
3279.El
3280.Sh EXIT STATUS
3281The following exit values are returned:
3282.Bl -tag -offset 2n -width 2n
3283.It 0
3284Successful completion.
3285.It 1
3286An error occurred.
3287.It 2
3288Invalid command line options were specified.
3289.El
3290.Sh EXAMPLES
3291.Bl -tag -width 0n
3292.It Sy Example 1 No Creating a Tn ZFS No File System Hierarchy
3293.Pp
3294The following commands create a file system named
3295.Em pool/home
3296and a file system named
3297.Em pool/home/bob .
3298The mount point
3299.Pa /home
3300is set for the parent file system, and is automatically inherited by the child
3301file system.
3302.Bd -literal -offset 2n
3303.Li # Ic zfs create pool/home
3304.Li # Ic zfs set mountpoint=/home pool/home
3305.Li # Ic zfs create pool/home/bob
3306.Ed
3307.It Sy Example 2 No Creating a Tn ZFS No Snapshot
3308.Pp
3309The following command creates a snapshot named
3310.Sy yesterday .
3311This snapshot is mounted on demand in the
3312.Pa \&.zfs/snapshot
3313directory at the root of the
3314.Em pool/home/bob
3315file system.
3316.Bd -literal -offset 2n
3317.Li # Ic zfs snapshot pool/home/bob@yesterday
3318.Ed
3319.It Sy Example 3 No Creating and Destroying Multiple Snapshots
3320.Pp
3321The following command creates snapshots named
3322.Em yesterday
3323of
3324.Em pool/home
3325and all of its descendent file systems. Each snapshot is mounted on demand in
3326the
3327.Pa \&.zfs/snapshot
3328directory at the root of its file system. The second command destroys the newly
3329created snapshots.
3330.Bd -literal -offset 2n
3331.Li # Ic zfs snapshot -r pool/home@yesterday
3332.Li # Ic zfs destroy -r pool/home@yesterday
3333.Ed
3334.It Sy Example 4 No Disabling and Enabling File System Compression
3335.Pp
3336The following command disables the
3337.Sy compression
3338property for all file systems under
3339.Em pool/home .
3340The next command explicitly enables
3341.Sy compression
3342for
3343.Em pool/home/anne .
3344.Bd -literal -offset 2n
3345.Li # Ic zfs set compression=off pool/home
3346.Li # Ic zfs set compression=on pool/home/anne
3347.Ed
3348.It Sy Example 5 No Listing Tn ZFS No Datasets
3349.Pp
3350The following command lists all active file systems and volumes in the system.
3351Snapshots are displayed if the
3352.Sy listsnaps
3353property is
3354.Cm on .
3355The default is
3356.Cm off .
3357See
3358.Xr zpool 8
3359for more information on pool properties.
3360.Bd -literal -offset 2n
3361.Li # Ic zfs list
3362   NAME                      USED  AVAIL  REFER  MOUNTPOINT
3363   pool                      450K   457G    18K  /pool
3364   pool/home                 315K   457G    21K  /home
3365   pool/home/anne             18K   457G    18K  /home/anne
3366   pool/home/bob             276K   457G   276K  /home/bob
3367.Ed
3368.It Sy Example 6 No Setting a Quota on a Tn ZFS No File System
3369.Pp
3370The following command sets a quota of 50 Gbytes for
3371.Em pool/home/bob .
3372.Bd -literal -offset 2n
3373.Li # Ic zfs set quota=50G pool/home/bob
3374.Ed
3375.It Sy Example 7 No Listing Tn ZFS No Properties
3376.Pp
3377The following command lists all properties for
3378.Em pool/home/bob .
3379.Bd -literal -offset 2n
3380.Li # Ic zfs get all pool/home/bob
3381NAME           PROPERTY              VALUE                  SOURCE
3382pool/home/bob  type                  filesystem             -
3383pool/home/bob  creation              Tue Jul 21 15:53 2009  -
3384pool/home/bob  used                  21K                    -
3385pool/home/bob  available             20.0G                  -
3386pool/home/bob  referenced            21K                    -
3387pool/home/bob  compressratio         1.00x                  -
3388pool/home/bob  mounted               yes                    -
3389pool/home/bob  quota                 20G                    local
3390pool/home/bob  reservation           none                   default
3391pool/home/bob  recordsize            128K                   default
3392pool/home/bob  mountpoint            /home/bob              default
3393pool/home/bob  sharenfs              off                    default
3394pool/home/bob  checksum              on                     default
3395pool/home/bob  compression           on                     local
3396pool/home/bob  atime                 on                     default
3397pool/home/bob  devices               on                     default
3398pool/home/bob  exec                  on                     default
3399pool/home/bob  filesystem_limit      none                   default
3400pool/home/bob  setuid                on                     default
3401pool/home/bob  readonly              off                    default
3402pool/home/bob  jailed                off                    default
3403pool/home/bob  snapdir               hidden                 default
3404pool/home/bob  snapshot_limit        none                   default
3405pool/home/bob  aclmode               discard                default
3406pool/home/bob  aclinherit            restricted             default
3407pool/home/bob  canmount              on                     default
3408pool/home/bob  xattr                 on                     default
3409pool/home/bob  copies                1                      default
3410pool/home/bob  version               5                      -
3411pool/home/bob  utf8only              off                    -
3412pool/home/bob  normalization         none                   -
3413pool/home/bob  casesensitivity       sensitive              -
3414pool/home/bob  vscan                 off                    default
3415pool/home/bob  nbmand                off                    default
3416pool/home/bob  sharesmb              off                    default
3417pool/home/bob  refquota              none                   default
3418pool/home/bob  refreservation        none                   default
3419pool/home/bob  primarycache          all                    default
3420pool/home/bob  secondarycache        all                    default
3421pool/home/bob  usedbysnapshots       0                      -
3422pool/home/bob  usedbydataset         21K                    -
3423pool/home/bob  usedbychildren        0                      -
3424pool/home/bob  usedbyrefreservation  0                      -
3425pool/home/bob  logbias               latency                default
3426pool/home/bob  dedup                 off                    default
3427pool/home/bob  mlslabel                                     -
3428pool/home/bob  sync                  standard               default
3429pool/home/bob  refcompressratio      1.00x                  -
3430.Ed
3431.Pp
3432The following command gets a single property value.
3433.Bd -literal -offset 2n
3434.Li # Ic zfs get -H -o value compression pool/home/bob
3435on
3436.Ed
3437.Pp
3438The following command lists all properties with local settings for
3439.Em pool/home/bob .
3440.Bd -literal -offset 2n
3441.Li # Ic zfs get -s local -o name,property,value all pool/home/bob
3442NAME           PROPERTY              VALUE
3443pool/home/bob  quota                 20G
3444pool/home/bob  compression           on
3445.Ed
3446.It Sy Example 8 No Rolling Back a Tn ZFS No File System
3447.Pp
3448The following command reverts the contents of
3449.Em pool/home/anne
3450to the snapshot named
3451.Em yesterday ,
3452deleting all intermediate snapshots.
3453.Bd -literal -offset 2n
3454.Li # Ic zfs rollback -r pool/home/anne@yesterday
3455.Ed
3456.It Sy Example 9 No Creating a Tn ZFS No Clone
3457.Pp
3458The following command creates a writable file system whose initial contents are
3459the same as
3460.Em pool/home/bob@yesterday .
3461.Bd -literal -offset 2n
3462.Li # Ic zfs clone pool/home/bob@yesterday pool/clone
3463.Ed
3464.It Sy Example 10 No Promoting a Tn ZFS No Clone
3465.Pp
3466The following commands illustrate how to test out changes to a file system, and
3467then replace the original file system with the changed one, using clones, clone
3468promotion, and renaming:
3469.Bd -literal -offset 2n
3470.Li # Ic zfs create pool/project/production
3471.Ed
3472.Pp
3473Populate
3474.Pa /pool/project/production
3475with data and continue with the following commands:
3476.Bd -literal -offset 2n
3477.Li # Ic zfs snapshot pool/project/production@today
3478.Li # Ic zfs clone pool/project/production@today pool/project/beta
3479.Ed
3480.Pp
3481Now make changes to
3482.Pa /pool/project/beta
3483and continue with the following commands:
3484.Bd -literal -offset 2n
3485.Li # Ic zfs promote pool/project/beta
3486.Li # Ic zfs rename pool/project/production pool/project/legacy
3487.Li # Ic zfs rename pool/project/beta pool/project/production
3488.Ed
3489.Pp
3490Once the legacy version is no longer needed, it can be destroyed.
3491.Bd -literal -offset 2n
3492.Li # Ic zfs destroy pool/project/legacy
3493.Ed
3494.It Sy Example 11 No Inheriting Tn ZFS No Properties
3495.Pp
3496The following command causes
3497.Em pool/home/bob
3498and
3499.Em pool/home/anne
3500to inherit the
3501.Sy checksum
3502property from their parent.
3503.Bd -literal -offset 2n
3504.Li # Ic zfs inherit checksum pool/home/bob pool/home/anne
3505.Ed
3506.It Sy Example 12 No Remotely Replicating Tn ZFS No Data
3507.Pp
3508The following commands send a full stream and then an incremental stream to a
3509remote machine, restoring them into
3510.Sy poolB/received/fs@a
3511and
3512.Sy poolB/received/fs@b ,
3513respectively.
3514.Sy poolB
3515must contain the file system
3516.Sy poolB/received ,
3517and must not initially contain
3518.Sy poolB/received/fs .
3519.Bd -literal -offset 2n
3520.Li # Ic zfs send pool/fs@a | ssh host zfs receive poolB/received/fs@a
3521.Li # Ic zfs send -i a pool/fs@b | ssh host zfs receive poolB/received/fs
3522.Ed
3523.It Xo
3524.Sy Example 13
3525Using the
3526.Qq zfs receive -d
3527Option
3528.Xc
3529.Pp
3530The following command sends a full stream of
3531.Sy poolA/fsA/fsB@snap
3532to a remote machine, receiving it into
3533.Sy poolB/received/fsA/fsB@snap .
3534The
3535.Sy fsA/fsB@snap
3536portion of the received snapshot's name is determined from the name of the sent
3537snapshot.
3538.Sy poolB
3539must contain the file system
3540.Sy poolB/received .
3541If
3542.Sy poolB/received/fsA
3543does not exist, it is created as an empty file system.
3544.Bd -literal -offset 2n
3545.Li # Ic zfs send poolA/fsA/fsB@snap | ssh host zfs receive -d poolB/received
3546.Ed
3547.It Sy Example 14 No Setting User Properties
3548.Pp
3549The following example sets the user-defined
3550.Sy com.example:department
3551property for a dataset.
3552.Bd -literal -offset 2n
3553.Li # Ic zfs set com.example:department=12345 tank/accounting
3554.Ed
3555.It Sy Example 15 No Performing a Rolling Snapshot
3556.Pp
3557The following example shows how to maintain a history of snapshots with a
3558consistent naming scheme. To keep a week's worth of snapshots, the user
3559destroys the oldest snapshot, renames the remaining snapshots, and then creates
3560a new snapshot, as follows:
3561.Bd -literal -offset 2n
3562.Li # Ic zfs destroy -r pool/users@7daysago
3563.Li # Ic zfs rename -r pool/users@6daysago @7daysago
3564.Li # Ic zfs rename -r pool/users@5daysago @6daysago
3565.Li # Ic zfs rename -r pool/users@4daysago @5daysago
3566.Li # Ic zfs rename -r pool/users@3daysago @4daysago
3567.Li # Ic zfs rename -r pool/users@2daysago @3daysago
3568.Li # Ic zfs rename -r pool/users@yesterday @2daysago
3569.Li # Ic zfs rename -r pool/users@today @yesterday
3570.Li # Ic zfs snapshot -r pool/users@today
3571.Ed
3572.It Xo
3573.Sy Example 16
3574Setting
3575.Qq sharenfs
3576Property Options on a ZFS File System
3577.Xc
3578.Pp
3579The following command shows how to set
3580.Sy sharenfs
3581property options to enable root access for a specific network on the
3582.Em tank/home
3583file system. The contents of the
3584.Sy sharenfs
3585property are valid
3586.Xr exports 5
3587options.
3588.Bd -literal -offset 2n
3589.Li # Ic zfs set sharenfs="maproot=root,network 192.168.0.0/24" tank/home
3590.Ed
3591.Pp
3592Another way to write this command with the same result is:
3593.Bd -literal -offset 2n
3594.Li # Ic set zfs sharenfs="-maproot=root -network 192.168.0.0/24" tank/home
3595.Ed
3596.It Xo
3597.Sy Example 17
3598Delegating
3599.Tn ZFS
3600Administration Permissions on a
3601.Tn ZFS
3602Dataset
3603.Xc
3604.Pp
3605The following example shows how to set permissions so that user
3606.Em cindys
3607can create, destroy, mount, and take snapshots on
3608.Em tank/cindys .
3609The permissions on
3610.Em tank/cindys
3611are also displayed.
3612.Bd -literal -offset 2n
3613.Li # Ic zfs allow cindys create,destroy,mount,snapshot tank/cindys
3614.Li # Ic zfs allow tank/cindys
3615---- Permissions on tank/cindys --------------------------------------
3616Local+Descendent permissions:
3617        user cindys create,destroy,mount,snapshot
3618.Ed
3619.It Sy Example 18 No Delegating Create Time Permissions on a Tn ZFS No Dataset
3620.Pp
3621The following example shows how to grant anyone in the group
3622.Em staff
3623to create file systems in
3624.Em tank/users .
3625This syntax also allows staff members to destroy their own file systems, but
3626not destroy anyone else's file system. The permissions on
3627.Em tank/users
3628are also displayed.
3629.Bd -literal -offset 2n
3630.Li # Ic zfs allow staff create,mount tank/users
3631.Li # Ic zfs allow -c destroy tank/users
3632.Li # Ic zfs allow tank/users
3633---- Permissions on tank/users ---------------------------------------
3634Permission sets:
3635        destroy
3636Local+Descendent permissions:
3637        group staff create,mount
3638.Ed
3639.It Xo
3640.Sy Example 19
3641Defining and Granting a Permission Set on a
3642.Tn ZFS
3643Dataset
3644.Xc
3645.Pp
3646The following example shows how to define and grant a permission set on the
3647.Em tank/users
3648file system. The permissions on
3649.Em tank/users
3650are also displayed.
3651.Bd -literal -offset 2n
3652.Li # Ic zfs allow -s @pset create,destroy,snapshot,mount tank/users
3653.Li # Ic zfs allow staff @pset tank/users
3654.Li # Ic zfs allow tank/users
3655---- Permissions on tank/users ---------------------------------------
3656Permission sets:
3657        @pset create,destroy,mount,snapshot
3658Local+Descendent permissions:
3659        group staff @pset
3660.Ed
3661.It Sy Example 20 No Delegating Property Permissions on a Tn ZFS No Dataset
3662.Pp
3663The following example shows to grant the ability to set quotas and reservations
3664on the
3665.Sy users/home
3666file system. The permissions on
3667.Sy users/home
3668are also displayed.
3669.Bd -literal -offset 2n
3670.Li # Ic zfs allow cindys quota,reservation users/home
3671.Li # Ic zfs allow users/home
3672---- Permissions on users/home ---------------------------------------
3673Local+Descendent permissions:
3674        user cindys quota,reservation
3675.Li # Ic su - cindys
3676.Li cindys% Ic zfs set quota=10G users/home/marks
3677.Li cindys% Ic zfs get quota users/home/marks
3678NAME              PROPERTY  VALUE  SOURCE
3679users/home/marks  quota     10G    local
3680.Ed
3681.It Sy Example 21 No Removing ZFS Delegated Permissions on a Tn ZFS No Dataset
3682.Pp
3683The following example shows how to remove the snapshot permission from the
3684.Em staff
3685group on the
3686.Em tank/users
3687file system. The permissions on
3688.Em tank/users
3689are also displayed.
3690.Bd -literal -offset 2n
3691.Li # Ic zfs unallow staff snapshot tank/users
3692.Li # Ic zfs allow tank/users
3693---- Permissions on tank/users ---------------------------------------
3694Permission sets:
3695        @pset create,destroy,mount,snapshot
3696Local+Descendent permissions:
3697        group staff @pset
3698.Ed
3699.It Sy Example 22 Showing the differences between a snapshot and a ZFS Dataset
3700.Pp
3701The following example shows how to see what has changed between a prior
3702snapshot of a ZFS Dataset and its current state.  The
3703.Fl F
3704option is used to indicate type information for the files affected.
3705.Bd -literal -offset 2n
3706.Li # Ic zfs diff tank/test@before tank/test
3707M       /       /tank/test/
3708M       F       /tank/test/linked      (+1)
3709R       F       /tank/test/oldname -> /tank/test/newname
3710-       F       /tank/test/deleted
3711+       F       /tank/test/created
3712M       F       /tank/test/modified
3713.Ed
3714.El
3715.Sh SEE ALSO
3716.Xr chmod 2 ,
3717.Xr fsync 2 ,
3718.Xr exports 5 ,
3719.Xr fstab 5 ,
3720.Xr rc.conf 5 ,
3721.Xr jail 8 ,
3722.Xr mount 8 ,
3723.Xr umount 8 ,
3724.Xr zpool 8
3725.Sh AUTHORS
3726This manual page is a
3727.Xr mdoc 7
3728reimplementation of the
3729.Tn OpenSolaris
3730manual page
3731.Em zfs(1M) ,
3732modified and customized for
3733.Fx
3734and licensed under the
3735Common Development and Distribution License
3736.Pq Tn CDDL .
3737.Pp
3738The
3739.Xr mdoc 7
3740implementation of this manual page was initially written by
3741.An Martin Matuska Aq mm@FreeBSD.org .
3742