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