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.
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.
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]
22 .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
23 .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
24 .\" Copyright (c) 2011, 2016 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 (c) 2014 Integros [integros.com]
29 .\" Copyright 2016 Nexenta Systems, Inc.
31 .Dd September 16, 2016
36 .Nd configures ZFS file systems
43 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
49 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
50 .Fl V Ar size Ar volume
54 .Ar filesystem Ns | Ns Ar volume
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 ...
62 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
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 ...
75 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
76 .Ar snapshot Ar filesystem Ns | Ns Ar volume
83 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
84 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
88 .Ar filesystem Ns | Ns Ar volume
89 .Ar filesystem Ns | Ns Ar volume
93 .Ar snapshot Ar snapshot
96 .Op Fl r Ns | Ns Fl d Ar depth
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 ...
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 ...
109 .Op Fl r Ns | Ns Fl d Ar depth
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 ...
119 .Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
129 .Fl a | Ar filesystem
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
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
152 .Fl a | Ar filesystem
156 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
159 .Fl a | Ar filesystem
162 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
165 .Ar snapshot bookmark
169 .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
174 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
175 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
179 .Fl t Ar receive_resume_token
183 .Op Fl o Sy origin Ns = Ns Ar snapshot
184 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
188 .Op Fl d Ns | Ns Fl e
189 .Op Fl o Sy origin Ns = Ns Ar snapshot
194 .Ar filesystem Ns | Ns Ar volume
197 .Ar filesystem Ns | Ns Ar volume
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
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
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
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
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
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
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
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
255 .Ar tag Ar snapshot Ns ...
263 .Ar tag Ar snapshot Ns ...
267 .Ar snapshot Ar snapshot Ns | Ns Ar filesystem
271 command configures ZFS datasets within a ZFS storage pool, as described in
273 A dataset is identified by a unique path within the ZFS namespace. For example:
275 pool/{filesystem,volume,snapshot}
278 where the maximum length of a dataset name is
282 A dataset can be one of the following:
283 .Bl -tag -width "file system"
285 A ZFS dataset of type
287 can be mounted within the standard system namespace and behaves like other file
288 systems. While ZFS file systems are designed to be POSIX compliant, known issues
289 exist that prevent compliance in some cases. Applications that depend on
290 standards conformance might fail due to non-standard behavior when checking file
293 A logical volume exported as a raw or block device. This type of dataset should
294 only be used under special circumstances. File systems are typically used in
297 A read-only version of a file system or volume at a given point in time. It is
299 .Ar filesystem Ns @ Ns Ar name
301 .Ar volume Ns @ Ns Ar name .
303 .Ss ZFS File System Hierarchy
304 A ZFS storage pool is a logical collection of devices that provide space for
305 datasets. A storage pool is also the root of the ZFS file system hierarchy.
307 The root of the pool can be accessed as a file system, such as mounting and
308 unmounting, taking snapshots, and setting properties. The physical storage
309 characteristics, however, are managed by the
315 for more information on creating and administering pools.
317 A snapshot is a read-only copy of a file system or volume. Snapshots can be
318 created extremely quickly, and initially consume no additional space within the
319 pool. As data within the active dataset changes, the snapshot consumes more
320 data than would otherwise be shared with the active dataset.
322 Snapshots can have arbitrary names. Snapshots of volumes can be cloned or
323 rolled back, but cannot be accessed independently.
325 File system snapshots can be accessed under the
327 directory in the root of the file system. Snapshots are automatically mounted on
328 demand and may be unmounted at regular intervals. The visibility of the
330 directory can be controlled by the
334 A clone is a writable volume or file system whose initial contents are the same
335 as another dataset. As with snapshots, creating a clone is nearly instantaneous,
336 and initially consumes no additional space.
338 Clones can only be created from a snapshot. When a snapshot is cloned, it
339 creates an implicit dependency between the parent and child. Even though the
340 clone is created somewhere else in the dataset hierarchy, the original snapshot
341 cannot be destroyed as long as a clone exists. The
343 property exposes this dependency, and the
345 command lists any such dependencies, if they exist.
347 The clone parent-child dependency relationship can be reversed by using the
349 subcommand. This causes the
351 file system to become a clone of the specified file system, which makes it
352 possible to destroy the file system that the clone was created from.
354 Creating a ZFS file system is a simple operation, so the number of file systems
355 per system is likely to be numerous. To cope with this, ZFS automatically
356 manages mounting and unmounting file systems without the need to edit the
358 file. All automatically managed file systems are mounted by ZFS at boot time.
360 By default, file systems are mounted under
364 is the name of the file system in the ZFS namespace. Directories are created and
367 A file system can also have a mount point set in the
369 property. This directory is created as needed, and ZFS automatically mounts the
371 .Nm zfs Cm mount Fl a
378 property can be inherited, so if
384 automatically inherits a mount point of
385 .Pa /export/stuff/user .
391 prevents the file system from being mounted.
393 If needed, ZFS file systems can also be managed with traditional tools
399 If a file system's mount point is set to
401 ZFS makes no attempt to manage the file system, and the administrator is
402 responsible for mounting and unmounting the file system.
404 A ZFS file system can be added to a non-global zone by using the
405 .Nm zonecfg Cm add Sy fs
406 subcommand. A ZFS file system that is added to a non-global zone must have its
411 The physical properties of an added file system are controlled by the global
412 administrator. However, the zone administrator can create, modify, or destroy
413 files within the added file system, depending on how the file system is mounted.
415 A dataset can also be delegated to a non-global zone by using the
416 .Nm zonecfg Cm add Sy dataset
417 subcommand. You cannot delegate a dataset to one zone and the children of the
418 same dataset to another zone. The zone administrator can change properties of
419 the dataset or any of its children. However, the
424 properties of the delegated dataset can be modified only by the global
427 A ZFS volume can be added as a device to a non-global zone by using the
428 .Nm zonecfg Cm add Sy device
429 subcommand. However, its physical properties can be modified only by the global
432 For more information about
437 After a dataset is delegated to a non-global zone, the
439 property is automatically set. A zoned file system cannot be mounted in the
440 global zone, since the zone administrator might have to set the mount point to
441 an unacceptable value.
443 The global administrator can forcibly clear the
445 property, though this should be done with extreme care. The global administrator
446 should verify that all the mount points are acceptable before clearing the
448 .Ss Native Properties
449 Properties are divided into two types, native properties and user-defined
453 properties. Native properties either export internal statistics or control ZFS
454 behavior. In addition, native properties are either editable or read-only. User
455 properties have no effect on ZFS behavior, but you can use them to annotate
456 datasets in a way that is meaningful in your environment. For more information
457 about user properties, see the
461 Every dataset has a set of properties that export statistics about the dataset
462 as well as control various behaviors. Properties are inherited from the parent
463 unless overridden by the child. Some properties apply only to certain types of
465 .Pq file systems, volumes, or snapshots .
467 The values of numeric properties can be specified using human-readable suffixes
477 The following are all valid
480 .Li 1536M, 1.5g, 1.50GB .
482 The values of non-numeric properties are case sensitive and must be lowercase,
489 The following native properties consist of read-only statistics about the
490 dataset. These properties can be neither set, nor inherited. Native properties
491 apply to all dataset types unless otherwise noted.
492 .Bl -tag -width "usedbyrefreservation"
494 The amount of space available to the dataset and all its children, assuming that
495 there is no other activity in the pool. Because space is shared within a pool,
496 availability can be limited by any number of factors, including physical pool
497 size, quotas, reservations, or other datasets within the pool.
499 This property can also be referred to by its shortened column name,
502 For non-snapshots, the compression ratio achieved for the
504 space of this dataset, expressed as a multiplier. The
506 property includes descendant datasets, and, for clones, does not include the
507 space shared with the origin snapshot. For snapshots, the
511 property. Compression can be turned on by running:
512 .Nm zfs Cm set Sy compression Ns = Ns Sy on Ar dataset .
516 The time this dataset was created.
518 For snapshots, this property is a comma-separated list of filesystems or volumes
519 which are clones of this snapshot. The clones'
521 property is this snapshot. If the
523 property is not empty, then this snapshot can not be destroyed
533 if the snapshot has been marked for deferred destroy by using the
534 .Nm zfs Cm destroy Fl d
535 command. Otherwise, the property is
537 .It Sy filesystem_count
538 The total number of filesystems and volumes that exist under this location in
539 the dataset tree. This value is only available when a
541 has been set somewhere in the tree under which the dataset resides.
542 .It Sy logicalreferenced
543 The amount of space that is
545 accessible by this dataset. See the
547 property. The logical space ignores the effect of the
551 properties, giving a quantity closer to the amount of data that applications
552 see. However, it does include space consumed by metadata.
554 This property can also be referred to by its shortened column name,
557 The amount of space that is
559 consumed by this dataset and all its descendents. See the
561 property. The logical space ignores the effect of the
565 properties, giving a quantity closer to the amount of data that applications
566 see. However, it does include space consumed by metadata.
568 This property can also be referred to by its shortened column name,
571 For file systems, indicates whether the file system is currently mounted. This
572 property can be either
577 For cloned file systems or volumes, the snapshot from which the clone was
578 created. See also the
581 .It Sy receive_resume_token
582 For filesystems or volumes which have saved partially-completed state from
584 this opaque token can be provided to
586 to resume and complete the
589 The amount of data that is accessible by this dataset, which may or may not be
590 shared with other datasets in the pool. When a snapshot or clone is created, it
591 initially references the same amount of space as the file system or snapshot it
592 was created from, since its contents are identical.
594 This property can also be referred to by its shortened column name,
596 .It Sy refcompressratio
597 The compression ratio achieved for the
599 space of this dataset, expressed as a multiplier. See also the
602 .It Sy snapshot_count
603 The total number of snapshots that exist under this location in the dataset
604 tree. This value is only available when a
606 has been set somewhere in the tree under which the dataset resides.
614 The amount of space consumed by this dataset and all its descendents. This is
615 the value that is checked against this dataset's quota and reservation. The
616 space used does not include this dataset's reservation, but does take into
617 account the reservations of any descendent datasets. The amount of space that a
618 dataset consumes from its parent, as well as the amount of space that is freed
619 if this dataset is recursively destroyed, is the greater of its space used and
622 The used space of a snapshot
627 is space that is referenced exclusively by this snapshot. If this snapshot is
628 destroyed, the amount of
630 space will be freed. Space that is shared by multiple snapshots isn't accounted
631 for in this metric. When a snapshot is destroyed, space that was previously
632 shared with this snapshot can become unique to snapshots adjacent to it, thus
633 changing the used space of those snapshots. The used space of the latest
634 snapshot can also be affected by changes in the file system. Note that the
636 space of a snapshot is a subset of the
638 space of the snapshot.
640 The amount of space used, available, or referenced does not take into account
641 pending changes. Pending changes are generally accounted for within a few
642 seconds. Committing a change to a disk using
646 does not necessarily guarantee that the space usage information is updated
651 properties decompose the
653 properties into the various reasons that space is used. Specifically,
655 .Sy usedbychildren No +
656 .Sy usedbydataset No +
657 .Sy usedbyrefreservation No +
658 .Sy usedbysnapshots .
659 These properties are only available for datasets created on
663 .It Sy usedbychildren
664 The amount of space used by children of this dataset, which would be freed if
665 all the dataset's children were destroyed.
667 The amount of space used by this dataset itself, which would be freed if the
668 dataset were destroyed
669 .Po after first removing any
671 and destroying any necessary snapshots or descendents
673 .It Sy usedbyrefreservation
674 The amount of space used by a
676 set on this dataset, which would be freed if the
679 .It Sy usedbysnapshots
680 The amount of space consumed by snapshots of this dataset. In particular, it is
681 the amount of space that would be freed if all of this dataset's snapshots were
682 destroyed. Note that this is not simply the sum of the snapshots'
684 properties because space can be shared by multiple snapshots.
685 .It Sy userused Ns @ Ns Em user
686 The amount of space consumed by the specified user in this dataset. Space is
687 charged to the owner of each file, as displayed by
689 The amount of space charged is displayed by
695 subcommand for more information.
697 Unprivileged users can access only their own space usage. The root user, or a
698 user who has been granted the
702 can access everyone's usage.
705 .Sy userused Ns @ Ns Em ...
706 properties are not displayed by
707 .Nm zfs Cm get Sy all .
708 The user's name must be appended after the @ symbol, using one of the following
710 .Bl -bullet -width ""
724 .Sy joe.smith@mydomain
733 This property is set to the number of user holds on this snapshot. User holds
737 .It Sy groupused Ns @ Ns Em group
738 The amount of space consumed by the specified group in this dataset. Space is
739 charged to the group of each file, as displayed by
742 .Sy userused Ns @ Ns Em user
743 property for more information.
745 Unprivileged users can only access their own groups' space usage. The root user,
746 or a user who has been granted the
750 can access all groups' usage.
752 For volumes, specifies the block size of the volume. The
754 cannot be changed once the volume has been written, so it should be set at
755 volume creation time. The default
757 for volumes is 8 Kbytes. Any power of 2 from 512 bytes to 128 Kbytes is valid.
759 This property can also be referred to by its shortened column name,
764 by this dataset, that was written since the previous snapshot
765 .Pq i.e. that is not referenced by the previous snapshot .
766 .It Sy written Ns @ Ns Em snapshot
769 space written to this dataset since the specified snapshot. This is the space
770 that is referenced by this dataset but was not referenced by the specified
775 may be specified as a short snapshot name
776 .Po just the part after the
779 in which case it will be interpreted as a snapshot in the same filesystem as
782 may be a full snapshot name
783 .Po Em filesystem Ns @ Ns Em snapshot Pc ,
784 which for clones may be a snapshot in the origin's filesystem
785 .Pq or the origin of the origin's filesystem, etc.
788 The following native properties can be used to change the behavior of a ZFS
792 .Sy aclinherit Ns = Ns Sy discard Ns | Ns Sy noallow Ns | Ns
793 .Sy restricted Ns | Ns Sy passthrough Ns | Ns Sy passthrough-x
795 Controls how ACEs are inherited when files and directories are created.
796 .Bl -tag -width "passthrough-x"
798 does not inherit any ACEs.
800 only inherits inheritable ACEs that specify
808 permissions when the ACE is inherited.
810 inherits all inheritable ACEs without any modifications.
819 ACEs inherit the execute permission only if the file creation mode also requests
823 When the property value is set to
825 files are created with a mode determined by the inheritable ACEs.
826 If no inheritable ACEs exist that affect the mode, then the mode is set in
827 accordance to the requested mode from the application.
829 .Sy aclmode Ns = Ns Sy discard Ns | Ns Sy groupmask Ns | Ns
830 .Sy passthrough Ns | Ns Sy restricted
832 Controls how an ACL is modified during
834 and how inherited ACEs are modified by the file creation mode.
835 .Bl -tag -width "passthrough"
837 default, deletes all ACEs except for those representing the mode of the file or
838 directory requested by
841 reduces permissions granted by all
843 entries found in the ACL such that they are no greater than the group
844 permissions specified by the mode.
846 indicates that no changes are made to the ACL other than creating or updating
847 the necessary ACEs to represent the new mode of the file or directory.
851 operation to return an error when used on any file or directory which has a
852 non-trivial ACL, with entries in addition to those that represent the mode.
856 is required to change the set user ID, set group ID, or sticky bit on a file or
857 directory, as they do not have equivalent ACEs. In order to use
859 on a file or directory with a non-trivial ACL when
863 you must first remove all ACEs except for those that represent the current mode.
864 .It Sy atime Ns = Ns Sy on Ns | Ns Sy off
865 Controls whether the access time for files is updated when they are read.
866 Turning this property off avoids producing write traffic when reading files and
867 can result in significant performance gains, though it might confuse mailers
868 and other similar utilities. The default value is
870 .It Sy canmount Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy noauto
871 If this property is set to
873 the file system cannot be mounted, and is ignored by
874 .Nm zfs Cm mount Fl a .
875 Setting this property to
877 is similar to setting the
881 except that the dataset still has a normal
883 property, which can be inherited. Setting this property to
885 allows datasets to be used solely as a mechanism to inherit properties. One
887 .Sy canmount Ns = Ns Sy off
888 is to have two datasets with the same
890 so that the children of both datasets appear in the same directory, but might
891 have different inherited characteristics.
895 a dataset can only be mounted and unmounted explicitly. The dataset is not
896 mounted automatically when the dataset is created or imported, nor is it mounted
898 .Nm zfs Cm mount Fl a
899 command or unmounted by the
900 .Nm zfs Cm unmount Fl a
903 This property is not inherited.
905 .Sy checksum Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy fletcher2 Ns | Ns
906 .Sy fletcher4 Ns | Ns Sy sha256 Ns | Ns Sy noparity Ns | Ns
907 .Sy sha512 Ns | Ns Sy skein Ns | Ns Sy edonr
909 Controls the checksum used to verify data integrity. The default value is
911 which automatically selects an appropriate algorithm
914 but this may change in future releases
918 disables integrity checking on user data. The value
920 not only disables integrity but also disables maintaining parity for user data.
921 This setting is used internally by a dump device residing on a RAID-Z pool and
922 should not be used by any other dataset. Disabling checksums is
924 a recommended practice.
931 checksum algorithms require enabling the appropriate features on the
934 for more information on these algorithms.
936 Changing this property affects only newly-written data.
938 .Sy compression Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy gzip Ns | Ns
939 .Sy gzip- Ns Em N Ns | Ns Sy lz4 Ns | Ns Sy lzjb Ns | Ns Sy zle
941 Controls the compression algorithm used for this dataset.
943 Setting compression to
945 indicates that the current default compression algorithm should be used. The
946 default balances compression and decompression speed, with compression ratio and
947 is expected to work well on a wide variety of workloads. Unlike all other
948 settings for this property,
950 does not select a fixed compression type. As new compression algorithms are
951 added to ZFS and enabled on a pool, the default compression algorithm may
952 change. The current default compression algorithm is either
961 compression algorithm is a high-performance replacement for the
963 algorithm. It features significantly faster compression and decompression, as
964 well as a moderately higher compression ratio than
966 but can only be used on pools with the
972 for details on ZFS feature flags and the
978 compression algorithm is optimized for performance while providing decent data
983 compression algorithm uses the same compression as the
985 command. You can specify the
987 level by using the value
994 .Pq best compression ratio .
999 .Po which is also the default for
1005 compression algorithm compresses runs of zeros.
1007 This property can also be referred to by its shortened column name
1008 \fBcompress\fR. Changing this property affects only newly-written data.
1009 .It Sy copies Ns = Ns Sy 1 Ns | Ns Sy 2 Ns | Ns Sy 3
1010 Controls the number of copies of data stored for this dataset. These copies are
1011 in addition to any redundancy provided by the pool, for example, mirroring or
1012 RAID-Z. The copies are stored on different disks, if possible. The space used
1013 by multiple copies is charged to the associated file and dataset, changing the
1015 property and counting against quotas and reservations.
1017 Changing this property only affects newly-written data. Therefore, set this
1018 property at file system creation time by using the
1019 .Fl o Sy copies Ns = Ns Ar N
1021 .It Sy devices Ns = Ns Sy on Ns | Ns Sy off
1022 Controls whether device nodes can be opened on this file system. The default
1025 .It Sy exec Ns = Ns Sy on Ns | Ns Sy off
1026 Controls whether processes can be executed from within this file system. The
1029 .It Sy filesystem_limit Ns = Ns Em count Ns | Ns Sy none
1030 Limits the number of filesystems and volumes that can exist under this point in
1031 the dataset tree. The limit is not enforced if the user is allowed to change
1032 the limit. Setting a
1033 .Sy filesystem_limit
1036 a descendent of a filesystem that already has a
1037 .Sy filesystem_limit
1038 does not override the ancestor's
1039 .Sy filesystem_limit ,
1040 but rather imposes an additional limit. This feature must be enabled to be used
1042 .Xr zpool-features 5
1044 .It Sy mountpoint Ns = Ns Pa path Ns | Ns Sy none Ns | Ns Sy legacy
1045 Controls the mount point used for this file system. See the
1047 section for more information on how this property is used.
1051 property is changed for a file system, the file system and any children that
1052 inherit the mount point are unmounted. If the new value is
1054 then they remain unmounted. Otherwise, they are automatically remounted in the
1055 new location if the property was previously
1059 or if they were mounted before the property was changed. In addition, any shared
1060 file systems are unshared and shared in the new location.
1061 .It Sy nbmand Ns = Ns Sy on Ns | Ns Sy off
1062 Controls whether the file system should be mounted with
1064 .Pq Non Blocking mandatory locks .
1065 This is used for SMB clients. Changes to this property only take effect when the
1066 file system is umounted and remounted. See
1068 for more information on
1071 .It Sy primarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1072 Controls what is cached in the primary cache
1074 If this property is set to
1076 then both user data and metadata is cached. If this property is set to
1078 then neither user data nor metadata is cached. If this property is set to
1080 then only metadata is cached. The default value is
1082 .It Sy quota Ns = Ns Em size Ns | Ns Sy none
1083 Limits the amount of space a dataset and its descendents can consume. This
1084 property enforces a hard limit on the amount of space used. This includes all
1085 space consumed by descendents, including file systems and snapshots. Setting a
1086 quota on a descendent of a dataset that already has a quota does not override
1087 the ancestor's quota, but rather imposes an additional limit.
1089 Quotas cannot be set on volumes, as the
1091 property acts as an implicit quota.
1092 .It Sy snapshot_limit Ns = Ns Em count Ns | Ns Sy none
1093 Limits the number of snapshots that can be created on a dataset and its
1094 descendents. Setting a
1096 on a descendent of a dataset that already has a
1098 does not override the ancestor's
1099 .Sy snapshot_limit ,
1100 but rather imposes an additional limit. The limit is not enforced if the user is
1101 allowed to change the limit. For example, this means that recursive snapshots
1102 taken from the global zone are counted against each delegated dataset within
1103 a zone. This feature must be enabled to be used
1105 .Xr zpool-features 5
1107 .It Sy userquota@ Ns Em user Ns = Ns Em size Ns | Ns Sy none
1108 Limits the amount of space consumed by the specified user. User space
1109 consumption is identified by the
1110 .Sy userspace@ Ns Em user
1113 Enforcement of user quotas may be delayed by several seconds. This delay means
1114 that a user might exceed their quota before the system notices that they are
1115 over quota and begins to refuse additional writes with the
1117 error message. See the
1118 .Nm zfs Cm userspace
1119 subcommand for more information.
1121 Unprivileged users can only access their own groups' space usage. The root
1122 user, or a user who has been granted the
1126 can get and set everyone's quota.
1128 This property is not available on volumes, on file systems before version 4, or
1129 on pools before version 15. The
1130 .Sy userquota@ Ns Em ...
1131 properties are not displayed by
1132 .Nm zfs Cm get Sy all .
1133 The user's name must be appended after the
1135 symbol, using one of the following forms:
1143 .Em POSIX numeric ID
1150 .Sy joe.smith@mydomain
1158 .It Sy groupquota@ Ns Em group Ns = Ns Em size Ns | Ns Sy none
1159 Limits the amount of space consumed by the specified group. Group space
1160 consumption is identified by the
1161 .Sy groupused@ Ns Em group
1164 Unprivileged users can access only their own groups' space usage. The root
1165 user, or a user who has been granted the
1169 can get and set all groups' quotas.
1170 .It Sy readonly Ns = Ns Sy on Ns | Ns Sy off
1171 Controls whether this dataset can be modified. The default value is
1174 This property can also be referred to by its shortened column name,
1176 .It Sy recordsize Ns = Ns Em size
1177 Specifies a suggested block size for files in the file system. This property is
1178 designed solely for use with database workloads that access files in fixed-size
1179 records. ZFS automatically tunes block sizes according to internal algorithms
1180 optimized for typical access patterns.
1182 For databases that create very large files but access them in small random
1183 chunks, these algorithms may be suboptimal. Specifying a
1185 greater than or equal to the record size of the database can result in
1186 significant performance gains. Use of this property for general purpose file
1187 systems is strongly discouraged, and may adversely affect performance.
1189 The size specified must be a power of two greater than or equal to 512 and less
1190 than or equal to 128 Kbytes. If the
1192 feature is enabled on the pool, the size may be up to 1 Mbyte. See
1193 .Xr zpool-features 5
1194 for details on ZFS feature flags.
1196 Changing the file system's
1198 affects only files created afterward; existing files are unaffected.
1200 This property can also be referred to by its shortened column name,
1202 .It Sy redundant_metadata Ns = Ns Sy all Ns | Ns Sy most
1203 Controls what types of metadata are stored redundantly. ZFS stores an extra copy
1204 of metadata, so that if a single block is corrupted, the amount of user data
1205 lost is limited. This extra copy is in addition to any redundancy provided at
1207 .Pq e.g. by mirroring or RAID-Z ,
1208 and is in addition to an extra copy specified by the
1211 .Pq up to a total of 3 copies .
1212 For example if the pool is mirrored,
1213 .Sy copies Ns = Ns 2 ,
1215 .Sy redundant_metadata Ns = Ns Sy most ,
1216 then ZFS stores 6 copies of most metadata, and 4 copies of data and some
1221 ZFS stores an extra copy of all metadata. If a single on-disk block is corrupt,
1222 at worst a single block of user data
1231 ZFS stores an extra copy of most types of metadata. This can improve performance
1232 of random writes, because less metadata must be written. In practice, at worst
1238 of user data can be lost if a single on-disk block is corrupt. The exact
1239 behavior of which metadata blocks are stored redundantly may change in future
1242 The default value is
1244 .It Sy refquota Ns = Ns Em size Ns | Ns Sy none
1245 Limits the amount of space a dataset can consume. This property enforces a hard
1246 limit on the amount of space used. This hard limit does not include space used
1247 by descendents, including file systems and snapshots.
1248 .It Sy refreservation Ns = Ns Em size Ns | Ns Sy none
1249 The minimum amount of space guaranteed to a dataset, not including its
1250 descendents. When the amount of space used is below this value, the dataset is
1251 treated as if it were taking up the amount of space specified by
1252 .Sy refreservation .
1255 reservation is accounted for in the parent datasets' space used, and counts
1256 against the parent datasets' quotas and reservations.
1260 is set, a snapshot is only allowed if there is enough free pool space outside of
1261 this reservation to accommodate the current number of
1263 bytes in the dataset.
1265 This property can also be referred to by its shortened column name,
1267 .It Sy reservation Ns = Ns Em size Ns | Ns Sy none
1268 The minimum amount of space guaranteed to a dataset and its descendents. When
1269 the amount of space used is below this value, the dataset is treated as if it
1270 were taking up the amount of space specified by its reservation. Reservations
1271 are accounted for in the parent datasets' space used, and count against the
1272 parent datasets' quotas and reservations.
1274 This property can also be referred to by its shortened column name,
1276 .It Sy secondarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1277 Controls what is cached in the secondary cache
1279 If this property is set to
1281 then both user data and metadata is cached. If this property is set to
1283 then neither user data nor metadata is cached. If this property is set to
1285 then only metadata is cached. The default value is
1287 .It Sy setuid Ns = Ns Sy on Ns | Ns Sy off
1288 Controls whether the setuid bit is respected for the file system. The default
1291 .It Sy sharesmb Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1292 Controls whether the file system is shared via SMB, and what options are to be
1293 used. A file system with the
1297 is managed through traditional tools such as
1299 Otherwise, the file system is automatically shared and unshared with the
1303 commands. If the property is set to
1307 command is invoked with no options. Otherwise, the
1309 command is invoked with options equivalent to the contents of this property.
1311 Because SMB shares requires a resource name, a unique resource name is
1312 constructed from the dataset name. The constructed name is a copy of the dataset
1313 name except that the characters in the dataset name, which would be illegal in
1314 the resource name, are replaced with underscore
1316 characters. A pseudo property
1318 is also supported that allows you to replace the data set name with a specified
1319 name. The specified name is then used to replace the prefix dataset in the case
1320 of inheritance. For example, if the dataset
1323 .Sy name Ns = Ns Sy john ,
1326 has a resource name of
1329 .Em data/home/john/backups
1330 is shared, it has a resource name of
1333 When SMB shares are created, the SMB share name appears as an entry in the
1335 directory. You can use the
1339 command to display the share-level ACLs on the entries in this directory.
1343 property is changed for a dataset, the dataset and any children inheriting the
1344 property are re-shared with the new options, only if the property was previously
1347 or if they were shared before the property was changed. If the new property is
1350 the file systems are unshared.
1351 .It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1352 Controls whether the file system is shared via NFS, and what options are to be
1353 used. A file system with a
1357 is managed through traditional tools such as
1362 Otherwise, the file system is automatically shared and unshared with the
1366 commands. If the property is set to
1369 command is invoked with no options. Otherwise, the
1371 command is invoked with options equivalent to the contents of this property.
1375 property is changed for a dataset, the dataset and any children inheriting the
1376 property are re-shared with the new options, only if the property was previously
1378 or if they were shared before the property was changed. If the new property is
1380 the file systems are unshared.
1381 .It Sy logbias Ns = Ns Sy latency Ns | Ns Sy throughput
1382 Provide a hint to ZFS about handling of synchronous requests in this dataset. If
1387 ZFS will use pool log devices
1389 to handle the requests at low latency. If
1393 ZFS will not use configured pool log devices. ZFS will instead optimize
1394 synchronous operations for global pool throughput and efficient use of
1396 .It Sy snapdir Ns = Ns Sy hidden Ns | Ns Sy visible
1397 Controls whether the
1399 directory is hidden or visible in the root of the file system as discussed in
1402 section. The default value is
1404 .It Sy sync Ns = Ns Sy standard Ns | Ns Sy always Ns | Ns Sy disabled
1405 Controls the behavior of synchronous requests
1406 .Pq e.g. fsync, O_DSYNC .
1410 specified behavior of ensuring all synchronous requests are written to stable
1411 storage and all devices are flushed to ensure data is not cached by device
1413 .Pq this is the default .
1415 causes every file system transaction to be written and flushed before its
1416 system call returns. This has a large performance penalty.
1418 disables synchronous requests. File system transactions are only committed to
1419 stable storage periodically. This option will give the highest performance.
1420 However, it is very dangerous as ZFS would be ignoring the synchronous
1421 transaction demands of applications such as databases or NFS. Administrators
1422 should only use this option when the risks are understood.
1423 .It Sy version Ns = Ns Em N Ns | Ns Sy current
1424 The on-disk version of this file system, which is independent of the pool
1425 version. This property can only be set to later supported versions. See the
1428 .It Sy volsize Ns = Ns Em size
1429 For volumes, specifies the logical size of the volume. By default, creating a
1430 volume establishes a reservation of equal size. For storage pools with a version
1431 number of 9 or higher, a
1433 is set instead. Any changes to
1435 are reflected in an equivalent change to the reservation
1441 can only be set to a multiple of
1445 The reservation is kept equal to the volume's logical size to prevent unexpected
1446 behavior for consumers. Without the reservation, the volume could run out of
1447 space, resulting in undefined behavior or data corruption, depending on how the
1448 volume is used. These effects can also occur when the volume size is changed
1450 .Pq particularly when shrinking the size .
1451 Extreme care should be used when adjusting the volume size.
1453 Though not recommended, a
1456 .Qq thin provisioning
1458 can be created by specifying the
1461 .Nm zfs Cm create Fl V
1462 command, or by changing the reservation after the volume has been created. A
1464 is a volume where the reservation is less then the volume size. Consequently,
1465 writes to a sparse volume can fail with
1467 when the pool is low on space. For a sparse volume, changes to
1469 are not reflected in the reservation.
1470 .It Sy vscan Ns = Ns Sy on Ns | Ns Sy off
1471 Controls whether regular files should be scanned for viruses when a file is
1472 opened and closed. In addition to enabling this property, the virus scan
1473 service must also be enabled for virus scanning to occur. The default value is
1475 .It Sy xattr Ns = Ns Sy on Ns | Ns Sy off
1476 Controls whether extended attributes are enabled for this file system. The
1479 .It Sy zoned Ns = Ns Sy on Ns | Ns Sy off
1480 Controls whether the dataset is managed from a non-global zone. See the
1482 section for more information. The default value is
1486 The following three properties cannot be changed after the file system is
1487 created, and therefore, should be set when the file system is created. If the
1488 properties are not set with the
1492 commands, these properties are inherited from the parent dataset. If the parent
1493 dataset lacks these properties due to having been created prior to these
1494 features being supported, the new file system will have the default values for
1498 .Sy casesensitivity Ns = Ns Sy sensitive Ns | Ns
1499 .Sy insensitive Ns | Ns Sy mixed
1501 Indicates whether the file name matching algorithm used by the file system
1502 should be case-sensitive, case-insensitive, or allow a combination of both
1503 styles of matching. The default value for the
1511 file systems have case-sensitive file names.
1517 property indicates that the file system can support requests for both
1518 case-sensitive and case-insensitive matching behavior. Currently,
1519 case-insensitive matching behavior on a file system that supports mixed behavior
1520 is limited to the SMB server product. For more information about the
1522 value behavior, see the "ZFS Administration Guide".
1524 .Sy normalization Ns = Ns Sy none Ns | Ns Sy formC Ns | Ns
1525 .Sy formD Ns | Ns Sy formKC Ns | Ns Sy formKD
1527 Indicates whether the file system should perform a
1529 normalization of file names whenever two file names are compared, and which
1530 normalization algorithm should be used. File names are always stored unmodified,
1531 names are normalized as part of any comparison process. If this property is set
1532 to a legal value other than
1536 property was left unspecified, the
1538 property is automatically set to
1540 The default value of the
1544 This property cannot be changed after the file system is created.
1545 .It Sy utf8only Ns = Ns Sy on Ns | Ns Sy off
1546 Indicates whether the file system should reject file names that include
1547 characters that are not present in the
1549 character code set. If this property is explicitly set to
1551 the normalization property must either not be explicitly set or be set to
1553 The default value for the
1557 This property cannot be changed after the file system is created.
1561 .Sy casesensitivity ,
1565 properties are also new permissions that can be assigned to non-privileged users
1566 by using the ZFS delegated administration feature.
1567 .Ss "Temporary Mount Point Properties"
1568 When a file system is mounted, either through
1570 for legacy mounts or the
1572 command for normal file systems, its mount options are set according to its
1573 properties. The correlation between properties and mount options is as follows:
1575 PROPERTY MOUNT OPTION
1576 devices devices/nodevices
1579 setuid setuid/nosetuid
1583 In addition, these options can be set on a per-mount basis using the
1585 option, without affecting the property that is stored on disk. The values
1586 specified on the command line override the values stored in the dataset. The
1588 option is an alias for
1589 .Sy nodevices Ns , Ns Sy nosetuid .
1590 These properties are reported as
1594 command. If the properties are changed while the dataset is mounted, the new
1595 setting overrides any temporary settings.
1596 .Ss "User Properties"
1597 In addition to the standard native properties, ZFS supports arbitrary user
1598 properties. User properties have no effect on ZFS behavior, but applications or
1599 administrators can use them to annotate datasets
1600 .Pq file systems, volumes, and snapshots .
1602 User property names must contain a colon
1604 character to distinguish them from native properties. They may contain lowercase
1605 letters, numbers, and the following punctuation characters: colon
1613 The expected convention is that the property name is divided into two portions
1615 .Em module Ns : Ns Em property ,
1616 but this namespace is not enforced by ZFS.
1617 User property names can be at most 256 characters, and cannot begin with a dash
1620 When making programmatic use of user properties, it is strongly suggested to use
1625 component of property names to reduce the chance that two
1626 independently-developed packages use the same property name for different
1629 The values of user properties are arbitrary strings, are always inherited, and
1630 are never validated. All of the commands that operate on properties
1631 .Po Nm zfs Cm list ,
1636 can be used to manipulate both native properties and user properties. Use the
1638 command to clear a user property. If the property is not defined in any parent
1639 dataset, it is removed entirely. Property values are limited to 8192 bytes.
1640 .Ss ZFS Volumes as Swap or Dump Devices
1641 During an initial installation a swap device and dump device are created on ZFS
1642 volumes in the ZFS root pool. By default, the swap area size is based on 1/2 the
1643 size of physical memory up to 2 Gbytes. The size of the dump device depends on
1644 the kernel's requirements at installation time. Separate ZFS volumes must be
1645 used for the swap area and dump devices. Do not swap to a file on a ZFS file
1646 system. A ZFS swap file configuration is not supported.
1648 If you need to change your swap area or dump device after the system is
1649 installed or upgraded, use the
1655 All subcommands that modify state are logged persistently to the pool in their
1659 Displays a help message.
1664 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1667 Creates a new ZFS file system. The file system is automatically mounted
1670 property inherited from the parent.
1671 .Bl -tag -width "-o"
1672 .It Fl o Ar property Ns = Ns Ar value
1673 Sets the specified property as if the command
1674 .Nm zfs Cm set Ar property Ns = Ns Ar value
1675 was invoked at the same time the dataset was created. Any editable ZFS property
1676 can also be set at creation time. Multiple
1678 options can be specified. An error results if the same property is specified in
1683 Creates all the non-existing parent datasets. Datasets created in this manner
1684 are automatically mounted according to the
1686 property inherited from their parent. Any property specified on the command line
1689 option is ignored. If the target filesystem already exists, the operation
1690 completes successfully.
1696 .Op Fl b Ar blocksize
1697 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1698 .Fl V Ar size Ar volume
1700 Creates a volume of the given size. The volume is exported as a block device in
1701 .Pa /dev/zvol/{dsk,rdsk}/path ,
1704 is the name of the volume in the ZFS namespace. The size represents the logical
1705 size as exported by the device. By default, a reservation of equal size is
1709 is automatically rounded up to the nearest 128 Kbytes to ensure that the volume
1710 has an integral number of blocks regardless of
1712 .Bl -tag -width "-b"
1713 .It Fl b Ar blocksize
1715 .Fl o Sy volblocksize Ns = Ns Ar blocksize .
1716 If this option is specified in conjunction with
1717 .Fl o Sy volblocksize ,
1718 the resulting behavior is undefined.
1719 .It Fl o Ar property Ns = Ns Ar value
1720 Sets the specified property as if the
1721 .Nm zfs Cm set Ar property Ns = Ns Ar value
1722 command was invoked at the same time the dataset was created. Any editable ZFS
1723 property can also be set at creation time. Multiple
1725 options can be specified. An error results if the same property is specified in
1730 Creates all the non-existing parent datasets. Datasets created in this manner
1731 are automatically mounted according to the
1733 property inherited from their parent. Any property specified on the command line
1736 option is ignored. If the target filesystem already exists, the operation
1737 completes successfully.
1739 Creates a sparse volume with no reservation. See
1742 .Sx Native Properties
1743 section for more information about sparse volumes.
1749 .Ar filesystem Ns | Ns Ar volume
1751 Destroys the given dataset. By default, the command unshares any file systems
1752 that are currently shared, unmounts any file systems that are currently
1753 mounted, and refuses to destroy a dataset that has active dependents
1754 .Pq children or clones .
1755 .Bl -tag -width "-R"
1757 Recursively destroy all dependents, including cloned file systems outside the
1760 Force an unmount of any file systems using the
1762 command. This option has no effect on non-file systems or unmounted file
1767 deletion. No data will be deleted. This is useful in conjunction with the
1771 flags to determine what data would be deleted.
1773 Print machine-parsable verbose information about the deleted data.
1775 Recursively destroy all children.
1777 Print verbose information about the deleted data.
1780 Extreme care should be taken when applying either the
1784 options, as they can destroy large portions of a pool and cause unexpected
1785 behavior for mounted file systems in use.
1790 .Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns
1791 .Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ...
1793 The given snapshots are destroyed immediately if and only if the
1797 option would have destroyed it. Such immediate destruction would occur, for
1798 example, if the snapshot had no clones and the user-initiated reference count
1801 If a snapshot does not qualify for immediate destruction, it is marked for
1802 deferred deletion. In this state, it exists as a usable, visible snapshot until
1803 both of the preconditions listed above are met, at which point it is destroyed.
1805 An inclusive range of snapshots may be specified by separating the first and
1806 last snapshots with a percent sign. The first and/or last snapshots may be left
1807 blank, in which case the filesystem's oldest or newest snapshot will be implied.
1810 .Pq or ranges of snapshots
1811 of the same filesystem or volume may be specified in a comma-separated list of
1812 snapshots. Only the snapshot's short name
1813 .Po the part after the
1816 should be specified when using a range or comma-separated list to identify
1818 .Bl -tag -width "-R"
1820 Recursively destroy all clones of these snapshots, including the clones,
1821 snapshots, and children. If this flag is specified, the
1823 flag will have no effect.
1825 Defer snapshot deletion.
1829 deletion. No data will be deleted. This is
1830 useful in conjunction with the
1834 flags to determine what data would be deleted.
1836 Print machine-parsable verbose information about the deleted data.
1839 .Pq or mark for deferred deletion
1840 all snapshots with this name in descendent file systems.
1842 Print verbose information about the deleted data.
1844 Extreme care should be taken when applying either the
1848 options, as they can destroy large portions of a pool and cause unexpected
1849 behavior for mounted file systems in use.
1854 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
1856 The given bookmark is destroyed.
1861 .Oo Fl o Ar property Ns = Ns value Oc Ns ...
1862 .Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ...
1864 Creates snapshots with the given names. All previous modifications by successful
1865 system calls to the file system are part of the snapshots. Snapshots are taken
1866 atomically, so that all snapshots correspond to the same moment in time. See the
1868 section for details.
1869 .Bl -tag -width "-o"
1870 .It Fl o Ar property Ns = Ns Ar value
1871 Sets the specified property; see
1875 Recursively create snapshots of all descendent datasets
1883 Roll back the given dataset to a previous snapshot. When a dataset is rolled
1884 back, all data that has changed since the snapshot is discarded, and the dataset
1885 reverts to the state at the time of the snapshot. By default, the command
1886 refuses to roll back to a snapshot other than the most recent one. In order to
1887 do so, all intermediate snapshots and bookmarks must be destroyed by specifying
1894 options do not recursively destroy the child snapshots of a recursive snapshot.
1895 Only direct snapshots of the specified filesystem are destroyed by either of
1896 these options. To completely roll back a recursive snapshot, you must rollback
1897 the individual child snapshots.
1898 .Bl -tag -width "-R"
1900 Destroy any more recent snapshots and bookmarks, as well as any clones of those
1905 option to force an unmount of any clone file systems that are to be destroyed.
1907 Destroy any snapshots and bookmarks more recent than the one specified.
1913 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1914 .Ar snapshot Ar filesystem Ns | Ns Ar volume
1916 Creates a clone of the given snapshot. See the
1918 section for details. The target dataset can be located anywhere in the ZFS
1919 hierarchy, and is created as the same type as the original.
1920 .Bl -tag -width "-o"
1921 .It Fl o Ar property Ns = Ns Ar value
1922 Sets the specified property; see
1926 Creates all the non-existing parent datasets. Datasets created in this manner
1927 are automatically mounted according to the
1929 property inherited from their parent. If the target filesystem or volume already
1930 exists, the operation completes successfully.
1935 .Ar clone-filesystem
1937 Promotes a clone file system to no longer be dependent on its
1939 snapshot. This makes it possible to destroy the file system that the clone was
1940 created from. The clone parent-child dependency relationship is reversed, so
1941 that the origin file system becomes a clone of the specified file system.
1943 The snapshot that was cloned, and any snapshots previous to this snapshot, are
1944 now owned by the promoted clone. The space they use moves from the origin file
1945 system to the promoted clone, so enough space must be available to accommodate
1946 these snapshots. No new space is consumed by this operation, but the space
1947 accounting is adjusted. The promoted clone must not have any conflicting
1948 snapshot names of its own. The
1950 subcommand can be used to rename any conflicting snapshots.
1955 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1956 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1961 .Ar filesystem Ns | Ns Ar volume
1962 .Ar filesystem Ns | Ns Ar volume
1964 Renames the given dataset. The new target can be located anywhere in the ZFS
1965 hierarchy, with the exception of snapshots. Snapshots can only be renamed within
1966 the parent file system or volume. When renaming a snapshot, the parent file
1967 system of the snapshot does not need to be specified as part of the second
1968 argument. Renamed file systems can inherit new mount points, in which case they
1969 are unmounted and remounted at the new mount point.
1970 .Bl -tag -width "-a"
1972 Force unmount any filesystems that need to be unmounted in the process.
1974 Creates all the nonexistent parent datasets. Datasets created in this manner are
1975 automatically mounted according to the
1977 property inherited from their parent.
1983 .Ar snapshot Ar snapshot
1985 Recursively rename the snapshots of all descendent datasets. Snapshots are the
1986 only dataset that can be renamed recursively.
1990 .Op Fl r Ns | Ns Fl d Ar depth
1992 .Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc
1993 .Oo Fl s Ar property Oc Ns ...
1994 .Oo Fl S Ar property Oc Ns ...
1995 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
1996 .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ...
1998 Lists the property information for the given datasets in tabular form. If
1999 specified, you can list property information by the absolute pathname or the
2000 relative pathname. By default, all file systems and volumes are displayed.
2001 Snapshots are displayed if the
2008 The following fields are displayed,
2009 .Sy name Ns , Ns Sy used Ns , Ns Sy available Ns , Ns Sy referenced Ns , Ns
2011 .Bl -tag -width "-H"
2013 Used for scripting mode. Do not print headers and separate fields by a single
2014 tab instead of arbitrary white space.
2015 .It Fl S Ar property
2018 option, but sorts by property in descending order.
2020 Recursively display any children of the dataset, limiting the recursion to
2026 will display only the dataset and its direct children.
2027 .It Fl o Ar property
2028 A comma-separated list of properties to display. The property must be:
2031 One of the properties described in the
2032 .Sx Native Properties
2039 to display the dataset name
2043 to display space usage properties on file systems and volumes. This is a
2044 shortcut for specifying
2045 .Fl o Sy name Ns , Ns Sy avail Ns , Ns Sy used Ns , Ns Sy usedsnap Ns , Ns
2046 .Sy usedds Ns , Ns Sy usedrefreserv Ns , Ns Sy usedchild Fl t
2047 .Sy filesystem Ns , Ns Sy volume
2051 Display numbers in parsable
2055 Recursively display any children of the dataset on the command line.
2056 .It Fl s Ar property
2057 A property for sorting the output by column in ascending order based on the
2058 value of the property. The property must be one of the properties described in
2061 section, or the special value
2063 to sort by the dataset name. Multiple properties can be specified at one time
2066 property options. Multiple
2068 options are evaluated from left to right in decreasing order of importance. The
2069 following is a list of sorting criteria:
2072 Numeric types sort in numeric order.
2074 String types sort in alphabetical order.
2076 Types inappropriate for a row sort that row to the literal bottom, regardless of
2077 the specified ordering.
2080 If no sorting options are specified the existing behavior of
2084 A comma-separated list of types to display, where
2093 For example, specifying
2095 displays only snapshots.
2100 .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ...
2101 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2103 Sets the property or list of properties to the given value(s) for each dataset.
2104 Only some properties can be edited. See the
2106 section for more information on what properties can be set and acceptable
2107 values. Numeric values can be specified as exact values, or in a human-readable
2108 form with a suffix of
2109 .Sy B , K , M , G , T , P , E , Z
2110 .Po for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes,
2111 or zettabytes, respectively
2113 User properties can be set on snapshots. For more information, see the
2119 .Op Fl r Ns | Ns Fl d Ar depth
2121 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2122 .Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc
2123 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2124 .Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ...
2125 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Ns ...
2127 Displays properties for the given datasets. If no datasets are specified, then
2128 the command displays properties for all datasets on the system. For each
2129 property, the following columns are displayed:
2132 property Property name
2133 value Property value
2134 source Property source. Can either be local, default,
2135 temporary, inherited, or none (-).
2138 All columns are displayed by default, though this can be controlled by using the
2140 option. This command takes a comma-separated list of properties as described in
2142 .Sx Native Properties
2149 can be used to display all properties that apply to the given dataset's type
2150 .Pq filesystem, volume, snapshot, or bookmark .
2151 .Bl -tag -width "-H"
2153 Display output in a form more easily parsed by scripts. Any headers are omitted,
2154 and fields are explicitly separated by a single tab instead of an arbitrary
2157 Recursively display any children of the dataset, limiting the recursion to
2161 will display only the dataset and its direct children.
2163 A comma-separated list of columns to display.
2164 .Sy name Ns , Ns Sy property Ns , Ns Sy value Ns , Ns Sy source
2165 is the default value.
2167 Display numbers in parsable
2171 Recursively display properties for any children.
2173 A comma-separated list of sources to display. Those properties coming from a
2174 source other than those in this list are ignored. Each source must be one of the
2182 The default value is all sources.
2184 A comma-separated list of types to display, where
2198 .Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2200 Clears the specified property, causing it to be inherited from an ancestor,
2201 restored to default if no ancestor has the property set, or with the
2203 option reverted to the received value if one exists. See the
2205 section for a listing of default values, and details on which properties can be
2207 .Bl -tag -width "-r"
2209 Recursively inherit the given property for all children.
2211 Revert the property to the received value if one exists; otherwise operate as
2214 option was not specified.
2220 Displays a list of file systems that are not the most recent version.
2226 Displays a list of currently supported file system versions.
2232 .Fl a | Ar filesystem
2234 Upgrades file systems to a new on-disk version. Once this is done, the file
2235 systems will no longer be accessible on systems running older versions of the
2238 streams generated from new snapshots of these file systems cannot be accessed on
2239 systems running older versions of the software.
2241 In general, the file system version is independent of the pool version. See
2243 for information on the
2244 .Nm zpool Cm upgrade
2247 In some cases, the file system version and the pool version are interrelated and
2248 the pool version must be upgraded before the file system version can be upgraded.
2249 .Bl -tag -width "-V"
2251 Upgrade to the specified
2255 flag is not specified, this command upgrades to the most recent version. This
2256 option can only be used to increase the version number, and only up to the most
2257 recent version supported by this software.
2259 Upgrade all file systems on all imported pools.
2261 Upgrade the specified file system.
2263 Upgrade the specified file system and all descendent file systems.
2269 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2270 .Oo Fl s Ar field Oc Ns ...
2271 .Oo Fl S Ar field Oc Ns ...
2272 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2273 .Ar filesystem Ns | Ns Ar snapshot
2275 Displays space consumed by, and quotas on, each user in the specified filesystem
2276 or snapshot. This corresponds to the
2277 .Sy userused@ Ns Em user
2279 .Sy userquota@ Ns Em user
2281 .Bl -tag -width "-H"
2283 Do not print headers, use tab-delimited output.
2285 Sort by this field in reverse order. See
2288 Translate SID to POSIX ID. The POSIX ID may be ephemeral if no mapping exists.
2289 Normal POSIX interfaces
2294 perform this translation, so the
2296 option allows the output from
2297 .Nm zfs Cm userspace
2298 to be compared directly with those utilities. However,
2300 may lead to confusion if some files were created by an SMB user before a
2301 SMB-to-POSIX name mapping was established. In such a case, some files will be
2302 owned by the SMB entity and some by the POSIX entity. However, the
2304 option will report that the POSIX entity has the total usage and quota for both.
2306 Print numeric ID instead of user/group name.
2307 .It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2308 Display only the specified fields from the following set:
2313 The default is to display all fields.
2319 Sort output by this field. The
2323 flags may be specified multiple times to sort first by one field, then by
2324 another. The default is
2325 .Fl s Sy type Fl s Sy name .
2326 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2327 Print only the specified types from the following set:
2334 .Fl t Sy posixuser Ns , Ns Sy smbuser .
2335 The default can be changed to include group types.
2341 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2342 .Oo Fl s Ar field Oc Ns ...
2343 .Oo Fl S Ar field Oc Ns ...
2344 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2345 .Ar filesystem Ns | Ns Ar snapshot
2347 Displays space consumed by, and quotas on, each group in the specified
2348 filesystem or snapshot. This subcommand is identical to
2349 .Nm zfs Cm userspace ,
2350 except that the default types to display are
2351 .Fl t Sy posixgroup Ns , Ns Sy smbgroup .
2356 Displays all ZFS file systems currently mounted.
2362 .Fl a | Ar filesystem
2364 Mounts ZFS file systems.
2365 .Bl -tag -width "-O"
2367 Perform an overlay mount. See
2369 for more information.
2371 Mount all available ZFS file systems. Invoked automatically as part of the boot
2374 Mount the specified filesystem.
2376 An optional, comma-separated list of mount options to use temporarily for the
2377 duration of the mount. See the
2378 .Sx Temporary Mount Point Properties
2379 section for details.
2381 Report mount progress.
2387 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2389 Unmounts currently mounted ZFS file systems.
2390 .Bl -tag -width "-a"
2392 Unmount all available ZFS file systems. Invoked automatically as part of the
2394 .It Ar filesystem Ns | Ns Ar mountpoint
2395 Unmount the specified filesystem. The command can also be given a path to a ZFS
2396 file system mount point on the system.
2398 Forcefully unmount the file system, even if it is currently in use.
2403 .Fl a | Ar filesystem
2405 Shares available ZFS file systems.
2406 .Bl -tag -width "-a"
2408 Share all available ZFS file systems. Invoked automatically as part of the boot
2411 Share the specified filesystem according to the
2415 properties. File systems are shared when the
2424 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2426 Unshares currently shared ZFS file systems.
2427 .Bl -tag -width "-a"
2429 Unshare all available ZFS file systems. Invoked automatically as part of the
2431 .It Ar filesystem Ns | Ns Ar mountpoint
2432 Unshare the specified filesystem. The command can also be given a path to a ZFS
2433 file system shared on the system.
2438 .Ar snapshot bookmark
2440 Creates a bookmark of the given snapshot. Bookmarks mark the point in time when
2441 the snapshot was created, and can be used as the incremental source for a
2445 This feature must be enabled to be used. See
2446 .Xr zpool-features 5
2447 for details on ZFS feature flags and the
2454 .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
2457 Creates a stream representation of the second
2459 which is written to standard output. The output can be redirected to a file or
2460 to a different system
2461 .Po for example, using
2464 By default, a full stream is generated.
2465 .Bl -tag -width "-D"
2467 Generate a deduplicated stream. Blocks which would have been sent multiple times
2468 in the send stream will only be sent once. The receiving system must also
2469 support this feature to receive a deduplicated stream. This flag can be used
2470 regardless of the dataset's
2472 property, but performance will be much better if the filesystem uses a
2473 dedup-capable checksum
2477 .It Fl I Ar snapshot
2478 Generate a stream package that sends all intermediary snapshots from the first
2479 snapshot to the second snapshot. For example,
2482 .Fl i Em @a Em fs@b Ns ; Fl i Em @b Em fs@c Ns ; Fl i Em @c Em fs@d .
2483 The incremental source may be specified as with the
2486 .It Fl L, -large-block
2487 Generate a stream which may contain blocks larger than 128KB. This flag has no
2490 pool feature is disabled, or if the
2492 property of this filesystem has never been set above 128KB. The receiving system
2495 pool feature enabled as well. See
2496 .Xr zpool-features 5
2497 for details on ZFS feature flags and the
2501 Print machine-parsable verbose information about the stream package generated.
2502 .It Fl R, -replicate
2503 Generate a replication stream package, which will replicate the specified
2504 file system, and all descendent file systems, up to the named snapshot. When
2505 received, all properties, snapshots, descendent file systems, and clones are
2512 flags are used in conjunction with the
2514 flag, an incremental replication stream is generated. The current values of
2515 properties, and current snapshot and file system names are set when the stream
2518 flag is specified when this stream is received, snapshots and file systems that
2519 do not exist on the sending side are destroyed.
2521 Generate a more compact stream by using
2523 records for blocks which are stored more compactly on disk by the
2525 pool feature. This flag has no effect if the
2527 feature is disabled. The receiving system must have the
2529 feature enabled. If the
2531 feature is active on the sending system, then the receiving system must have
2532 that feature enabled as well. See
2533 .Xr zpool-features 5
2534 for details on ZFS feature flags and the
2537 .It Fl c, -compressed
2538 Generate a more compact stream by using compressed WRITE records for blocks
2539 which are compressed on disk and in memory (see the
2540 .Sy compression No property for details). If the Sy lz4_compress No feature
2541 is active on the sending system, then the receiving system must have that
2542 feature enabled as well. If the
2543 .Sy large_blocks No feature is enabled on the sending system but the Fl L
2544 option is not supplied in conjunction with
2545 .Fl c, No then the data will be decompressed before sending so it can be split
2546 into smaller block sizes.
2547 .It Fl i Ar snapshot
2548 Generate an incremental stream from the first
2550 .Pq the incremental source
2553 .Pq the incremental target .
2554 The incremental source can be specified as the last component of the snapshot
2558 character and following
2560 and it is assumed to be from the same file system as the incremental target.
2562 If the destination is a clone, the source may be the origin snapshot, which must
2565 .Em pool/fs@origin ,
2572 send. Do not generate any actual send data. This is useful in conjunction with
2577 flags to determine what data will be sent. In this case, the verbose output will
2578 be written to standard output
2579 .Po contrast with a non-dry-run, where the stream is written to standard output
2580 and the verbose output goes to standard error
2583 Include the dataset's properties in the stream. This flag is implicit when
2585 is specified. The receiving system must also support this feature.
2587 Print verbose information about the stream package generated. This information
2588 includes a per-second report of how much data has been sent.
2590 The format of the stream is committed. You will be able to receive your streams
2591 on future versions of ZFS .
2597 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
2598 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2600 Generate a send stream, which may be of a filesystem, and may be incremental
2601 from a bookmark. If the destination is a filesystem or volume, the pool must be
2602 read-only, or the filesystem must not be mounted. When the stream generated from
2603 a filesystem or volume is received, the default snapshot name will be
2605 .Bl -tag -width "-L"
2606 .It Fl L, -large-block
2607 Generate a stream which may contain blocks larger than 128KB. This flag has no
2610 pool feature is disabled, or if the
2612 property of this filesystem has never been set above 128KB. The receiving system
2615 pool feature enabled as well. See
2616 .Xr zpool-features 5
2617 for details on ZFS feature flags and the
2620 .It Fl c, -compressed
2621 Generate a more compact stream by using compressed WRITE records for blocks
2622 which are compressed on disk and in memory (see the
2623 .Sy compression No property for details). If the Sy lz4_compress No feature is
2624 active on the sending system, then the receiving system must have that feature
2625 enabled as well. If the
2626 .Sy large_blocks No feature is enabled on the sending system but the Fl L
2627 option is not supplied in conjunction with
2628 .Fl c, No then the data will be decompressed before sending so it can be split
2629 into smaller block sizes.
2631 Generate a more compact stream by using
2633 records for blocks which are stored more compactly on disk by the
2635 pool feature. This flag has no effect if the
2637 feature is disabled. The receiving system must have the
2639 feature enabled. If the
2641 feature is active on the sending system, then the receiving system must have
2642 that feature enabled as well. See
2643 .Xr zpool-features 5
2644 for details on ZFS feature flags and the
2647 .It Fl i Ar snapshot Ns | Ns Ar bookmark
2648 Generate an incremental send stream. The incremental source must be an earlier
2649 snapshot in the destination's history. It will commonly be an earlier snapshot
2650 in the destination's file system, in which case it can be specified as the last
2651 component of the name
2656 character and following
2659 If the incremental target is a clone, the incremental source can be the origin
2660 snapshot, or an earlier snapshot in the origin's filesystem, or the origin's
2668 .Ar receive_resume_token
2670 Creates a send stream which resumes an interrupted receive. The
2671 .Ar receive_resume_token
2672 is the value of this property on the filesystem
2673 or volume that was being received into. See the documentation for
2680 .Op Fl o Sy origin Ns = Ns Ar snapshot
2681 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2686 .Op Fl d Ns | Ns Fl e
2687 .Op Fl o Sy origin Ns = Ns Ar snapshot
2690 Creates a snapshot whose contents are as specified in the stream provided on
2691 standard input. If a full stream is received, then a new file system is created
2692 as well. Streams are created using the
2694 subcommand, which by default creates a full stream.
2696 can be used as an alias for
2699 If an incremental stream is received, then the destination file system must
2700 already exist, and its most recent snapshot must match the incremental stream's
2703 the destination device link is destroyed and recreated, which means the
2705 cannot be accessed during the
2709 When a snapshot replication package stream that is generated by using the
2710 .Nm zfs Cm send Fl R
2711 command is received, any snapshots that do not exist on the sending location are
2712 destroyed by using the
2713 .Nm zfs Cm destroy Fl d
2716 The name of the snapshot
2717 .Pq and file system, if a full stream is received
2718 that this subcommand creates depends on the argument type and the use of the
2724 If the argument is a snapshot name, the specified
2726 is created. If the argument is a file system or volume name, a snapshot with the
2727 same name as the sent snapshot is created within the specified
2735 options are specified, the provided target snapshot name is used exactly as
2742 options cause the file system name of the target snapshot to be determined by
2743 appending a portion of the sent snapshot's name to the specified target
2747 option is specified, all but the first element of the sent snapshot's file
2749 .Pq usually the pool name
2750 is used and any required intermediate file systems within the specified one are
2753 option is specified, then only the last element of the sent snapshot's file
2755 .Pq i.e. the name of the source file system itself
2756 is used as the target file system name.
2757 .Bl -tag -width "-F"
2759 Force a rollback of the file system to the most recent snapshot before
2760 performing the receive operation. If receiving an incremental replication stream
2761 .Po for example, one generated by
2762 .Nm zfs Cm send Fl R Op Fl i Ns | Ns Fl I
2764 destroy snapshots and file systems that do not exist on the sending side.
2766 Discard the first element of the sent snapshot's file system name, using the
2767 remaining elements to determine the name of the target file system for the new
2768 snapshot as described in the paragraph above.
2770 Discard all but the last element of the sent snapshot's file system name, using
2771 that element to determine the name of the target file system for the new
2772 snapshot as described in the paragraph above.
2774 Do not actually receive the stream. This can be useful in conjunction with the
2776 option to verify the name the receive operation would use.
2777 .It Fl o Sy origin Ns = Ns Ar snapshot
2778 Forces the stream to be received as a clone of the given snapshot.
2779 If the stream is a full send stream, this will create the filesystem
2780 described by the stream as a clone of the specified snapshot. Which
2781 snapshot was specified will not affect the success or failure of the
2782 receive, as long as the snapshot does exist. If the stream is an
2783 incremental send stream, all the normal verification will be performed.
2785 File system that is associated with the received stream is not mounted.
2787 Print verbose information about the stream and the time required to perform the
2790 If the receive is interrupted, save the partially received state, rather
2791 than deleting it. Interruption may be due to premature termination of
2793 .Po e.g. due to network failure or failure of the remote system
2794 if the stream is being read over a network connection
2796 a checksum error in the stream, termination of the
2798 process, or unclean shutdown of the system.
2800 The receive can be resumed with a stream generated by
2801 .Nm zfs Cm send Fl t Ar token ,
2805 .Sy receive_resume_token
2806 property of the filesystem or volume which is received into.
2808 To use this flag, the storage pool must have the
2809 .Sy extensible_dataset
2810 feature enabled. See
2811 .Xr zpool-features 5
2812 for details on ZFS feature flags.
2818 .Ar filesystem Ns | Ns Ar volume
2820 Abort an interrupted
2821 .Nm zfs Cm receive Fl s ,
2822 deleting its saved partially received state.
2826 .Ar filesystem Ns | Ns Ar volume
2828 Displays permissions that have been delegated on the specified filesystem or
2829 volume. See the other forms of
2831 for more information.
2836 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
2837 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
2838 .Ar setname Oc Ns ...
2839 .Ar filesystem Ns | Ns Ar volume
2844 .Fl e Ns | Ns Sy everyone
2845 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
2846 .Ar setname Oc Ns ...
2847 .Ar filesystem Ns | Ns Ar volume
2849 Delegates ZFS administration permission for the file systems to non-privileged
2851 .Bl -tag -width "-d"
2853 Allow only for the descendent file systems.
2854 .It Fl e Ns | Ns Sy everyone
2855 Specifies that the permissions be delegated to everyone.
2856 .It Fl g Ar group Ns Oo , Ns Ar group Oc Ns ...
2857 Explicitly specify that permissions are delegated to the group.
2861 only for the specified file system.
2862 .It Fl u Ar user Ns Oo , Ns Ar user Oc Ns ...
2863 Explicitly specify that permissions are delegated to the user.
2864 .It Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
2865 Specifies to whom the permissions are delegated. Multiple entities can be
2866 specified as a comma-separated list. If neither of the
2868 options are specified, then the argument is interpreted preferentially as the
2871 then as a user name, and lastly as a group name. To specify a user or group
2878 options. To specify a group with the same name as a user, use the
2882 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
2883 .Ar setname Oc Ns ...
2885 The permissions to delegate. Multiple permissions may be specified as a
2886 comma-separated list. Permission names are the same as ZFS subcommand and
2887 property names. See the property list below. Property set names,
2890 may be specified. See the
2892 form below for details.
2897 options are specified, or both are, then the permissions are allowed for the
2898 file system or volume, and all of its descendents.
2900 Permissions are generally the ability to use a ZFS subcommand or change a ZFS
2901 property. The following permissions are available:
2904 allow subcommand Must also have the permission that is being
2906 clone subcommand Must also have the 'create' ability and 'mount'
2907 ability in the origin file system
2908 create subcommand Must also have the 'mount' ability
2909 destroy subcommand Must also have the 'mount' ability
2910 diff subcommand Allows lookup of paths within a dataset
2911 given an object number, and the ability to
2912 create snapshots necessary to 'zfs diff'.
2913 mount subcommand Allows mount/umount of ZFS datasets
2914 promote subcommand Must also have the 'mount'
2915 and 'promote' ability in the origin file system
2916 receive subcommand Must also have the 'mount' and 'create' ability
2917 rename subcommand Must also have the 'mount' and 'create'
2918 ability in the new parent
2919 rollback subcommand Must also have the 'mount' ability
2921 share subcommand Allows sharing file systems over NFS or SMB
2923 snapshot subcommand Must also have the 'mount' ability
2925 groupquota other Allows accessing any groupquota@... property
2926 groupused other Allows reading any groupused@... property
2927 userprop other Allows changing any user property
2928 userquota other Allows accessing any userquota@... property
2929 userused other Allows reading any userused@... property
2935 casesensitivity property
2937 compression property
2941 filesystem_limit property
2944 normalization property
2945 primarycache property
2950 refreservation property
2951 reservation property
2952 secondarycache property
2957 snapshot_limit property
2960 volblocksize property
2970 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
2971 .Ar setname Oc Ns ...
2972 .Ar filesystem Ns | Ns Ar volume
2976 permissions. These permissions are granted
2978 to the creator of any newly-created descendent file system.
2982 .Fl s No @ Ns Ar setname
2983 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
2984 .Ar setname Oc Ns ...
2985 .Ar filesystem Ns | Ns Ar volume
2987 Defines or adds permissions to a permission set. The set can be used by other
2989 commands for the specified file system and its descendents. Sets are evaluated
2990 dynamically, so changes to a set are immediately reflected. Permission sets
2991 follow the same naming restrictions as ZFS file systems, but the name must begin
2994 and can be no more than 64 characters long.
2999 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3000 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3001 .Ar setname Oc Ns ... Oc
3002 .Ar filesystem Ns | Ns Ar volume
3007 .Fl e Ns | Ns Sy everyone
3008 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3009 .Ar setname Oc Ns ... Oc
3010 .Ar filesystem Ns | Ns Ar volume
3016 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3017 .Ar setname Oc Ns ... Oc
3018 .Ar filesystem Ns | Ns Ar volume
3020 Removes permissions that were granted with the
3022 command. No permissions are explicitly denied, so other permissions granted are
3023 still in effect. For example, if the permission is granted by an ancestor. If no
3024 permissions are specified, then all permissions for the specified
3029 are removed. Specifying
3035 only removes the permissions that were granted to everyone, not all permissions
3036 for every user and group. See the
3038 command for a description of the
3041 .Bl -tag -width "-r"
3043 Recursively remove the permissions from this file system and all descendents.
3049 .Fl s No @ Ns Ar setname
3050 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3051 .Ar setname Oc Ns ... Oc
3052 .Ar filesystem Ns | Ns Ar volume
3054 Removes permissions from a permission set. If no permissions are specified, then
3055 all permissions are removed, thus removing the set entirely.
3060 .Ar tag Ar snapshot Ns ...
3062 Adds a single reference, named with the
3064 argument, to the specified snapshot or snapshots. Each snapshot has its own tag
3065 namespace, and tags must be unique within that space.
3067 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3071 .Bl -tag -width "-r"
3073 Specifies that a hold with the given tag is applied recursively to the snapshots
3074 of all descendent file systems.
3082 Lists all existing user references for the given snapshot or snapshots.
3083 .Bl -tag -width "-r"
3085 Lists the holds that are set on the named descendent snapshots, in addition to
3086 listing the holds on the named snapshot.
3092 .Ar tag Ar snapshot Ns ...
3094 Removes a single reference, named with the
3096 argument, from the specified snapshot or snapshots. The tag must already exist
3097 for each snapshot. If a hold exists on a snapshot, attempts to destroy that
3098 snapshot by using the
3102 .Bl -tag -width "-r"
3104 Recursively releases a hold with the given tag on the snapshots of all
3105 descendent file systems.
3111 .Ar snapshot Ar snapshot Ns | Ns Ar filesystem
3113 Display the difference between a snapshot of a given filesystem and another
3114 snapshot of that filesystem from a later time or the current contents of the
3115 filesystem. The first column is a character indicating the type of change, the
3116 other columns indicate pathname, new pathname
3117 .Pq in case of rename ,
3118 change in link count, and optionally file type and/or change time. The types of
3121 - The path has been removed
3122 + The path has been created
3123 M The path has been modified
3124 R The path has been renamed
3126 .Bl -tag -width "-F"
3128 Display an indication of the type of file, in a manner similar to the
3144 Give more parsable tab-separated output, without header lines and without
3147 Display the path's inode change time as the first column of output.
3153 utility exits 0 on success, 1 if an error occurs, and 2 if invalid command line
3154 options were specified.
3157 .It Sy Example 1 No Creating a ZFS File System Hierarchy
3158 The following commands create a file system named
3160 and a file system named
3164 is set for the parent file system, and is automatically inherited by the child
3167 # zfs create pool/home
3168 # zfs set mountpoint=/export/home pool/home
3169 # zfs create pool/home/bob
3171 .It Sy Example 2 No Creating a ZFS Snapshot
3172 The following command creates a snapshot named
3174 This snapshot is mounted on demand in the
3176 directory at the root of the
3180 # zfs snapshot pool/home/bob@yesterday
3182 .It Sy Example 3 No Creating and Destroying Multiple Snapshots
3183 The following command creates snapshots named
3187 and all of its descendent file systems. Each snapshot is mounted on demand in
3190 directory at the root of its file system. The second command destroys the newly
3193 # zfs snapshot -r pool/home@yesterday
3194 # zfs destroy -r pool/home@yesterday
3196 .It Sy Example 4 No Disabling and Enabling File System Compression
3197 The following command disables the
3199 property for all file systems under
3201 The next command explicitly enables
3204 .Em pool/home/anne .
3206 # zfs set compression=off pool/home
3207 # zfs set compression=on pool/home/anne
3209 .It Sy Example 5 No Listing ZFS Datasets
3210 The following command lists all active file systems and volumes in the system.
3211 Snapshots are displayed if the
3219 for more information on pool properties.
3222 NAME USED AVAIL REFER MOUNTPOINT
3223 pool 450K 457G 18K /pool
3224 pool/home 315K 457G 21K /export/home
3225 pool/home/anne 18K 457G 18K /export/home/anne
3226 pool/home/bob 276K 457G 276K /export/home/bob
3228 .It Sy Example 6 No Setting a Quota on a ZFS File System
3229 The following command sets a quota of 50 Gbytes for
3232 # zfs set quota=50G pool/home/bob
3234 .It Sy Example 7 No Listing ZFS Properties
3235 The following command lists all properties for
3238 # zfs get all pool/home/bob
3239 NAME PROPERTY VALUE SOURCE
3240 pool/home/bob type filesystem -
3241 pool/home/bob creation Tue Jul 21 15:53 2009 -
3242 pool/home/bob used 21K -
3243 pool/home/bob available 20.0G -
3244 pool/home/bob referenced 21K -
3245 pool/home/bob compressratio 1.00x -
3246 pool/home/bob mounted yes -
3247 pool/home/bob quota 20G local
3248 pool/home/bob reservation none default
3249 pool/home/bob recordsize 128K default
3250 pool/home/bob mountpoint /pool/home/bob default
3251 pool/home/bob sharenfs off default
3252 pool/home/bob checksum on default
3253 pool/home/bob compression on local
3254 pool/home/bob atime on default
3255 pool/home/bob devices on default
3256 pool/home/bob exec on default
3257 pool/home/bob setuid on default
3258 pool/home/bob readonly off default
3259 pool/home/bob zoned off default
3260 pool/home/bob snapdir hidden default
3261 pool/home/bob aclmode discard default
3262 pool/home/bob aclinherit restricted default
3263 pool/home/bob canmount on default
3264 pool/home/bob xattr on default
3265 pool/home/bob copies 1 default
3266 pool/home/bob version 4 -
3267 pool/home/bob utf8only off -
3268 pool/home/bob normalization none -
3269 pool/home/bob casesensitivity sensitive -
3270 pool/home/bob vscan off default
3271 pool/home/bob nbmand off default
3272 pool/home/bob sharesmb off default
3273 pool/home/bob refquota none default
3274 pool/home/bob refreservation none default
3275 pool/home/bob primarycache all default
3276 pool/home/bob secondarycache all default
3277 pool/home/bob usedbysnapshots 0 -
3278 pool/home/bob usedbydataset 21K -
3279 pool/home/bob usedbychildren 0 -
3280 pool/home/bob usedbyrefreservation 0 -
3283 The following command gets a single property value.
3285 # zfs get -H -o value compression pool/home/bob
3288 The following command lists all properties with local settings for
3291 # zfs get -r -s local -o name,property,value all pool/home/bob
3293 pool/home/bob quota 20G
3294 pool/home/bob compression on
3296 .It Sy Example 8 No Rolling Back a ZFS File System
3297 The following command reverts the contents of
3299 to the snapshot named
3301 deleting all intermediate snapshots.
3303 # zfs rollback -r pool/home/anne@yesterday
3305 .It Sy Example 9 No Creating a ZFS Clone
3306 The following command creates a writable file system whose initial contents are
3308 .Em pool/home/bob@yesterday .
3310 # zfs clone pool/home/bob@yesterday pool/clone
3312 .It Sy Example 10 No Promoting a ZFS Clone
3313 The following commands illustrate how to test out changes to a file system, and
3314 then replace the original file system with the changed one, using clones, clone
3315 promotion, and renaming:
3317 # zfs create pool/project/production
3318 populate /pool/project/production with data
3319 # zfs snapshot pool/project/production@today
3320 # zfs clone pool/project/production@today pool/project/beta
3321 make changes to /pool/project/beta and test them
3322 # zfs promote pool/project/beta
3323 # zfs rename pool/project/production pool/project/legacy
3324 # zfs rename pool/project/beta pool/project/production
3325 once the legacy version is no longer needed, it can be destroyed
3326 # zfs destroy pool/project/legacy
3328 .It Sy Example 11 No Inheriting ZFS Properties
3329 The following command causes
3335 property from their parent.
3337 # zfs inherit checksum pool/home/bob pool/home/anne
3339 .It Sy Example 12 No Remotely Replicating ZFS Data
3340 The following commands send a full stream and then an incremental stream to a
3341 remote machine, restoring them into
3342 .Em poolB/received/fs@a
3344 .Em poolB/received/fs@b ,
3347 must contain the file system
3348 .Em poolB/received ,
3349 and must not initially contain
3350 .Em poolB/received/fs .
3352 # zfs send pool/fs@a | \e
3353 ssh host zfs receive poolB/received/fs@a
3354 # zfs send -i a pool/fs@b | \e
3355 ssh host zfs receive poolB/received/fs
3357 .It Sy Example 13 No Using the zfs receive -d Option
3358 The following command sends a full stream of
3359 .Em poolA/fsA/fsB@snap
3360 to a remote machine, receiving it into
3361 .Em poolB/received/fsA/fsB@snap .
3364 portion of the received snapshot's name is determined from the name of the sent
3367 must contain the file system
3368 .Em poolB/received .
3370 .Em poolB/received/fsA
3371 does not exist, it is created as an empty file system.
3373 # zfs send poolA/fsA/fsB@snap | \e
3374 ssh host zfs receive -d poolB/received
3376 .It Sy Example 14 No Setting User Properties
3377 The following example sets the user-defined
3378 .Sy com.example:department
3379 property for a dataset.
3381 # zfs set com.example:department=12345 tank/accounting
3383 .It Sy Example 15 No Performing a Rolling Snapshot
3384 The following example shows how to maintain a history of snapshots with a
3385 consistent naming scheme. To keep a week's worth of snapshots, the user
3386 destroys the oldest snapshot, renames the remaining snapshots, and then creates
3387 a new snapshot, as follows:
3389 # zfs destroy -r pool/users@7daysago
3390 # zfs rename -r pool/users@6daysago @7daysago
3391 # zfs rename -r pool/users@5daysago @6daysago
3392 # zfs rename -r pool/users@yesterday @5daysago
3393 # zfs rename -r pool/users@yesterday @4daysago
3394 # zfs rename -r pool/users@yesterday @3daysago
3395 # zfs rename -r pool/users@yesterday @2daysago
3396 # zfs rename -r pool/users@today @yesterday
3397 # zfs snapshot -r pool/users@today
3399 .It Sy Example 16 No Setting sharenfs Property Options on a ZFS File System
3400 The following commands show how to set
3402 property options to enable
3406 addresses and to enable root access for system
3412 # zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home
3417 for host name resolution, specify the fully qualified hostname.
3418 .It Sy Example 17 No Delegating ZFS Administration Permissions on a ZFS Dataset
3419 The following example shows how to set permissions so that user
3421 can create, destroy, mount, and take snapshots on
3427 # zfs allow cindys create,destroy,mount,snapshot tank/cindys
3428 # zfs allow tank/cindys
3429 ---- Permissions on tank/cindys --------------------------------------
3430 Local+Descendent permissions:
3431 user cindys create,destroy,mount,snapshot
3436 mount point permission is set to 755 by default, user
3438 will be unable to mount file systems under
3440 Add an ACE similar to the following syntax to provide mount point access:
3442 # chmod A+user:cindys:add_subdirectory:allow /tank/cindys
3444 .It Sy Example 18 No Delegating Create Time Permissions on a ZFS Dataset
3445 The following example shows how to grant anyone in the group
3447 to create file systems in
3449 This syntax also allows staff members to destroy their own file systems, but not
3450 destroy anyone else's file system. The permissions on
3454 # zfs allow staff create,mount tank/users
3455 # zfs allow -c destroy tank/users
3456 # zfs allow tank/users
3457 ---- Permissions on tank/users ---------------------------------------
3460 Local+Descendent permissions:
3461 group staff create,mount
3463 .It Sy Example 19 No Defining and Granting a Permission Set on a ZFS Dataset
3464 The following example shows how to define and grant a permission set on the
3466 file system. The permissions on
3470 # zfs allow -s @pset create,destroy,snapshot,mount tank/users
3471 # zfs allow staff @pset tank/users
3472 # zfs allow tank/users
3473 ---- Permissions on tank/users ---------------------------------------
3475 @pset create,destroy,mount,snapshot
3476 Local+Descendent permissions:
3479 .It Sy Example 20 No Delegating Property Permissions on a ZFS Dataset
3480 The following example shows to grant the ability to set quotas and reservations
3483 file system. The permissions on
3487 # zfs allow cindys quota,reservation users/home
3488 # zfs allow users/home
3489 ---- Permissions on users/home ---------------------------------------
3490 Local+Descendent permissions:
3491 user cindys quota,reservation
3492 cindys% zfs set quota=10G users/home/marks
3493 cindys% zfs get quota users/home/marks
3494 NAME PROPERTY VALUE SOURCE
3495 users/home/marks quota 10G local
3497 .It Sy Example 21 No Removing ZFS Delegated Permissions on a ZFS Dataset
3498 The following example shows how to remove the snapshot permission from the
3502 file system. The permissions on
3506 # zfs unallow staff snapshot tank/users
3507 # zfs allow tank/users
3508 ---- Permissions on tank/users ---------------------------------------
3510 @pset create,destroy,mount,snapshot
3511 Local+Descendent permissions:
3514 .It Sy Example 22 No Showing the differences between a snapshot and a ZFS Dataset
3515 The following example shows how to see what has changed between a prior
3516 snapshot of a ZFS dataset and its current state. The
3518 option is used to indicate type information for the files affected.
3520 # zfs diff -F tank/test@before tank/test
3522 M F /tank/test/linked (+1)
3523 R F /tank/test/oldname -> /tank/test/newname
3524 - F /tank/test/deleted
3525 + F /tank/test/created
3526 M F /tank/test/modified
3529 .Sh INTERFACE STABILITY