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 2018 Nexenta Systems, Inc.
30 .\" Copyright 2018 Joyent, Inc.
37 .Nd configures ZFS file systems
44 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
50 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
51 .Fl V Ar size Ar volume
55 .Ar filesystem Ns | Ns Ar volume
59 .Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns
60 .Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ...
63 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
67 .Oo Fl o Ar property Ns = Ns value Oc Ns ...
68 .Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ...
76 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
77 .Ar snapshot Ar filesystem Ns | Ns Ar volume
84 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
85 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
89 .Ar filesystem Ns | Ns Ar volume
90 .Ar filesystem Ns | Ns Ar volume
94 .Ar snapshot Ar snapshot
97 .Op Fl r Ns | Ns Fl d Ar depth
99 .Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc
100 .Oo Fl s Ar property Oc Ns ...
101 .Oo Fl S Ar property Oc Ns ...
102 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
103 .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ...
106 .Ar filesystem Ns | Ns Ar volume
109 .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ...
110 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
113 .Op Fl r Ns | Ns Fl d Ar depth
115 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
116 .Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc
117 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
118 .Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ...
119 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Ns ...
123 .Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
133 .Fl a | Ar filesystem
137 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
138 .Oo Fl s Ar field Oc Ns ...
139 .Oo Fl S Ar field Oc Ns ...
140 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
141 .Ar filesystem Ns | Ns Ar snapshot
145 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
146 .Oo Fl s Ar field Oc Ns ...
147 .Oo Fl S Ar field Oc Ns ...
148 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
149 .Ar filesystem Ns | Ns Ar snapshot
156 .Fl a | Ar filesystem
160 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
163 .Fl a | Ar filesystem
166 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
169 .Ar snapshot bookmark
173 .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
178 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
179 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
183 .Fl t Ar receive_resume_token
187 .Op Fl o Sy origin Ns = Ns Ar snapshot
188 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
192 .Op Fl d Ns | Ns Fl e
193 .Op Fl o Sy origin Ns = Ns Ar snapshot
198 .Ar filesystem Ns | Ns Ar volume
201 .Ar filesystem Ns | Ns Ar volume
205 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
206 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
207 .Ar setname Oc Ns ...
208 .Ar filesystem Ns | Ns Ar volume
212 .Fl e Ns | Ns Sy everyone
213 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
214 .Ar setname Oc Ns ...
215 .Ar filesystem Ns | Ns Ar volume
219 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
220 .Ar setname Oc Ns ...
221 .Ar filesystem Ns | Ns Ar volume
224 .Fl s No @ Ns Ar setname
225 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
226 .Ar setname Oc Ns ...
227 .Ar filesystem Ns | Ns Ar volume
231 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
232 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
233 .Ar setname Oc Ns ... Oc
234 .Ar filesystem Ns | Ns Ar volume
238 .Fl e Ns | Ns Sy everyone
239 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
240 .Ar setname Oc Ns ... Oc
241 .Ar filesystem Ns | Ns Ar volume
246 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
247 .Ar setname Oc Ns ... Oc
248 .Ar filesystem Ns | Ns Ar volume
252 .Fl s @ Ns Ar setname
253 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
254 .Ar setname Oc Ns ... Oc
255 .Ar filesystem Ns | Ns Ar volume
259 .Ar tag Ar snapshot Ns ...
267 .Ar tag Ar snapshot Ns ...
271 .Ar snapshot Ar snapshot Ns | Ns Ar filesystem
276 .Op Fl m Ar memory_limit
282 command configures ZFS datasets within a ZFS storage pool, as described in
284 A dataset is identified by a unique path within the ZFS namespace.
287 pool/{filesystem,volume,snapshot}
290 where the maximum length of a dataset name is
293 and the maximum amount of nesting allowed in a path is 50 levels deep.
295 A dataset can be one of the following:
296 .Bl -tag -width "file system"
298 A ZFS dataset of type
300 can be mounted within the standard system namespace and behaves like other file
302 While ZFS file systems are designed to be POSIX compliant, known issues exist
303 that prevent compliance in some cases.
304 Applications that depend on standards conformance might fail due to non-standard
305 behavior when checking file system free space.
307 A logical volume exported as a raw or block device.
308 This type of dataset should only be used under special circumstances.
309 File systems are typically used in most environments.
311 A read-only version of a file system or volume at a given point in time.
313 .Ar filesystem Ns @ Ns Ar name
315 .Ar volume Ns @ Ns Ar name .
317 .Ss ZFS File System Hierarchy
318 A ZFS storage pool is a logical collection of devices that provide space for
320 A storage pool is also the root of the ZFS file system hierarchy.
322 The root of the pool can be accessed as a file system, such as mounting and
323 unmounting, taking snapshots, and setting properties.
324 The physical storage characteristics, however, are managed by the
330 for more information on creating and administering pools.
332 A snapshot is a read-only copy of a file system or volume.
333 Snapshots can be created extremely quickly, and initially consume no additional
334 space within the pool.
335 As data within the active dataset changes, the snapshot consumes more data than
336 would otherwise be shared with the active dataset.
338 Snapshots can have arbitrary names.
339 Snapshots of volumes can be cloned or rolled back, but cannot be accessed
342 File system snapshots can be accessed under the
344 directory in the root of the file system.
345 Snapshots are automatically mounted on demand and may be unmounted at regular
347 The visibility of the
349 directory can be controlled by the
353 A clone is a writable volume or file system whose initial contents are the same
355 As with snapshots, creating a clone is nearly instantaneous, and initially
356 consumes no additional space.
358 Clones can only be created from a snapshot.
359 When a snapshot is cloned, it creates an implicit dependency between the parent
361 Even though the clone is created somewhere else in the dataset hierarchy, the
362 original snapshot cannot be destroyed as long as a clone exists.
365 property exposes this dependency, and the
367 command lists any such dependencies, if they exist.
369 The clone parent-child dependency relationship can be reversed by using the
374 file system to become a clone of the specified file system, which makes it
375 possible to destroy the file system that the clone was created from.
377 Creating a ZFS file system is a simple operation, so the number of file systems
378 per system is likely to be numerous.
379 To cope with this, ZFS automatically manages mounting and unmounting file
380 systems without the need to edit the
383 All automatically managed file systems are mounted by ZFS at boot time.
385 By default, file systems are mounted under
389 is the name of the file system in the ZFS namespace.
390 Directories are created and destroyed as needed.
392 A file system can also have a mount point set in the
395 This directory is created as needed, and ZFS automatically mounts the file
397 .Nm zfs Cm mount Fl a
404 property can be inherited, so if
410 automatically inherits a mount point of
411 .Pa /export/stuff/user .
417 prevents the file system from being mounted.
419 If needed, ZFS file systems can also be managed with traditional tools
425 If a file system's mount point is set to
427 ZFS makes no attempt to manage the file system, and the administrator is
428 responsible for mounting and unmounting the file system.
430 A ZFS file system can be added to a non-global zone by using the
431 .Nm zonecfg Cm add Sy fs
433 A ZFS file system that is added to a non-global zone must have its
438 The physical properties of an added file system are controlled by the global
440 However, the zone administrator can create, modify, or destroy files within the
441 added file system, depending on how the file system is mounted.
443 A dataset can also be delegated to a non-global zone by using the
444 .Nm zonecfg Cm add Sy dataset
446 You cannot delegate a dataset to one zone and the children of the same dataset
448 The zone administrator can change properties of the dataset or any of its
455 properties of the delegated dataset can be modified only by the global
458 A ZFS volume can be added as a device to a non-global zone by using the
459 .Nm zonecfg Cm add Sy device
461 However, its physical properties can be modified only by the global
464 For more information about
469 After a dataset is delegated to a non-global zone, the
471 property is automatically set.
472 A zoned file system cannot be mounted in the global zone, since the zone
473 administrator might have to set the mount point to an unacceptable value.
475 The global administrator can forcibly clear the
477 property, though this should be done with extreme care.
478 The global administrator should verify that all the mount points are acceptable
479 before clearing the property.
480 .Ss Native Properties
481 Properties are divided into two types, native properties and user-defined
486 Native properties either export internal statistics or control ZFS behavior.
487 In addition, native properties are either editable or read-only.
488 User properties have no effect on ZFS behavior, but you can use them to annotate
489 datasets in a way that is meaningful in your environment.
490 For more information about user properties, see the
494 Every dataset has a set of properties that export statistics about the dataset
495 as well as control various behaviors.
496 Properties are inherited from the parent unless overridden by the child.
497 Some properties apply only to certain types of datasets
498 .Pq file systems, volumes, or snapshots .
500 The values of numeric properties can be specified using human-readable suffixes
510 The following are all valid
513 .Li 1536M, 1.5g, 1.50GB .
515 The values of non-numeric properties are case sensitive and must be lowercase,
522 The following native properties consist of read-only statistics about the
524 These properties can be neither set, nor inherited.
525 Native properties apply to all dataset types unless otherwise noted.
526 .Bl -tag -width "usedbyrefreservation"
528 The amount of space available to the dataset and all its children, assuming that
529 there is no other activity in the pool.
530 Because space is shared within a pool, availability can be limited by any number
531 of factors, including physical pool size, quotas, reservations, or other
532 datasets within the pool.
534 This property can also be referred to by its shortened column name,
537 For non-snapshots, the compression ratio achieved for the
539 space of this dataset, expressed as a multiplier.
542 property includes descendant datasets, and, for clones, does not include the
543 space shared with the origin snapshot.
549 Compression can be turned on by running:
550 .Nm zfs Cm set Sy compression Ns = Ns Sy on Ar dataset .
554 The transaction group (txg) in which the dataset was created.
555 Bookmarks have the same
557 as the snapshot they are initially tied to.
558 This property is suitable for ordering a list of snapshots,
559 e.g. for incremental send and receive.
561 The time this dataset was created.
563 For snapshots, this property is a comma-separated list of filesystems or volumes
564 which are clones of this snapshot.
567 property is this snapshot.
570 property is not empty, then this snapshot can not be destroyed
580 if the snapshot has been marked for deferred destroy by using the
581 .Nm zfs Cm destroy Fl d
583 Otherwise, the property is
585 .It Sy filesystem_count
586 The total number of filesystems and volumes that exist under this location in
588 This value is only available when a
590 has been set somewhere in the tree under which the dataset resides.
592 The 64 bit GUID of this dataset or bookmark which does not change over its
594 When a snapshot is sent to another pool, the received snapshot has the same
598 is suitable to identify a snapshot across pools.
599 .It Sy logicalreferenced
600 The amount of space that is
602 accessible by this dataset.
606 The logical space ignores the effect of the
610 properties, giving a quantity closer to the amount of data that applications
612 However, it does include space consumed by metadata.
614 This property can also be referred to by its shortened column name,
617 The amount of space that is
619 consumed by this dataset and all its descendents.
623 The logical space ignores the effect of the
627 properties, giving a quantity closer to the amount of data that applications
629 However, it does include space consumed by metadata.
631 This property can also be referred to by its shortened column name,
634 For file systems, indicates whether the file system is currently mounted.
635 This property can be either
640 For cloned file systems or volumes, the snapshot from which the clone was
645 .It Sy receive_resume_token
646 For filesystems or volumes which have saved partially-completed state from
648 this opaque token can be provided to
650 to resume and complete the
653 The amount of data that is accessible by this dataset, which may or may not be
654 shared with other datasets in the pool.
655 When a snapshot or clone is created, it initially references the same amount of
656 space as the file system or snapshot it was created from, since its contents are
659 This property can also be referred to by its shortened column name,
661 .It Sy refcompressratio
662 The compression ratio achieved for the
664 space of this dataset, expressed as a multiplier.
668 .It Sy snapshot_count
669 The total number of snapshots that exist under this location in the dataset
671 This value is only available when a
673 has been set somewhere in the tree under which the dataset resides.
681 The amount of space consumed by this dataset and all its descendents.
682 This is the value that is checked against this dataset's quota and reservation.
683 The space used does not include this dataset's reservation, but does take into
684 account the reservations of any descendent datasets.
685 The amount of space that a dataset consumes from its parent, as well as the
686 amount of space that is freed if this dataset is recursively destroyed, is the
687 greater of its space used and its reservation.
689 The used space of a snapshot
694 is space that is referenced exclusively by this snapshot.
695 If this snapshot is destroyed, the amount of
698 Space that is shared by multiple snapshots isn't accounted for in this metric.
699 When a snapshot is destroyed, space that was previously shared with this
700 snapshot can become unique to snapshots adjacent to it, thus changing the used
701 space of those snapshots.
702 The used space of the latest snapshot can also be affected by changes in the
706 space of a snapshot is a subset of the
708 space of the snapshot.
710 The amount of space used, available, or referenced does not take into account
712 Pending changes are generally accounted for within a few seconds.
713 Committing a change to a disk using
717 does not necessarily guarantee that the space usage information is updated
722 properties decompose the
724 properties into the various reasons that space is used.
727 .Sy usedbychildren No +
728 .Sy usedbydataset No +
729 .Sy usedbyrefreservation No +
730 .Sy usedbysnapshots .
731 These properties are only available for datasets created on
735 .It Sy usedbychildren
736 The amount of space used by children of this dataset, which would be freed if
737 all the dataset's children were destroyed.
739 The amount of space used by this dataset itself, which would be freed if the
740 dataset were destroyed
741 .Po after first removing any
743 and destroying any necessary snapshots or descendents
745 .It Sy usedbyrefreservation
746 The amount of space used by a
748 set on this dataset, which would be freed if the
751 .It Sy usedbysnapshots
752 The amount of space consumed by snapshots of this dataset.
753 In particular, it is the amount of space that would be freed if all of this
754 dataset's snapshots were destroyed.
755 Note that this is not simply the sum of the snapshots'
757 properties because space can be shared by multiple snapshots.
758 .It Sy userused Ns @ Ns Em user
759 The amount of space consumed by the specified user in this dataset.
760 Space is charged to the owner of each file, as displayed by
762 The amount of space charged is displayed by
768 subcommand for more information.
770 Unprivileged users can access only their own space usage.
771 The root user, or a user who has been granted the
775 can access everyone's usage.
778 .Sy userused Ns @ Ns Em ...
779 properties are not displayed by
780 .Nm zfs Cm get Sy all .
781 The user's name must be appended after the @ symbol, using one of the following
783 .Bl -bullet -width ""
797 .Sy joe.smith@mydomain
806 This property is set to the number of user holds on this snapshot.
807 User holds are set by using the
810 .It Sy groupused Ns @ Ns Em group
811 The amount of space consumed by the specified group in this dataset.
812 Space is charged to the group of each file, as displayed by
815 .Sy userused Ns @ Ns Em user
816 property for more information.
818 Unprivileged users can only access their own groups' space usage.
819 The root user, or a user who has been granted the
823 can access all groups' usage.
825 For volumes, specifies the block size of the volume.
828 cannot be changed once the volume has been written, so it should be set at
829 volume creation time.
832 for volumes is 8 Kbytes.
833 Any power of 2 from 512 bytes to 128 Kbytes is valid.
835 This property can also be referred to by its shortened column name,
840 by this dataset, that was written since the previous snapshot
841 .Pq i.e. that is not referenced by the previous snapshot .
842 .It Sy written Ns @ Ns Em snapshot
845 space written to this dataset since the specified snapshot.
846 This is the space that is referenced by this dataset but was not referenced by
847 the specified snapshot.
851 may be specified as a short snapshot name
852 .Po just the part after the
855 in which case it will be interpreted as a snapshot in the same filesystem as
859 may be a full snapshot name
860 .Po Em filesystem Ns @ Ns Em snapshot Pc ,
861 which for clones may be a snapshot in the origin's filesystem
862 .Pq or the origin of the origin's filesystem, etc.
865 The following native properties can be used to change the behavior of a ZFS
869 .Sy aclinherit Ns = Ns Sy discard Ns | Ns Sy noallow Ns | Ns
870 .Sy restricted Ns | Ns Sy passthrough Ns | Ns Sy passthrough-x
872 Controls how ACEs are inherited when files and directories are created.
873 .Bl -tag -width "passthrough-x"
875 does not inherit any ACEs.
877 only inherits inheritable ACEs that specify
885 permissions when the ACE is inherited.
887 inherits all inheritable ACEs without any modifications.
896 ACEs inherit the execute permission only if the file creation mode also requests
900 When the property value is set to
902 files are created with a mode determined by the inheritable ACEs.
903 If no inheritable ACEs exist that affect the mode, then the mode is set in
904 accordance to the requested mode from the application.
906 .Sy aclmode Ns = Ns Sy discard Ns | Ns Sy groupmask Ns | Ns
907 .Sy passthrough Ns | Ns Sy restricted
909 Controls how an ACL is modified during
911 and how inherited ACEs are modified by the file creation mode.
912 .Bl -tag -width "passthrough"
914 default, deletes all ACEs except for those representing the mode of the file or
915 directory requested by
918 reduces permissions granted by all
920 entries found in the ACL such that they are no greater than the group
921 permissions specified by the mode.
923 indicates that no changes are made to the ACL other than creating or updating
924 the necessary ACEs to represent the new mode of the file or directory.
928 operation to return an error when used on any file or directory which has a
929 non-trivial ACL, with entries in addition to those that represent the mode.
933 is required to change the set user ID, set group ID, or sticky bit on a file or
934 directory, as they do not have equivalent ACEs.
937 on a file or directory with a non-trivial ACL when
941 you must first remove all ACEs except for those that represent the current mode.
942 .It Sy atime Ns = Ns Sy on Ns | Ns Sy off
943 Controls whether the access time for files is updated when they are read.
944 Turning this property off avoids producing write traffic when reading files and
945 can result in significant performance gains, though it might confuse mailers
946 and other similar utilities.
949 .It Sy canmount Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy noauto
950 If this property is set to
952 the file system cannot be mounted, and is ignored by
953 .Nm zfs Cm mount Fl a .
954 Setting this property to
956 is similar to setting the
960 except that the dataset still has a normal
962 property, which can be inherited.
963 Setting this property to
965 allows datasets to be used solely as a mechanism to inherit properties.
966 One example of setting
967 .Sy canmount Ns = Ns Sy off
968 is to have two datasets with the same
970 so that the children of both datasets appear in the same directory, but might
971 have different inherited characteristics.
975 a dataset can only be mounted and unmounted explicitly.
976 The dataset is not mounted automatically when the dataset is created or
977 imported, nor is it mounted by the
978 .Nm zfs Cm mount Fl a
979 command or unmounted by the
980 .Nm zfs Cm unmount Fl a
983 This property is not inherited.
985 .Sy checksum Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy fletcher2 Ns | Ns
986 .Sy fletcher4 Ns | Ns Sy sha256 Ns | Ns Sy noparity Ns | Ns
987 .Sy sha512 Ns | Ns Sy skein Ns | Ns Sy edonr
989 Controls the checksum used to verify data integrity.
992 which automatically selects an appropriate algorithm
995 but this may change in future releases
999 disables integrity checking on user data.
1002 not only disables integrity but also disables maintaining parity for user data.
1003 This setting is used internally by a dump device residing on a RAID-Z pool and
1004 should not be used by any other dataset.
1005 Disabling checksums is
1007 a recommended practice.
1014 checksum algorithms require enabling the appropriate features on the pool.
1016 .Xr zpool-features 5
1017 for more information on these algorithms.
1019 Changing this property affects only newly-written data.
1021 .Sy compression Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy gzip Ns | Ns
1022 .Sy gzip- Ns Em N Ns | Ns Sy lz4 Ns | Ns Sy lzjb Ns | Ns Sy zle
1024 Controls the compression algorithm used for this dataset.
1026 Setting compression to
1028 indicates that the current default compression algorithm should be used.
1029 The default balances compression and decompression speed, with compression ratio
1030 and is expected to work well on a wide variety of workloads.
1031 Unlike all other settings for this property,
1033 does not select a fixed compression type.
1034 As new compression algorithms are added to ZFS and enabled on a pool, the
1035 default compression algorithm may change.
1036 The current default compression algorithm is either
1045 compression algorithm is a high-performance replacement for the
1048 It features significantly faster compression and decompression, as well as a
1049 moderately higher compression ratio than
1051 but can only be used on pools with the
1056 .Xr zpool-features 5
1057 for details on ZFS feature flags and the
1063 compression algorithm is optimized for performance while providing decent data
1068 compression algorithm uses the same compression as the
1073 level by using the value
1077 is an integer from 1
1080 .Pq best compression ratio .
1085 .Po which is also the default for
1091 compression algorithm compresses runs of zeros.
1093 This property can also be referred to by its shortened column name
1095 Changing this property affects only newly-written data.
1096 .It Sy copies Ns = Ns Sy 1 Ns | Ns Sy 2 Ns | Ns Sy 3
1097 Controls the number of copies of data stored for this dataset.
1098 These copies are in addition to any redundancy provided by the pool, for
1099 example, mirroring or RAID-Z.
1100 The copies are stored on different disks, if possible.
1101 The space used by multiple copies is charged to the associated file and dataset,
1104 property and counting against quotas and reservations.
1106 Changing this property only affects newly-written data.
1107 Therefore, set this property at file system creation time by using the
1108 .Fl o Sy copies Ns = Ns Ar N
1110 .It Sy devices Ns = Ns Sy on Ns | Ns Sy off
1111 Controls whether device nodes can be opened on this file system.
1112 The default value is
1114 .It Sy exec Ns = Ns Sy on Ns | Ns Sy off
1115 Controls whether processes can be executed from within this file system.
1116 The default value is
1118 .It Sy filesystem_limit Ns = Ns Em count Ns | Ns Sy none
1119 Limits the number of filesystems and volumes that can exist under this point in
1121 The limit is not enforced if the user is allowed to change the limit.
1123 .Sy filesystem_limit
1126 a descendent of a filesystem that already has a
1127 .Sy filesystem_limit
1128 does not override the ancestor's
1129 .Sy filesystem_limit ,
1130 but rather imposes an additional limit.
1131 This feature must be enabled to be used
1133 .Xr zpool-features 5
1135 .It Sy mountpoint Ns = Ns Pa path Ns | Ns Sy none Ns | Ns Sy legacy
1136 Controls the mount point used for this file system.
1139 section for more information on how this property is used.
1143 property is changed for a file system, the file system and any children that
1144 inherit the mount point are unmounted.
1147 then they remain unmounted.
1148 Otherwise, they are automatically remounted in the new location if the property
1153 or if they were mounted before the property was changed.
1154 In addition, any shared file systems are unshared and shared in the new
1156 .It Sy nbmand Ns = Ns Sy on Ns | Ns Sy off
1157 Controls whether the file system should be mounted with
1159 .Pq Non Blocking mandatory locks .
1160 This is used for SMB clients.
1161 Changes to this property only take effect when the file system is umounted and
1165 for more information on
1168 .It Sy primarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1169 Controls what is cached in the primary cache
1171 If this property is set to
1173 then both user data and metadata is cached.
1174 If this property is set to
1176 then neither user data nor metadata is cached.
1177 If this property is set to
1179 then only metadata is cached.
1180 The default value is
1182 .It Sy quota Ns = Ns Em size Ns | Ns Sy none
1183 Limits the amount of space a dataset and its descendents can consume.
1184 This property enforces a hard limit on the amount of space used.
1185 This includes all space consumed by descendents, including file systems and
1187 Setting a quota on a descendent of a dataset that already has a quota does not
1188 override the ancestor's quota, but rather imposes an additional limit.
1190 Quotas cannot be set on volumes, as the
1192 property acts as an implicit quota.
1193 .It Sy snapshot_limit Ns = Ns Em count Ns | Ns Sy none
1194 Limits the number of snapshots that can be created on a dataset and its
1198 on a descendent of a dataset that already has a
1200 does not override the ancestor's
1201 .Sy snapshot_limit ,
1202 but rather imposes an additional limit.
1203 The limit is not enforced if the user is allowed to change the limit.
1204 For example, this means that recursive snapshots taken from the global zone are
1205 counted against each delegated dataset within a zone.
1206 This feature must be enabled to be used
1208 .Xr zpool-features 5
1210 .It Sy userquota@ Ns Em user Ns = Ns Em size Ns | Ns Sy none
1211 Limits the amount of space consumed by the specified user.
1212 User space consumption is identified by the
1213 .Sy userspace@ Ns Em user
1216 Enforcement of user quotas may be delayed by several seconds.
1217 This delay means that a user might exceed their quota before the system notices
1218 that they are over quota and begins to refuse additional writes with the
1222 .Nm zfs Cm userspace
1223 subcommand for more information.
1225 Unprivileged users can only access their own groups' space usage.
1226 The root user, or a user who has been granted the
1230 can get and set everyone's quota.
1232 This property is not available on volumes, on file systems before version 4, or
1233 on pools before version 15.
1235 .Sy userquota@ Ns Em ...
1236 properties are not displayed by
1237 .Nm zfs Cm get Sy all .
1238 The user's name must be appended after the
1240 symbol, using one of the following forms:
1248 .Em POSIX numeric ID
1255 .Sy joe.smith@mydomain
1263 .It Sy groupquota@ Ns Em group Ns = Ns Em size Ns | Ns Sy none
1264 Limits the amount of space consumed by the specified group.
1265 Group space consumption is identified by the
1266 .Sy groupused@ Ns Em group
1269 Unprivileged users can access only their own groups' space usage.
1270 The root user, or a user who has been granted the
1274 can get and set all groups' quotas.
1275 .It Sy readonly Ns = Ns Sy on Ns | Ns Sy off
1276 Controls whether this dataset can be modified.
1277 The default value is
1280 This property can also be referred to by its shortened column name,
1282 .It Sy recordsize Ns = Ns Em size
1283 Specifies a suggested block size for files in the file system.
1284 This property is designed solely for use with database workloads that access
1285 files in fixed-size records.
1286 ZFS automatically tunes block sizes according to internal algorithms optimized
1287 for typical access patterns.
1289 For databases that create very large files but access them in small random
1290 chunks, these algorithms may be suboptimal.
1293 greater than or equal to the record size of the database can result in
1294 significant performance gains.
1295 Use of this property for general purpose file systems is strongly discouraged,
1296 and may adversely affect performance.
1298 The size specified must be a power of two greater than or equal to 512 and less
1299 than or equal to 128 Kbytes.
1302 feature is enabled on the pool, the size may be up to 1 Mbyte.
1304 .Xr zpool-features 5
1305 for details on ZFS feature flags.
1307 Changing the file system's
1309 affects only files created afterward; existing files are unaffected.
1311 This property can also be referred to by its shortened column name,
1313 .It Sy redundant_metadata Ns = Ns Sy all Ns | Ns Sy most
1314 Controls what types of metadata are stored redundantly.
1315 ZFS stores an extra copy of metadata, so that if a single block is corrupted,
1316 the amount of user data lost is limited.
1317 This extra copy is in addition to any redundancy provided at the pool level
1318 .Pq e.g. by mirroring or RAID-Z ,
1319 and is in addition to an extra copy specified by the
1322 .Pq up to a total of 3 copies .
1323 For example if the pool is mirrored,
1324 .Sy copies Ns = Ns 2 ,
1326 .Sy redundant_metadata Ns = Ns Sy most ,
1327 then ZFS stores 6 copies of most metadata, and 4 copies of data and some
1332 ZFS stores an extra copy of all metadata.
1333 If a single on-disk block is corrupt, at worst a single block of user data
1342 ZFS stores an extra copy of most types of metadata.
1343 This can improve performance of random writes, because less metadata must be
1345 In practice, at worst about 100 blocks
1350 of user data can be lost if a single on-disk block is corrupt.
1351 The exact behavior of which metadata blocks are stored redundantly may change in
1354 The default value is
1356 .It Sy refquota Ns = Ns Em size Ns | Ns Sy none
1357 Limits the amount of space a dataset can consume.
1358 This property enforces a hard limit on the amount of space used.
1359 This hard limit does not include space used by descendents, including file
1360 systems and snapshots.
1361 .It Sy refreservation Ns = Ns Em size Ns | Ns Sy none Ns | Ns Sy auto
1362 The minimum amount of space guaranteed to a dataset, not including its
1364 When the amount of space used is below this value, the dataset is treated as if
1365 it were taking up the amount of space specified by
1366 .Sy refreservation .
1369 reservation is accounted for in the parent datasets' space used, and counts
1370 against the parent datasets' quotas and reservations.
1374 is set, a snapshot is only allowed if there is enough free pool space outside of
1375 this reservation to accommodate the current number of
1377 bytes in the dataset.
1383 a volume is thick provisioned
1387 .Sy refreservation Ns = Ns Sy auto
1388 is only supported on volumes.
1392 .Sx Native Properties
1393 section for more information about sparse volumes.
1395 This property can also be referred to by its shortened column name,
1397 .It Sy reservation Ns = Ns Em size Ns | Ns Sy none
1398 The minimum amount of space guaranteed to a dataset and its descendants.
1399 When the amount of space used is below this value, the dataset is treated as if
1400 it were taking up the amount of space specified by its reservation.
1401 Reservations are accounted for in the parent datasets' space used, and count
1402 against the parent datasets' quotas and reservations.
1404 This property can also be referred to by its shortened column name,
1406 .It Sy secondarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1407 Controls what is cached in the secondary cache
1409 If this property is set to
1411 then both user data and metadata is cached.
1412 If this property is set to
1414 then neither user data nor metadata is cached.
1415 If this property is set to
1417 then only metadata is cached.
1418 The default value is
1420 .It Sy setuid Ns = Ns Sy on Ns | Ns Sy off
1421 Controls whether the setuid bit is respected for the file system.
1422 The default value is
1424 .It Sy sharesmb Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1425 Controls whether the file system is shared via SMB, and what options are to be
1427 A file system with the
1431 is managed through traditional tools such as
1433 Otherwise, the file system is automatically shared and unshared with the
1438 If the property is set to
1442 command is invoked with no options.
1445 command is invoked with options equivalent to the contents of this property.
1447 Because SMB shares requires a resource name, a unique resource name is
1448 constructed from the dataset name.
1449 The constructed name is a copy of the dataset name except that the characters in
1450 the dataset name, which would be invalid in the resource name, are replaced with
1456 is also supported that allows you to replace the data set name with a specified
1458 The specified name is then used to replace the prefix dataset in the case of
1460 For example, if the dataset
1463 .Sy name Ns = Ns Sy john ,
1466 has a resource name of
1469 .Em data/home/john/backups
1470 is shared, it has a resource name of
1473 When SMB shares are created, the SMB share name appears as an entry in the
1480 command to display the share-level ACLs on the entries in this directory.
1484 property is changed for a dataset, the dataset and any children inheriting the
1485 property are re-shared with the new options, only if the property was previously
1488 or if they were shared before the property was changed.
1489 If the new property is set to
1491 the file systems are unshared.
1492 .It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1493 Controls whether the file system is shared via NFS, and what options are to be
1495 A file system with a
1499 is managed through traditional tools such as
1504 Otherwise, the file system is automatically shared and unshared with the
1509 If the property is set to
1512 command is invoked with no options.
1515 command is invoked with options equivalent to the contents of this property.
1519 property is changed for a dataset, the dataset and any children inheriting the
1520 property are re-shared with the new options, only if the property was previously
1522 or if they were shared before the property was changed.
1523 If the new property is
1525 the file systems are unshared.
1526 .It Sy logbias Ns = Ns Sy latency Ns | Ns Sy throughput
1527 Provide a hint to ZFS about handling of synchronous requests in this dataset.
1533 ZFS will use pool log devices
1535 to handle the requests at low latency.
1540 ZFS will not use configured pool log devices.
1541 ZFS will instead optimize synchronous operations for global pool throughput and
1542 efficient use of resources.
1543 .It Sy snapdir Ns = Ns Sy hidden Ns | Ns Sy visible
1544 Controls whether the
1546 directory is hidden or visible in the root of the file system as discussed in
1550 The default value is
1552 .It Sy sync Ns = Ns Sy standard Ns | Ns Sy always Ns | Ns Sy disabled
1553 Controls the behavior of synchronous requests
1554 .Pq e.g. fsync, O_DSYNC .
1558 specified behavior of ensuring all synchronous requests are written to stable
1559 storage and all devices are flushed to ensure data is not cached by device
1561 .Pq this is the default .
1563 causes every file system transaction to be written and flushed before its
1564 system call returns.
1565 This has a large performance penalty.
1567 disables synchronous requests.
1568 File system transactions are only committed to stable storage periodically.
1569 This option will give the highest performance.
1570 However, it is very dangerous as ZFS would be ignoring the synchronous
1571 transaction demands of applications such as databases or NFS.
1572 Administrators should only use this option when the risks are understood.
1573 .It Sy version Ns = Ns Em N Ns | Ns Sy current
1574 The on-disk version of this file system, which is independent of the pool
1576 This property can only be set to later supported versions.
1580 .It Sy volsize Ns = Ns Em size
1581 For volumes, specifies the logical size of the volume.
1582 By default, creating a volume establishes a reservation of equal size.
1583 For storage pools with a version number of 9 or higher, a
1588 are reflected in an equivalent change to the reservation
1594 can only be set to a multiple of
1598 The reservation is kept equal to the volume's logical size to prevent unexpected
1599 behavior for consumers.
1600 Without the reservation, the volume could run out of space, resulting in
1601 undefined behavior or data corruption, depending on how the volume is used.
1602 These effects can also occur when the volume size is changed while it is in use
1603 .Pq particularly when shrinking the size .
1604 Extreme care should be used when adjusting the volume size.
1606 Though not recommended, a
1609 .Qq thin provisioned
1611 can be created by specifying the
1614 .Nm zfs Cm create Fl V
1615 command, or by changing the value of the
1620 property on pool version 8 or earlier
1622 after the volume has been created.
1625 is a volume where the value of
1627 is less than the size of the volume plus the space required to store its
1629 Consequently, writes to a sparse volume can fail with
1631 when the pool is low on space.
1632 For a sparse volume, changes to
1634 are not reflected in the
1636 A volume that is not sparse is said to be
1637 .Qq thick provisioned .
1638 A sparse volume can become thick provisioned by setting
1642 .It Sy vscan Ns = Ns Sy on Ns | Ns Sy off
1643 Controls whether regular files should be scanned for viruses when a file is
1645 In addition to enabling this property, the virus scan service must also be
1646 enabled for virus scanning to occur.
1647 The default value is
1649 .It Sy xattr Ns = Ns Sy on Ns | Ns Sy off
1650 Controls whether extended attributes are enabled for this file system.
1651 The default value is
1653 .It Sy zoned Ns = Ns Sy on Ns | Ns Sy off
1654 Controls whether the dataset is managed from a non-global zone.
1657 section for more information.
1658 The default value is
1662 The following three properties cannot be changed after the file system is
1663 created, and therefore, should be set when the file system is created.
1664 If the properties are not set with the
1668 commands, these properties are inherited from the parent dataset.
1669 If the parent dataset lacks these properties due to having been created prior to
1670 these features being supported, the new file system will have the default values
1671 for these properties.
1674 .Sy casesensitivity Ns = Ns Sy sensitive Ns | Ns
1675 .Sy insensitive Ns | Ns Sy mixed
1677 Indicates whether the file name matching algorithm used by the file system
1678 should be case-sensitive, case-insensitive, or allow a combination of both
1680 The default value for the
1688 file systems have case-sensitive file names.
1694 property indicates that the file system can support requests for both
1695 case-sensitive and case-insensitive matching behavior.
1696 Currently, case-insensitive matching behavior on a file system that supports
1697 mixed behavior is limited to the SMB server product.
1698 For more information about the
1700 value behavior, see the "ZFS Administration Guide".
1702 .Sy normalization Ns = Ns Sy none Ns | Ns Sy formC Ns | Ns
1703 .Sy formD Ns | Ns Sy formKC Ns | Ns Sy formKD
1705 Indicates whether the file system should perform a
1707 normalization of file names whenever two file names are compared, and which
1708 normalization algorithm should be used.
1709 File names are always stored unmodified, names are normalized as part of any
1711 If this property is set to a legal value other than
1715 property was left unspecified, the
1717 property is automatically set to
1719 The default value of the
1723 This property cannot be changed after the file system is created.
1724 .It Sy utf8only Ns = Ns Sy on Ns | Ns Sy off
1725 Indicates whether the file system should reject file names that include
1726 characters that are not present in the
1729 If this property is explicitly set to
1731 the normalization property must either not be explicitly set or be set to
1733 The default value for the
1737 This property cannot be changed after the file system is created.
1741 .Sy casesensitivity ,
1745 properties are also new permissions that can be assigned to non-privileged users
1746 by using the ZFS delegated administration feature.
1747 .Ss "Temporary Mount Point Properties"
1748 When a file system is mounted, either through
1750 for legacy mounts or the
1752 command for normal file systems, its mount options are set according to its
1754 The correlation between properties and mount options is as follows:
1756 PROPERTY MOUNT OPTION
1757 devices devices/nodevices
1760 setuid setuid/nosetuid
1764 In addition, these options can be set on a per-mount basis using the
1766 option, without affecting the property that is stored on disk.
1767 The values specified on the command line override the values stored in the
1771 option is an alias for
1772 .Sy nodevices Ns \&, Ns Sy nosetuid .
1773 These properties are reported as
1778 If the properties are changed while the dataset is mounted, the new setting
1779 overrides any temporary settings.
1780 .Ss "User Properties"
1781 In addition to the standard native properties, ZFS supports arbitrary user
1783 User properties have no effect on ZFS behavior, but applications or
1784 administrators can use them to annotate datasets
1785 .Pq file systems, volumes, and snapshots .
1787 User property names must contain a colon
1789 character to distinguish them from native properties.
1790 They may contain lowercase letters, numbers, and the following punctuation
1799 The expected convention is that the property name is divided into two portions
1801 .Em module Ns \&: Ns Em property ,
1802 but this namespace is not enforced by ZFS.
1803 User property names can be at most 256 characters, and cannot begin with a dash
1806 When making programmatic use of user properties, it is strongly suggested to use
1811 component of property names to reduce the chance that two
1812 independently-developed packages use the same property name for different
1815 The values of user properties are arbitrary strings, are always inherited, and
1816 are never validated.
1817 All of the commands that operate on properties
1818 .Po Nm zfs Cm list ,
1823 can be used to manipulate both native properties and user properties.
1826 command to clear a user property.
1827 If the property is not defined in any parent dataset, it is removed entirely.
1828 Property values are limited to 8192 bytes.
1829 .Ss ZFS Volumes as Swap or Dump Devices
1830 During an initial installation a swap device and dump device are created on ZFS
1831 volumes in the ZFS root pool.
1832 By default, the swap area size is based on 1/2 the size of physical memory up to
1834 The size of the dump device depends on the kernel's requirements at installation
1836 Separate ZFS volumes must be used for the swap area and dump devices.
1837 Do not swap to a file on a ZFS file system.
1838 A ZFS swap file configuration is not supported.
1840 If you need to change your swap area or dump device after the system is
1841 installed or upgraded, use the
1847 All subcommands that modify state are logged persistently to the pool in their
1851 Displays a help message.
1856 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1859 Creates a new ZFS file system.
1860 The file system is automatically mounted according to the
1862 property inherited from the parent.
1863 .Bl -tag -width "-o"
1864 .It Fl o Ar property Ns = Ns Ar value
1865 Sets the specified property as if the command
1866 .Nm zfs Cm set Ar property Ns = Ns Ar value
1867 was invoked at the same time the dataset was created.
1868 Any editable ZFS property can also be set at creation time.
1871 options can be specified.
1872 An error results if the same property is specified in multiple
1876 Creates all the non-existing parent datasets.
1877 Datasets created in this manner are automatically mounted according to the
1879 property inherited from their parent.
1880 Any property specified on the command line using the
1883 If the target filesystem already exists, the operation completes successfully.
1889 .Op Fl b Ar blocksize
1890 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1891 .Fl V Ar size Ar volume
1893 Creates a volume of the given size.
1894 The volume is exported as a block device in
1895 .Pa /dev/zvol/{dsk,rdsk}/path ,
1898 is the name of the volume in the ZFS namespace.
1899 The size represents the logical size as exported by the device.
1900 By default, a reservation of equal size is created.
1903 is automatically rounded up to the nearest 128 Kbytes to ensure that the volume
1904 has an integral number of blocks regardless of
1906 .Bl -tag -width "-b"
1907 .It Fl b Ar blocksize
1909 .Fl o Sy volblocksize Ns = Ns Ar blocksize .
1910 If this option is specified in conjunction with
1911 .Fl o Sy volblocksize ,
1912 the resulting behavior is undefined.
1913 .It Fl o Ar property Ns = Ns Ar value
1914 Sets the specified property as if the
1915 .Nm zfs Cm set Ar property Ns = Ns Ar value
1916 command was invoked at the same time the dataset was created.
1917 Any editable ZFS property can also be set at creation time.
1920 options can be specified.
1921 An error results if the same property is specified in multiple
1925 Creates all the non-existing parent datasets.
1926 Datasets created in this manner are automatically mounted according to the
1928 property inherited from their parent.
1929 Any property specified on the command line using the
1932 If the target filesystem already exists, the operation completes successfully.
1934 Creates a sparse volume with no reservation.
1938 .Sx Native Properties
1939 section for more information about sparse volumes.
1945 .Ar filesystem Ns | Ns Ar volume
1947 Destroys the given dataset.
1948 By default, the command unshares any file systems that are currently shared,
1949 unmounts any file systems that are currently mounted, and refuses to destroy a
1950 dataset that has active dependents
1951 .Pq children or clones .
1952 .Bl -tag -width "-R"
1954 Recursively destroy all dependents, including cloned file systems outside the
1957 Force an unmount of any file systems using the
1960 This option has no effect on non-file systems or unmounted file systems.
1965 No data will be deleted.
1966 This is useful in conjunction with the
1970 flags to determine what data would be deleted.
1972 Print machine-parsable verbose information about the deleted data.
1974 Recursively destroy all children.
1976 Print verbose information about the deleted data.
1979 Extreme care should be taken when applying either the
1983 options, as they can destroy large portions of a pool and cause unexpected
1984 behavior for mounted file systems in use.
1989 .Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns
1990 .Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ...
1992 The given snapshots are destroyed immediately if and only if the
1996 option would have destroyed it.
1997 Such immediate destruction would occur, for example, if the snapshot had no
1998 clones and the user-initiated reference count were zero.
2000 If a snapshot does not qualify for immediate destruction, it is marked for
2002 In this state, it exists as a usable, visible snapshot until both of the
2003 preconditions listed above are met, at which point it is destroyed.
2005 An inclusive range of snapshots may be specified by separating the first and
2006 last snapshots with a percent sign.
2007 The first and/or last snapshots may be left blank, in which case the
2008 filesystem's oldest or newest snapshot will be implied.
2011 .Pq or ranges of snapshots
2012 of the same filesystem or volume may be specified in a comma-separated list of
2014 Only the snapshot's short name
2015 .Po the part after the
2018 should be specified when using a range or comma-separated list to identify
2020 .Bl -tag -width "-R"
2022 Recursively destroy all clones of these snapshots, including the clones,
2023 snapshots, and children.
2024 If this flag is specified, the
2026 flag will have no effect.
2028 Defer snapshot deletion.
2033 No data will be deleted.
2034 This is useful in conjunction with the
2038 flags to determine what data would be deleted.
2040 Print machine-parsable verbose information about the deleted data.
2043 .Pq or mark for deferred deletion
2044 all snapshots with this name in descendent file systems.
2046 Print verbose information about the deleted data.
2048 Extreme care should be taken when applying either the
2052 options, as they can destroy large portions of a pool and cause unexpected
2053 behavior for mounted file systems in use.
2058 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
2060 The given bookmark is destroyed.
2065 .Oo Fl o Ar property Ns = Ns value Oc Ns ...
2066 .Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ...
2068 Creates snapshots with the given names.
2069 All previous modifications by successful system calls to the file system are
2070 part of the snapshots.
2071 Snapshots are taken atomically, so that all snapshots correspond to the same
2075 section for details.
2076 .Bl -tag -width "-o"
2077 .It Fl o Ar property Ns = Ns Ar value
2078 Sets the specified property; see
2082 Recursively create snapshots of all descendent datasets
2090 Roll back the given dataset to a previous snapshot.
2091 When a dataset is rolled back, all data that has changed since the snapshot is
2092 discarded, and the dataset reverts to the state at the time of the snapshot.
2093 By default, the command refuses to roll back to a snapshot other than the most
2095 In order to do so, all intermediate snapshots and bookmarks must be destroyed by
2102 options do not recursively destroy the child snapshots of a recursive snapshot.
2103 Only direct snapshots of the specified filesystem are destroyed by either of
2105 To completely roll back a recursive snapshot, you must rollback the individual
2107 .Bl -tag -width "-R"
2109 Destroy any more recent snapshots and bookmarks, as well as any clones of those
2114 option to force an unmount of any clone file systems that are to be destroyed.
2116 Destroy any snapshots and bookmarks more recent than the one specified.
2122 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
2123 .Ar snapshot Ar filesystem Ns | Ns Ar volume
2125 Creates a clone of the given snapshot.
2128 section for details.
2129 The target dataset can be located anywhere in the ZFS hierarchy, and is created
2130 as the same type as the original.
2131 .Bl -tag -width "-o"
2132 .It Fl o Ar property Ns = Ns Ar value
2133 Sets the specified property; see
2137 Creates all the non-existing parent datasets.
2138 Datasets created in this manner are automatically mounted according to the
2140 property inherited from their parent.
2141 If the target filesystem or volume already exists, the operation completes
2147 .Ar clone-filesystem
2149 Promotes a clone file system to no longer be dependent on its
2152 This makes it possible to destroy the file system that the clone was created
2154 The clone parent-child dependency relationship is reversed, so that the origin
2155 file system becomes a clone of the specified file system.
2157 The snapshot that was cloned, and any snapshots previous to this snapshot, are
2158 now owned by the promoted clone.
2159 The space they use moves from the origin file system to the promoted clone, so
2160 enough space must be available to accommodate these snapshots.
2161 No new space is consumed by this operation, but the space accounting is
2163 The promoted clone must not have any conflicting snapshot names of its own.
2166 subcommand can be used to rename any conflicting snapshots.
2171 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2172 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2178 .Ar filesystem Ns | Ns Ar volume
2179 .Ar filesystem Ns | Ns Ar volume
2181 Renames the given dataset.
2182 The new target can be located anywhere in the ZFS hierarchy, with the exception
2184 Snapshots can only be renamed within the parent file system or volume.
2185 When renaming a snapshot, the parent file system of the snapshot does not need
2186 to be specified as part of the second argument.
2187 Renamed file systems can inherit new mount points, in which case they are
2188 unmounted and remounted at the new mount point.
2189 .Bl -tag -width "-a"
2191 Force unmount any filesystems that need to be unmounted in the process.
2193 Creates all the nonexistent parent datasets.
2194 Datasets created in this manner are automatically mounted according to the
2196 property inherited from their parent.
2202 .Ar snapshot Ar snapshot
2204 Recursively rename the snapshots of all descendent datasets.
2205 Snapshots are the only dataset that can be renamed recursively.
2209 .Op Fl r Ns | Ns Fl d Ar depth
2211 .Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc
2212 .Oo Fl s Ar property Oc Ns ...
2213 .Oo Fl S Ar property Oc Ns ...
2214 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2215 .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ...
2217 Lists the property information for the given datasets in tabular form.
2218 If specified, you can list property information by the absolute pathname or the
2220 By default, all file systems and volumes are displayed.
2221 Snapshots are displayed if the
2228 The following fields are displayed,
2229 .Sy name Ns \&, Ns Sy used Ns \&, Ns Sy available Ns \&, Ns Sy referenced Ns \&, Ns
2231 .Bl -tag -width "-H"
2233 Used for scripting mode.
2234 Do not print headers and separate fields by a single tab instead of arbitrary
2236 .It Fl S Ar property
2239 option, but sorts by property in descending order.
2241 Recursively display any children of the dataset, limiting the recursion to
2247 will display only the dataset and its direct children.
2248 .It Fl o Ar property
2249 A comma-separated list of properties to display.
2250 The property must be:
2253 One of the properties described in the
2254 .Sx Native Properties
2261 to display the dataset name
2265 to display space usage properties on file systems and volumes.
2266 This is a shortcut for specifying
2267 .Fl o Sy name Ns \&, Ns Sy avail Ns \&, Ns Sy used Ns \&, Ns Sy usedsnap Ns \&, Ns
2268 .Sy usedds Ns \&, Ns Sy usedrefreserv Ns \&, Ns Sy usedchild Fl t
2269 .Sy filesystem Ns \&, Ns Sy volume
2273 Display numbers in parsable
2277 Recursively display any children of the dataset on the command line.
2278 .It Fl s Ar property
2279 A property for sorting the output by column in ascending order based on the
2280 value of the property.
2281 The property must be one of the properties described in the
2283 section, or the special value
2285 to sort by the dataset name.
2286 Multiple properties can be specified at one time using multiple
2291 options are evaluated from left to right in decreasing order of importance.
2292 The following is a list of sorting criteria:
2295 Numeric types sort in numeric order.
2297 String types sort in alphabetical order.
2299 Types inappropriate for a row sort that row to the literal bottom, regardless of
2300 the specified ordering.
2303 If no sorting options are specified the existing behavior of
2307 A comma-separated list of types to display, where
2316 For example, specifying
2318 displays only snapshots.
2323 .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ...
2324 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2326 Sets the property or list of properties to the given value(s) for each dataset.
2327 Only some properties can be edited.
2330 section for more information on what properties can be set and acceptable
2332 Numeric values can be specified as exact values, or in a human-readable form
2334 .Sy B , K , M , G , T , P , E , Z
2335 .Po for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes,
2336 or zettabytes, respectively
2338 User properties can be set on snapshots.
2339 For more information, see the
2345 .Op Fl r Ns | Ns Fl d Ar depth
2347 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2348 .Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc
2349 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2350 .Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ...
2351 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Ns ...
2353 Displays properties for the given datasets.
2354 If no datasets are specified, then the command displays properties for all
2355 datasets on the system.
2356 For each property, the following columns are displayed:
2359 property Property name
2360 value Property value
2361 source Property source. Can either be local, default,
2362 temporary, inherited, or none (-).
2365 All columns are displayed by default, though this can be controlled by using the
2368 This command takes a comma-separated list of properties as described in the
2369 .Sx Native Properties
2376 can be used to display all properties that apply to the given dataset's type
2377 .Pq filesystem, volume, snapshot, or bookmark .
2378 .Bl -tag -width "-H"
2380 Display output in a form more easily parsed by scripts.
2381 Any headers are omitted, and fields are explicitly separated by a single tab
2382 instead of an arbitrary amount of space.
2384 Recursively display any children of the dataset, limiting the recursion to
2388 will display only the dataset and its direct children.
2390 A comma-separated list of columns to display.
2391 .Sy name Ns \&, Ns Sy property Ns \&, Ns Sy value Ns \&, Ns Sy source
2392 is the default value.
2394 Display numbers in parsable
2398 Recursively display properties for any children.
2400 A comma-separated list of sources to display.
2401 Those properties coming from a source other than those in this list are ignored.
2402 Each source must be one of the following:
2409 The default value is all sources.
2411 A comma-separated list of types to display, where
2425 .Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2427 Clears the specified property, causing it to be inherited from an ancestor,
2428 restored to default if no ancestor has the property set, or with the
2430 option reverted to the received value if one exists.
2433 section for a listing of default values, and details on which properties can be
2435 .Bl -tag -width "-r"
2437 Recursively inherit the given property for all children.
2439 Revert the property to the received value if one exists; otherwise operate as
2442 option was not specified.
2447 .Ar filesystem Ns | Ns Ar volume
2449 Remap the indirect blocks in the given fileystem or volume so that they no
2450 longer reference blocks on previously removed vdevs and we can eventually
2451 shrink the size of the indirect mapping objects for the previously removed
2452 vdevs. Note that remapping all blocks might not be possible and that
2453 references from snapshots will still exist and cannot be remapped.
2458 Displays a list of file systems that are not the most recent version.
2464 Displays a list of currently supported file system versions.
2470 .Fl a | Ar filesystem
2472 Upgrades file systems to a new on-disk version.
2473 Once this is done, the file systems will no longer be accessible on systems
2474 running older versions of the software.
2476 streams generated from new snapshots of these file systems cannot be accessed on
2477 systems running older versions of the software.
2479 In general, the file system version is independent of the pool version.
2482 for information on the
2483 .Nm zpool Cm upgrade
2486 In some cases, the file system version and the pool version are interrelated and
2487 the pool version must be upgraded before the file system version can be
2489 .Bl -tag -width "-V"
2491 Upgrade to the specified
2495 flag is not specified, this command upgrades to the most recent version.
2497 option can only be used to increase the version number, and only up to the most
2498 recent version supported by this software.
2500 Upgrade all file systems on all imported pools.
2502 Upgrade the specified file system.
2504 Upgrade the specified file system and all descendent file systems.
2510 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2511 .Oo Fl s Ar field Oc Ns ...
2512 .Oo Fl S Ar field Oc Ns ...
2513 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2514 .Ar filesystem Ns | Ns Ar snapshot
2516 Displays space consumed by, and quotas on, each user in the specified filesystem
2518 This corresponds to the
2519 .Sy userused@ Ns Em user
2521 .Sy userquota@ Ns Em user
2523 .Bl -tag -width "-H"
2525 Do not print headers, use tab-delimited output.
2527 Sort by this field in reverse order.
2531 Translate SID to POSIX ID.
2532 The POSIX ID may be ephemeral if no mapping exists.
2533 Normal POSIX interfaces
2538 perform this translation, so the
2540 option allows the output from
2541 .Nm zfs Cm userspace
2542 to be compared directly with those utilities.
2545 may lead to confusion if some files were created by an SMB user before a
2546 SMB-to-POSIX name mapping was established.
2547 In such a case, some files will be owned by the SMB entity and some by the POSIX
2551 option will report that the POSIX entity has the total usage and quota for both.
2553 Print numeric ID instead of user/group name.
2554 .It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2555 Display only the specified fields from the following set:
2560 The default is to display all fields.
2566 Sort output by this field.
2571 flags may be specified multiple times to sort first by one field, then by
2574 .Fl s Sy type Fl s Sy name .
2575 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2576 Print only the specified types from the following set:
2583 .Fl t Sy posixuser Ns \&, Ns Sy smbuser .
2584 The default can be changed to include group types.
2590 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2591 .Oo Fl s Ar field Oc Ns ...
2592 .Oo Fl S Ar field Oc Ns ...
2593 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2594 .Ar filesystem Ns | Ns Ar snapshot
2596 Displays space consumed by, and quotas on, each group in the specified
2597 filesystem or snapshot.
2598 This subcommand is identical to
2599 .Nm zfs Cm userspace ,
2600 except that the default types to display are
2601 .Fl t Sy posixgroup Ns \&, Ns Sy smbgroup .
2606 Displays all ZFS file systems currently mounted.
2612 .Fl a | Ar filesystem
2614 Mounts ZFS file systems.
2615 .Bl -tag -width "-O"
2617 Perform an overlay mount.
2620 for more information.
2622 Mount all available ZFS file systems.
2623 Invoked automatically as part of the boot process.
2625 Mount the specified filesystem.
2627 An optional, comma-separated list of mount options to use temporarily for the
2628 duration of the mount.
2630 .Sx Temporary Mount Point Properties
2631 section for details.
2633 Report mount progress.
2639 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2641 Unmounts currently mounted ZFS file systems.
2642 .Bl -tag -width "-a"
2644 Unmount all available ZFS file systems.
2645 Invoked automatically as part of the shutdown process.
2646 .It Ar filesystem Ns | Ns Ar mountpoint
2647 Unmount the specified filesystem.
2648 The command can also be given a path to a ZFS file system mount point on the
2651 Forcefully unmount the file system, even if it is currently in use.
2656 .Fl a | Ar filesystem
2658 Shares available ZFS file systems.
2659 .Bl -tag -width "-a"
2661 Share all available ZFS file systems.
2662 Invoked automatically as part of the boot process.
2664 Share the specified filesystem according to the
2669 File systems are shared when the
2678 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2680 Unshares currently shared ZFS file systems.
2681 .Bl -tag -width "-a"
2683 Unshare all available ZFS file systems.
2684 Invoked automatically as part of the shutdown process.
2685 .It Ar filesystem Ns | Ns Ar mountpoint
2686 Unshare the specified filesystem.
2687 The command can also be given a path to a ZFS file system shared on the system.
2692 .Ar snapshot bookmark
2694 Creates a bookmark of the given snapshot.
2695 Bookmarks mark the point in time when the snapshot was created, and can be used
2696 as the incremental source for a
2700 This feature must be enabled to be used.
2702 .Xr zpool-features 5
2703 for details on ZFS feature flags and the
2710 .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
2713 Creates a stream representation of the second
2715 which is written to standard output.
2716 The output can be redirected to a file or to a different system
2717 .Po for example, using
2720 By default, a full stream is generated.
2721 .Bl -tag -width "-D"
2723 Generate a deduplicated stream.
2724 Blocks which would have been sent multiple times in the send stream will only be
2726 The receiving system must also support this feature to receive a deduplicated
2728 This flag can be used regardless of the dataset's
2730 property, but performance will be much better if the filesystem uses a
2731 dedup-capable checksum
2735 .It Fl I Ar snapshot
2736 Generate a stream package that sends all intermediary snapshots from the first
2737 snapshot to the second snapshot.
2741 .Fl i Em @a Em fs@b Ns \&; Fl i Em @b Em fs@c Ns \&; Fl i Em @c Em fs@d .
2742 The incremental source may be specified as with the
2745 .It Fl L, -large-block
2746 Generate a stream which may contain blocks larger than 128KB.
2747 This flag has no effect if the
2749 pool feature is disabled, or if the
2751 property of this filesystem has never been set above 128KB.
2752 The receiving system must have the
2754 pool feature enabled as well.
2756 .Xr zpool-features 5
2757 for details on ZFS feature flags and the
2761 Print machine-parsable verbose information about the stream package generated.
2762 .It Fl R, -replicate
2763 Generate a replication stream package, which will replicate the specified
2764 file system, and all descendent file systems, up to the named snapshot.
2765 When received, all properties, snapshots, descendent file systems, and clones
2772 flags are used in conjunction with the
2774 flag, an incremental replication stream is generated.
2775 The current values of properties, and current snapshot and file system names are
2776 set when the stream is received.
2779 flag is specified when this stream is received, snapshots and file systems that
2780 do not exist on the sending side are destroyed.
2782 Generate a more compact stream by using
2784 records for blocks which are stored more compactly on disk by the
2787 This flag has no effect if the
2789 feature is disabled.
2790 The receiving system must have the
2795 feature is active on the sending system, then the receiving system must have
2796 that feature enabled as well.
2798 .Xr zpool-features 5
2799 for details on ZFS feature flags and the
2802 .It Fl c, -compressed
2803 Generate a more compact stream by using compressed WRITE records for blocks
2804 which are compressed on disk and in memory
2807 property for details
2811 feature is active on the sending system, then the receiving system must have
2812 that feature enabled as well.
2815 feature is enabled on the sending system but the
2817 option is not supplied in conjunction with
2819 then the data will be decompressed before sending so it can be split into
2820 smaller block sizes.
2821 .It Fl i Ar snapshot
2822 Generate an incremental stream from the first
2824 .Pq the incremental source
2827 .Pq the incremental target .
2828 The incremental source can be specified as the last component of the snapshot
2832 character and following
2834 and it is assumed to be from the same file system as the incremental target.
2836 If the destination is a clone, the source may be the origin snapshot, which must
2839 .Em pool/fs@origin ,
2847 Do not generate any actual send data.
2848 This is useful in conjunction with the
2852 flags to determine what data will be sent.
2853 In this case, the verbose output will be written to standard output
2854 .Po contrast with a non-dry-run, where the stream is written to standard output
2855 and the verbose output goes to standard error
2858 Include the dataset's properties in the stream.
2859 This flag is implicit when
2862 The receiving system must also support this feature.
2864 Print verbose information about the stream package generated.
2865 This information includes a per-second report of how much data has been sent.
2867 The format of the stream is committed.
2868 You will be able to receive your streams on future versions of ZFS .
2874 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
2875 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2877 Generate a send stream, which may be of a filesystem, and may be incremental
2879 If the destination is a filesystem or volume, the pool must be read-only, or the
2880 filesystem must not be mounted.
2881 When the stream generated from a filesystem or volume is received, the default
2882 snapshot name will be
2884 .Bl -tag -width "-L"
2885 .It Fl L, -large-block
2886 Generate a stream which may contain blocks larger than 128KB.
2887 This flag has no effect if the
2889 pool feature is disabled, or if the
2891 property of this filesystem has never been set above 128KB.
2892 The receiving system must have the
2894 pool feature enabled as well.
2896 .Xr zpool-features 5
2897 for details on ZFS feature flags and the
2900 .It Fl c, -compressed
2901 Generate a more compact stream by using compressed WRITE records for blocks
2902 which are compressed on disk and in memory
2905 property for details
2909 feature is active on the sending system, then the receiving system must have
2910 that feature enabled as well.
2913 feature is enabled on the sending system but the
2915 option is not supplied in conjunction with
2917 then the data will be decompressed before sending so it can be split into
2918 smaller block sizes.
2920 Generate a more compact stream by using
2922 records for blocks which are stored more compactly on disk by the
2925 This flag has no effect if the
2927 feature is disabled.
2928 The receiving system must have the
2933 feature is active on the sending system, then the receiving system must have
2934 that feature enabled as well.
2936 .Xr zpool-features 5
2937 for details on ZFS feature flags and the
2940 .It Fl i Ar snapshot Ns | Ns Ar bookmark
2941 Generate an incremental send stream.
2942 The incremental source must be an earlier snapshot in the destination's history.
2943 It will commonly be an earlier snapshot in the destination's file system, in
2944 which case it can be specified as the last component of the name
2949 character and following
2952 If the incremental target is a clone, the incremental source can be the origin
2953 snapshot, or an earlier snapshot in the origin's filesystem, or the origin's
2961 .Ar receive_resume_token
2963 Creates a send stream which resumes an interrupted receive.
2965 .Ar receive_resume_token
2966 is the value of this property on the filesystem or volume that was being
2968 See the documentation for
2975 .Op Fl o Sy origin Ns = Ns Ar snapshot
2976 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2982 .Op Fl d Ns | Ns Fl e
2983 .Op Fl o Sy origin Ns = Ns Ar snapshot
2986 Creates a snapshot whose contents are as specified in the stream provided on
2988 If a full stream is received, then a new file system is created as well.
2989 Streams are created using the
2991 subcommand, which by default creates a full stream.
2993 can be used as an alias for
2996 If an incremental stream is received, then the destination file system must
2997 already exist, and its most recent snapshot must match the incremental stream's
3001 the destination device link is destroyed and recreated, which means the
3003 cannot be accessed during the
3007 When a snapshot replication package stream that is generated by using the
3008 .Nm zfs Cm send Fl R
3009 command is received, any snapshots that do not exist on the sending location are
3010 destroyed by using the
3011 .Nm zfs Cm destroy Fl d
3014 The name of the snapshot
3015 .Pq and file system, if a full stream is received
3016 that this subcommand creates depends on the argument type and the use of the
3022 If the argument is a snapshot name, the specified
3025 If the argument is a file system or volume name, a snapshot with the same name
3026 as the sent snapshot is created within the specified
3034 options are specified, the provided target snapshot name is used exactly as
3041 options cause the file system name of the target snapshot to be determined by
3042 appending a portion of the sent snapshot's name to the specified target
3046 option is specified, all but the first element of the sent snapshot's file
3048 .Pq usually the pool name
3049 is used and any required intermediate file systems within the specified one are
3053 option is specified, then only the last element of the sent snapshot's file
3055 .Pq i.e. the name of the source file system itself
3056 is used as the target file system name.
3057 .Bl -tag -width "-F"
3059 Force a rollback of the file system to the most recent snapshot before
3060 performing the receive operation.
3061 If receiving an incremental replication stream
3062 .Po for example, one generated by
3063 .Nm zfs Cm send Fl R Op Fl i Ns | Ns Fl I
3065 destroy snapshots and file systems that do not exist on the sending side.
3067 Discard the first element of the sent snapshot's file system name, using the
3068 remaining elements to determine the name of the target file system for the new
3069 snapshot as described in the paragraph above.
3071 Discard all but the last element of the sent snapshot's file system name, using
3072 that element to determine the name of the target file system for the new
3073 snapshot as described in the paragraph above.
3075 Do not actually receive the stream.
3076 This can be useful in conjunction with the
3078 option to verify the name the receive operation would use.
3079 .It Fl o Sy origin Ns = Ns Ar snapshot
3080 Forces the stream to be received as a clone of the given snapshot.
3081 If the stream is a full send stream, this will create the filesystem
3082 described by the stream as a clone of the specified snapshot.
3083 Which snapshot was specified will not affect the success or failure of the
3084 receive, as long as the snapshot does exist.
3085 If the stream is an incremental send stream, all the normal verification will be
3088 File system that is associated with the received stream is not mounted.
3090 Print verbose information about the stream and the time required to perform the
3093 If the receive is interrupted, save the partially received state, rather
3095 Interruption may be due to premature termination of the stream
3096 .Po e.g. due to network failure or failure of the remote system
3097 if the stream is being read over a network connection
3099 a checksum error in the stream, termination of the
3101 process, or unclean shutdown of the system.
3103 The receive can be resumed with a stream generated by
3104 .Nm zfs Cm send Fl t Ar token ,
3108 .Sy receive_resume_token
3109 property of the filesystem or volume which is received into.
3111 To use this flag, the storage pool must have the
3112 .Sy extensible_dataset
3115 .Xr zpool-features 5
3116 for details on ZFS feature flags.
3122 .Ar filesystem Ns | Ns Ar volume
3124 Abort an interrupted
3125 .Nm zfs Cm receive Fl s ,
3126 deleting its saved partially received state.
3130 .Ar filesystem Ns | Ns Ar volume
3132 Displays permissions that have been delegated on the specified filesystem or
3134 See the other forms of
3136 for more information.
3141 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3142 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3143 .Ar setname Oc Ns ...
3144 .Ar filesystem Ns | Ns Ar volume
3150 .Fl e Ns | Ns Sy everyone
3151 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3152 .Ar setname Oc Ns ...
3153 .Ar filesystem Ns | Ns Ar volume
3155 Delegates ZFS administration permission for the file systems to non-privileged
3157 .Bl -tag -width "-d"
3159 Allow only for the descendent file systems.
3160 .It Fl e Ns | Ns Sy everyone
3161 Specifies that the permissions be delegated to everyone.
3162 .It Fl g Ar group Ns Oo , Ns Ar group Oc Ns ...
3163 Explicitly specify that permissions are delegated to the group.
3167 only for the specified file system.
3168 .It Fl u Ar user Ns Oo , Ns Ar user Oc Ns ...
3169 Explicitly specify that permissions are delegated to the user.
3170 .It Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3171 Specifies to whom the permissions are delegated.
3172 Multiple entities can be specified as a comma-separated list.
3175 options are specified, then the argument is interpreted preferentially as the
3178 then as a user name, and lastly as a group name.
3179 To specify a user or group named
3186 To specify a group with the same name as a user, use the
3190 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3191 .Ar setname Oc Ns ...
3193 The permissions to delegate.
3194 Multiple permissions may be specified as a comma-separated list.
3195 Permission names are the same as ZFS subcommand and property names.
3196 See the property list below.
3197 Property set names, which begin with
3202 form below for details.
3207 options are specified, or both are, then the permissions are allowed for the
3208 file system or volume, and all of its descendents.
3210 Permissions are generally the ability to use a ZFS subcommand or change a ZFS
3212 The following permissions are available:
3215 allow subcommand Must also have the permission that is
3217 clone subcommand Must also have the 'create' ability and
3218 'mount' ability in the origin file system
3219 create subcommand Must also have the 'mount' ability
3220 destroy subcommand Must also have the 'mount' ability
3221 diff subcommand Allows lookup of paths within a dataset
3222 given an object number, and the ability
3223 to create snapshots necessary to
3225 mount subcommand Allows mount/umount of ZFS datasets
3226 promote subcommand Must also have the 'mount' and 'promote'
3227 ability in the origin file system
3228 receive subcommand Must also have the 'mount' and 'create'
3230 rename subcommand Must also have the 'mount' and 'create'
3231 ability in the new parent
3232 rollback subcommand Must also have the 'mount' ability
3234 share subcommand Allows sharing file systems over NFS
3236 snapshot subcommand Must also have the 'mount' ability
3238 groupquota other Allows accessing any groupquota@...
3240 groupused other Allows reading any groupused@... property
3241 userprop other Allows changing any user property
3242 userquota other Allows accessing any userquota@...
3244 userused other Allows reading any userused@... property
3250 casesensitivity property
3252 compression property
3256 filesystem_limit property
3259 normalization property
3260 primarycache property
3265 refreservation property
3266 reservation property
3267 secondarycache property
3272 snapshot_limit property
3275 volblocksize property
3285 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3286 .Ar setname Oc Ns ...
3287 .Ar filesystem Ns | Ns Ar volume
3292 These permissions are granted
3294 to the creator of any newly-created descendent file system.
3298 .Fl s No @ Ns Ar setname
3299 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3300 .Ar setname Oc Ns ...
3301 .Ar filesystem Ns | Ns Ar volume
3303 Defines or adds permissions to a permission set.
3304 The set can be used by other
3306 commands for the specified file system and its descendents.
3307 Sets are evaluated dynamically, so changes to a set are immediately reflected.
3308 Permission sets follow the same naming restrictions as ZFS file systems, but the
3309 name must begin with
3311 and can be no more than 64 characters long.
3316 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3317 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3318 .Ar setname Oc Ns ... Oc
3319 .Ar filesystem Ns | Ns Ar volume
3325 .Fl e Ns | Ns Sy everyone
3326 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3327 .Ar setname Oc Ns ... Oc
3328 .Ar filesystem Ns | Ns Ar volume
3335 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3336 .Ar setname Oc Ns ... Oc
3337 .Ar filesystem Ns | Ns Ar volume
3339 Removes permissions that were granted with the
3342 No permissions are explicitly denied, so other permissions granted are still in
3344 For example, if the permission is granted by an ancestor.
3345 If no permissions are specified, then all permissions for the specified
3357 only removes the permissions that were granted to everyone, not all permissions
3358 for every user and group.
3361 command for a description of the
3364 .Bl -tag -width "-r"
3366 Recursively remove the permissions from this file system and all descendents.
3372 .Fl s No @ Ns Ar setname
3373 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3374 .Ar setname Oc Ns ... Oc
3375 .Ar filesystem Ns | Ns Ar volume
3377 Removes permissions from a permission set.
3378 If no permissions are specified, then all permissions are removed, thus removing
3384 .Ar tag Ar snapshot Ns ...
3386 Adds a single reference, named with the
3388 argument, to the specified snapshot or snapshots.
3389 Each snapshot has its own tag namespace, and tags must be unique within that
3392 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3396 .Bl -tag -width "-r"
3398 Specifies that a hold with the given tag is applied recursively to the snapshots
3399 of all descendent file systems.
3407 Lists all existing user references for the given snapshot or snapshots.
3408 .Bl -tag -width "-r"
3410 Lists the holds that are set on the named descendent snapshots, in addition to
3411 listing the holds on the named snapshot.
3417 .Ar tag Ar snapshot Ns ...
3419 Removes a single reference, named with the
3421 argument, from the specified snapshot or snapshots.
3422 The tag must already exist for each snapshot.
3423 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3427 .Bl -tag -width "-r"
3429 Recursively releases a hold with the given tag on the snapshots of all
3430 descendent file systems.
3436 .Ar snapshot Ar snapshot Ns | Ns Ar filesystem
3438 Display the difference between a snapshot of a given filesystem and another
3439 snapshot of that filesystem from a later time or the current contents of the
3441 The first column is a character indicating the type of change, the other columns
3442 indicate pathname, new pathname
3443 .Pq in case of rename ,
3444 change in link count, and optionally file type and/or change time.
3445 The types of change are:
3447 - The path has been removed
3448 + The path has been created
3449 M The path has been modified
3450 R The path has been renamed
3452 .Bl -tag -width "-F"
3454 Display an indication of the type of file, in a manner similar to the
3470 Give more parsable tab-separated output, without header lines and without
3473 Display the path's inode change time as the first column of output.
3480 .Op Fl m Ar memory_limit
3486 as a ZFS channel program on
3489 program interface allows ZFS administrative operations to be run
3490 programmatically via a Lua script.
3491 The entire script is executed atomically, with no other administrative
3492 operations taking effect concurrently.
3493 A library of ZFS calls is made available to channel program scripts.
3494 Channel programs may only be run with root privileges.
3496 For full documentation of the ZFS channel program interface, see the manual
3500 Executes a read-only channel program, which runs faster.
3501 The program cannot change on-disk state by calling functions from
3502 the zfs.sync submodule.
3503 The program can be used to gather information such as properties and
3504 determining if changes would succeed (zfs.check.*).
3505 Without this flag, all pending changes must be synced to disk before
3506 a channel program can complete.
3508 Execution time limit, in milliseconds.
3509 If a channel program executes for longer than the provided timeout, it will
3510 be stopped and an error will be returned.
3511 The default timeout is 1000 ms, and can be set to a maximum of 10000 ms.
3512 .It Fl m Ar memory-limit
3513 Memory limit, in bytes.
3514 If a channel program attempts to allocate more memory than the given limit,
3515 it will be stopped and an error returned.
3516 The default memory limit is 10 MB, and can be set to a maximum of 100 MB.
3518 All remaining argument strings are passed directly to the channel program as
3522 for more information.
3528 utility exits 0 on success, 1 if an error occurs, and 2 if invalid command line
3529 options were specified.
3532 .It Sy Example 1 No Creating a ZFS File System Hierarchy
3533 The following commands create a file system named
3535 and a file system named
3539 is set for the parent file system, and is automatically inherited by the child
3542 # zfs create pool/home
3543 # zfs set mountpoint=/export/home pool/home
3544 # zfs create pool/home/bob
3546 .It Sy Example 2 No Creating a ZFS Snapshot
3547 The following command creates a snapshot named
3549 This snapshot is mounted on demand in the
3551 directory at the root of the
3555 # zfs snapshot pool/home/bob@yesterday
3557 .It Sy Example 3 No Creating and Destroying Multiple Snapshots
3558 The following command creates snapshots named
3562 and all of its descendent file systems.
3563 Each snapshot is mounted on demand in the
3565 directory at the root of its file system.
3566 The second command destroys the newly created snapshots.
3568 # zfs snapshot -r pool/home@yesterday
3569 # zfs destroy -r pool/home@yesterday
3571 .It Sy Example 4 No Disabling and Enabling File System Compression
3572 The following command disables the
3574 property for all file systems under
3576 The next command explicitly enables
3579 .Em pool/home/anne .
3581 # zfs set compression=off pool/home
3582 # zfs set compression=on pool/home/anne
3584 .It Sy Example 5 No Listing ZFS Datasets
3585 The following command lists all active file systems and volumes in the system.
3586 Snapshots are displayed if the
3594 for more information on pool properties.
3597 NAME USED AVAIL REFER MOUNTPOINT
3598 pool 450K 457G 18K /pool
3599 pool/home 315K 457G 21K /export/home
3600 pool/home/anne 18K 457G 18K /export/home/anne
3601 pool/home/bob 276K 457G 276K /export/home/bob
3603 .It Sy Example 6 No Setting a Quota on a ZFS File System
3604 The following command sets a quota of 50 Gbytes for
3607 # zfs set quota=50G pool/home/bob
3609 .It Sy Example 7 No Listing ZFS Properties
3610 The following command lists all properties for
3613 # zfs get all pool/home/bob
3614 NAME PROPERTY VALUE SOURCE
3615 pool/home/bob type filesystem -
3616 pool/home/bob creation Tue Jul 21 15:53 2009 -
3617 pool/home/bob used 21K -
3618 pool/home/bob available 20.0G -
3619 pool/home/bob referenced 21K -
3620 pool/home/bob compressratio 1.00x -
3621 pool/home/bob mounted yes -
3622 pool/home/bob quota 20G local
3623 pool/home/bob reservation none default
3624 pool/home/bob recordsize 128K default
3625 pool/home/bob mountpoint /pool/home/bob default
3626 pool/home/bob sharenfs off default
3627 pool/home/bob checksum on default
3628 pool/home/bob compression on local
3629 pool/home/bob atime on default
3630 pool/home/bob devices on default
3631 pool/home/bob exec on default
3632 pool/home/bob setuid on default
3633 pool/home/bob readonly off default
3634 pool/home/bob zoned off default
3635 pool/home/bob snapdir hidden default
3636 pool/home/bob aclmode discard default
3637 pool/home/bob aclinherit restricted default
3638 pool/home/bob canmount on default
3639 pool/home/bob xattr on default
3640 pool/home/bob copies 1 default
3641 pool/home/bob version 4 -
3642 pool/home/bob utf8only off -
3643 pool/home/bob normalization none -
3644 pool/home/bob casesensitivity sensitive -
3645 pool/home/bob vscan off default
3646 pool/home/bob nbmand off default
3647 pool/home/bob sharesmb off default
3648 pool/home/bob refquota none default
3649 pool/home/bob refreservation none default
3650 pool/home/bob primarycache all default
3651 pool/home/bob secondarycache all default
3652 pool/home/bob usedbysnapshots 0 -
3653 pool/home/bob usedbydataset 21K -
3654 pool/home/bob usedbychildren 0 -
3655 pool/home/bob usedbyrefreservation 0 -
3658 The following command gets a single property value.
3660 # zfs get -H -o value compression pool/home/bob
3663 The following command lists all properties with local settings for
3666 # zfs get -r -s local -o name,property,value all pool/home/bob
3668 pool/home/bob quota 20G
3669 pool/home/bob compression on
3671 .It Sy Example 8 No Rolling Back a ZFS File System
3672 The following command reverts the contents of
3674 to the snapshot named
3676 deleting all intermediate snapshots.
3678 # zfs rollback -r pool/home/anne@yesterday
3680 .It Sy Example 9 No Creating a ZFS Clone
3681 The following command creates a writable file system whose initial contents are
3683 .Em pool/home/bob@yesterday .
3685 # zfs clone pool/home/bob@yesterday pool/clone
3687 .It Sy Example 10 No Promoting a ZFS Clone
3688 The following commands illustrate how to test out changes to a file system, and
3689 then replace the original file system with the changed one, using clones, clone
3690 promotion, and renaming:
3692 # zfs create pool/project/production
3693 populate /pool/project/production with data
3694 # zfs snapshot pool/project/production@today
3695 # zfs clone pool/project/production@today pool/project/beta
3696 make changes to /pool/project/beta and test them
3697 # zfs promote pool/project/beta
3698 # zfs rename pool/project/production pool/project/legacy
3699 # zfs rename pool/project/beta pool/project/production
3700 once the legacy version is no longer needed, it can be destroyed
3701 # zfs destroy pool/project/legacy
3703 .It Sy Example 11 No Inheriting ZFS Properties
3704 The following command causes
3710 property from their parent.
3712 # zfs inherit checksum pool/home/bob pool/home/anne
3714 .It Sy Example 12 No Remotely Replicating ZFS Data
3715 The following commands send a full stream and then an incremental stream to a
3716 remote machine, restoring them into
3717 .Em poolB/received/fs@a
3719 .Em poolB/received/fs@b ,
3722 must contain the file system
3723 .Em poolB/received ,
3724 and must not initially contain
3725 .Em poolB/received/fs .
3727 # zfs send pool/fs@a | \e
3728 ssh host zfs receive poolB/received/fs@a
3729 # zfs send -i a pool/fs@b | \e
3730 ssh host zfs receive poolB/received/fs
3732 .It Sy Example 13 No Using the zfs receive -d Option
3733 The following command sends a full stream of
3734 .Em poolA/fsA/fsB@snap
3735 to a remote machine, receiving it into
3736 .Em poolB/received/fsA/fsB@snap .
3739 portion of the received snapshot's name is determined from the name of the sent
3742 must contain the file system
3743 .Em poolB/received .
3745 .Em poolB/received/fsA
3746 does not exist, it is created as an empty file system.
3748 # zfs send poolA/fsA/fsB@snap | \e
3749 ssh host zfs receive -d poolB/received
3751 .It Sy Example 14 No Setting User Properties
3752 The following example sets the user-defined
3753 .Sy com.example:department
3754 property for a dataset.
3756 # zfs set com.example:department=12345 tank/accounting
3758 .It Sy Example 15 No Performing a Rolling Snapshot
3759 The following example shows how to maintain a history of snapshots with a
3760 consistent naming scheme.
3761 To keep a week's worth of snapshots, the user destroys the oldest snapshot,
3762 renames the remaining snapshots, and then creates a new snapshot, as follows:
3764 # zfs destroy -r pool/users@7daysago
3765 # zfs rename -r pool/users@6daysago @7daysago
3766 # zfs rename -r pool/users@5daysago @6daysago
3767 # zfs rename -r pool/users@yesterday @5daysago
3768 # zfs rename -r pool/users@yesterday @4daysago
3769 # zfs rename -r pool/users@yesterday @3daysago
3770 # zfs rename -r pool/users@yesterday @2daysago
3771 # zfs rename -r pool/users@today @yesterday
3772 # zfs snapshot -r pool/users@today
3774 .It Sy Example 16 No Setting sharenfs Property Options on a ZFS File System
3775 The following commands show how to set
3777 property options to enable
3781 addresses and to enable root access for system
3787 # zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home
3792 for host name resolution, specify the fully qualified hostname.
3793 .It Sy Example 17 No Delegating ZFS Administration Permissions on a ZFS Dataset
3794 The following example shows how to set permissions so that user
3796 can create, destroy, mount, and take snapshots on
3802 # zfs allow cindys create,destroy,mount,snapshot tank/cindys
3803 # zfs allow tank/cindys
3804 ---- Permissions on tank/cindys --------------------------------------
3805 Local+Descendent permissions:
3806 user cindys create,destroy,mount,snapshot
3811 mount point permission is set to 755 by default, user
3813 will be unable to mount file systems under
3815 Add an ACE similar to the following syntax to provide mount point access:
3817 # chmod A+user:cindys:add_subdirectory:allow /tank/cindys
3819 .It Sy Example 18 No Delegating Create Time Permissions on a ZFS Dataset
3820 The following example shows how to grant anyone in the group
3822 to create file systems in
3824 This syntax also allows staff members to destroy their own file systems, but not
3825 destroy anyone else's file system.
3830 # zfs allow staff create,mount tank/users
3831 # zfs allow -c destroy tank/users
3832 # zfs allow tank/users
3833 ---- Permissions on tank/users ---------------------------------------
3836 Local+Descendent permissions:
3837 group staff create,mount
3839 .It Sy Example 19 No Defining and Granting a Permission Set on a ZFS Dataset
3840 The following example shows how to define and grant a permission set on the
3847 # zfs allow -s @pset create,destroy,snapshot,mount tank/users
3848 # zfs allow staff @pset tank/users
3849 # zfs allow tank/users
3850 ---- Permissions on tank/users ---------------------------------------
3852 @pset create,destroy,mount,snapshot
3853 Local+Descendent permissions:
3856 .It Sy Example 20 No Delegating Property Permissions on a ZFS Dataset
3857 The following example shows to grant the ability to set quotas and reservations
3865 # zfs allow cindys quota,reservation users/home
3866 # zfs allow users/home
3867 ---- Permissions on users/home ---------------------------------------
3868 Local+Descendent permissions:
3869 user cindys quota,reservation
3870 cindys% zfs set quota=10G users/home/marks
3871 cindys% zfs get quota users/home/marks
3872 NAME PROPERTY VALUE SOURCE
3873 users/home/marks quota 10G local
3875 .It Sy Example 21 No Removing ZFS Delegated Permissions on a ZFS Dataset
3876 The following example shows how to remove the snapshot permission from the
3885 # zfs unallow staff snapshot tank/users
3886 # zfs allow tank/users
3887 ---- Permissions on tank/users ---------------------------------------
3889 @pset create,destroy,mount,snapshot
3890 Local+Descendent permissions:
3893 .It Sy Example 22 No Showing the differences between a snapshot and a ZFS Dataset
3894 The following example shows how to see what has changed between a prior
3895 snapshot of a ZFS dataset and its current state.
3898 option is used to indicate type information for the files affected.
3900 # zfs diff -F tank/test@before tank/test
3902 M F /tank/test/linked (+1)
3903 R F /tank/test/oldname -> /tank/test/newname
3904 - F /tank/test/deleted
3905 + F /tank/test/created
3906 M F /tank/test/modified
3909 .Sh INTERFACE STABILITY