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