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.
276 pool/{filesystem,volume,snapshot}
279 where the maximum length of a dataset name is
283 A dataset can be one of the following:
284 .Bl -tag -width "file system"
286 A ZFS dataset of type
288 can be mounted within the standard system namespace and behaves like other file
290 While ZFS file systems are designed to be POSIX compliant, known issues exist
291 that prevent compliance in some cases.
292 Applications that depend on standards conformance might fail due to non-standard
293 behavior when checking file system free space.
295 A logical volume exported as a raw or block device.
296 This type of dataset should only be used under special circumstances.
297 File systems are typically used in most environments.
299 A read-only version of a file system or volume at a given point in time.
301 .Ar filesystem Ns @ Ns Ar name
303 .Ar volume Ns @ Ns Ar name .
305 .Ss ZFS File System Hierarchy
306 A ZFS storage pool is a logical collection of devices that provide space for
308 A storage pool is also the root of the ZFS file system hierarchy.
310 The root of the pool can be accessed as a file system, such as mounting and
311 unmounting, taking snapshots, and setting properties.
312 The physical storage characteristics, however, are managed by the
318 for more information on creating and administering pools.
320 A snapshot is a read-only copy of a file system or volume.
321 Snapshots can be created extremely quickly, and initially consume no additional
322 space within the pool.
323 As data within the active dataset changes, the snapshot consumes more data than
324 would otherwise be shared with the active dataset.
326 Snapshots can have arbitrary names.
327 Snapshots of volumes can be cloned or rolled back, but cannot be accessed
330 File system snapshots can be accessed under the
332 directory in the root of the file system.
333 Snapshots are automatically mounted on demand and may be unmounted at regular
335 The visibility of the
337 directory can be controlled by the
341 A clone is a writable volume or file system whose initial contents are the same
343 As with snapshots, creating a clone is nearly instantaneous, and initially
344 consumes no additional space.
346 Clones can only be created from a snapshot.
347 When a snapshot is cloned, it creates an implicit dependency between the parent
349 Even though the clone is created somewhere else in the dataset hierarchy, the
350 original snapshot cannot be destroyed as long as a clone exists.
353 property exposes this dependency, and the
355 command lists any such dependencies, if they exist.
357 The clone parent-child dependency relationship can be reversed by using the
362 file system to become a clone of the specified file system, which makes it
363 possible to destroy the file system that the clone was created from.
365 Creating a ZFS file system is a simple operation, so the number of file systems
366 per system is likely to be numerous.
367 To cope with this, ZFS automatically manages mounting and unmounting file
368 systems without the need to edit the
371 All automatically managed file systems are mounted by ZFS at boot time.
373 By default, file systems are mounted under
377 is the name of the file system in the ZFS namespace.
378 Directories are created and destroyed as needed.
380 A file system can also have a mount point set in the
383 This directory is created as needed, and ZFS automatically mounts the file
385 .Nm zfs Cm mount Fl a
392 property can be inherited, so if
398 automatically inherits a mount point of
399 .Pa /export/stuff/user .
405 prevents the file system from being mounted.
407 If needed, ZFS file systems can also be managed with traditional tools
413 If a file system's mount point is set to
415 ZFS makes no attempt to manage the file system, and the administrator is
416 responsible for mounting and unmounting the file system.
418 A ZFS file system can be added to a non-global zone by using the
419 .Nm zonecfg Cm add Sy fs
421 A ZFS file system that is added to a non-global zone must have its
426 The physical properties of an added file system are controlled by the global
428 However, the zone administrator can create, modify, or destroy files within the
429 added file system, depending on how the file system is mounted.
431 A dataset can also be delegated to a non-global zone by using the
432 .Nm zonecfg Cm add Sy dataset
434 You cannot delegate a dataset to one zone and the children of the same dataset
436 The zone administrator can change properties of the dataset or any of its
443 properties of the delegated dataset can be modified only by the global
446 A ZFS volume can be added as a device to a non-global zone by using the
447 .Nm zonecfg Cm add Sy device
449 However, its physical properties can be modified only by the global
452 For more information about
457 After a dataset is delegated to a non-global zone, the
459 property is automatically set.
460 A zoned file system cannot be mounted in the global zone, since the zone
461 administrator might have to set the mount point to an unacceptable value.
463 The global administrator can forcibly clear the
465 property, though this should be done with extreme care.
466 The global administrator should verify that all the mount points are acceptable
467 before clearing the property.
468 .Ss Native Properties
469 Properties are divided into two types, native properties and user-defined
474 Native properties either export internal statistics or control ZFS behavior.
475 In addition, native properties are either editable or read-only.
476 User properties have no effect on ZFS behavior, but you can use them to annotate
477 datasets in a way that is meaningful in your environment.
478 For more information about user properties, see the
482 Every dataset has a set of properties that export statistics about the dataset
483 as well as control various behaviors.
484 Properties are inherited from the parent unless overridden by the child.
485 Some properties apply only to certain types of datasets
486 .Pq file systems, volumes, or snapshots .
488 The values of numeric properties can be specified using human-readable suffixes
498 The following are all valid
501 .Li 1536M, 1.5g, 1.50GB .
503 The values of non-numeric properties are case sensitive and must be lowercase,
510 The following native properties consist of read-only statistics about the
512 These properties can be neither set, nor inherited.
513 Native properties apply to all dataset types unless otherwise noted.
514 .Bl -tag -width "usedbyrefreservation"
516 The amount of space available to the dataset and all its children, assuming that
517 there is no other activity in the pool.
518 Because space is shared within a pool, availability can be limited by any number
519 of factors, including physical pool size, quotas, reservations, or other
520 datasets within the pool.
522 This property can also be referred to by its shortened column name,
525 For non-snapshots, the compression ratio achieved for the
527 space of this dataset, expressed as a multiplier.
530 property includes descendant datasets, and, for clones, does not include the
531 space shared with the origin snapshot.
537 Compression can be turned on by running:
538 .Nm zfs Cm set Sy compression Ns = Ns Sy on Ar dataset .
542 The time this dataset was created.
544 For snapshots, this property is a comma-separated list of filesystems or volumes
545 which are clones of this snapshot.
548 property is this snapshot.
551 property is not empty, then this snapshot can not be destroyed
561 if the snapshot has been marked for deferred destroy by using the
562 .Nm zfs Cm destroy Fl d
564 Otherwise, the property is
566 .It Sy filesystem_count
567 The total number of filesystems and volumes that exist under this location in
569 This value is only available when a
571 has been set somewhere in the tree under which the dataset resides.
572 .It Sy logicalreferenced
573 The amount of space that is
575 accessible by this dataset.
579 The logical space ignores the effect of the
583 properties, giving a quantity closer to the amount of data that applications
585 However, it does include space consumed by metadata.
587 This property can also be referred to by its shortened column name,
590 The amount of space that is
592 consumed by this dataset and all its descendents.
596 The logical space ignores the effect of the
600 properties, giving a quantity closer to the amount of data that applications
602 However, it does include space consumed by metadata.
604 This property can also be referred to by its shortened column name,
607 For file systems, indicates whether the file system is currently mounted.
608 This property can be either
613 For cloned file systems or volumes, the snapshot from which the clone was
618 .It Sy receive_resume_token
619 For filesystems or volumes which have saved partially-completed state from
621 this opaque token can be provided to
623 to resume and complete the
626 The amount of data that is accessible by this dataset, which may or may not be
627 shared with other datasets in the pool.
628 When a snapshot or clone is created, it initially references the same amount of
629 space as the file system or snapshot it was created from, since its contents are
632 This property can also be referred to by its shortened column name,
634 .It Sy refcompressratio
635 The compression ratio achieved for the
637 space of this dataset, expressed as a multiplier.
641 .It Sy snapshot_count
642 The total number of snapshots that exist under this location in the dataset
644 This value is only available when a
646 has been set somewhere in the tree under which the dataset resides.
654 The amount of space consumed by this dataset and all its descendents.
655 This is the value that is checked against this dataset's quota and reservation.
656 The space used does not include this dataset's reservation, but does take into
657 account the reservations of any descendent datasets.
658 The amount of space that a dataset consumes from its parent, as well as the
659 amount of space that is freed if this dataset is recursively destroyed, is the
660 greater of its space used and its reservation.
662 The used space of a snapshot
667 is space that is referenced exclusively by this snapshot.
668 If this snapshot is destroyed, the amount of
671 Space that is shared by multiple snapshots isn't accounted for in this metric.
672 When a snapshot is destroyed, space that was previously shared with this
673 snapshot can become unique to snapshots adjacent to it, thus changing the used
674 space of those snapshots.
675 The used space of the latest snapshot can also be affected by changes in the
679 space of a snapshot is a subset of the
681 space of the snapshot.
683 The amount of space used, available, or referenced does not take into account
685 Pending changes are generally accounted for within a few seconds.
686 Committing a change to a disk using
690 does not necessarily guarantee that the space usage information is updated
695 properties decompose the
697 properties into the various reasons that space is used.
700 .Sy usedbychildren No +
701 .Sy usedbydataset No +
702 .Sy usedbyrefreservation No +
703 .Sy usedbysnapshots .
704 These properties are only available for datasets created on
708 .It Sy usedbychildren
709 The amount of space used by children of this dataset, which would be freed if
710 all the dataset's children were destroyed.
712 The amount of space used by this dataset itself, which would be freed if the
713 dataset were destroyed
714 .Po after first removing any
716 and destroying any necessary snapshots or descendents
718 .It Sy usedbyrefreservation
719 The amount of space used by a
721 set on this dataset, which would be freed if the
724 .It Sy usedbysnapshots
725 The amount of space consumed by snapshots of this dataset.
726 In particular, it is the amount of space that would be freed if all of this
727 dataset's snapshots were destroyed.
728 Note that this is not simply the sum of the snapshots'
730 properties because space can be shared by multiple snapshots.
731 .It Sy userused Ns @ Ns Em user
732 The amount of space consumed by the specified user in this dataset.
733 Space is charged to the owner of each file, as displayed by
735 The amount of space charged is displayed by
741 subcommand for more information.
743 Unprivileged users can access only their own space usage.
744 The root user, or a user who has been granted the
748 can access everyone's usage.
751 .Sy userused Ns @ Ns Em ...
752 properties are not displayed by
753 .Nm zfs Cm get Sy all .
754 The user's name must be appended after the @ symbol, using one of the following
756 .Bl -bullet -width ""
770 .Sy joe.smith@mydomain
779 This property is set to the number of user holds on this snapshot.
780 User holds are set by using the
783 .It Sy groupused Ns @ Ns Em group
784 The amount of space consumed by the specified group in this dataset.
785 Space is charged to the group of each file, as displayed by
788 .Sy userused Ns @ Ns Em user
789 property for more information.
791 Unprivileged users can only access their own groups' space usage.
792 The root user, or a user who has been granted the
796 can access all groups' usage.
798 For volumes, specifies the block size of the volume.
801 cannot be changed once the volume has been written, so it should be set at
802 volume creation time.
805 for volumes is 8 Kbytes.
806 Any power of 2 from 512 bytes to 128 Kbytes is valid.
808 This property can also be referred to by its shortened column name,
813 by this dataset, that was written since the previous snapshot
814 .Pq i.e. that is not referenced by the previous snapshot .
815 .It Sy written Ns @ Ns Em snapshot
818 space written to this dataset since the specified snapshot.
819 This is the space that is referenced by this dataset but was not referenced by
820 the specified snapshot.
824 may be specified as a short snapshot name
825 .Po just the part after the
828 in which case it will be interpreted as a snapshot in the same filesystem as
832 may be a full snapshot name
833 .Po Em filesystem Ns @ Ns Em snapshot Pc ,
834 which for clones may be a snapshot in the origin's filesystem
835 .Pq or the origin of the origin's filesystem, etc.
838 The following native properties can be used to change the behavior of a ZFS
842 .Sy aclinherit Ns = Ns Sy discard Ns | Ns Sy noallow Ns | Ns
843 .Sy restricted Ns | Ns Sy passthrough Ns | Ns Sy passthrough-x
845 Controls how ACEs are inherited when files and directories are created.
846 .Bl -tag -width "passthrough-x"
848 does not inherit any ACEs.
850 only inherits inheritable ACEs that specify
858 permissions when the ACE is inherited.
860 inherits all inheritable ACEs without any modifications.
869 ACEs inherit the execute permission only if the file creation mode also requests
873 When the property value is set to
875 files are created with a mode determined by the inheritable ACEs.
876 If no inheritable ACEs exist that affect the mode, then the mode is set in
877 accordance to the requested mode from the application.
879 .Sy aclmode Ns = Ns Sy discard Ns | Ns Sy groupmask Ns | Ns
880 .Sy passthrough Ns | Ns Sy restricted
882 Controls how an ACL is modified during
884 and how inherited ACEs are modified by the file creation mode.
885 .Bl -tag -width "passthrough"
887 default, deletes all ACEs except for those representing the mode of the file or
888 directory requested by
891 reduces permissions granted by all
893 entries found in the ACL such that they are no greater than the group
894 permissions specified by the mode.
896 indicates that no changes are made to the ACL other than creating or updating
897 the necessary ACEs to represent the new mode of the file or directory.
901 operation to return an error when used on any file or directory which has a
902 non-trivial ACL, with entries in addition to those that represent the mode.
906 is required to change the set user ID, set group ID, or sticky bit on a file or
907 directory, as they do not have equivalent ACEs.
910 on a file or directory with a non-trivial ACL when
914 you must first remove all ACEs except for those that represent the current mode.
915 .It Sy atime Ns = Ns Sy on Ns | Ns Sy off
916 Controls whether the access time for files is updated when they are read.
917 Turning this property off avoids producing write traffic when reading files and
918 can result in significant performance gains, though it might confuse mailers
919 and other similar utilities.
922 .It Sy canmount Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy noauto
923 If this property is set to
925 the file system cannot be mounted, and is ignored by
926 .Nm zfs Cm mount Fl a .
927 Setting this property to
929 is similar to setting the
933 except that the dataset still has a normal
935 property, which can be inherited.
936 Setting this property to
938 allows datasets to be used solely as a mechanism to inherit properties.
939 One example of setting
940 .Sy canmount Ns = Ns Sy off
941 is to have two datasets with the same
943 so that the children of both datasets appear in the same directory, but might
944 have different inherited characteristics.
948 a dataset can only be mounted and unmounted explicitly.
949 The dataset is not mounted automatically when the dataset is created or
950 imported, nor is it mounted by the
951 .Nm zfs Cm mount Fl a
952 command or unmounted by the
953 .Nm zfs Cm unmount Fl a
956 This property is not inherited.
958 .Sy checksum Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy fletcher2 Ns | Ns
959 .Sy fletcher4 Ns | Ns Sy sha256 Ns | Ns Sy noparity Ns | Ns
960 .Sy sha512 Ns | Ns Sy skein Ns | Ns Sy edonr
962 Controls the checksum used to verify data integrity.
965 which automatically selects an appropriate algorithm
968 but this may change in future releases
972 disables integrity checking on user data.
975 not only disables integrity but also disables maintaining parity for user data.
976 This setting is used internally by a dump device residing on a RAID-Z pool and
977 should not be used by any other dataset.
978 Disabling checksums is
980 a recommended practice.
987 checksum algorithms require enabling the appropriate features on the pool.
990 for more information on these algorithms.
992 Changing this property affects only newly-written data.
994 .Sy compression Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy gzip Ns | Ns
995 .Sy gzip- Ns Em N Ns | Ns Sy lz4 Ns | Ns Sy lzjb Ns | Ns Sy zle
997 Controls the compression algorithm used for this dataset.
999 Setting compression to
1001 indicates that the current default compression algorithm should be used.
1002 The default balances compression and decompression speed, with compression ratio
1003 and is expected to work well on a wide variety of workloads.
1004 Unlike all other settings for this property,
1006 does not select a fixed compression type.
1007 As new compression algorithms are added to ZFS and enabled on a pool, the
1008 default compression algorithm may change.
1009 The current default compression algorithm is either
1018 compression algorithm is a high-performance replacement for the
1021 It features significantly faster compression and decompression, as well as a
1022 moderately higher compression ratio than
1024 but can only be used on pools with the
1029 .Xr zpool-features 5
1030 for details on ZFS feature flags and the
1036 compression algorithm is optimized for performance while providing decent data
1041 compression algorithm uses the same compression as the
1046 level by using the value
1050 is an integer from 1
1053 .Pq best compression ratio .
1058 .Po which is also the default for
1064 compression algorithm compresses runs of zeros.
1066 This property can also be referred to by its shortened column name
1068 Changing this property affects only newly-written data.
1069 .It Sy copies Ns = Ns Sy 1 Ns | Ns Sy 2 Ns | Ns Sy 3
1070 Controls the number of copies of data stored for this dataset.
1071 These copies are in addition to any redundancy provided by the pool, for
1072 example, mirroring or RAID-Z.
1073 The copies are stored on different disks, if possible.
1074 The space used by multiple copies is charged to the associated file and dataset,
1077 property and counting against quotas and reservations.
1079 Changing this property only affects newly-written data.
1080 Therefore, set this property at file system creation time by using the
1081 .Fl o Sy copies Ns = Ns Ar N
1083 .It Sy devices Ns = Ns Sy on Ns | Ns Sy off
1084 Controls whether device nodes can be opened on this file system.
1085 The default value is
1087 .It Sy exec Ns = Ns Sy on Ns | Ns Sy off
1088 Controls whether processes can be executed from within this file system.
1089 The default value is
1091 .It Sy filesystem_limit Ns = Ns Em count Ns | Ns Sy none
1092 Limits the number of filesystems and volumes that can exist under this point in
1094 The limit is not enforced if the user is allowed to change the limit.
1096 .Sy filesystem_limit
1099 a descendent of a filesystem that already has a
1100 .Sy filesystem_limit
1101 does not override the ancestor's
1102 .Sy filesystem_limit ,
1103 but rather imposes an additional limit.
1104 This feature must be enabled to be used
1106 .Xr zpool-features 5
1108 .It Sy mountpoint Ns = Ns Pa path Ns | Ns Sy none Ns | Ns Sy legacy
1109 Controls the mount point used for this file system.
1112 section for more information on how this property is used.
1116 property is changed for a file system, the file system and any children that
1117 inherit the mount point are unmounted.
1120 then they remain unmounted.
1121 Otherwise, they are automatically remounted in the new location if the property
1126 or if they were mounted before the property was changed.
1127 In addition, any shared file systems are unshared and shared in the new
1129 .It Sy nbmand Ns = Ns Sy on Ns | Ns Sy off
1130 Controls whether the file system should be mounted with
1132 .Pq Non Blocking mandatory locks .
1133 This is used for SMB clients.
1134 Changes to this property only take effect when the file system is umounted and
1138 for more information on
1141 .It Sy primarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1142 Controls what is cached in the primary cache
1144 If this property is set to
1146 then both user data and metadata is cached.
1147 If this property is set to
1149 then neither user data nor metadata is cached.
1150 If this property is set to
1152 then only metadata is cached.
1153 The default value is
1155 .It Sy quota Ns = Ns Em size Ns | Ns Sy none
1156 Limits the amount of space a dataset and its descendents can consume.
1157 This property enforces a hard limit on the amount of space used.
1158 This includes all space consumed by descendents, including file systems and
1160 Setting a quota on a descendent of a dataset that already has a quota does not
1161 override the ancestor's quota, but rather imposes an additional limit.
1163 Quotas cannot be set on volumes, as the
1165 property acts as an implicit quota.
1166 .It Sy snapshot_limit Ns = Ns Em count Ns | Ns Sy none
1167 Limits the number of snapshots that can be created on a dataset and its
1171 on a descendent of a dataset that already has a
1173 does not override the ancestor's
1174 .Sy snapshot_limit ,
1175 but rather imposes an additional limit.
1176 The limit is not enforced if the user is allowed to change the limit.
1177 For example, this means that recursive snapshots taken from the global zone are
1178 counted against each delegated dataset within a zone.
1179 This feature must be enabled to be used
1181 .Xr zpool-features 5
1183 .It Sy userquota@ Ns Em user Ns = Ns Em size Ns | Ns Sy none
1184 Limits the amount of space consumed by the specified user.
1185 User space consumption is identified by the
1186 .Sy userspace@ Ns Em user
1189 Enforcement of user quotas may be delayed by several seconds.
1190 This delay means that a user might exceed their quota before the system notices
1191 that they are over quota and begins to refuse additional writes with the
1195 .Nm zfs Cm userspace
1196 subcommand for more information.
1198 Unprivileged users can only access their own groups' space usage.
1199 The root user, or a user who has been granted the
1203 can get and set everyone's quota.
1205 This property is not available on volumes, on file systems before version 4, or
1206 on pools before version 15.
1208 .Sy userquota@ Ns Em ...
1209 properties are not displayed by
1210 .Nm zfs Cm get Sy all .
1211 The user's name must be appended after the
1213 symbol, using one of the following forms:
1221 .Em POSIX numeric ID
1228 .Sy joe.smith@mydomain
1236 .It Sy groupquota@ Ns Em group Ns = Ns Em size Ns | Ns Sy none
1237 Limits the amount of space consumed by the specified group.
1238 Group space consumption is identified by the
1239 .Sy groupused@ Ns Em group
1242 Unprivileged users can access only their own groups' space usage.
1243 The root user, or a user who has been granted the
1247 can get and set all groups' quotas.
1248 .It Sy readonly Ns = Ns Sy on Ns | Ns Sy off
1249 Controls whether this dataset can be modified.
1250 The default value is
1253 This property can also be referred to by its shortened column name,
1255 .It Sy recordsize Ns = Ns Em size
1256 Specifies a suggested block size for files in the file system.
1257 This property is designed solely for use with database workloads that access
1258 files in fixed-size records.
1259 ZFS automatically tunes block sizes according to internal algorithms optimized
1260 for typical access patterns.
1262 For databases that create very large files but access them in small random
1263 chunks, these algorithms may be suboptimal.
1266 greater than or equal to the record size of the database can result in
1267 significant performance gains.
1268 Use of this property for general purpose file systems is strongly discouraged,
1269 and may adversely affect performance.
1271 The size specified must be a power of two greater than or equal to 512 and less
1272 than or equal to 128 Kbytes.
1275 feature is enabled on the pool, the size may be up to 1 Mbyte.
1277 .Xr zpool-features 5
1278 for details on ZFS feature flags.
1280 Changing the file system's
1282 affects only files created afterward; existing files are unaffected.
1284 This property can also be referred to by its shortened column name,
1286 .It Sy redundant_metadata Ns = Ns Sy all Ns | Ns Sy most
1287 Controls what types of metadata are stored redundantly.
1288 ZFS stores an extra copy of metadata, so that if a single block is corrupted,
1289 the amount of user data lost is limited.
1290 This extra copy is in addition to any redundancy provided at the pool level
1291 .Pq e.g. by mirroring or RAID-Z ,
1292 and is in addition to an extra copy specified by the
1295 .Pq up to a total of 3 copies .
1296 For example if the pool is mirrored,
1297 .Sy copies Ns = Ns 2 ,
1299 .Sy redundant_metadata Ns = Ns Sy most ,
1300 then ZFS stores 6 copies of most metadata, and 4 copies of data and some
1305 ZFS stores an extra copy of all metadata.
1306 If a single on-disk block is corrupt, at worst a single block of user data
1315 ZFS stores an extra copy of most types of metadata.
1316 This can improve performance of random writes, because less metadata must be
1318 In practice, at worst about 100 blocks
1323 of user data can be lost if a single on-disk block is corrupt.
1324 The exact behavior of which metadata blocks are stored redundantly may change in
1327 The default value is
1329 .It Sy refquota Ns = Ns Em size Ns | Ns Sy none
1330 Limits the amount of space a dataset can consume.
1331 This property enforces a hard limit on the amount of space used.
1332 This hard limit does not include space used by descendents, including file
1333 systems and snapshots.
1334 .It Sy refreservation Ns = Ns Em size Ns | Ns Sy none
1335 The minimum amount of space guaranteed to a dataset, not including its
1337 When the amount of space used is below this value, the dataset is treated as if
1338 it were taking up the amount of space specified by
1339 .Sy refreservation .
1342 reservation is accounted for in the parent datasets' space used, and counts
1343 against the parent datasets' quotas and reservations.
1347 is set, a snapshot is only allowed if there is enough free pool space outside of
1348 this reservation to accommodate the current number of
1350 bytes in the dataset.
1352 This property can also be referred to by its shortened column name,
1354 .It Sy reservation Ns = Ns Em size Ns | Ns Sy none
1355 The minimum amount of space guaranteed to a dataset and its descendents.
1356 When the amount of space used is below this value, the dataset is treated as if
1357 it were taking up the amount of space specified by its reservation.
1358 Reservations are accounted for in the parent datasets' space used, and count
1359 against the parent datasets' quotas and reservations.
1361 This property can also be referred to by its shortened column name,
1363 .It Sy secondarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1364 Controls what is cached in the secondary cache
1366 If this property is set to
1368 then both user data and metadata is cached.
1369 If this property is set to
1371 then neither user data nor metadata is cached.
1372 If this property is set to
1374 then only metadata is cached.
1375 The default value is
1377 .It Sy setuid Ns = Ns Sy on Ns | Ns Sy off
1378 Controls whether the setuid bit is respected for the file system.
1379 The default value is
1381 .It Sy sharesmb Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1382 Controls whether the file system is shared via SMB, and what options are to be
1384 A file system with the
1388 is managed through traditional tools such as
1390 Otherwise, the file system is automatically shared and unshared with the
1395 If the property is set to
1399 command is invoked with no options.
1402 command is invoked with options equivalent to the contents of this property.
1404 Because SMB shares requires a resource name, a unique resource name is
1405 constructed from the dataset name.
1406 The constructed name is a copy of the dataset name except that the characters in
1407 the dataset name, which would be illegal in the resource name, are replaced with
1413 is also supported that allows you to replace the data set name with a specified
1415 The specified name is then used to replace the prefix dataset in the case of
1417 For example, if the dataset
1420 .Sy name Ns = Ns Sy john ,
1423 has a resource name of
1426 .Em data/home/john/backups
1427 is shared, it has a resource name of
1430 When SMB shares are created, the SMB share name appears as an entry in the
1437 command to display the share-level ACLs on the entries in this directory.
1441 property is changed for a dataset, the dataset and any children inheriting the
1442 property are re-shared with the new options, only if the property was previously
1445 or if they were shared before the property was changed.
1446 If the new property is set to
1448 the file systems are unshared.
1449 .It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1450 Controls whether the file system is shared via NFS, and what options are to be
1452 A file system with a
1456 is managed through traditional tools such as
1461 Otherwise, the file system is automatically shared and unshared with the
1466 If the property is set to
1469 command is invoked with no options.
1472 command is invoked with options equivalent to the contents of this property.
1476 property is changed for a dataset, the dataset and any children inheriting the
1477 property are re-shared with the new options, only if the property was previously
1479 or if they were shared before the property was changed.
1480 If the new property is
1482 the file systems are unshared.
1483 .It Sy logbias Ns = Ns Sy latency Ns | Ns Sy throughput
1484 Provide a hint to ZFS about handling of synchronous requests in this dataset.
1490 ZFS will use pool log devices
1492 to handle the requests at low latency.
1497 ZFS will not use configured pool log devices.
1498 ZFS will instead optimize synchronous operations for global pool throughput and
1499 efficient use of resources.
1500 .It Sy snapdir Ns = Ns Sy hidden Ns | Ns Sy visible
1501 Controls whether the
1503 directory is hidden or visible in the root of the file system as discussed in
1507 The default value is
1509 .It Sy sync Ns = Ns Sy standard Ns | Ns Sy always Ns | Ns Sy disabled
1510 Controls the behavior of synchronous requests
1511 .Pq e.g. fsync, O_DSYNC .
1515 specified behavior of ensuring all synchronous requests are written to stable
1516 storage and all devices are flushed to ensure data is not cached by device
1518 .Pq this is the default .
1520 causes every file system transaction to be written and flushed before its
1521 system call returns.
1522 This has a large performance penalty.
1524 disables synchronous requests.
1525 File system transactions are only committed to stable storage periodically.
1526 This option will give the highest performance.
1527 However, it is very dangerous as ZFS would be ignoring the synchronous
1528 transaction demands of applications such as databases or NFS.
1529 Administrators should only use this option when the risks are understood.
1530 .It Sy version Ns = Ns Em N Ns | Ns Sy current
1531 The on-disk version of this file system, which is independent of the pool
1533 This property can only be set to later supported versions.
1537 .It Sy volsize Ns = Ns Em size
1538 For volumes, specifies the logical size of the volume.
1539 By default, creating a volume establishes a reservation of equal size.
1540 For storage pools with a version number of 9 or higher, a
1545 are reflected in an equivalent change to the reservation
1551 can only be set to a multiple of
1555 The reservation is kept equal to the volume's logical size to prevent unexpected
1556 behavior for consumers.
1557 Without the reservation, the volume could run out of space, resulting in
1558 undefined behavior or data corruption, depending on how the volume is used.
1559 These effects can also occur when the volume size is changed while it is in use
1560 .Pq particularly when shrinking the size .
1561 Extreme care should be used when adjusting the volume size.
1563 Though not recommended, a
1566 .Qq thin provisioning
1568 can be created by specifying the
1571 .Nm zfs Cm create Fl V
1572 command, or by changing the reservation after the volume has been created.
1575 is a volume where the reservation is less then the volume size.
1576 Consequently, writes to a sparse volume can fail with
1578 when the pool is low on space.
1579 For a sparse volume, changes to
1581 are not reflected in the reservation.
1582 .It Sy vscan Ns = Ns Sy on Ns | Ns Sy off
1583 Controls whether regular files should be scanned for viruses when a file is
1585 In addition to enabling this property, the virus scan service must also be
1586 enabled for virus scanning to occur.
1587 The default value is
1589 .It Sy xattr Ns = Ns Sy on Ns | Ns Sy off
1590 Controls whether extended attributes are enabled for this file system.
1591 The default value is
1593 .It Sy zoned Ns = Ns Sy on Ns | Ns Sy off
1594 Controls whether the dataset is managed from a non-global zone.
1597 section for more information.
1598 The default value is
1602 The following three properties cannot be changed after the file system is
1603 created, and therefore, should be set when the file system is created.
1604 If the properties are not set with the
1608 commands, these properties are inherited from the parent dataset.
1609 If the parent dataset lacks these properties due to having been created prior to
1610 these features being supported, the new file system will have the default values
1611 for these properties.
1614 .Sy casesensitivity Ns = Ns Sy sensitive Ns | Ns
1615 .Sy insensitive Ns | Ns Sy mixed
1617 Indicates whether the file name matching algorithm used by the file system
1618 should be case-sensitive, case-insensitive, or allow a combination of both
1620 The default value for the
1628 file systems have case-sensitive file names.
1634 property indicates that the file system can support requests for both
1635 case-sensitive and case-insensitive matching behavior.
1636 Currently, case-insensitive matching behavior on a file system that supports
1637 mixed behavior is limited to the SMB server product.
1638 For more information about the
1640 value behavior, see the "ZFS Administration Guide".
1642 .Sy normalization Ns = Ns Sy none Ns | Ns Sy formC Ns | Ns
1643 .Sy formD Ns | Ns Sy formKC Ns | Ns Sy formKD
1645 Indicates whether the file system should perform a
1647 normalization of file names whenever two file names are compared, and which
1648 normalization algorithm should be used.
1649 File names are always stored unmodified, names are normalized as part of any
1651 If this property is set to a legal value other than
1655 property was left unspecified, the
1657 property is automatically set to
1659 The default value of the
1663 This property cannot be changed after the file system is created.
1664 .It Sy utf8only Ns = Ns Sy on Ns | Ns Sy off
1665 Indicates whether the file system should reject file names that include
1666 characters that are not present in the
1669 If this property is explicitly set to
1671 the normalization property must either not be explicitly set or be set to
1673 The default value for the
1677 This property cannot be changed after the file system is created.
1681 .Sy casesensitivity ,
1685 properties are also new permissions that can be assigned to non-privileged users
1686 by using the ZFS delegated administration feature.
1687 .Ss "Temporary Mount Point Properties"
1688 When a file system is mounted, either through
1690 for legacy mounts or the
1692 command for normal file systems, its mount options are set according to its
1694 The correlation between properties and mount options is as follows:
1696 PROPERTY MOUNT OPTION
1697 devices devices/nodevices
1700 setuid setuid/nosetuid
1704 In addition, these options can be set on a per-mount basis using the
1706 option, without affecting the property that is stored on disk.
1707 The values specified on the command line override the values stored in the
1711 option is an alias for
1712 .Sy nodevices Ns , Ns Sy nosetuid .
1713 These properties are reported as
1718 If the properties are changed while the dataset is mounted, the new setting
1719 overrides any temporary settings.
1720 .Ss "User Properties"
1721 In addition to the standard native properties, ZFS supports arbitrary user
1723 User properties have no effect on ZFS behavior, but applications or
1724 administrators can use them to annotate datasets
1725 .Pq file systems, volumes, and snapshots .
1727 User property names must contain a colon
1729 character to distinguish them from native properties.
1730 They may contain lowercase letters, numbers, and the following punctuation
1739 The expected convention is that the property name is divided into two portions
1741 .Em module Ns : Ns Em property ,
1742 but this namespace is not enforced by ZFS.
1743 User property names can be at most 256 characters, and cannot begin with a dash
1746 When making programmatic use of user properties, it is strongly suggested to use
1751 component of property names to reduce the chance that two
1752 independently-developed packages use the same property name for different
1755 The values of user properties are arbitrary strings, are always inherited, and
1756 are never validated.
1757 All of the commands that operate on properties
1758 .Po Nm zfs Cm list ,
1763 can be used to manipulate both native properties and user properties.
1766 command to clear a user property.
1767 If the property is not defined in any parent dataset, it is removed entirely.
1768 Property values are limited to 8192 bytes.
1769 .Ss ZFS Volumes as Swap or Dump Devices
1770 During an initial installation a swap device and dump device are created on ZFS
1771 volumes in the ZFS root pool.
1772 By default, the swap area size is based on 1/2 the size of physical memory up to
1774 The size of the dump device depends on the kernel's requirements at installation
1776 Separate ZFS volumes must be used for the swap area and dump devices.
1777 Do not swap to a file on a ZFS file system.
1778 A ZFS swap file configuration is not supported.
1780 If you need to change your swap area or dump device after the system is
1781 installed or upgraded, use the
1787 All subcommands that modify state are logged persistently to the pool in their
1791 Displays a help message.
1796 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1799 Creates a new ZFS file system.
1800 The file system is automatically mounted according to the
1802 property inherited from the parent.
1803 .Bl -tag -width "-o"
1804 .It Fl o Ar property Ns = Ns Ar value
1805 Sets the specified property as if the command
1806 .Nm zfs Cm set Ar property Ns = Ns Ar value
1807 was invoked at the same time the dataset was created.
1808 Any editable ZFS property can also be set at creation time.
1811 options can be specified.
1812 An error results if the same property is specified in multiple
1816 Creates all the non-existing parent datasets.
1817 Datasets created in this manner are automatically mounted according to the
1819 property inherited from their parent.
1820 Any property specified on the command line using the
1823 If the target filesystem already exists, the operation completes successfully.
1829 .Op Fl b Ar blocksize
1830 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1831 .Fl V Ar size Ar volume
1833 Creates a volume of the given size.
1834 The volume is exported as a block device in
1835 .Pa /dev/zvol/{dsk,rdsk}/path ,
1838 is the name of the volume in the ZFS namespace.
1839 The size represents the logical size as exported by the device.
1840 By default, a reservation of equal size is created.
1843 is automatically rounded up to the nearest 128 Kbytes to ensure that the volume
1844 has an integral number of blocks regardless of
1846 .Bl -tag -width "-b"
1847 .It Fl b Ar blocksize
1849 .Fl o Sy volblocksize Ns = Ns Ar blocksize .
1850 If this option is specified in conjunction with
1851 .Fl o Sy volblocksize ,
1852 the resulting behavior is undefined.
1853 .It Fl o Ar property Ns = Ns Ar value
1854 Sets the specified property as if the
1855 .Nm zfs Cm set Ar property Ns = Ns Ar value
1856 command was invoked at the same time the dataset was created.
1857 Any editable ZFS property can also be set at creation time.
1860 options can be specified.
1861 An error results if the same property is specified in multiple
1865 Creates all the non-existing parent datasets.
1866 Datasets created in this manner are automatically mounted according to the
1868 property inherited from their parent.
1869 Any property specified on the command line using the
1872 If the target filesystem already exists, the operation completes successfully.
1874 Creates a sparse volume with no reservation.
1878 .Sx Native Properties
1879 section for more information about sparse volumes.
1885 .Ar filesystem Ns | Ns Ar volume
1887 Destroys the given dataset.
1888 By default, the command unshares any file systems that are currently shared,
1889 unmounts any file systems that are currently mounted, and refuses to destroy a
1890 dataset that has active dependents
1891 .Pq children or clones .
1892 .Bl -tag -width "-R"
1894 Recursively destroy all dependents, including cloned file systems outside the
1897 Force an unmount of any file systems using the
1900 This option has no effect on non-file systems or unmounted file systems.
1905 No data will be deleted.
1906 This is useful in conjunction with the
1910 flags to determine what data would be deleted.
1912 Print machine-parsable verbose information about the deleted data.
1914 Recursively destroy all children.
1916 Print verbose information about the deleted data.
1919 Extreme care should be taken when applying either the
1923 options, as they can destroy large portions of a pool and cause unexpected
1924 behavior for mounted file systems in use.
1929 .Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns
1930 .Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ...
1932 The given snapshots are destroyed immediately if and only if the
1936 option would have destroyed it.
1937 Such immediate destruction would occur, for example, if the snapshot had no
1938 clones and the user-initiated reference count were zero.
1940 If a snapshot does not qualify for immediate destruction, it is marked for
1942 In this state, it exists as a usable, visible snapshot until both of the
1943 preconditions listed above are met, at which point it is destroyed.
1945 An inclusive range of snapshots may be specified by separating the first and
1946 last snapshots with a percent sign.
1947 The first and/or last snapshots may be left blank, in which case the
1948 filesystem's oldest or newest snapshot will be implied.
1951 .Pq or ranges of snapshots
1952 of the same filesystem or volume may be specified in a comma-separated list of
1954 Only the snapshot's short name
1955 .Po the part after the
1958 should be specified when using a range or comma-separated list to identify
1960 .Bl -tag -width "-R"
1962 Recursively destroy all clones of these snapshots, including the clones,
1963 snapshots, and children.
1964 If this flag is specified, the
1966 flag will have no effect.
1968 Defer snapshot deletion.
1973 No data will be deleted.
1974 This is useful in conjunction with the
1978 flags to determine what data would be deleted.
1980 Print machine-parsable verbose information about the deleted data.
1983 .Pq or mark for deferred deletion
1984 all snapshots with this name in descendent file systems.
1986 Print verbose information about the deleted data.
1988 Extreme care should be taken when applying either the
1992 options, as they can destroy large portions of a pool and cause unexpected
1993 behavior for mounted file systems in use.
1998 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
2000 The given bookmark is destroyed.
2005 .Oo Fl o Ar property Ns = Ns value Oc Ns ...
2006 .Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ...
2008 Creates snapshots with the given names.
2009 All previous modifications by successful system calls to the file system are
2010 part of the snapshots.
2011 Snapshots are taken atomically, so that all snapshots correspond to the same
2015 section for details.
2016 .Bl -tag -width "-o"
2017 .It Fl o Ar property Ns = Ns Ar value
2018 Sets the specified property; see
2022 Recursively create snapshots of all descendent datasets
2030 Roll back the given dataset to a previous snapshot.
2031 When a dataset is rolled back, all data that has changed since the snapshot is
2032 discarded, and the dataset reverts to the state at the time of the snapshot.
2033 By default, the command refuses to roll back to a snapshot other than the most
2035 In order to do so, all intermediate snapshots and bookmarks must be destroyed by
2042 options do not recursively destroy the child snapshots of a recursive snapshot.
2043 Only direct snapshots of the specified filesystem are destroyed by either of
2045 To completely roll back a recursive snapshot, you must rollback the individual
2047 .Bl -tag -width "-R"
2049 Destroy any more recent snapshots and bookmarks, as well as any clones of those
2054 option to force an unmount of any clone file systems that are to be destroyed.
2056 Destroy any snapshots and bookmarks more recent than the one specified.
2062 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
2063 .Ar snapshot Ar filesystem Ns | Ns Ar volume
2065 Creates a clone of the given snapshot.
2068 section for details.
2069 The target dataset can be located anywhere in the ZFS hierarchy, and is created
2070 as the same type as the original.
2071 .Bl -tag -width "-o"
2072 .It Fl o Ar property Ns = Ns Ar value
2073 Sets the specified property; see
2077 Creates all the non-existing parent datasets.
2078 Datasets created in this manner are automatically mounted according to the
2080 property inherited from their parent.
2081 If the target filesystem or volume already exists, the operation completes
2087 .Ar clone-filesystem
2089 Promotes a clone file system to no longer be dependent on its
2092 This makes it possible to destroy the file system that the clone was created
2094 The clone parent-child dependency relationship is reversed, so that the origin
2095 file system becomes a clone of the specified file system.
2097 The snapshot that was cloned, and any snapshots previous to this snapshot, are
2098 now owned by the promoted clone.
2099 The space they use moves from the origin file system to the promoted clone, so
2100 enough space must be available to accommodate these snapshots.
2101 No new space is consumed by this operation, but the space accounting is
2103 The promoted clone must not have any conflicting snapshot names of its own.
2106 subcommand can be used to rename any conflicting snapshots.
2111 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2112 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2117 .Ar filesystem Ns | Ns Ar volume
2118 .Ar filesystem Ns | Ns Ar volume
2120 Renames the given dataset.
2121 The new target can be located anywhere in the ZFS hierarchy, with the exception
2123 Snapshots can only be renamed within the parent file system or volume.
2124 When renaming a snapshot, the parent file system of the snapshot does not need
2125 to be specified as part of the second argument.
2126 Renamed file systems can inherit new mount points, in which case they are
2127 unmounted and remounted at the new mount point.
2128 .Bl -tag -width "-a"
2130 Force unmount any filesystems that need to be unmounted in the process.
2132 Creates all the nonexistent parent datasets.
2133 Datasets created in this manner are automatically mounted according to the
2135 property inherited from their parent.
2141 .Ar snapshot Ar snapshot
2143 Recursively rename the snapshots of all descendent datasets.
2144 Snapshots are the only dataset that can be renamed recursively.
2148 .Op Fl r Ns | Ns Fl d Ar depth
2150 .Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc
2151 .Oo Fl s Ar property Oc Ns ...
2152 .Oo Fl S Ar property Oc Ns ...
2153 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2154 .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ...
2156 Lists the property information for the given datasets in tabular form.
2157 If specified, you can list property information by the absolute pathname or the
2159 By default, all file systems and volumes are displayed.
2160 Snapshots are displayed if the
2167 The following fields are displayed,
2168 .Sy name Ns , Ns Sy used Ns , Ns Sy available Ns , Ns Sy referenced Ns , Ns
2170 .Bl -tag -width "-H"
2172 Used for scripting mode.
2173 Do not print headers and separate fields by a single tab instead of arbitrary
2175 .It Fl S Ar property
2178 option, but sorts by property in descending order.
2180 Recursively display any children of the dataset, limiting the recursion to
2186 will display only the dataset and its direct children.
2187 .It Fl o Ar property
2188 A comma-separated list of properties to display.
2189 The property must be:
2192 One of the properties described in the
2193 .Sx Native Properties
2200 to display the dataset name
2204 to display space usage properties on file systems and volumes.
2205 This is a shortcut for specifying
2206 .Fl o Sy name Ns , Ns Sy avail Ns , Ns Sy used Ns , Ns Sy usedsnap Ns , Ns
2207 .Sy usedds Ns , Ns Sy usedrefreserv Ns , Ns Sy usedchild Fl t
2208 .Sy filesystem Ns , Ns Sy volume
2212 Display numbers in parsable
2216 Recursively display any children of the dataset on the command line.
2217 .It Fl s Ar property
2218 A property for sorting the output by column in ascending order based on the
2219 value of the property.
2220 The property must be one of the properties described in the
2222 section, or the special value
2224 to sort by the dataset name.
2225 Multiple properties can be specified at one time using multiple
2230 options are evaluated from left to right in decreasing order of importance.
2231 The following is a list of sorting criteria:
2234 Numeric types sort in numeric order.
2236 String types sort in alphabetical order.
2238 Types inappropriate for a row sort that row to the literal bottom, regardless of
2239 the specified ordering.
2242 If no sorting options are specified the existing behavior of
2246 A comma-separated list of types to display, where
2255 For example, specifying
2257 displays only snapshots.
2262 .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ...
2263 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2265 Sets the property or list of properties to the given value(s) for each dataset.
2266 Only some properties can be edited.
2269 section for more information on what properties can be set and acceptable
2271 Numeric values can be specified as exact values, or in a human-readable form
2273 .Sy B , K , M , G , T , P , E , Z
2274 .Po for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes,
2275 or zettabytes, respectively
2277 User properties can be set on snapshots.
2278 For more information, see the
2284 .Op Fl r Ns | Ns Fl d Ar depth
2286 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2287 .Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc
2288 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2289 .Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ...
2290 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Ns ...
2292 Displays properties for the given datasets.
2293 If no datasets are specified, then the command displays properties for all
2294 datasets on the system.
2295 For each property, the following columns are displayed:
2298 property Property name
2299 value Property value
2300 source Property source. Can either be local, default,
2301 temporary, inherited, or none (-).
2304 All columns are displayed by default, though this can be controlled by using the
2307 This command takes a comma-separated list of properties as described in the
2308 .Sx Native Properties
2315 can be used to display all properties that apply to the given dataset's type
2316 .Pq filesystem, volume, snapshot, or bookmark .
2317 .Bl -tag -width "-H"
2319 Display output in a form more easily parsed by scripts.
2320 Any headers are omitted, and fields are explicitly separated by a single tab
2321 instead of an arbitrary amount of space.
2323 Recursively display any children of the dataset, limiting the recursion to
2327 will display only the dataset and its direct children.
2329 A comma-separated list of columns to display.
2330 .Sy name Ns , Ns Sy property Ns , Ns Sy value Ns , Ns Sy source
2331 is the default value.
2333 Display numbers in parsable
2337 Recursively display properties for any children.
2339 A comma-separated list of sources to display.
2340 Those properties coming from a source other than those in this list are ignored.
2341 Each source must be one of the following:
2348 The default value is all sources.
2350 A comma-separated list of types to display, where
2364 .Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2366 Clears the specified property, causing it to be inherited from an ancestor,
2367 restored to default if no ancestor has the property set, or with the
2369 option reverted to the received value if one exists.
2372 section for a listing of default values, and details on which properties can be
2374 .Bl -tag -width "-r"
2376 Recursively inherit the given property for all children.
2378 Revert the property to the received value if one exists; otherwise operate as
2381 option was not specified.
2387 Displays a list of file systems that are not the most recent version.
2393 Displays a list of currently supported file system versions.
2399 .Fl a | Ar filesystem
2401 Upgrades file systems to a new on-disk version.
2402 Once this is done, the file systems will no longer be accessible on systems
2403 running older versions of the software.
2405 streams generated from new snapshots of these file systems cannot be accessed on
2406 systems running older versions of the software.
2408 In general, the file system version is independent of the pool version.
2411 for information on the
2412 .Nm zpool Cm upgrade
2415 In some cases, the file system version and the pool version are interrelated and
2416 the pool version must be upgraded before the file system version can be
2418 .Bl -tag -width "-V"
2420 Upgrade to the specified
2424 flag is not specified, this command upgrades to the most recent version.
2426 option can only be used to increase the version number, and only up to the most
2427 recent version supported by this software.
2429 Upgrade all file systems on all imported pools.
2431 Upgrade the specified file system.
2433 Upgrade the specified file system and all descendent file systems.
2439 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2440 .Oo Fl s Ar field Oc Ns ...
2441 .Oo Fl S Ar field Oc Ns ...
2442 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2443 .Ar filesystem Ns | Ns Ar snapshot
2445 Displays space consumed by, and quotas on, each user in the specified filesystem
2447 This corresponds to the
2448 .Sy userused@ Ns Em user
2450 .Sy userquota@ Ns Em user
2452 .Bl -tag -width "-H"
2454 Do not print headers, use tab-delimited output.
2456 Sort by this field in reverse order.
2460 Translate SID to POSIX ID.
2461 The POSIX ID may be ephemeral if no mapping exists.
2462 Normal POSIX interfaces
2467 perform this translation, so the
2469 option allows the output from
2470 .Nm zfs Cm userspace
2471 to be compared directly with those utilities.
2474 may lead to confusion if some files were created by an SMB user before a
2475 SMB-to-POSIX name mapping was established.
2476 In such a case, some files will be owned by the SMB entity and some by the POSIX
2480 option will report that the POSIX entity has the total usage and quota for both.
2482 Print numeric ID instead of user/group name.
2483 .It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2484 Display only the specified fields from the following set:
2489 The default is to display all fields.
2495 Sort output by this field.
2500 flags may be specified multiple times to sort first by one field, then by
2503 .Fl s Sy type Fl s Sy name .
2504 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2505 Print only the specified types from the following set:
2512 .Fl t Sy posixuser Ns , Ns Sy smbuser .
2513 The default can be changed to include group types.
2519 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2520 .Oo Fl s Ar field Oc Ns ...
2521 .Oo Fl S Ar field Oc Ns ...
2522 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2523 .Ar filesystem Ns | Ns Ar snapshot
2525 Displays space consumed by, and quotas on, each group in the specified
2526 filesystem or snapshot.
2527 This subcommand is identical to
2528 .Nm zfs Cm userspace ,
2529 except that the default types to display are
2530 .Fl t Sy posixgroup Ns , Ns Sy smbgroup .
2535 Displays all ZFS file systems currently mounted.
2541 .Fl a | Ar filesystem
2543 Mounts ZFS file systems.
2544 .Bl -tag -width "-O"
2546 Perform an overlay mount.
2549 for more information.
2551 Mount all available ZFS file systems.
2552 Invoked automatically as part of the boot process.
2554 Mount the specified filesystem.
2556 An optional, comma-separated list of mount options to use temporarily for the
2557 duration of the mount.
2559 .Sx Temporary Mount Point Properties
2560 section for details.
2562 Report mount progress.
2568 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2570 Unmounts currently mounted ZFS file systems.
2571 .Bl -tag -width "-a"
2573 Unmount all available ZFS file systems.
2574 Invoked automatically as part of the shutdown process.
2575 .It Ar filesystem Ns | Ns Ar mountpoint
2576 Unmount the specified filesystem.
2577 The command can also be given a path to a ZFS file system mount point on the
2580 Forcefully unmount the file system, even if it is currently in use.
2585 .Fl a | Ar filesystem
2587 Shares available ZFS file systems.
2588 .Bl -tag -width "-a"
2590 Share all available ZFS file systems.
2591 Invoked automatically as part of the boot process.
2593 Share the specified filesystem according to the
2598 File systems are shared when the
2607 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2609 Unshares currently shared ZFS file systems.
2610 .Bl -tag -width "-a"
2612 Unshare all available ZFS file systems.
2613 Invoked automatically as part of the shutdown process.
2614 .It Ar filesystem Ns | Ns Ar mountpoint
2615 Unshare the specified filesystem.
2616 The command can also be given a path to a ZFS file system shared on the system.
2621 .Ar snapshot bookmark
2623 Creates a bookmark of the given snapshot.
2624 Bookmarks mark the point in time when the snapshot was created, and can be used
2625 as the incremental source for a
2629 This feature must be enabled to be used.
2631 .Xr zpool-features 5
2632 for details on ZFS feature flags and the
2639 .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
2642 Creates a stream representation of the second
2644 which is written to standard output.
2645 The output can be redirected to a file or to a different system
2646 .Po for example, using
2649 By default, a full stream is generated.
2650 .Bl -tag -width "-D"
2652 Generate a deduplicated stream.
2653 Blocks which would have been sent multiple times in the send stream will only be
2655 The receiving system must also support this feature to receive a deduplicated
2657 This flag can be used regardless of the dataset's
2659 property, but performance will be much better if the filesystem uses a
2660 dedup-capable checksum
2664 .It Fl I Ar snapshot
2665 Generate a stream package that sends all intermediary snapshots from the first
2666 snapshot to the second snapshot.
2670 .Fl i Em @a Em fs@b Ns ; Fl i Em @b Em fs@c Ns ; Fl i Em @c Em fs@d .
2671 The incremental source may be specified as with the
2674 .It Fl L, -large-block
2675 Generate a stream which may contain blocks larger than 128KB.
2676 This flag has no effect if the
2678 pool feature is disabled, or if the
2680 property of this filesystem has never been set above 128KB.
2681 The receiving system must have the
2683 pool feature enabled as well.
2685 .Xr zpool-features 5
2686 for details on ZFS feature flags and the
2690 Print machine-parsable verbose information about the stream package generated.
2691 .It Fl R, -replicate
2692 Generate a replication stream package, which will replicate the specified
2693 file system, and all descendent file systems, up to the named snapshot.
2694 When received, all properties, snapshots, descendent file systems, and clones
2701 flags are used in conjunction with the
2703 flag, an incremental replication stream is generated.
2704 The current values of properties, and current snapshot and file system names are
2705 set when the stream is received.
2708 flag is specified when this stream is received, snapshots and file systems that
2709 do not exist on the sending side are destroyed.
2711 Generate a more compact stream by using
2713 records for blocks which are stored more compactly on disk by the
2716 This flag has no effect if the
2718 feature is disabled.
2719 The receiving system must have the
2724 feature is active on the sending system, then the receiving system must have
2725 that feature enabled as well.
2727 .Xr zpool-features 5
2728 for details on ZFS feature flags and the
2731 .It Fl c, -compressed
2732 Generate a more compact stream by using compressed WRITE records for blocks
2733 which are compressed on disk and in memory
2736 property for details
2740 feature is active on the sending system, then the receiving system must have
2741 that feature enabled as well.
2744 feature is enabled on the sending system but the
2746 option is not supplied in conjunction with
2748 then the data will be decompressed before sending so it can be split into
2749 smaller block sizes.
2750 .It Fl i Ar snapshot
2751 Generate an incremental stream from the first
2753 .Pq the incremental source
2756 .Pq the incremental target .
2757 The incremental source can be specified as the last component of the snapshot
2761 character and following
2763 and it is assumed to be from the same file system as the incremental target.
2765 If the destination is a clone, the source may be the origin snapshot, which must
2768 .Em pool/fs@origin ,
2776 Do not generate any actual send data.
2777 This is useful in conjunction with the
2781 flags to determine what data will be sent.
2782 In this case, the verbose output will be written to standard output
2783 .Po contrast with a non-dry-run, where the stream is written to standard output
2784 and the verbose output goes to standard error
2787 Include the dataset's properties in the stream.
2788 This flag is implicit when
2791 The receiving system must also support this feature.
2793 Print verbose information about the stream package generated.
2794 This information includes a per-second report of how much data has been sent.
2796 The format of the stream is committed.
2797 You will be able to receive your streams on future versions of ZFS .
2803 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
2804 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2806 Generate a send stream, which may be of a filesystem, and may be incremental
2808 If the destination is a filesystem or volume, the pool must be read-only, or the
2809 filesystem must not be mounted.
2810 When the stream generated from a filesystem or volume is received, the default
2811 snapshot name will be
2813 .Bl -tag -width "-L"
2814 .It Fl L, -large-block
2815 Generate a stream which may contain blocks larger than 128KB.
2816 This flag has no effect if the
2818 pool feature is disabled, or if the
2820 property of this filesystem has never been set above 128KB.
2821 The receiving system must have the
2823 pool feature enabled as well.
2825 .Xr zpool-features 5
2826 for details on ZFS feature flags and the
2829 .It Fl c, -compressed
2830 Generate a more compact stream by using compressed WRITE records for blocks
2831 which are compressed on disk and in memory
2834 property for details
2838 feature is active on the sending system, then the receiving system must have
2839 that feature enabled as well.
2842 feature is enabled on the sending system but the
2844 option is not supplied in conjunction with
2846 then the data will be decompressed before sending so it can be split into
2847 smaller block sizes.
2849 Generate a more compact stream by using
2851 records for blocks which are stored more compactly on disk by the
2854 This flag has no effect if the
2856 feature is disabled.
2857 The receiving system must have the
2862 feature is active on the sending system, then the receiving system must have
2863 that feature enabled as well.
2865 .Xr zpool-features 5
2866 for details on ZFS feature flags and the
2869 .It Fl i Ar snapshot Ns | Ns Ar bookmark
2870 Generate an incremental send stream.
2871 The incremental source must be an earlier snapshot in the destination's history.
2872 It will commonly be an earlier snapshot in the destination's file system, in
2873 which case it can be specified as the last component of the name
2878 character and following
2881 If the incremental target is a clone, the incremental source can be the origin
2882 snapshot, or an earlier snapshot in the origin's filesystem, or the origin's
2890 .Ar receive_resume_token
2892 Creates a send stream which resumes an interrupted receive.
2894 .Ar receive_resume_token
2895 is the value of this property on the filesystem or volume that was being
2897 See the documentation for
2904 .Op Fl o Sy origin Ns = Ns Ar snapshot
2905 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2910 .Op Fl d Ns | Ns Fl e
2911 .Op Fl o Sy origin Ns = Ns Ar snapshot
2914 Creates a snapshot whose contents are as specified in the stream provided on
2916 If a full stream is received, then a new file system is created as well.
2917 Streams are created using the
2919 subcommand, which by default creates a full stream.
2921 can be used as an alias for
2924 If an incremental stream is received, then the destination file system must
2925 already exist, and its most recent snapshot must match the incremental stream's
2929 the destination device link is destroyed and recreated, which means the
2931 cannot be accessed during the
2935 When a snapshot replication package stream that is generated by using the
2936 .Nm zfs Cm send Fl R
2937 command is received, any snapshots that do not exist on the sending location are
2938 destroyed by using the
2939 .Nm zfs Cm destroy Fl d
2942 The name of the snapshot
2943 .Pq and file system, if a full stream is received
2944 that this subcommand creates depends on the argument type and the use of the
2950 If the argument is a snapshot name, the specified
2953 If the argument is a file system or volume name, a snapshot with the same name
2954 as the sent snapshot is created within the specified
2962 options are specified, the provided target snapshot name is used exactly as
2969 options cause the file system name of the target snapshot to be determined by
2970 appending a portion of the sent snapshot's name to the specified target
2974 option is specified, all but the first element of the sent snapshot's file
2976 .Pq usually the pool name
2977 is used and any required intermediate file systems within the specified one are
2981 option is specified, then only the last element of the sent snapshot's file
2983 .Pq i.e. the name of the source file system itself
2984 is used as the target file system name.
2985 .Bl -tag -width "-F"
2987 Force a rollback of the file system to the most recent snapshot before
2988 performing the receive operation.
2989 If receiving an incremental replication stream
2990 .Po for example, one generated by
2991 .Nm zfs Cm send Fl R Op Fl i Ns | Ns Fl I
2993 destroy snapshots and file systems that do not exist on the sending side.
2995 Discard the first element of the sent snapshot's file system name, using the
2996 remaining elements to determine the name of the target file system for the new
2997 snapshot as described in the paragraph above.
2999 Discard all but the last element of the sent snapshot's file system name, using
3000 that element to determine the name of the target file system for the new
3001 snapshot as described in the paragraph above.
3003 Do not actually receive the stream.
3004 This can be useful in conjunction with the
3006 option to verify the name the receive operation would use.
3007 .It Fl o Sy origin Ns = Ns Ar snapshot
3008 Forces the stream to be received as a clone of the given snapshot.
3009 If the stream is a full send stream, this will create the filesystem
3010 described by the stream as a clone of the specified snapshot.
3011 Which snapshot was specified will not affect the success or failure of the
3012 receive, as long as the snapshot does exist.
3013 If the stream is an incremental send stream, all the normal verification will be
3016 File system that is associated with the received stream is not mounted.
3018 Print verbose information about the stream and the time required to perform the
3021 If the receive is interrupted, save the partially received state, rather
3023 Interruption may be due to premature termination of the stream
3024 .Po e.g. due to network failure or failure of the remote system
3025 if the stream is being read over a network connection
3027 a checksum error in the stream, termination of the
3029 process, or unclean shutdown of the system.
3031 The receive can be resumed with a stream generated by
3032 .Nm zfs Cm send Fl t Ar token ,
3036 .Sy receive_resume_token
3037 property of the filesystem or volume which is received into.
3039 To use this flag, the storage pool must have the
3040 .Sy extensible_dataset
3043 .Xr zpool-features 5
3044 for details on ZFS feature flags.
3050 .Ar filesystem Ns | Ns Ar volume
3052 Abort an interrupted
3053 .Nm zfs Cm receive Fl s ,
3054 deleting its saved partially received state.
3058 .Ar filesystem Ns | Ns Ar volume
3060 Displays permissions that have been delegated on the specified filesystem or
3062 See the other forms of
3064 for more information.
3069 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3070 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3071 .Ar setname Oc Ns ...
3072 .Ar filesystem Ns | Ns Ar volume
3077 .Fl e Ns | Ns Sy everyone
3078 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3079 .Ar setname Oc Ns ...
3080 .Ar filesystem Ns | Ns Ar volume
3082 Delegates ZFS administration permission for the file systems to non-privileged
3084 .Bl -tag -width "-d"
3086 Allow only for the descendent file systems.
3087 .It Fl e Ns | Ns Sy everyone
3088 Specifies that the permissions be delegated to everyone.
3089 .It Fl g Ar group Ns Oo , Ns Ar group Oc Ns ...
3090 Explicitly specify that permissions are delegated to the group.
3094 only for the specified file system.
3095 .It Fl u Ar user Ns Oo , Ns Ar user Oc Ns ...
3096 Explicitly specify that permissions are delegated to the user.
3097 .It Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3098 Specifies to whom the permissions are delegated.
3099 Multiple entities can be specified as a comma-separated list.
3102 options are specified, then the argument is interpreted preferentially as the
3105 then as a user name, and lastly as a group name.
3106 To specify a user or group named
3113 To specify a group with the same name as a user, use the
3117 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3118 .Ar setname Oc Ns ...
3120 The permissions to delegate.
3121 Multiple permissions may be specified as a comma-separated list.
3122 Permission names are the same as ZFS subcommand and property names.
3123 See the property list below.
3124 Property set names, which begin with
3129 form below for details.
3134 options are specified, or both are, then the permissions are allowed for the
3135 file system or volume, and all of its descendents.
3137 Permissions are generally the ability to use a ZFS subcommand or change a ZFS
3139 The following permissions are available:
3142 allow subcommand Must also have the permission that is being
3144 clone subcommand Must also have the 'create' ability and 'mount'
3145 ability in the origin file system
3146 create subcommand Must also have the 'mount' ability
3147 destroy subcommand Must also have the 'mount' ability
3148 diff subcommand Allows lookup of paths within a dataset
3149 given an object number, and the ability to
3150 create snapshots necessary to 'zfs diff'.
3151 mount subcommand Allows mount/umount of ZFS datasets
3152 promote subcommand Must also have the 'mount'
3153 and 'promote' ability in the origin file system
3154 receive subcommand Must also have the 'mount' and 'create' ability
3155 rename subcommand Must also have the 'mount' and 'create'
3156 ability in the new parent
3157 rollback subcommand Must also have the 'mount' ability
3159 share subcommand Allows sharing file systems over NFS or SMB
3161 snapshot subcommand Must also have the 'mount' ability
3163 groupquota other Allows accessing any groupquota@... property
3164 groupused other Allows reading any groupused@... property
3165 userprop other Allows changing any user property
3166 userquota other Allows accessing any userquota@... property
3167 userused other Allows reading any userused@... property
3173 casesensitivity property
3175 compression property
3179 filesystem_limit property
3182 normalization property
3183 primarycache property
3188 refreservation property
3189 reservation property
3190 secondarycache property
3195 snapshot_limit property
3198 volblocksize property
3208 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3209 .Ar setname Oc Ns ...
3210 .Ar filesystem Ns | Ns Ar volume
3215 These permissions are granted
3217 to the creator of any newly-created descendent file system.
3221 .Fl s No @ Ns Ar setname
3222 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3223 .Ar setname Oc Ns ...
3224 .Ar filesystem Ns | Ns Ar volume
3226 Defines or adds permissions to a permission set.
3227 The set can be used by other
3229 commands for the specified file system and its descendents.
3230 Sets are evaluated dynamically, so changes to a set are immediately reflected.
3231 Permission sets follow the same naming restrictions as ZFS file systems, but the
3232 name must begin with
3234 and can be no more than 64 characters long.
3239 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3240 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3241 .Ar setname Oc Ns ... Oc
3242 .Ar filesystem Ns | Ns Ar volume
3247 .Fl e Ns | Ns Sy everyone
3248 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3249 .Ar setname Oc Ns ... Oc
3250 .Ar filesystem Ns | Ns Ar volume
3256 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3257 .Ar setname Oc Ns ... Oc
3258 .Ar filesystem Ns | Ns Ar volume
3260 Removes permissions that were granted with the
3263 No permissions are explicitly denied, so other permissions granted are still in
3265 For example, if the permission is granted by an ancestor.
3266 If no permissions are specified, then all permissions for the specified
3278 only removes the permissions that were granted to everyone, not all permissions
3279 for every user and group.
3282 command for a description of the
3285 .Bl -tag -width "-r"
3287 Recursively remove the permissions from this file system and all descendents.
3293 .Fl s No @ Ns Ar setname
3294 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3295 .Ar setname Oc Ns ... Oc
3296 .Ar filesystem Ns | Ns Ar volume
3298 Removes permissions from a permission set.
3299 If no permissions are specified, then all permissions are removed, thus removing
3305 .Ar tag Ar snapshot Ns ...
3307 Adds a single reference, named with the
3309 argument, to the specified snapshot or snapshots.
3310 Each snapshot has its own tag namespace, and tags must be unique within that
3313 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3317 .Bl -tag -width "-r"
3319 Specifies that a hold with the given tag is applied recursively to the snapshots
3320 of all descendent file systems.
3328 Lists all existing user references for the given snapshot or snapshots.
3329 .Bl -tag -width "-r"
3331 Lists the holds that are set on the named descendent snapshots, in addition to
3332 listing the holds on the named snapshot.
3338 .Ar tag Ar snapshot Ns ...
3340 Removes a single reference, named with the
3342 argument, from the specified snapshot or snapshots.
3343 The tag must already exist for each snapshot.
3344 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3348 .Bl -tag -width "-r"
3350 Recursively releases a hold with the given tag on the snapshots of all
3351 descendent file systems.
3357 .Ar snapshot Ar snapshot Ns | Ns Ar filesystem
3359 Display the difference between a snapshot of a given filesystem and another
3360 snapshot of that filesystem from a later time or the current contents of the
3362 The first column is a character indicating the type of change, the other columns
3363 indicate pathname, new pathname
3364 .Pq in case of rename ,
3365 change in link count, and optionally file type and/or change time.
3366 The types of change are:
3368 - The path has been removed
3369 + The path has been created
3370 M The path has been modified
3371 R The path has been renamed
3373 .Bl -tag -width "-F"
3375 Display an indication of the type of file, in a manner similar to the
3391 Give more parsable tab-separated output, without header lines and without
3394 Display the path's inode change time as the first column of output.
3400 utility exits 0 on success, 1 if an error occurs, and 2 if invalid command line
3401 options were specified.
3404 .It Sy Example 1 No Creating a ZFS File System Hierarchy
3405 The following commands create a file system named
3407 and a file system named
3411 is set for the parent file system, and is automatically inherited by the child
3414 # zfs create pool/home
3415 # zfs set mountpoint=/export/home pool/home
3416 # zfs create pool/home/bob
3418 .It Sy Example 2 No Creating a ZFS Snapshot
3419 The following command creates a snapshot named
3421 This snapshot is mounted on demand in the
3423 directory at the root of the
3427 # zfs snapshot pool/home/bob@yesterday
3429 .It Sy Example 3 No Creating and Destroying Multiple Snapshots
3430 The following command creates snapshots named
3434 and all of its descendent file systems.
3435 Each snapshot is mounted on demand in the
3437 directory at the root of its file system.
3438 The second command destroys the newly created snapshots.
3440 # zfs snapshot -r pool/home@yesterday
3441 # zfs destroy -r pool/home@yesterday
3443 .It Sy Example 4 No Disabling and Enabling File System Compression
3444 The following command disables the
3446 property for all file systems under
3448 The next command explicitly enables
3451 .Em pool/home/anne .
3453 # zfs set compression=off pool/home
3454 # zfs set compression=on pool/home/anne
3456 .It Sy Example 5 No Listing ZFS Datasets
3457 The following command lists all active file systems and volumes in the system.
3458 Snapshots are displayed if the
3466 for more information on pool properties.
3469 NAME USED AVAIL REFER MOUNTPOINT
3470 pool 450K 457G 18K /pool
3471 pool/home 315K 457G 21K /export/home
3472 pool/home/anne 18K 457G 18K /export/home/anne
3473 pool/home/bob 276K 457G 276K /export/home/bob
3475 .It Sy Example 6 No Setting a Quota on a ZFS File System
3476 The following command sets a quota of 50 Gbytes for
3479 # zfs set quota=50G pool/home/bob
3481 .It Sy Example 7 No Listing ZFS Properties
3482 The following command lists all properties for
3485 # zfs get all pool/home/bob
3486 NAME PROPERTY VALUE SOURCE
3487 pool/home/bob type filesystem -
3488 pool/home/bob creation Tue Jul 21 15:53 2009 -
3489 pool/home/bob used 21K -
3490 pool/home/bob available 20.0G -
3491 pool/home/bob referenced 21K -
3492 pool/home/bob compressratio 1.00x -
3493 pool/home/bob mounted yes -
3494 pool/home/bob quota 20G local
3495 pool/home/bob reservation none default
3496 pool/home/bob recordsize 128K default
3497 pool/home/bob mountpoint /pool/home/bob default
3498 pool/home/bob sharenfs off default
3499 pool/home/bob checksum on default
3500 pool/home/bob compression on local
3501 pool/home/bob atime on default
3502 pool/home/bob devices on default
3503 pool/home/bob exec on default
3504 pool/home/bob setuid on default
3505 pool/home/bob readonly off default
3506 pool/home/bob zoned off default
3507 pool/home/bob snapdir hidden default
3508 pool/home/bob aclmode discard default
3509 pool/home/bob aclinherit restricted default
3510 pool/home/bob canmount on default
3511 pool/home/bob xattr on default
3512 pool/home/bob copies 1 default
3513 pool/home/bob version 4 -
3514 pool/home/bob utf8only off -
3515 pool/home/bob normalization none -
3516 pool/home/bob casesensitivity sensitive -
3517 pool/home/bob vscan off default
3518 pool/home/bob nbmand off default
3519 pool/home/bob sharesmb off default
3520 pool/home/bob refquota none default
3521 pool/home/bob refreservation none default
3522 pool/home/bob primarycache all default
3523 pool/home/bob secondarycache all default
3524 pool/home/bob usedbysnapshots 0 -
3525 pool/home/bob usedbydataset 21K -
3526 pool/home/bob usedbychildren 0 -
3527 pool/home/bob usedbyrefreservation 0 -
3530 The following command gets a single property value.
3532 # zfs get -H -o value compression pool/home/bob
3535 The following command lists all properties with local settings for
3538 # zfs get -r -s local -o name,property,value all pool/home/bob
3540 pool/home/bob quota 20G
3541 pool/home/bob compression on
3543 .It Sy Example 8 No Rolling Back a ZFS File System
3544 The following command reverts the contents of
3546 to the snapshot named
3548 deleting all intermediate snapshots.
3550 # zfs rollback -r pool/home/anne@yesterday
3552 .It Sy Example 9 No Creating a ZFS Clone
3553 The following command creates a writable file system whose initial contents are
3555 .Em pool/home/bob@yesterday .
3557 # zfs clone pool/home/bob@yesterday pool/clone
3559 .It Sy Example 10 No Promoting a ZFS Clone
3560 The following commands illustrate how to test out changes to a file system, and
3561 then replace the original file system with the changed one, using clones, clone
3562 promotion, and renaming:
3564 # zfs create pool/project/production
3565 populate /pool/project/production with data
3566 # zfs snapshot pool/project/production@today
3567 # zfs clone pool/project/production@today pool/project/beta
3568 make changes to /pool/project/beta and test them
3569 # zfs promote pool/project/beta
3570 # zfs rename pool/project/production pool/project/legacy
3571 # zfs rename pool/project/beta pool/project/production
3572 once the legacy version is no longer needed, it can be destroyed
3573 # zfs destroy pool/project/legacy
3575 .It Sy Example 11 No Inheriting ZFS Properties
3576 The following command causes
3582 property from their parent.
3584 # zfs inherit checksum pool/home/bob pool/home/anne
3586 .It Sy Example 12 No Remotely Replicating ZFS Data
3587 The following commands send a full stream and then an incremental stream to a
3588 remote machine, restoring them into
3589 .Em poolB/received/fs@a
3591 .Em poolB/received/fs@b ,
3594 must contain the file system
3595 .Em poolB/received ,
3596 and must not initially contain
3597 .Em poolB/received/fs .
3599 # zfs send pool/fs@a | \e
3600 ssh host zfs receive poolB/received/fs@a
3601 # zfs send -i a pool/fs@b | \e
3602 ssh host zfs receive poolB/received/fs
3604 .It Sy Example 13 No Using the zfs receive -d Option
3605 The following command sends a full stream of
3606 .Em poolA/fsA/fsB@snap
3607 to a remote machine, receiving it into
3608 .Em poolB/received/fsA/fsB@snap .
3611 portion of the received snapshot's name is determined from the name of the sent
3614 must contain the file system
3615 .Em poolB/received .
3617 .Em poolB/received/fsA
3618 does not exist, it is created as an empty file system.
3620 # zfs send poolA/fsA/fsB@snap | \e
3621 ssh host zfs receive -d poolB/received
3623 .It Sy Example 14 No Setting User Properties
3624 The following example sets the user-defined
3625 .Sy com.example:department
3626 property for a dataset.
3628 # zfs set com.example:department=12345 tank/accounting
3630 .It Sy Example 15 No Performing a Rolling Snapshot
3631 The following example shows how to maintain a history of snapshots with a
3632 consistent naming scheme.
3633 To keep a week's worth of snapshots, the user destroys the oldest snapshot,
3634 renames the remaining snapshots, and then creates a new snapshot, as follows:
3636 # zfs destroy -r pool/users@7daysago
3637 # zfs rename -r pool/users@6daysago @7daysago
3638 # zfs rename -r pool/users@5daysago @6daysago
3639 # zfs rename -r pool/users@yesterday @5daysago
3640 # zfs rename -r pool/users@yesterday @4daysago
3641 # zfs rename -r pool/users@yesterday @3daysago
3642 # zfs rename -r pool/users@yesterday @2daysago
3643 # zfs rename -r pool/users@today @yesterday
3644 # zfs snapshot -r pool/users@today
3646 .It Sy Example 16 No Setting sharenfs Property Options on a ZFS File System
3647 The following commands show how to set
3649 property options to enable
3653 addresses and to enable root access for system
3659 # zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home
3664 for host name resolution, specify the fully qualified hostname.
3665 .It Sy Example 17 No Delegating ZFS Administration Permissions on a ZFS Dataset
3666 The following example shows how to set permissions so that user
3668 can create, destroy, mount, and take snapshots on
3674 # zfs allow cindys create,destroy,mount,snapshot tank/cindys
3675 # zfs allow tank/cindys
3676 ---- Permissions on tank/cindys --------------------------------------
3677 Local+Descendent permissions:
3678 user cindys create,destroy,mount,snapshot
3683 mount point permission is set to 755 by default, user
3685 will be unable to mount file systems under
3687 Add an ACE similar to the following syntax to provide mount point access:
3689 # chmod A+user:cindys:add_subdirectory:allow /tank/cindys
3691 .It Sy Example 18 No Delegating Create Time Permissions on a ZFS Dataset
3692 The following example shows how to grant anyone in the group
3694 to create file systems in
3696 This syntax also allows staff members to destroy their own file systems, but not
3697 destroy anyone else's file system.
3702 # zfs allow staff create,mount tank/users
3703 # zfs allow -c destroy tank/users
3704 # zfs allow tank/users
3705 ---- Permissions on tank/users ---------------------------------------
3708 Local+Descendent permissions:
3709 group staff create,mount
3711 .It Sy Example 19 No Defining and Granting a Permission Set on a ZFS Dataset
3712 The following example shows how to define and grant a permission set on the
3719 # zfs allow -s @pset create,destroy,snapshot,mount tank/users
3720 # zfs allow staff @pset tank/users
3721 # zfs allow tank/users
3722 ---- Permissions on tank/users ---------------------------------------
3724 @pset create,destroy,mount,snapshot
3725 Local+Descendent permissions:
3728 .It Sy Example 20 No Delegating Property Permissions on a ZFS Dataset
3729 The following example shows to grant the ability to set quotas and reservations
3737 # zfs allow cindys quota,reservation users/home
3738 # zfs allow users/home
3739 ---- Permissions on users/home ---------------------------------------
3740 Local+Descendent permissions:
3741 user cindys quota,reservation
3742 cindys% zfs set quota=10G users/home/marks
3743 cindys% zfs get quota users/home/marks
3744 NAME PROPERTY VALUE SOURCE
3745 users/home/marks quota 10G local
3747 .It Sy Example 21 No Removing ZFS Delegated Permissions on a ZFS Dataset
3748 The following example shows how to remove the snapshot permission from the
3757 # zfs unallow staff snapshot tank/users
3758 # zfs allow tank/users
3759 ---- Permissions on tank/users ---------------------------------------
3761 @pset create,destroy,mount,snapshot
3762 Local+Descendent permissions:
3765 .It Sy Example 22 No Showing the differences between a snapshot and a ZFS Dataset
3766 The following example shows how to see what has changed between a prior
3767 snapshot of a ZFS dataset and its current state.
3770 option is used to indicate type information for the files affected.
3772 # zfs diff -F tank/test@before tank/test
3774 M F /tank/test/linked (+1)
3775 R F /tank/test/oldname -> /tank/test/newname
3776 - F /tank/test/deleted
3777 + F /tank/test/created
3778 M F /tank/test/modified
3781 .Sh INTERFACE STABILITY