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 2017 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
294 A dataset can be one of the following:
295 .Bl -tag -width "file system"
297 A ZFS dataset of type
299 can be mounted within the standard system namespace and behaves like other file
301 While ZFS file systems are designed to be POSIX compliant, known issues exist
302 that prevent compliance in some cases.
303 Applications that depend on standards conformance might fail due to non-standard
304 behavior when checking file system free space.
306 A logical volume exported as a raw or block device.
307 This type of dataset should only be used under special circumstances.
308 File systems are typically used in most environments.
310 A read-only version of a file system or volume at a given point in time.
312 .Ar filesystem Ns @ Ns Ar name
314 .Ar volume Ns @ Ns Ar name .
316 .Ss ZFS File System Hierarchy
317 A ZFS storage pool is a logical collection of devices that provide space for
319 A storage pool is also the root of the ZFS file system hierarchy.
321 The root of the pool can be accessed as a file system, such as mounting and
322 unmounting, taking snapshots, and setting properties.
323 The physical storage characteristics, however, are managed by the
329 for more information on creating and administering pools.
331 A snapshot is a read-only copy of a file system or volume.
332 Snapshots can be created extremely quickly, and initially consume no additional
333 space within the pool.
334 As data within the active dataset changes, the snapshot consumes more data than
335 would otherwise be shared with the active dataset.
337 Snapshots can have arbitrary names.
338 Snapshots of volumes can be cloned or rolled back, but cannot be accessed
341 File system snapshots can be accessed under the
343 directory in the root of the file system.
344 Snapshots are automatically mounted on demand and may be unmounted at regular
346 The visibility of the
348 directory can be controlled by the
352 A clone is a writable volume or file system whose initial contents are the same
354 As with snapshots, creating a clone is nearly instantaneous, and initially
355 consumes no additional space.
357 Clones can only be created from a snapshot.
358 When a snapshot is cloned, it creates an implicit dependency between the parent
360 Even though the clone is created somewhere else in the dataset hierarchy, the
361 original snapshot cannot be destroyed as long as a clone exists.
364 property exposes this dependency, and the
366 command lists any such dependencies, if they exist.
368 The clone parent-child dependency relationship can be reversed by using the
373 file system to become a clone of the specified file system, which makes it
374 possible to destroy the file system that the clone was created from.
376 Creating a ZFS file system is a simple operation, so the number of file systems
377 per system is likely to be numerous.
378 To cope with this, ZFS automatically manages mounting and unmounting file
379 systems without the need to edit the
382 All automatically managed file systems are mounted by ZFS at boot time.
384 By default, file systems are mounted under
388 is the name of the file system in the ZFS namespace.
389 Directories are created and destroyed as needed.
391 A file system can also have a mount point set in the
394 This directory is created as needed, and ZFS automatically mounts the file
396 .Nm zfs Cm mount Fl a
403 property can be inherited, so if
409 automatically inherits a mount point of
410 .Pa /export/stuff/user .
416 prevents the file system from being mounted.
418 If needed, ZFS file systems can also be managed with traditional tools
424 If a file system's mount point is set to
426 ZFS makes no attempt to manage the file system, and the administrator is
427 responsible for mounting and unmounting the file system.
429 A ZFS file system can be added to a non-global zone by using the
430 .Nm zonecfg Cm add Sy fs
432 A ZFS file system that is added to a non-global zone must have its
437 The physical properties of an added file system are controlled by the global
439 However, the zone administrator can create, modify, or destroy files within the
440 added file system, depending on how the file system is mounted.
442 A dataset can also be delegated to a non-global zone by using the
443 .Nm zonecfg Cm add Sy dataset
445 You cannot delegate a dataset to one zone and the children of the same dataset
447 The zone administrator can change properties of the dataset or any of its
454 properties of the delegated dataset can be modified only by the global
457 A ZFS volume can be added as a device to a non-global zone by using the
458 .Nm zonecfg Cm add Sy device
460 However, its physical properties can be modified only by the global
463 For more information about
468 After a dataset is delegated to a non-global zone, the
470 property is automatically set.
471 A zoned file system cannot be mounted in the global zone, since the zone
472 administrator might have to set the mount point to an unacceptable value.
474 The global administrator can forcibly clear the
476 property, though this should be done with extreme care.
477 The global administrator should verify that all the mount points are acceptable
478 before clearing the property.
479 .Ss Native Properties
480 Properties are divided into two types, native properties and user-defined
485 Native properties either export internal statistics or control ZFS behavior.
486 In addition, native properties are either editable or read-only.
487 User properties have no effect on ZFS behavior, but you can use them to annotate
488 datasets in a way that is meaningful in your environment.
489 For more information about user properties, see the
493 Every dataset has a set of properties that export statistics about the dataset
494 as well as control various behaviors.
495 Properties are inherited from the parent unless overridden by the child.
496 Some properties apply only to certain types of datasets
497 .Pq file systems, volumes, or snapshots .
499 The values of numeric properties can be specified using human-readable suffixes
509 The following are all valid
512 .Li 1536M, 1.5g, 1.50GB .
514 The values of non-numeric properties are case sensitive and must be lowercase,
521 The following native properties consist of read-only statistics about the
523 These properties can be neither set, nor inherited.
524 Native properties apply to all dataset types unless otherwise noted.
525 .Bl -tag -width "usedbyrefreservation"
527 The amount of space available to the dataset and all its children, assuming that
528 there is no other activity in the pool.
529 Because space is shared within a pool, availability can be limited by any number
530 of factors, including physical pool size, quotas, reservations, or other
531 datasets within the pool.
533 This property can also be referred to by its shortened column name,
536 For non-snapshots, the compression ratio achieved for the
538 space of this dataset, expressed as a multiplier.
541 property includes descendant datasets, and, for clones, does not include the
542 space shared with the origin snapshot.
548 Compression can be turned on by running:
549 .Nm zfs Cm set Sy compression Ns = Ns Sy on Ar dataset .
553 The time this dataset was created.
555 For snapshots, this property is a comma-separated list of filesystems or volumes
556 which are clones of this snapshot.
559 property is this snapshot.
562 property is not empty, then this snapshot can not be destroyed
572 if the snapshot has been marked for deferred destroy by using the
573 .Nm zfs Cm destroy Fl d
575 Otherwise, the property is
577 .It Sy filesystem_count
578 The total number of filesystems and volumes that exist under this location in
580 This value is only available when a
582 has been set somewhere in the tree under which the dataset resides.
583 .It Sy logicalreferenced
584 The amount of space that is
586 accessible by this dataset.
590 The logical space ignores the effect of the
594 properties, giving a quantity closer to the amount of data that applications
596 However, it does include space consumed by metadata.
598 This property can also be referred to by its shortened column name,
601 The amount of space that is
603 consumed by this dataset and all its descendents.
607 The logical space ignores the effect of the
611 properties, giving a quantity closer to the amount of data that applications
613 However, it does include space consumed by metadata.
615 This property can also be referred to by its shortened column name,
618 For file systems, indicates whether the file system is currently mounted.
619 This property can be either
624 For cloned file systems or volumes, the snapshot from which the clone was
629 .It Sy receive_resume_token
630 For filesystems or volumes which have saved partially-completed state from
632 this opaque token can be provided to
634 to resume and complete the
637 The amount of data that is accessible by this dataset, which may or may not be
638 shared with other datasets in the pool.
639 When a snapshot or clone is created, it initially references the same amount of
640 space as the file system or snapshot it was created from, since its contents are
643 This property can also be referred to by its shortened column name,
645 .It Sy refcompressratio
646 The compression ratio achieved for the
648 space of this dataset, expressed as a multiplier.
652 .It Sy snapshot_count
653 The total number of snapshots that exist under this location in the dataset
655 This value is only available when a
657 has been set somewhere in the tree under which the dataset resides.
665 The amount of space consumed by this dataset and all its descendents.
666 This is the value that is checked against this dataset's quota and reservation.
667 The space used does not include this dataset's reservation, but does take into
668 account the reservations of any descendent datasets.
669 The amount of space that a dataset consumes from its parent, as well as the
670 amount of space that is freed if this dataset is recursively destroyed, is the
671 greater of its space used and its reservation.
673 The used space of a snapshot
678 is space that is referenced exclusively by this snapshot.
679 If this snapshot is destroyed, the amount of
682 Space that is shared by multiple snapshots isn't accounted for in this metric.
683 When a snapshot is destroyed, space that was previously shared with this
684 snapshot can become unique to snapshots adjacent to it, thus changing the used
685 space of those snapshots.
686 The used space of the latest snapshot can also be affected by changes in the
690 space of a snapshot is a subset of the
692 space of the snapshot.
694 The amount of space used, available, or referenced does not take into account
696 Pending changes are generally accounted for within a few seconds.
697 Committing a change to a disk using
701 does not necessarily guarantee that the space usage information is updated
706 properties decompose the
708 properties into the various reasons that space is used.
711 .Sy usedbychildren No +
712 .Sy usedbydataset No +
713 .Sy usedbyrefreservation No +
714 .Sy usedbysnapshots .
715 These properties are only available for datasets created on
719 .It Sy usedbychildren
720 The amount of space used by children of this dataset, which would be freed if
721 all the dataset's children were destroyed.
723 The amount of space used by this dataset itself, which would be freed if the
724 dataset were destroyed
725 .Po after first removing any
727 and destroying any necessary snapshots or descendents
729 .It Sy usedbyrefreservation
730 The amount of space used by a
732 set on this dataset, which would be freed if the
735 .It Sy usedbysnapshots
736 The amount of space consumed by snapshots of this dataset.
737 In particular, it is the amount of space that would be freed if all of this
738 dataset's snapshots were destroyed.
739 Note that this is not simply the sum of the snapshots'
741 properties because space can be shared by multiple snapshots.
742 .It Sy userused Ns @ Ns Em user
743 The amount of space consumed by the specified user in this dataset.
744 Space is charged to the owner of each file, as displayed by
746 The amount of space charged is displayed by
752 subcommand for more information.
754 Unprivileged users can access only their own space usage.
755 The root user, or a user who has been granted the
759 can access everyone's usage.
762 .Sy userused Ns @ Ns Em ...
763 properties are not displayed by
764 .Nm zfs Cm get Sy all .
765 The user's name must be appended after the @ symbol, using one of the following
767 .Bl -bullet -width ""
781 .Sy joe.smith@mydomain
790 This property is set to the number of user holds on this snapshot.
791 User holds are set by using the
794 .It Sy groupused Ns @ Ns Em group
795 The amount of space consumed by the specified group in this dataset.
796 Space is charged to the group of each file, as displayed by
799 .Sy userused Ns @ Ns Em user
800 property for more information.
802 Unprivileged users can only access their own groups' space usage.
803 The root user, or a user who has been granted the
807 can access all groups' usage.
809 For volumes, specifies the block size of the volume.
812 cannot be changed once the volume has been written, so it should be set at
813 volume creation time.
816 for volumes is 8 Kbytes.
817 Any power of 2 from 512 bytes to 128 Kbytes is valid.
819 This property can also be referred to by its shortened column name,
824 by this dataset, that was written since the previous snapshot
825 .Pq i.e. that is not referenced by the previous snapshot .
826 .It Sy written Ns @ Ns Em snapshot
829 space written to this dataset since the specified snapshot.
830 This is the space that is referenced by this dataset but was not referenced by
831 the specified snapshot.
835 may be specified as a short snapshot name
836 .Po just the part after the
839 in which case it will be interpreted as a snapshot in the same filesystem as
843 may be a full snapshot name
844 .Po Em filesystem Ns @ Ns Em snapshot Pc ,
845 which for clones may be a snapshot in the origin's filesystem
846 .Pq or the origin of the origin's filesystem, etc.
849 The following native properties can be used to change the behavior of a ZFS
853 .Sy aclinherit Ns = Ns Sy discard Ns | Ns Sy noallow Ns | Ns
854 .Sy restricted Ns | Ns Sy passthrough Ns | Ns Sy passthrough-x
856 Controls how ACEs are inherited when files and directories are created.
857 .Bl -tag -width "passthrough-x"
859 does not inherit any ACEs.
861 only inherits inheritable ACEs that specify
869 permissions when the ACE is inherited.
871 inherits all inheritable ACEs without any modifications.
880 ACEs inherit the execute permission only if the file creation mode also requests
884 When the property value is set to
886 files are created with a mode determined by the inheritable ACEs.
887 If no inheritable ACEs exist that affect the mode, then the mode is set in
888 accordance to the requested mode from the application.
890 .Sy aclmode Ns = Ns Sy discard Ns | Ns Sy groupmask Ns | Ns
891 .Sy passthrough Ns | Ns Sy restricted
893 Controls how an ACL is modified during
895 and how inherited ACEs are modified by the file creation mode.
896 .Bl -tag -width "passthrough"
898 default, deletes all ACEs except for those representing the mode of the file or
899 directory requested by
902 reduces permissions granted by all
904 entries found in the ACL such that they are no greater than the group
905 permissions specified by the mode.
907 indicates that no changes are made to the ACL other than creating or updating
908 the necessary ACEs to represent the new mode of the file or directory.
912 operation to return an error when used on any file or directory which has a
913 non-trivial ACL, with entries in addition to those that represent the mode.
917 is required to change the set user ID, set group ID, or sticky bit on a file or
918 directory, as they do not have equivalent ACEs.
921 on a file or directory with a non-trivial ACL when
925 you must first remove all ACEs except for those that represent the current mode.
926 .It Sy atime Ns = Ns Sy on Ns | Ns Sy off
927 Controls whether the access time for files is updated when they are read.
928 Turning this property off avoids producing write traffic when reading files and
929 can result in significant performance gains, though it might confuse mailers
930 and other similar utilities.
933 .It Sy canmount Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy noauto
934 If this property is set to
936 the file system cannot be mounted, and is ignored by
937 .Nm zfs Cm mount Fl a .
938 Setting this property to
940 is similar to setting the
944 except that the dataset still has a normal
946 property, which can be inherited.
947 Setting this property to
949 allows datasets to be used solely as a mechanism to inherit properties.
950 One example of setting
951 .Sy canmount Ns = Ns Sy off
952 is to have two datasets with the same
954 so that the children of both datasets appear in the same directory, but might
955 have different inherited characteristics.
959 a dataset can only be mounted and unmounted explicitly.
960 The dataset is not mounted automatically when the dataset is created or
961 imported, nor is it mounted by the
962 .Nm zfs Cm mount Fl a
963 command or unmounted by the
964 .Nm zfs Cm unmount Fl a
967 This property is not inherited.
969 .Sy checksum Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy fletcher2 Ns | Ns
970 .Sy fletcher4 Ns | Ns Sy sha256 Ns | Ns Sy noparity Ns | Ns
971 .Sy sha512 Ns | Ns Sy skein Ns | Ns Sy edonr
973 Controls the checksum used to verify data integrity.
976 which automatically selects an appropriate algorithm
979 but this may change in future releases
983 disables integrity checking on user data.
986 not only disables integrity but also disables maintaining parity for user data.
987 This setting is used internally by a dump device residing on a RAID-Z pool and
988 should not be used by any other dataset.
989 Disabling checksums is
991 a recommended practice.
998 checksum algorithms require enabling the appropriate features on the pool.
1000 .Xr zpool-features 5
1001 for more information on these algorithms.
1003 Changing this property affects only newly-written data.
1005 Salted checksum algorithms
1006 .Pq Cm edonr , skein
1007 are currently not supported for any filesystem on the boot pools.
1009 .Sy compression Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy gzip Ns | Ns
1010 .Sy gzip- Ns Em N Ns | Ns Sy lz4 Ns | Ns Sy lzjb Ns | Ns Sy zle
1012 Controls the compression algorithm used for this dataset.
1014 Setting compression to
1016 indicates that the current default compression algorithm should be used.
1017 The default balances compression and decompression speed, with compression ratio
1018 and is expected to work well on a wide variety of workloads.
1019 Unlike all other settings for this property,
1021 does not select a fixed compression type.
1022 As new compression algorithms are added to ZFS and enabled on a pool, the
1023 default compression algorithm may change.
1024 The current default compression algorithm is either
1033 compression algorithm is a high-performance replacement for the
1036 It features significantly faster compression and decompression, as well as a
1037 moderately higher compression ratio than
1039 but can only be used on pools with the
1044 .Xr zpool-features 5
1045 for details on ZFS feature flags and the
1051 compression algorithm is optimized for performance while providing decent data
1056 compression algorithm uses the same compression as the
1061 level by using the value
1065 is an integer from 1
1068 .Pq best compression ratio .
1073 .Po which is also the default for
1079 compression algorithm compresses runs of zeros.
1081 This property can also be referred to by its shortened column name
1083 Changing this property affects only newly-written data.
1084 .It Sy copies Ns = Ns Sy 1 Ns | Ns Sy 2 Ns | Ns Sy 3
1085 Controls the number of copies of data stored for this dataset.
1086 These copies are in addition to any redundancy provided by the pool, for
1087 example, mirroring or RAID-Z.
1088 The copies are stored on different disks, if possible.
1089 The space used by multiple copies is charged to the associated file and dataset,
1092 property and counting against quotas and reservations.
1094 Changing this property only affects newly-written data.
1095 Therefore, set this property at file system creation time by using the
1096 .Fl o Sy copies Ns = Ns Ar N
1098 .It Sy devices Ns = Ns Sy on Ns | Ns Sy off
1099 Controls whether device nodes can be opened on this file system.
1100 The default value is
1102 .It Sy exec Ns = Ns Sy on Ns | Ns Sy off
1103 Controls whether processes can be executed from within this file system.
1104 The default value is
1106 .It Sy filesystem_limit Ns = Ns Em count Ns | Ns Sy none
1107 Limits the number of filesystems and volumes that can exist under this point in
1109 The limit is not enforced if the user is allowed to change the limit.
1111 .Sy filesystem_limit
1114 a descendent of a filesystem that already has a
1115 .Sy filesystem_limit
1116 does not override the ancestor's
1117 .Sy filesystem_limit ,
1118 but rather imposes an additional limit.
1119 This feature must be enabled to be used
1121 .Xr zpool-features 5
1123 .It Sy mountpoint Ns = Ns Pa path Ns | Ns Sy none Ns | Ns Sy legacy
1124 Controls the mount point used for this file system.
1127 section for more information on how this property is used.
1131 property is changed for a file system, the file system and any children that
1132 inherit the mount point are unmounted.
1135 then they remain unmounted.
1136 Otherwise, they are automatically remounted in the new location if the property
1141 or if they were mounted before the property was changed.
1142 In addition, any shared file systems are unshared and shared in the new
1144 .It Sy nbmand Ns = Ns Sy on Ns | Ns Sy off
1145 Controls whether the file system should be mounted with
1147 .Pq Non Blocking mandatory locks .
1148 This is used for SMB clients.
1149 Changes to this property only take effect when the file system is umounted and
1153 for more information on
1156 .It Sy primarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1157 Controls what is cached in the primary cache
1159 If this property is set to
1161 then both user data and metadata is cached.
1162 If this property is set to
1164 then neither user data nor metadata is cached.
1165 If this property is set to
1167 then only metadata is cached.
1168 The default value is
1170 .It Sy quota Ns = Ns Em size Ns | Ns Sy none
1171 Limits the amount of space a dataset and its descendents can consume.
1172 This property enforces a hard limit on the amount of space used.
1173 This includes all space consumed by descendents, including file systems and
1175 Setting a quota on a descendent of a dataset that already has a quota does not
1176 override the ancestor's quota, but rather imposes an additional limit.
1178 Quotas cannot be set on volumes, as the
1180 property acts as an implicit quota.
1181 .It Sy snapshot_limit Ns = Ns Em count Ns | Ns Sy none
1182 Limits the number of snapshots that can be created on a dataset and its
1186 on a descendent of a dataset that already has a
1188 does not override the ancestor's
1189 .Sy snapshot_limit ,
1190 but rather imposes an additional limit.
1191 The limit is not enforced if the user is allowed to change the limit.
1192 For example, this means that recursive snapshots taken from the global zone are
1193 counted against each delegated dataset within a zone.
1194 This feature must be enabled to be used
1196 .Xr zpool-features 5
1198 .It Sy userquota@ Ns Em user Ns = Ns Em size Ns | Ns Sy none
1199 Limits the amount of space consumed by the specified user.
1200 User space consumption is identified by the
1201 .Sy userspace@ Ns Em user
1204 Enforcement of user quotas may be delayed by several seconds.
1205 This delay means that a user might exceed their quota before the system notices
1206 that they are over quota and begins to refuse additional writes with the
1210 .Nm zfs Cm userspace
1211 subcommand for more information.
1213 Unprivileged users can only access their own groups' space usage.
1214 The root user, or a user who has been granted the
1218 can get and set everyone's quota.
1220 This property is not available on volumes, on file systems before version 4, or
1221 on pools before version 15.
1223 .Sy userquota@ Ns Em ...
1224 properties are not displayed by
1225 .Nm zfs Cm get Sy all .
1226 The user's name must be appended after the
1228 symbol, using one of the following forms:
1236 .Em POSIX numeric ID
1243 .Sy joe.smith@mydomain
1251 .It Sy groupquota@ Ns Em group Ns = Ns Em size Ns | Ns Sy none
1252 Limits the amount of space consumed by the specified group.
1253 Group space consumption is identified by the
1254 .Sy groupused@ Ns Em group
1257 Unprivileged users can access only their own groups' space usage.
1258 The root user, or a user who has been granted the
1262 can get and set all groups' quotas.
1263 .It Sy readonly Ns = Ns Sy on Ns | Ns Sy off
1264 Controls whether this dataset can be modified.
1265 The default value is
1268 This property can also be referred to by its shortened column name,
1270 .It Sy recordsize Ns = Ns Em size
1271 Specifies a suggested block size for files in the file system.
1272 This property is designed solely for use with database workloads that access
1273 files in fixed-size records.
1274 ZFS automatically tunes block sizes according to internal algorithms optimized
1275 for typical access patterns.
1277 For databases that create very large files but access them in small random
1278 chunks, these algorithms may be suboptimal.
1281 greater than or equal to the record size of the database can result in
1282 significant performance gains.
1283 Use of this property for general purpose file systems is strongly discouraged,
1284 and may adversely affect performance.
1286 The size specified must be a power of two greater than or equal to 512 and less
1287 than or equal to 128 Kbytes.
1290 feature is enabled on the pool, the size may be up to 1 Mbyte.
1292 .Xr zpool-features 5
1293 for details on ZFS feature flags.
1295 Changing the file system's
1297 affects only files created afterward; existing files are unaffected.
1299 This property can also be referred to by its shortened column name,
1301 .It Sy redundant_metadata Ns = Ns Sy all Ns | Ns Sy most
1302 Controls what types of metadata are stored redundantly.
1303 ZFS stores an extra copy of metadata, so that if a single block is corrupted,
1304 the amount of user data lost is limited.
1305 This extra copy is in addition to any redundancy provided at the pool level
1306 .Pq e.g. by mirroring or RAID-Z ,
1307 and is in addition to an extra copy specified by the
1310 .Pq up to a total of 3 copies .
1311 For example if the pool is mirrored,
1312 .Sy copies Ns = Ns 2 ,
1314 .Sy redundant_metadata Ns = Ns Sy most ,
1315 then ZFS stores 6 copies of most metadata, and 4 copies of data and some
1320 ZFS stores an extra copy of all metadata.
1321 If a single on-disk block is corrupt, at worst a single block of user data
1330 ZFS stores an extra copy of most types of metadata.
1331 This can improve performance of random writes, because less metadata must be
1333 In practice, at worst about 100 blocks
1338 of user data can be lost if a single on-disk block is corrupt.
1339 The exact behavior of which metadata blocks are stored redundantly may change in
1342 The default value is
1344 .It Sy refquota Ns = Ns Em size Ns | Ns Sy none
1345 Limits the amount of space a dataset can consume.
1346 This property enforces a hard limit on the amount of space used.
1347 This hard limit does not include space used by descendents, including file
1348 systems and snapshots.
1349 .It Sy refreservation Ns = Ns Em size Ns | Ns Sy none Ns | Ns Sy auto
1350 The minimum amount of space guaranteed to a dataset, not including its
1352 When the amount of space used is below this value, the dataset is treated as if
1353 it were taking up the amount of space specified by
1354 .Sy refreservation .
1357 reservation is accounted for in the parent datasets' space used, and counts
1358 against the parent datasets' quotas and reservations.
1362 is set, a snapshot is only allowed if there is enough free pool space outside of
1363 this reservation to accommodate the current number of
1365 bytes in the dataset.
1371 a volume is thick provisioned
1375 .Sy refreservation Ns = Ns Sy auto
1376 is only supported on volumes.
1380 .Sx Native Properties
1381 section for more information about sparse volumes.
1383 This property can also be referred to by its shortened column name,
1385 .It Sy reservation Ns = Ns Em size Ns | Ns Sy none
1386 The minimum amount of space guaranteed to a dataset and its descendants.
1387 When the amount of space used is below this value, the dataset is treated as if
1388 it were taking up the amount of space specified by its reservation.
1389 Reservations are accounted for in the parent datasets' space used, and count
1390 against the parent datasets' quotas and reservations.
1392 This property can also be referred to by its shortened column name,
1394 .It Sy secondarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1395 Controls what is cached in the secondary cache
1397 If this property is set to
1399 then both user data and metadata is cached.
1400 If this property is set to
1402 then neither user data nor metadata is cached.
1403 If this property is set to
1405 then only metadata is cached.
1406 The default value is
1408 .It Sy setuid Ns = Ns Sy on Ns | Ns Sy off
1409 Controls whether the setuid bit is respected for the file system.
1410 The default value is
1412 .It Sy sharesmb Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1413 Controls whether the file system is shared via SMB, and what options are to be
1415 A file system with the
1419 is managed through traditional tools such as
1421 Otherwise, the file system is automatically shared and unshared with the
1426 If the property is set to
1430 command is invoked with no options.
1433 command is invoked with options equivalent to the contents of this property.
1435 Because SMB shares requires a resource name, a unique resource name is
1436 constructed from the dataset name.
1437 The constructed name is a copy of the dataset name except that the characters in
1438 the dataset name, which would be invalid in the resource name, are replaced with
1444 is also supported that allows you to replace the data set name with a specified
1446 The specified name is then used to replace the prefix dataset in the case of
1448 For example, if the dataset
1451 .Sy name Ns = Ns Sy john ,
1454 has a resource name of
1457 .Em data/home/john/backups
1458 is shared, it has a resource name of
1461 When SMB shares are created, the SMB share name appears as an entry in the
1468 command to display the share-level ACLs on the entries in this directory.
1472 property is changed for a dataset, the dataset and any children inheriting the
1473 property are re-shared with the new options, only if the property was previously
1476 or if they were shared before the property was changed.
1477 If the new property is set to
1479 the file systems are unshared.
1480 .It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1481 Controls whether the file system is shared via NFS, and what options are to be
1483 A file system with a
1487 is managed through traditional tools such as
1492 Otherwise, the file system is automatically shared and unshared with the
1497 If the property is set to
1500 command is invoked with no options.
1503 command is invoked with options equivalent to the contents of this property.
1507 property is changed for a dataset, the dataset and any children inheriting the
1508 property are re-shared with the new options, only if the property was previously
1510 or if they were shared before the property was changed.
1511 If the new property is
1513 the file systems are unshared.
1514 .It Sy logbias Ns = Ns Sy latency Ns | Ns Sy throughput
1515 Provide a hint to ZFS about handling of synchronous requests in this dataset.
1521 ZFS will use pool log devices
1523 to handle the requests at low latency.
1528 ZFS will not use configured pool log devices.
1529 ZFS will instead optimize synchronous operations for global pool throughput and
1530 efficient use of resources.
1531 .It Sy snapdir Ns = Ns Sy hidden Ns | Ns Sy visible
1532 Controls whether the
1534 directory is hidden or visible in the root of the file system as discussed in
1538 The default value is
1540 .It Sy sync Ns = Ns Sy standard Ns | Ns Sy always Ns | Ns Sy disabled
1541 Controls the behavior of synchronous requests
1542 .Pq e.g. fsync, O_DSYNC .
1546 specified behavior of ensuring all synchronous requests are written to stable
1547 storage and all devices are flushed to ensure data is not cached by device
1549 .Pq this is the default .
1551 causes every file system transaction to be written and flushed before its
1552 system call returns.
1553 This has a large performance penalty.
1555 disables synchronous requests.
1556 File system transactions are only committed to stable storage periodically.
1557 This option will give the highest performance.
1558 However, it is very dangerous as ZFS would be ignoring the synchronous
1559 transaction demands of applications such as databases or NFS.
1560 Administrators should only use this option when the risks are understood.
1561 .It Sy version Ns = Ns Em N Ns | Ns Sy current
1562 The on-disk version of this file system, which is independent of the pool
1564 This property can only be set to later supported versions.
1568 .It Sy volsize Ns = Ns Em size
1569 For volumes, specifies the logical size of the volume.
1570 By default, creating a volume establishes a reservation of equal size.
1571 For storage pools with a version number of 9 or higher, a
1576 are reflected in an equivalent change to the reservation
1582 can only be set to a multiple of
1586 The reservation is kept equal to the volume's logical size to prevent unexpected
1587 behavior for consumers.
1588 Without the reservation, the volume could run out of space, resulting in
1589 undefined behavior or data corruption, depending on how the volume is used.
1590 These effects can also occur when the volume size is changed while it is in use
1591 .Pq particularly when shrinking the size .
1592 Extreme care should be used when adjusting the volume size.
1594 Though not recommended, a
1597 .Qq thin provisioned
1599 can be created by specifying the
1602 .Nm zfs Cm create Fl V
1603 command, or by changing the value of the
1608 property on pool version 8 or earlier
1610 after the volume has been created.
1613 is a volume where the value of
1615 is less than the size of the volume plus the space required to store its
1617 Consequently, writes to a sparse volume can fail with
1619 when the pool is low on space.
1620 For a sparse volume, changes to
1622 are not reflected in the
1624 A volume that is not sparse is said to be
1625 .Qq thick provisioned .
1626 A sparse volume can become thick provisioned by setting
1630 .It Sy vscan Ns = Ns Sy on Ns | Ns Sy off
1631 Controls whether regular files should be scanned for viruses when a file is
1633 In addition to enabling this property, the virus scan service must also be
1634 enabled for virus scanning to occur.
1635 The default value is
1637 .It Sy xattr Ns = Ns Sy on Ns | Ns Sy off
1638 Controls whether extended attributes are enabled for this file system.
1639 The default value is
1641 .It Sy zoned Ns = Ns Sy on Ns | Ns Sy off
1642 Controls whether the dataset is managed from a non-global zone.
1645 section for more information.
1646 The default value is
1650 The following three properties cannot be changed after the file system is
1651 created, and therefore, should be set when the file system is created.
1652 If the properties are not set with the
1656 commands, these properties are inherited from the parent dataset.
1657 If the parent dataset lacks these properties due to having been created prior to
1658 these features being supported, the new file system will have the default values
1659 for these properties.
1662 .Sy casesensitivity Ns = Ns Sy sensitive Ns | Ns
1663 .Sy insensitive Ns | Ns Sy mixed
1665 Indicates whether the file name matching algorithm used by the file system
1666 should be case-sensitive, case-insensitive, or allow a combination of both
1668 The default value for the
1676 file systems have case-sensitive file names.
1682 property indicates that the file system can support requests for both
1683 case-sensitive and case-insensitive matching behavior.
1684 Currently, case-insensitive matching behavior on a file system that supports
1685 mixed behavior is limited to the SMB server product.
1686 For more information about the
1688 value behavior, see the "ZFS Administration Guide".
1690 .Sy normalization Ns = Ns Sy none Ns | Ns Sy formC Ns | Ns
1691 .Sy formD Ns | Ns Sy formKC Ns | Ns Sy formKD
1693 Indicates whether the file system should perform a
1695 normalization of file names whenever two file names are compared, and which
1696 normalization algorithm should be used.
1697 File names are always stored unmodified, names are normalized as part of any
1699 If this property is set to a legal value other than
1703 property was left unspecified, the
1705 property is automatically set to
1707 The default value of the
1711 This property cannot be changed after the file system is created.
1712 .It Sy utf8only Ns = Ns Sy on Ns | Ns Sy off
1713 Indicates whether the file system should reject file names that include
1714 characters that are not present in the
1717 If this property is explicitly set to
1719 the normalization property must either not be explicitly set or be set to
1721 The default value for the
1725 This property cannot be changed after the file system is created.
1729 .Sy casesensitivity ,
1733 properties are also new permissions that can be assigned to non-privileged users
1734 by using the ZFS delegated administration feature.
1735 .Ss "Temporary Mount Point Properties"
1736 When a file system is mounted, either through
1738 for legacy mounts or the
1740 command for normal file systems, its mount options are set according to its
1742 The correlation between properties and mount options is as follows:
1744 PROPERTY MOUNT OPTION
1745 devices devices/nodevices
1748 setuid setuid/nosetuid
1752 In addition, these options can be set on a per-mount basis using the
1754 option, without affecting the property that is stored on disk.
1755 The values specified on the command line override the values stored in the
1759 option is an alias for
1760 .Sy nodevices Ns \&, Ns Sy nosetuid .
1761 These properties are reported as
1766 If the properties are changed while the dataset is mounted, the new setting
1767 overrides any temporary settings.
1768 .Ss "User Properties"
1769 In addition to the standard native properties, ZFS supports arbitrary user
1771 User properties have no effect on ZFS behavior, but applications or
1772 administrators can use them to annotate datasets
1773 .Pq file systems, volumes, and snapshots .
1775 User property names must contain a colon
1777 character to distinguish them from native properties.
1778 They may contain lowercase letters, numbers, and the following punctuation
1787 The expected convention is that the property name is divided into two portions
1789 .Em module Ns \&: Ns Em property ,
1790 but this namespace is not enforced by ZFS.
1791 User property names can be at most 256 characters, and cannot begin with a dash
1794 When making programmatic use of user properties, it is strongly suggested to use
1799 component of property names to reduce the chance that two
1800 independently-developed packages use the same property name for different
1803 The values of user properties are arbitrary strings, are always inherited, and
1804 are never validated.
1805 All of the commands that operate on properties
1806 .Po Nm zfs Cm list ,
1811 can be used to manipulate both native properties and user properties.
1814 command to clear a user property.
1815 If the property is not defined in any parent dataset, it is removed entirely.
1816 Property values are limited to 8192 bytes.
1817 .Ss ZFS Volumes as Swap or Dump Devices
1818 During an initial installation a swap device and dump device are created on ZFS
1819 volumes in the ZFS root pool.
1820 By default, the swap area size is based on 1/2 the size of physical memory up to
1822 The size of the dump device depends on the kernel's requirements at installation
1824 Separate ZFS volumes must be used for the swap area and dump devices.
1825 Do not swap to a file on a ZFS file system.
1826 A ZFS swap file configuration is not supported.
1828 If you need to change your swap area or dump device after the system is
1829 installed or upgraded, use the
1835 All subcommands that modify state are logged persistently to the pool in their
1839 Displays a help message.
1844 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1847 Creates a new ZFS file system.
1848 The file system is automatically mounted according to the
1850 property inherited from the parent.
1851 .Bl -tag -width "-o"
1852 .It Fl o Ar property Ns = Ns Ar value
1853 Sets the specified property as if the command
1854 .Nm zfs Cm set Ar property Ns = Ns Ar value
1855 was invoked at the same time the dataset was created.
1856 Any editable ZFS property can also be set at creation time.
1859 options can be specified.
1860 An error results if the same property is specified in multiple
1864 Creates all the non-existing parent datasets.
1865 Datasets created in this manner are automatically mounted according to the
1867 property inherited from their parent.
1868 Any property specified on the command line using the
1871 If the target filesystem already exists, the operation completes successfully.
1877 .Op Fl b Ar blocksize
1878 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1879 .Fl V Ar size Ar volume
1881 Creates a volume of the given size.
1882 The volume is exported as a block device in
1883 .Pa /dev/zvol/{dsk,rdsk}/path ,
1886 is the name of the volume in the ZFS namespace.
1887 The size represents the logical size as exported by the device.
1888 By default, a reservation of equal size is created.
1891 is automatically rounded up to the nearest 128 Kbytes to ensure that the volume
1892 has an integral number of blocks regardless of
1894 .Bl -tag -width "-b"
1895 .It Fl b Ar blocksize
1897 .Fl o Sy volblocksize Ns = Ns Ar blocksize .
1898 If this option is specified in conjunction with
1899 .Fl o Sy volblocksize ,
1900 the resulting behavior is undefined.
1901 .It Fl o Ar property Ns = Ns Ar value
1902 Sets the specified property as if the
1903 .Nm zfs Cm set Ar property Ns = Ns Ar value
1904 command was invoked at the same time the dataset was created.
1905 Any editable ZFS property can also be set at creation time.
1908 options can be specified.
1909 An error results if the same property is specified in multiple
1913 Creates all the non-existing parent datasets.
1914 Datasets created in this manner are automatically mounted according to the
1916 property inherited from their parent.
1917 Any property specified on the command line using the
1920 If the target filesystem already exists, the operation completes successfully.
1922 Creates a sparse volume with no reservation.
1926 .Sx Native Properties
1927 section for more information about sparse volumes.
1933 .Ar filesystem Ns | Ns Ar volume
1935 Destroys the given dataset.
1936 By default, the command unshares any file systems that are currently shared,
1937 unmounts any file systems that are currently mounted, and refuses to destroy a
1938 dataset that has active dependents
1939 .Pq children or clones .
1940 .Bl -tag -width "-R"
1942 Recursively destroy all dependents, including cloned file systems outside the
1945 Force an unmount of any file systems using the
1948 This option has no effect on non-file systems or unmounted file systems.
1953 No data will be deleted.
1954 This is useful in conjunction with the
1958 flags to determine what data would be deleted.
1960 Print machine-parsable verbose information about the deleted data.
1962 Recursively destroy all children.
1964 Print verbose information about the deleted data.
1967 Extreme care should be taken when applying either the
1971 options, as they can destroy large portions of a pool and cause unexpected
1972 behavior for mounted file systems in use.
1977 .Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns
1978 .Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ...
1980 The given snapshots are destroyed immediately if and only if the
1984 option would have destroyed it.
1985 Such immediate destruction would occur, for example, if the snapshot had no
1986 clones and the user-initiated reference count were zero.
1988 If a snapshot does not qualify for immediate destruction, it is marked for
1990 In this state, it exists as a usable, visible snapshot until both of the
1991 preconditions listed above are met, at which point it is destroyed.
1993 An inclusive range of snapshots may be specified by separating the first and
1994 last snapshots with a percent sign.
1995 The first and/or last snapshots may be left blank, in which case the
1996 filesystem's oldest or newest snapshot will be implied.
1999 .Pq or ranges of snapshots
2000 of the same filesystem or volume may be specified in a comma-separated list of
2002 Only the snapshot's short name
2003 .Po the part after the
2006 should be specified when using a range or comma-separated list to identify
2008 .Bl -tag -width "-R"
2010 Recursively destroy all clones of these snapshots, including the clones,
2011 snapshots, and children.
2012 If this flag is specified, the
2014 flag will have no effect.
2016 Defer snapshot deletion.
2021 No data will be deleted.
2022 This is useful in conjunction with the
2026 flags to determine what data would be deleted.
2028 Print machine-parsable verbose information about the deleted data.
2031 .Pq or mark for deferred deletion
2032 all snapshots with this name in descendent file systems.
2034 Print verbose information about the deleted data.
2036 Extreme care should be taken when applying either the
2040 options, as they can destroy large portions of a pool and cause unexpected
2041 behavior for mounted file systems in use.
2046 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
2048 The given bookmark is destroyed.
2053 .Oo Fl o Ar property Ns = Ns value Oc Ns ...
2054 .Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ...
2056 Creates snapshots with the given names.
2057 All previous modifications by successful system calls to the file system are
2058 part of the snapshots.
2059 Snapshots are taken atomically, so that all snapshots correspond to the same
2063 section for details.
2064 .Bl -tag -width "-o"
2065 .It Fl o Ar property Ns = Ns Ar value
2066 Sets the specified property; see
2070 Recursively create snapshots of all descendent datasets
2078 Roll back the given dataset to a previous snapshot.
2079 When a dataset is rolled back, all data that has changed since the snapshot is
2080 discarded, and the dataset reverts to the state at the time of the snapshot.
2081 By default, the command refuses to roll back to a snapshot other than the most
2083 In order to do so, all intermediate snapshots and bookmarks must be destroyed by
2090 options do not recursively destroy the child snapshots of a recursive snapshot.
2091 Only direct snapshots of the specified filesystem are destroyed by either of
2093 To completely roll back a recursive snapshot, you must rollback the individual
2095 .Bl -tag -width "-R"
2097 Destroy any more recent snapshots and bookmarks, as well as any clones of those
2102 option to force an unmount of any clone file systems that are to be destroyed.
2104 Destroy any snapshots and bookmarks more recent than the one specified.
2110 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
2111 .Ar snapshot Ar filesystem Ns | Ns Ar volume
2113 Creates a clone of the given snapshot.
2116 section for details.
2117 The target dataset can be located anywhere in the ZFS hierarchy, and is created
2118 as the same type as the original.
2119 .Bl -tag -width "-o"
2120 .It Fl o Ar property Ns = Ns Ar value
2121 Sets the specified property; see
2125 Creates all the non-existing parent datasets.
2126 Datasets created in this manner are automatically mounted according to the
2128 property inherited from their parent.
2129 If the target filesystem or volume already exists, the operation completes
2135 .Ar clone-filesystem
2137 Promotes a clone file system to no longer be dependent on its
2140 This makes it possible to destroy the file system that the clone was created
2142 The clone parent-child dependency relationship is reversed, so that the origin
2143 file system becomes a clone of the specified file system.
2145 The snapshot that was cloned, and any snapshots previous to this snapshot, are
2146 now owned by the promoted clone.
2147 The space they use moves from the origin file system to the promoted clone, so
2148 enough space must be available to accommodate these snapshots.
2149 No new space is consumed by this operation, but the space accounting is
2151 The promoted clone must not have any conflicting snapshot names of its own.
2154 subcommand can be used to rename any conflicting snapshots.
2159 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2160 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2166 .Ar filesystem Ns | Ns Ar volume
2167 .Ar filesystem Ns | Ns Ar volume
2169 Renames the given dataset.
2170 The new target can be located anywhere in the ZFS hierarchy, with the exception
2172 Snapshots can only be renamed within the parent file system or volume.
2173 When renaming a snapshot, the parent file system of the snapshot does not need
2174 to be specified as part of the second argument.
2175 Renamed file systems can inherit new mount points, in which case they are
2176 unmounted and remounted at the new mount point.
2177 .Bl -tag -width "-a"
2179 Force unmount any filesystems that need to be unmounted in the process.
2181 Creates all the nonexistent parent datasets.
2182 Datasets created in this manner are automatically mounted according to the
2184 property inherited from their parent.
2190 .Ar snapshot Ar snapshot
2192 Recursively rename the snapshots of all descendent datasets.
2193 Snapshots are the only dataset that can be renamed recursively.
2197 .Op Fl r Ns | Ns Fl d Ar depth
2199 .Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc
2200 .Oo Fl s Ar property Oc Ns ...
2201 .Oo Fl S Ar property Oc Ns ...
2202 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2203 .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ...
2205 Lists the property information for the given datasets in tabular form.
2206 If specified, you can list property information by the absolute pathname or the
2208 By default, all file systems and volumes are displayed.
2209 Snapshots are displayed if the
2216 The following fields are displayed,
2217 .Sy name Ns \&, Ns Sy used Ns \&, Ns Sy available Ns \&, Ns Sy referenced Ns \&, Ns
2219 .Bl -tag -width "-H"
2221 Used for scripting mode.
2222 Do not print headers and separate fields by a single tab instead of arbitrary
2224 .It Fl S Ar property
2227 option, but sorts by property in descending order.
2229 Recursively display any children of the dataset, limiting the recursion to
2235 will display only the dataset and its direct children.
2236 .It Fl o Ar property
2237 A comma-separated list of properties to display.
2238 The property must be:
2241 One of the properties described in the
2242 .Sx Native Properties
2249 to display the dataset name
2253 to display space usage properties on file systems and volumes.
2254 This is a shortcut for specifying
2255 .Fl o Sy name Ns \&, Ns Sy avail Ns \&, Ns Sy used Ns \&, Ns Sy usedsnap Ns \&, Ns
2256 .Sy usedds Ns \&, Ns Sy usedrefreserv Ns \&, Ns Sy usedchild Fl t
2257 .Sy filesystem Ns \&, Ns Sy volume
2261 Display numbers in parsable
2265 Recursively display any children of the dataset on the command line.
2266 .It Fl s Ar property
2267 A property for sorting the output by column in ascending order based on the
2268 value of the property.
2269 The property must be one of the properties described in the
2271 section, or the special value
2273 to sort by the dataset name.
2274 Multiple properties can be specified at one time using multiple
2279 options are evaluated from left to right in decreasing order of importance.
2280 The following is a list of sorting criteria:
2283 Numeric types sort in numeric order.
2285 String types sort in alphabetical order.
2287 Types inappropriate for a row sort that row to the literal bottom, regardless of
2288 the specified ordering.
2291 If no sorting options are specified the existing behavior of
2295 A comma-separated list of types to display, where
2304 For example, specifying
2306 displays only snapshots.
2311 .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ...
2312 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2314 Sets the property or list of properties to the given value(s) for each dataset.
2315 Only some properties can be edited.
2318 section for more information on what properties can be set and acceptable
2320 Numeric values can be specified as exact values, or in a human-readable form
2322 .Sy B , K , M , G , T , P , E , Z
2323 .Po for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes,
2324 or zettabytes, respectively
2326 User properties can be set on snapshots.
2327 For more information, see the
2333 .Op Fl r Ns | Ns Fl d Ar depth
2335 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2336 .Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc
2337 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2338 .Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ...
2339 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Ns ...
2341 Displays properties for the given datasets.
2342 If no datasets are specified, then the command displays properties for all
2343 datasets on the system.
2344 For each property, the following columns are displayed:
2347 property Property name
2348 value Property value
2349 source Property source. Can either be local, default,
2350 temporary, inherited, or none (-).
2353 All columns are displayed by default, though this can be controlled by using the
2356 This command takes a comma-separated list of properties as described in the
2357 .Sx Native Properties
2364 can be used to display all properties that apply to the given dataset's type
2365 .Pq filesystem, volume, snapshot, or bookmark .
2366 .Bl -tag -width "-H"
2368 Display output in a form more easily parsed by scripts.
2369 Any headers are omitted, and fields are explicitly separated by a single tab
2370 instead of an arbitrary amount of space.
2372 Recursively display any children of the dataset, limiting the recursion to
2376 will display only the dataset and its direct children.
2378 A comma-separated list of columns to display.
2379 .Sy name Ns \&, Ns Sy property Ns \&, Ns Sy value Ns \&, Ns Sy source
2380 is the default value.
2382 Display numbers in parsable
2386 Recursively display properties for any children.
2388 A comma-separated list of sources to display.
2389 Those properties coming from a source other than those in this list are ignored.
2390 Each source must be one of the following:
2397 The default value is all sources.
2399 A comma-separated list of types to display, where
2413 .Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2415 Clears the specified property, causing it to be inherited from an ancestor,
2416 restored to default if no ancestor has the property set, or with the
2418 option reverted to the received value if one exists.
2421 section for a listing of default values, and details on which properties can be
2423 .Bl -tag -width "-r"
2425 Recursively inherit the given property for all children.
2427 Revert the property to the received value if one exists; otherwise operate as
2430 option was not specified.
2435 .Ar filesystem Ns | Ns Ar volume
2437 Remap the indirect blocks in the given fileystem or volume so that they no
2438 longer reference blocks on previously removed vdevs and we can eventually
2439 shrink the size of the indirect mapping objects for the previously removed
2440 vdevs. Note that remapping all blocks might not be possible and that
2441 references from snapshots will still exist and cannot be remapped.
2446 Displays a list of file systems that are not the most recent version.
2452 Displays a list of currently supported file system versions.
2458 .Fl a | Ar filesystem
2460 Upgrades file systems to a new on-disk version.
2461 Once this is done, the file systems will no longer be accessible on systems
2462 running older versions of the software.
2464 streams generated from new snapshots of these file systems cannot be accessed on
2465 systems running older versions of the software.
2467 In general, the file system version is independent of the pool version.
2470 for information on the
2471 .Nm zpool Cm upgrade
2474 In some cases, the file system version and the pool version are interrelated and
2475 the pool version must be upgraded before the file system version can be
2477 .Bl -tag -width "-V"
2479 Upgrade to the specified
2483 flag is not specified, this command upgrades to the most recent version.
2485 option can only be used to increase the version number, and only up to the most
2486 recent version supported by this software.
2488 Upgrade all file systems on all imported pools.
2490 Upgrade the specified file system.
2492 Upgrade the specified file system and all descendent file systems.
2498 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2499 .Oo Fl s Ar field Oc Ns ...
2500 .Oo Fl S Ar field Oc Ns ...
2501 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2502 .Ar filesystem Ns | Ns Ar snapshot
2504 Displays space consumed by, and quotas on, each user in the specified filesystem
2506 This corresponds to the
2507 .Sy userused@ Ns Em user
2509 .Sy userquota@ Ns Em user
2511 .Bl -tag -width "-H"
2513 Do not print headers, use tab-delimited output.
2515 Sort by this field in reverse order.
2519 Translate SID to POSIX ID.
2520 The POSIX ID may be ephemeral if no mapping exists.
2521 Normal POSIX interfaces
2526 perform this translation, so the
2528 option allows the output from
2529 .Nm zfs Cm userspace
2530 to be compared directly with those utilities.
2533 may lead to confusion if some files were created by an SMB user before a
2534 SMB-to-POSIX name mapping was established.
2535 In such a case, some files will be owned by the SMB entity and some by the POSIX
2539 option will report that the POSIX entity has the total usage and quota for both.
2541 Print numeric ID instead of user/group name.
2542 .It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2543 Display only the specified fields from the following set:
2548 The default is to display all fields.
2554 Sort output by this field.
2559 flags may be specified multiple times to sort first by one field, then by
2562 .Fl s Sy type Fl s Sy name .
2563 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2564 Print only the specified types from the following set:
2571 .Fl t Sy posixuser Ns \&, Ns Sy smbuser .
2572 The default can be changed to include group types.
2578 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2579 .Oo Fl s Ar field Oc Ns ...
2580 .Oo Fl S Ar field Oc Ns ...
2581 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2582 .Ar filesystem Ns | Ns Ar snapshot
2584 Displays space consumed by, and quotas on, each group in the specified
2585 filesystem or snapshot.
2586 This subcommand is identical to
2587 .Nm zfs Cm userspace ,
2588 except that the default types to display are
2589 .Fl t Sy posixgroup Ns \&, Ns Sy smbgroup .
2594 Displays all ZFS file systems currently mounted.
2600 .Fl a | Ar filesystem
2602 Mounts ZFS file systems.
2603 .Bl -tag -width "-O"
2605 Perform an overlay mount.
2608 for more information.
2610 Mount all available ZFS file systems.
2611 Invoked automatically as part of the boot process.
2613 Mount the specified filesystem.
2615 An optional, comma-separated list of mount options to use temporarily for the
2616 duration of the mount.
2618 .Sx Temporary Mount Point Properties
2619 section for details.
2621 Report mount progress.
2627 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2629 Unmounts currently mounted ZFS file systems.
2630 .Bl -tag -width "-a"
2632 Unmount all available ZFS file systems.
2633 Invoked automatically as part of the shutdown process.
2634 .It Ar filesystem Ns | Ns Ar mountpoint
2635 Unmount the specified filesystem.
2636 The command can also be given a path to a ZFS file system mount point on the
2639 Forcefully unmount the file system, even if it is currently in use.
2644 .Fl a | Ar filesystem
2646 Shares available ZFS file systems.
2647 .Bl -tag -width "-a"
2649 Share all available ZFS file systems.
2650 Invoked automatically as part of the boot process.
2652 Share the specified filesystem according to the
2657 File systems are shared when the
2666 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2668 Unshares currently shared ZFS file systems.
2669 .Bl -tag -width "-a"
2671 Unshare all available ZFS file systems.
2672 Invoked automatically as part of the shutdown process.
2673 .It Ar filesystem Ns | Ns Ar mountpoint
2674 Unshare the specified filesystem.
2675 The command can also be given a path to a ZFS file system shared on the system.
2680 .Ar snapshot bookmark
2682 Creates a bookmark of the given snapshot.
2683 Bookmarks mark the point in time when the snapshot was created, and can be used
2684 as the incremental source for a
2688 This feature must be enabled to be used.
2690 .Xr zpool-features 5
2691 for details on ZFS feature flags and the
2698 .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
2701 Creates a stream representation of the second
2703 which is written to standard output.
2704 The output can be redirected to a file or to a different system
2705 .Po for example, using
2708 By default, a full stream is generated.
2709 .Bl -tag -width "-D"
2711 Generate a deduplicated stream.
2712 Blocks which would have been sent multiple times in the send stream will only be
2714 The receiving system must also support this feature to receive a deduplicated
2716 This flag can be used regardless of the dataset's
2718 property, but performance will be much better if the filesystem uses a
2719 dedup-capable checksum
2723 .It Fl I Ar snapshot
2724 Generate a stream package that sends all intermediary snapshots from the first
2725 snapshot to the second snapshot.
2729 .Fl i Em @a Em fs@b Ns \&; Fl i Em @b Em fs@c Ns \&; Fl i Em @c Em fs@d .
2730 The incremental source may be specified as with the
2733 .It Fl L, -large-block
2734 Generate a stream which may contain blocks larger than 128KB.
2735 This flag has no effect if the
2737 pool feature is disabled, or if the
2739 property of this filesystem has never been set above 128KB.
2740 The receiving system must have the
2742 pool feature enabled as well.
2744 .Xr zpool-features 5
2745 for details on ZFS feature flags and the
2749 Print machine-parsable verbose information about the stream package generated.
2750 .It Fl R, -replicate
2751 Generate a replication stream package, which will replicate the specified
2752 file system, and all descendent file systems, up to the named snapshot.
2753 When received, all properties, snapshots, descendent file systems, and clones
2760 flags are used in conjunction with the
2762 flag, an incremental replication stream is generated.
2763 The current values of properties, and current snapshot and file system names are
2764 set when the stream is received.
2767 flag is specified when this stream is received, snapshots and file systems that
2768 do not exist on the sending side are destroyed.
2770 Generate a more compact stream by using
2772 records for blocks which are stored more compactly on disk by the
2775 This flag has no effect if the
2777 feature is disabled.
2778 The receiving system must have the
2783 feature is active on the sending system, then the receiving system must have
2784 that feature enabled as well.
2786 .Xr zpool-features 5
2787 for details on ZFS feature flags and the
2790 .It Fl c, -compressed
2791 Generate a more compact stream by using compressed WRITE records for blocks
2792 which are compressed on disk and in memory
2795 property for details
2799 feature is active on the sending system, then the receiving system must have
2800 that feature enabled as well.
2803 feature is enabled on the sending system but the
2805 option is not supplied in conjunction with
2807 then the data will be decompressed before sending so it can be split into
2808 smaller block sizes.
2809 .It Fl i Ar snapshot
2810 Generate an incremental stream from the first
2812 .Pq the incremental source
2815 .Pq the incremental target .
2816 The incremental source can be specified as the last component of the snapshot
2820 character and following
2822 and it is assumed to be from the same file system as the incremental target.
2824 If the destination is a clone, the source may be the origin snapshot, which must
2827 .Em pool/fs@origin ,
2835 Do not generate any actual send data.
2836 This is useful in conjunction with the
2840 flags to determine what data will be sent.
2841 In this case, the verbose output will be written to standard output
2842 .Po contrast with a non-dry-run, where the stream is written to standard output
2843 and the verbose output goes to standard error
2846 Include the dataset's properties in the stream.
2847 This flag is implicit when
2850 The receiving system must also support this feature.
2852 Print verbose information about the stream package generated.
2853 This information includes a per-second report of how much data has been sent.
2855 The format of the stream is committed.
2856 You will be able to receive your streams on future versions of ZFS .
2862 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
2863 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2865 Generate a send stream, which may be of a filesystem, and may be incremental
2867 If the destination is a filesystem or volume, the pool must be read-only, or the
2868 filesystem must not be mounted.
2869 When the stream generated from a filesystem or volume is received, the default
2870 snapshot name will be
2872 .Bl -tag -width "-L"
2873 .It Fl L, -large-block
2874 Generate a stream which may contain blocks larger than 128KB.
2875 This flag has no effect if the
2877 pool feature is disabled, or if the
2879 property of this filesystem has never been set above 128KB.
2880 The receiving system must have the
2882 pool feature enabled as well.
2884 .Xr zpool-features 5
2885 for details on ZFS feature flags and the
2888 .It Fl c, -compressed
2889 Generate a more compact stream by using compressed WRITE records for blocks
2890 which are compressed on disk and in memory
2893 property for details
2897 feature is active on the sending system, then the receiving system must have
2898 that feature enabled as well.
2901 feature is enabled on the sending system but the
2903 option is not supplied in conjunction with
2905 then the data will be decompressed before sending so it can be split into
2906 smaller block sizes.
2908 Generate a more compact stream by using
2910 records for blocks which are stored more compactly on disk by the
2913 This flag has no effect if the
2915 feature is disabled.
2916 The receiving system must have the
2921 feature is active on the sending system, then the receiving system must have
2922 that feature enabled as well.
2924 .Xr zpool-features 5
2925 for details on ZFS feature flags and the
2928 .It Fl i Ar snapshot Ns | Ns Ar bookmark
2929 Generate an incremental send stream.
2930 The incremental source must be an earlier snapshot in the destination's history.
2931 It will commonly be an earlier snapshot in the destination's file system, in
2932 which case it can be specified as the last component of the name
2937 character and following
2940 If the incremental target is a clone, the incremental source can be the origin
2941 snapshot, or an earlier snapshot in the origin's filesystem, or the origin's
2949 .Ar receive_resume_token
2951 Creates a send stream which resumes an interrupted receive.
2953 .Ar receive_resume_token
2954 is the value of this property on the filesystem or volume that was being
2956 See the documentation for
2963 .Op Fl o Sy origin Ns = Ns Ar snapshot
2964 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2970 .Op Fl d Ns | Ns Fl e
2971 .Op Fl o Sy origin Ns = Ns Ar snapshot
2974 Creates a snapshot whose contents are as specified in the stream provided on
2976 If a full stream is received, then a new file system is created as well.
2977 Streams are created using the
2979 subcommand, which by default creates a full stream.
2981 can be used as an alias for
2984 If an incremental stream is received, then the destination file system must
2985 already exist, and its most recent snapshot must match the incremental stream's
2989 the destination device link is destroyed and recreated, which means the
2991 cannot be accessed during the
2995 When a snapshot replication package stream that is generated by using the
2996 .Nm zfs Cm send Fl R
2997 command is received, any snapshots that do not exist on the sending location are
2998 destroyed by using the
2999 .Nm zfs Cm destroy Fl d
3002 The name of the snapshot
3003 .Pq and file system, if a full stream is received
3004 that this subcommand creates depends on the argument type and the use of the
3010 If the argument is a snapshot name, the specified
3013 If the argument is a file system or volume name, a snapshot with the same name
3014 as the sent snapshot is created within the specified
3022 options are specified, the provided target snapshot name is used exactly as
3029 options cause the file system name of the target snapshot to be determined by
3030 appending a portion of the sent snapshot's name to the specified target
3034 option is specified, all but the first element of the sent snapshot's file
3036 .Pq usually the pool name
3037 is used and any required intermediate file systems within the specified one are
3041 option is specified, then only the last element of the sent snapshot's file
3043 .Pq i.e. the name of the source file system itself
3044 is used as the target file system name.
3045 .Bl -tag -width "-F"
3047 Force a rollback of the file system to the most recent snapshot before
3048 performing the receive operation.
3049 If receiving an incremental replication stream
3050 .Po for example, one generated by
3051 .Nm zfs Cm send Fl R Op Fl i Ns | Ns Fl I
3053 destroy snapshots and file systems that do not exist on the sending side.
3055 Discard the first element of the sent snapshot's file system name, using the
3056 remaining elements to determine the name of the target file system for the new
3057 snapshot as described in the paragraph above.
3059 Discard all but the last element of the sent snapshot's file system name, using
3060 that element to determine the name of the target file system for the new
3061 snapshot as described in the paragraph above.
3063 Do not actually receive the stream.
3064 This can be useful in conjunction with the
3066 option to verify the name the receive operation would use.
3067 .It Fl o Sy origin Ns = Ns Ar snapshot
3068 Forces the stream to be received as a clone of the given snapshot.
3069 If the stream is a full send stream, this will create the filesystem
3070 described by the stream as a clone of the specified snapshot.
3071 Which snapshot was specified will not affect the success or failure of the
3072 receive, as long as the snapshot does exist.
3073 If the stream is an incremental send stream, all the normal verification will be
3076 File system that is associated with the received stream is not mounted.
3078 Print verbose information about the stream and the time required to perform the
3081 If the receive is interrupted, save the partially received state, rather
3083 Interruption may be due to premature termination of the stream
3084 .Po e.g. due to network failure or failure of the remote system
3085 if the stream is being read over a network connection
3087 a checksum error in the stream, termination of the
3089 process, or unclean shutdown of the system.
3091 The receive can be resumed with a stream generated by
3092 .Nm zfs Cm send Fl t Ar token ,
3096 .Sy receive_resume_token
3097 property of the filesystem or volume which is received into.
3099 To use this flag, the storage pool must have the
3100 .Sy extensible_dataset
3103 .Xr zpool-features 5
3104 for details on ZFS feature flags.
3110 .Ar filesystem Ns | Ns Ar volume
3112 Abort an interrupted
3113 .Nm zfs Cm receive Fl s ,
3114 deleting its saved partially received state.
3118 .Ar filesystem Ns | Ns Ar volume
3120 Displays permissions that have been delegated on the specified filesystem or
3122 See the other forms of
3124 for more information.
3129 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3130 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3131 .Ar setname Oc Ns ...
3132 .Ar filesystem Ns | Ns Ar volume
3137 .Fl e Ns | Ns Sy everyone
3138 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3139 .Ar setname Oc Ns ...
3140 .Ar filesystem Ns | Ns Ar volume
3142 Delegates ZFS administration permission for the file systems to non-privileged
3144 .Bl -tag -width "-d"
3146 Allow only for the descendent file systems.
3147 .It Fl e Ns | Ns Sy everyone
3148 Specifies that the permissions be delegated to everyone.
3149 .It Fl g Ar group Ns Oo , Ns Ar group Oc Ns ...
3150 Explicitly specify that permissions are delegated to the group.
3154 only for the specified file system.
3155 .It Fl u Ar user Ns Oo , Ns Ar user Oc Ns ...
3156 Explicitly specify that permissions are delegated to the user.
3157 .It Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3158 Specifies to whom the permissions are delegated.
3159 Multiple entities can be specified as a comma-separated list.
3162 options are specified, then the argument is interpreted preferentially as the
3165 then as a user name, and lastly as a group name.
3166 To specify a user or group named
3173 To specify a group with the same name as a user, use the
3177 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3178 .Ar setname Oc Ns ...
3180 The permissions to delegate.
3181 Multiple permissions may be specified as a comma-separated list.
3182 Permission names are the same as ZFS subcommand and property names.
3183 See the property list below.
3184 Property set names, which begin with
3189 form below for details.
3194 options are specified, or both are, then the permissions are allowed for the
3195 file system or volume, and all of its descendents.
3197 Permissions are generally the ability to use a ZFS subcommand or change a ZFS
3199 The following permissions are available:
3202 allow subcommand Must also have the permission that is
3204 clone subcommand Must also have the 'create' ability and
3205 'mount' ability in the origin file system
3206 create subcommand Must also have the 'mount' ability
3207 destroy subcommand Must also have the 'mount' ability
3208 diff subcommand Allows lookup of paths within a dataset
3209 given an object number, and the ability
3210 to create snapshots necessary to
3212 mount subcommand Allows mount/umount of ZFS datasets
3213 promote subcommand Must also have the 'mount' and 'promote'
3214 ability in the origin file system
3215 receive subcommand Must also have the 'mount' and 'create'
3217 rename subcommand Must also have the 'mount' and 'create'
3218 ability in the new parent
3219 rollback subcommand Must also have the 'mount' ability
3221 share subcommand Allows sharing file systems over NFS
3223 snapshot subcommand Must also have the 'mount' ability
3225 groupquota other Allows accessing any groupquota@...
3227 groupused other Allows reading any groupused@... property
3228 userprop other Allows changing any user property
3229 userquota other Allows accessing any userquota@...
3231 userused other Allows reading any userused@... property
3237 casesensitivity property
3239 compression property
3243 filesystem_limit property
3246 normalization property
3247 primarycache property
3252 refreservation property
3253 reservation property
3254 secondarycache property
3259 snapshot_limit property
3262 volblocksize property
3272 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3273 .Ar setname Oc Ns ...
3274 .Ar filesystem Ns | Ns Ar volume
3279 These permissions are granted
3281 to the creator of any newly-created descendent file system.
3285 .Fl s No @ Ns Ar setname
3286 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3287 .Ar setname Oc Ns ...
3288 .Ar filesystem Ns | Ns Ar volume
3290 Defines or adds permissions to a permission set.
3291 The set can be used by other
3293 commands for the specified file system and its descendents.
3294 Sets are evaluated dynamically, so changes to a set are immediately reflected.
3295 Permission sets follow the same naming restrictions as ZFS file systems, but the
3296 name must begin with
3298 and can be no more than 64 characters long.
3303 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3304 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3305 .Ar setname Oc Ns ... Oc
3306 .Ar filesystem Ns | Ns Ar volume
3311 .Fl e Ns | Ns Sy everyone
3312 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3313 .Ar setname Oc Ns ... Oc
3314 .Ar filesystem Ns | Ns Ar volume
3320 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3321 .Ar setname Oc Ns ... Oc
3322 .Ar filesystem Ns | Ns Ar volume
3324 Removes permissions that were granted with the
3327 No permissions are explicitly denied, so other permissions granted are still in
3329 For example, if the permission is granted by an ancestor.
3330 If no permissions are specified, then all permissions for the specified
3342 only removes the permissions that were granted to everyone, not all permissions
3343 for every user and group.
3346 command for a description of the
3349 .Bl -tag -width "-r"
3351 Recursively remove the permissions from this file system and all descendents.
3357 .Fl s No @ Ns Ar setname
3358 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3359 .Ar setname Oc Ns ... Oc
3360 .Ar filesystem Ns | Ns Ar volume
3362 Removes permissions from a permission set.
3363 If no permissions are specified, then all permissions are removed, thus removing
3369 .Ar tag Ar snapshot Ns ...
3371 Adds a single reference, named with the
3373 argument, to the specified snapshot or snapshots.
3374 Each snapshot has its own tag namespace, and tags must be unique within that
3377 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3381 .Bl -tag -width "-r"
3383 Specifies that a hold with the given tag is applied recursively to the snapshots
3384 of all descendent file systems.
3392 Lists all existing user references for the given snapshot or snapshots.
3393 .Bl -tag -width "-r"
3395 Lists the holds that are set on the named descendent snapshots, in addition to
3396 listing the holds on the named snapshot.
3402 .Ar tag Ar snapshot Ns ...
3404 Removes a single reference, named with the
3406 argument, from the specified snapshot or snapshots.
3407 The tag must already exist for each snapshot.
3408 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3412 .Bl -tag -width "-r"
3414 Recursively releases a hold with the given tag on the snapshots of all
3415 descendent file systems.
3421 .Ar snapshot Ar snapshot Ns | Ns Ar filesystem
3423 Display the difference between a snapshot of a given filesystem and another
3424 snapshot of that filesystem from a later time or the current contents of the
3426 The first column is a character indicating the type of change, the other columns
3427 indicate pathname, new pathname
3428 .Pq in case of rename ,
3429 change in link count, and optionally file type and/or change time.
3430 The types of change are:
3432 - The path has been removed
3433 + The path has been created
3434 M The path has been modified
3435 R The path has been renamed
3437 .Bl -tag -width "-F"
3439 Display an indication of the type of file, in a manner similar to the
3455 Give more parsable tab-separated output, without header lines and without
3458 Display the path's inode change time as the first column of output.
3465 .Op Fl m Ar memory_limit
3471 as a ZFS channel program on
3474 program interface allows ZFS administrative operations to be run
3475 programmatically via a Lua script.
3476 The entire script is executed atomically, with no other administrative
3477 operations taking effect concurrently.
3478 A library of ZFS calls is made available to channel program scripts.
3479 Channel programs may only be run with root privileges.
3481 For full documentation of the ZFS channel program interface, see the manual
3485 Executes a read-only channel program, which runs faster.
3486 The program cannot change on-disk state by calling functions from
3487 the zfs.sync submodule.
3488 The program can be used to gather information such as properties and
3489 determining if changes would succeed (zfs.check.*).
3490 Without this flag, all pending changes must be synced to disk before
3491 a channel program can complete.
3493 Execution time limit, in milliseconds.
3494 If a channel program executes for longer than the provided timeout, it will
3495 be stopped and an error will be returned.
3496 The default timeout is 1000 ms, and can be set to a maximum of 10000 ms.
3497 .It Fl m Ar memory-limit
3498 Memory limit, in bytes.
3499 If a channel program attempts to allocate more memory than the given limit,
3500 it will be stopped and an error returned.
3501 The default memory limit is 10 MB, and can be set to a maximum of 100 MB.
3503 All remaining argument strings are passed directly to the channel program as
3507 for more information.
3513 utility exits 0 on success, 1 if an error occurs, and 2 if invalid command line
3514 options were specified.
3517 .It Sy Example 1 No Creating a ZFS File System Hierarchy
3518 The following commands create a file system named
3520 and a file system named
3524 is set for the parent file system, and is automatically inherited by the child
3527 # zfs create pool/home
3528 # zfs set mountpoint=/export/home pool/home
3529 # zfs create pool/home/bob
3531 .It Sy Example 2 No Creating a ZFS Snapshot
3532 The following command creates a snapshot named
3534 This snapshot is mounted on demand in the
3536 directory at the root of the
3540 # zfs snapshot pool/home/bob@yesterday
3542 .It Sy Example 3 No Creating and Destroying Multiple Snapshots
3543 The following command creates snapshots named
3547 and all of its descendent file systems.
3548 Each snapshot is mounted on demand in the
3550 directory at the root of its file system.
3551 The second command destroys the newly created snapshots.
3553 # zfs snapshot -r pool/home@yesterday
3554 # zfs destroy -r pool/home@yesterday
3556 .It Sy Example 4 No Disabling and Enabling File System Compression
3557 The following command disables the
3559 property for all file systems under
3561 The next command explicitly enables
3564 .Em pool/home/anne .
3566 # zfs set compression=off pool/home
3567 # zfs set compression=on pool/home/anne
3569 .It Sy Example 5 No Listing ZFS Datasets
3570 The following command lists all active file systems and volumes in the system.
3571 Snapshots are displayed if the
3579 for more information on pool properties.
3582 NAME USED AVAIL REFER MOUNTPOINT
3583 pool 450K 457G 18K /pool
3584 pool/home 315K 457G 21K /export/home
3585 pool/home/anne 18K 457G 18K /export/home/anne
3586 pool/home/bob 276K 457G 276K /export/home/bob
3588 .It Sy Example 6 No Setting a Quota on a ZFS File System
3589 The following command sets a quota of 50 Gbytes for
3592 # zfs set quota=50G pool/home/bob
3594 .It Sy Example 7 No Listing ZFS Properties
3595 The following command lists all properties for
3598 # zfs get all pool/home/bob
3599 NAME PROPERTY VALUE SOURCE
3600 pool/home/bob type filesystem -
3601 pool/home/bob creation Tue Jul 21 15:53 2009 -
3602 pool/home/bob used 21K -
3603 pool/home/bob available 20.0G -
3604 pool/home/bob referenced 21K -
3605 pool/home/bob compressratio 1.00x -
3606 pool/home/bob mounted yes -
3607 pool/home/bob quota 20G local
3608 pool/home/bob reservation none default
3609 pool/home/bob recordsize 128K default
3610 pool/home/bob mountpoint /pool/home/bob default
3611 pool/home/bob sharenfs off default
3612 pool/home/bob checksum on default
3613 pool/home/bob compression on local
3614 pool/home/bob atime on default
3615 pool/home/bob devices on default
3616 pool/home/bob exec on default
3617 pool/home/bob setuid on default
3618 pool/home/bob readonly off default
3619 pool/home/bob zoned off default
3620 pool/home/bob snapdir hidden default
3621 pool/home/bob aclmode discard default
3622 pool/home/bob aclinherit restricted default
3623 pool/home/bob canmount on default
3624 pool/home/bob xattr on default
3625 pool/home/bob copies 1 default
3626 pool/home/bob version 4 -
3627 pool/home/bob utf8only off -
3628 pool/home/bob normalization none -
3629 pool/home/bob casesensitivity sensitive -
3630 pool/home/bob vscan off default
3631 pool/home/bob nbmand off default
3632 pool/home/bob sharesmb off default
3633 pool/home/bob refquota none default
3634 pool/home/bob refreservation none default
3635 pool/home/bob primarycache all default
3636 pool/home/bob secondarycache all default
3637 pool/home/bob usedbysnapshots 0 -
3638 pool/home/bob usedbydataset 21K -
3639 pool/home/bob usedbychildren 0 -
3640 pool/home/bob usedbyrefreservation 0 -
3643 The following command gets a single property value.
3645 # zfs get -H -o value compression pool/home/bob
3648 The following command lists all properties with local settings for
3651 # zfs get -r -s local -o name,property,value all pool/home/bob
3653 pool/home/bob quota 20G
3654 pool/home/bob compression on
3656 .It Sy Example 8 No Rolling Back a ZFS File System
3657 The following command reverts the contents of
3659 to the snapshot named
3661 deleting all intermediate snapshots.
3663 # zfs rollback -r pool/home/anne@yesterday
3665 .It Sy Example 9 No Creating a ZFS Clone
3666 The following command creates a writable file system whose initial contents are
3668 .Em pool/home/bob@yesterday .
3670 # zfs clone pool/home/bob@yesterday pool/clone
3672 .It Sy Example 10 No Promoting a ZFS Clone
3673 The following commands illustrate how to test out changes to a file system, and
3674 then replace the original file system with the changed one, using clones, clone
3675 promotion, and renaming:
3677 # zfs create pool/project/production
3678 populate /pool/project/production with data
3679 # zfs snapshot pool/project/production@today
3680 # zfs clone pool/project/production@today pool/project/beta
3681 make changes to /pool/project/beta and test them
3682 # zfs promote pool/project/beta
3683 # zfs rename pool/project/production pool/project/legacy
3684 # zfs rename pool/project/beta pool/project/production
3685 once the legacy version is no longer needed, it can be destroyed
3686 # zfs destroy pool/project/legacy
3688 .It Sy Example 11 No Inheriting ZFS Properties
3689 The following command causes
3695 property from their parent.
3697 # zfs inherit checksum pool/home/bob pool/home/anne
3699 .It Sy Example 12 No Remotely Replicating ZFS Data
3700 The following commands send a full stream and then an incremental stream to a
3701 remote machine, restoring them into
3702 .Em poolB/received/fs@a
3704 .Em poolB/received/fs@b ,
3707 must contain the file system
3708 .Em poolB/received ,
3709 and must not initially contain
3710 .Em poolB/received/fs .
3712 # zfs send pool/fs@a | \e
3713 ssh host zfs receive poolB/received/fs@a
3714 # zfs send -i a pool/fs@b | \e
3715 ssh host zfs receive poolB/received/fs
3717 .It Sy Example 13 No Using the zfs receive -d Option
3718 The following command sends a full stream of
3719 .Em poolA/fsA/fsB@snap
3720 to a remote machine, receiving it into
3721 .Em poolB/received/fsA/fsB@snap .
3724 portion of the received snapshot's name is determined from the name of the sent
3727 must contain the file system
3728 .Em poolB/received .
3730 .Em poolB/received/fsA
3731 does not exist, it is created as an empty file system.
3733 # zfs send poolA/fsA/fsB@snap | \e
3734 ssh host zfs receive -d poolB/received
3736 .It Sy Example 14 No Setting User Properties
3737 The following example sets the user-defined
3738 .Sy com.example:department
3739 property for a dataset.
3741 # zfs set com.example:department=12345 tank/accounting
3743 .It Sy Example 15 No Performing a Rolling Snapshot
3744 The following example shows how to maintain a history of snapshots with a
3745 consistent naming scheme.
3746 To keep a week's worth of snapshots, the user destroys the oldest snapshot,
3747 renames the remaining snapshots, and then creates a new snapshot, as follows:
3749 # zfs destroy -r pool/users@7daysago
3750 # zfs rename -r pool/users@6daysago @7daysago
3751 # zfs rename -r pool/users@5daysago @6daysago
3752 # zfs rename -r pool/users@yesterday @5daysago
3753 # zfs rename -r pool/users@yesterday @4daysago
3754 # zfs rename -r pool/users@yesterday @3daysago
3755 # zfs rename -r pool/users@yesterday @2daysago
3756 # zfs rename -r pool/users@today @yesterday
3757 # zfs snapshot -r pool/users@today
3759 .It Sy Example 16 No Setting sharenfs Property Options on a ZFS File System
3760 The following commands show how to set
3762 property options to enable
3766 addresses and to enable root access for system
3772 # zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home
3777 for host name resolution, specify the fully qualified hostname.
3778 .It Sy Example 17 No Delegating ZFS Administration Permissions on a ZFS Dataset
3779 The following example shows how to set permissions so that user
3781 can create, destroy, mount, and take snapshots on
3787 # zfs allow cindys create,destroy,mount,snapshot tank/cindys
3788 # zfs allow tank/cindys
3789 ---- Permissions on tank/cindys --------------------------------------
3790 Local+Descendent permissions:
3791 user cindys create,destroy,mount,snapshot
3796 mount point permission is set to 755 by default, user
3798 will be unable to mount file systems under
3800 Add an ACE similar to the following syntax to provide mount point access:
3802 # chmod A+user:cindys:add_subdirectory:allow /tank/cindys
3804 .It Sy Example 18 No Delegating Create Time Permissions on a ZFS Dataset
3805 The following example shows how to grant anyone in the group
3807 to create file systems in
3809 This syntax also allows staff members to destroy their own file systems, but not
3810 destroy anyone else's file system.
3815 # zfs allow staff create,mount tank/users
3816 # zfs allow -c destroy tank/users
3817 # zfs allow tank/users
3818 ---- Permissions on tank/users ---------------------------------------
3821 Local+Descendent permissions:
3822 group staff create,mount
3824 .It Sy Example 19 No Defining and Granting a Permission Set on a ZFS Dataset
3825 The following example shows how to define and grant a permission set on the
3832 # zfs allow -s @pset create,destroy,snapshot,mount tank/users
3833 # zfs allow staff @pset tank/users
3834 # zfs allow tank/users
3835 ---- Permissions on tank/users ---------------------------------------
3837 @pset create,destroy,mount,snapshot
3838 Local+Descendent permissions:
3841 .It Sy Example 20 No Delegating Property Permissions on a ZFS Dataset
3842 The following example shows to grant the ability to set quotas and reservations
3850 # zfs allow cindys quota,reservation users/home
3851 # zfs allow users/home
3852 ---- Permissions on users/home ---------------------------------------
3853 Local+Descendent permissions:
3854 user cindys quota,reservation
3855 cindys% zfs set quota=10G users/home/marks
3856 cindys% zfs get quota users/home/marks
3857 NAME PROPERTY VALUE SOURCE
3858 users/home/marks quota 10G local
3860 .It Sy Example 21 No Removing ZFS Delegated Permissions on a ZFS Dataset
3861 The following example shows how to remove the snapshot permission from the
3870 # zfs unallow staff snapshot tank/users
3871 # zfs allow tank/users
3872 ---- Permissions on tank/users ---------------------------------------
3874 @pset create,destroy,mount,snapshot
3875 Local+Descendent permissions:
3878 .It Sy Example 22 No Showing the differences between a snapshot and a ZFS Dataset
3879 The following example shows how to see what has changed between a prior
3880 snapshot of a ZFS dataset and its current state.
3883 option is used to indicate type information for the files affected.
3885 # zfs diff -F tank/test@before tank/test
3887 M F /tank/test/linked (+1)
3888 R F /tank/test/oldname -> /tank/test/newname
3889 - F /tank/test/deleted
3890 + F /tank/test/created
3891 M F /tank/test/modified
3894 .Sh INTERFACE STABILITY