4 .\" The contents of this file are subject to the terms of the
5 .\" Common Development and Distribution License (the "License").
6 .\" You may not use this file except in compliance with the License.
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 .\" or http://www.opensolaris.org/os/licensing.
10 .\" See the License for the specific language governing permissions
11 .\" and limitations under the License.
13 .\" When distributing Covered Code, include this CDDL HEADER in each
14 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 .\" If applicable, add the following below this CDDL HEADER, with the
16 .\" fields enclosed by brackets "[]" replaced with your own identifying
17 .\" information: Portions Copyright [yyyy] [name of copyright owner]
22 .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
23 .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
24 .\" Copyright (c) 2011, 2016 by Delphix. All rights reserved.
25 .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
26 .\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
27 .\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
28 .\" Copyright (c) 2014 Integros [integros.com]
29 .\" Copyright 2018 Nexenta Systems, Inc.
30 .\" Copyright 2018 Joyent, Inc.
31 .\" Copyright (c) 2018 Datto Inc.
38 .Nd configures ZFS file systems
45 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
51 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
52 .Fl V Ar size Ar volume
56 .Ar filesystem Ns | Ns Ar volume
60 .Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns
61 .Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ...
64 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
68 .Oo Fl o Ar property Ns = Ns value Oc Ns ...
69 .Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ...
77 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
78 .Ar snapshot Ar filesystem Ns | Ns Ar volume
85 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
86 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
90 .Ar filesystem Ns | Ns Ar volume
91 .Ar filesystem Ns | Ns Ar volume
95 .Ar snapshot Ar snapshot
98 .Op Fl r Ns | Ns Fl d Ar depth
100 .Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc
101 .Oo Fl s Ar property Oc Ns ...
102 .Oo Fl S Ar property Oc Ns ...
103 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
104 .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ...
107 .Ar filesystem Ns | Ns Ar volume
110 .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ...
111 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
114 .Op Fl r Ns | Ns Fl d Ar depth
116 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
117 .Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc
118 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
119 .Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ...
120 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Ns ...
124 .Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
134 .Fl a | Ar filesystem
138 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
139 .Oo Fl s Ar field Oc Ns ...
140 .Oo Fl S Ar field Oc Ns ...
141 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
142 .Ar filesystem Ns | Ns Ar snapshot
146 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
147 .Oo Fl s Ar field Oc Ns ...
148 .Oo Fl S Ar field Oc Ns ...
149 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
150 .Ar filesystem Ns | Ns Ar snapshot
157 .Fl a | Ar filesystem
161 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
164 .Fl a | Ar filesystem
167 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
170 .Ar snapshot bookmark
174 .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
179 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
180 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
184 .Fl t Ar receive_resume_token
188 .Op Fl o Sy origin Ns = Ns Ar snapshot
189 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
193 .Op Fl d Ns | Ns Fl e
194 .Op Fl o Sy origin Ns = Ns Ar snapshot
199 .Ar filesystem Ns | Ns Ar volume
202 .Ar filesystem Ns | Ns Ar volume
206 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
207 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
208 .Ar setname Oc Ns ...
209 .Ar filesystem Ns | Ns Ar volume
213 .Fl e Ns | Ns Sy everyone
214 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
215 .Ar setname Oc Ns ...
216 .Ar filesystem Ns | Ns Ar volume
220 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
221 .Ar setname Oc Ns ...
222 .Ar filesystem Ns | Ns Ar volume
225 .Fl s No @ Ns Ar setname
226 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
227 .Ar setname Oc Ns ...
228 .Ar filesystem Ns | Ns Ar volume
232 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
233 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
234 .Ar setname Oc Ns ... Oc
235 .Ar filesystem Ns | Ns Ar volume
239 .Fl e Ns | Ns Sy everyone
240 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
241 .Ar setname Oc Ns ... Oc
242 .Ar filesystem Ns | Ns Ar volume
247 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
248 .Ar setname Oc Ns ... Oc
249 .Ar filesystem Ns | Ns Ar volume
253 .Fl s @ Ns Ar setname
254 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
255 .Ar setname Oc Ns ... Oc
256 .Ar filesystem Ns | Ns Ar volume
260 .Ar tag Ar snapshot Ns ...
268 .Ar tag Ar snapshot Ns ...
272 .Ar snapshot Ar snapshot Ns | Ns Ar filesystem
277 .Op Fl m Ar memory_limit
283 command configures ZFS datasets within a ZFS storage pool, as described in
285 A dataset is identified by a unique path within the ZFS namespace.
288 pool/{filesystem,volume,snapshot}
291 where the maximum length of a dataset name is
294 and the maximum amount of nesting allowed in a path is 50 levels deep.
296 A dataset can be one of the following:
297 .Bl -tag -width "file system"
299 A ZFS dataset of type
301 can be mounted within the standard system namespace and behaves like other file
303 While ZFS file systems are designed to be POSIX compliant, known issues exist
304 that prevent compliance in some cases.
305 Applications that depend on standards conformance might fail due to non-standard
306 behavior when checking file system free space.
308 A logical volume exported as a raw or block device.
309 This type of dataset should only be used under special circumstances.
310 File systems are typically used in most environments.
312 A read-only version of a file system or volume at a given point in time.
314 .Ar filesystem Ns @ Ns Ar name
316 .Ar volume Ns @ Ns Ar name .
318 .Ss ZFS File System Hierarchy
319 A ZFS storage pool is a logical collection of devices that provide space for
321 A storage pool is also the root of the ZFS file system hierarchy.
323 The root of the pool can be accessed as a file system, such as mounting and
324 unmounting, taking snapshots, and setting properties.
325 The physical storage characteristics, however, are managed by the
331 for more information on creating and administering pools.
333 A snapshot is a read-only copy of a file system or volume.
334 Snapshots can be created extremely quickly, and initially consume no additional
335 space within the pool.
336 As data within the active dataset changes, the snapshot consumes more data than
337 would otherwise be shared with the active dataset.
339 Snapshots can have arbitrary names.
340 Snapshots of volumes can be cloned or rolled back, but cannot be accessed
343 File system snapshots can be accessed under the
345 directory in the root of the file system.
346 Snapshots are automatically mounted on demand and may be unmounted at regular
348 The visibility of the
350 directory can be controlled by the
354 A clone is a writable volume or file system whose initial contents are the same
356 As with snapshots, creating a clone is nearly instantaneous, and initially
357 consumes no additional space.
359 Clones can only be created from a snapshot.
360 When a snapshot is cloned, it creates an implicit dependency between the parent
362 Even though the clone is created somewhere else in the dataset hierarchy, the
363 original snapshot cannot be destroyed as long as a clone exists.
366 property exposes this dependency, and the
368 command lists any such dependencies, if they exist.
370 The clone parent-child dependency relationship can be reversed by using the
375 file system to become a clone of the specified file system, which makes it
376 possible to destroy the file system that the clone was created from.
378 Creating a ZFS file system is a simple operation, so the number of file systems
379 per system is likely to be numerous.
380 To cope with this, ZFS automatically manages mounting and unmounting file
381 systems without the need to edit the
384 All automatically managed file systems are mounted by ZFS at boot time.
386 By default, file systems are mounted under
390 is the name of the file system in the ZFS namespace.
391 Directories are created and destroyed as needed.
393 A file system can also have a mount point set in the
396 This directory is created as needed, and ZFS automatically mounts the file
398 .Nm zfs Cm mount Fl a
405 property can be inherited, so if
411 automatically inherits a mount point of
412 .Pa /export/stuff/user .
418 prevents the file system from being mounted.
420 If needed, ZFS file systems can also be managed with traditional tools
426 If a file system's mount point is set to
428 ZFS makes no attempt to manage the file system, and the administrator is
429 responsible for mounting and unmounting the file system.
431 A ZFS file system can be added to a non-global zone by using the
432 .Nm zonecfg Cm add Sy fs
434 A ZFS file system that is added to a non-global zone must have its
439 The physical properties of an added file system are controlled by the global
441 However, the zone administrator can create, modify, or destroy files within the
442 added file system, depending on how the file system is mounted.
444 A dataset can also be delegated to a non-global zone by using the
445 .Nm zonecfg Cm add Sy dataset
447 You cannot delegate a dataset to one zone and the children of the same dataset
449 The zone administrator can change properties of the dataset or any of its
456 properties of the delegated dataset can be modified only by the global
459 A ZFS volume can be added as a device to a non-global zone by using the
460 .Nm zonecfg Cm add Sy device
462 However, its physical properties can be modified only by the global
465 For more information about
470 After a dataset is delegated to a non-global zone, the
472 property is automatically set.
473 A zoned file system cannot be mounted in the global zone, since the zone
474 administrator might have to set the mount point to an unacceptable value.
476 The global administrator can forcibly clear the
478 property, though this should be done with extreme care.
479 The global administrator should verify that all the mount points are acceptable
480 before clearing the property.
481 .Ss Native Properties
482 Properties are divided into two types, native properties and user-defined
487 Native properties either export internal statistics or control ZFS behavior.
488 In addition, native properties are either editable or read-only.
489 User properties have no effect on ZFS behavior, but you can use them to annotate
490 datasets in a way that is meaningful in your environment.
491 For more information about user properties, see the
495 Every dataset has a set of properties that export statistics about the dataset
496 as well as control various behaviors.
497 Properties are inherited from the parent unless overridden by the child.
498 Some properties apply only to certain types of datasets
499 .Pq file systems, volumes, or snapshots .
501 The values of numeric properties can be specified using human-readable suffixes
511 The following are all valid
514 .Li 1536M, 1.5g, 1.50GB .
516 The values of non-numeric properties are case sensitive and must be lowercase,
523 The following native properties consist of read-only statistics about the
525 These properties can be neither set, nor inherited.
526 Native properties apply to all dataset types unless otherwise noted.
527 .Bl -tag -width "usedbyrefreservation"
529 The amount of space available to the dataset and all its children, assuming that
530 there is no other activity in the pool.
531 Because space is shared within a pool, availability can be limited by any number
532 of factors, including physical pool size, quotas, reservations, or other
533 datasets within the pool.
535 This property can also be referred to by its shortened column name,
538 For non-snapshots, the compression ratio achieved for the
540 space of this dataset, expressed as a multiplier.
543 property includes descendant datasets, and, for clones, does not include the
544 space shared with the origin snapshot.
550 Compression can be turned on by running:
551 .Nm zfs Cm set Sy compression Ns = Ns Sy on Ar dataset .
555 The transaction group (txg) in which the dataset was created.
556 Bookmarks have the same
558 as the snapshot they are initially tied to.
559 This property is suitable for ordering a list of snapshots,
560 e.g. for incremental send and receive.
562 The time this dataset was created.
564 For snapshots, this property is a comma-separated list of filesystems or volumes
565 which are clones of this snapshot.
568 property is this snapshot.
571 property is not empty, then this snapshot can not be destroyed
581 if the snapshot has been marked for deferred destroy by using the
582 .Nm zfs Cm destroy Fl d
584 Otherwise, the property is
586 .It Sy filesystem_count
587 The total number of filesystems and volumes that exist under this location in
589 This value is only available when a
591 has been set somewhere in the tree under which the dataset resides.
593 The 64 bit GUID of this dataset or bookmark which does not change over its
595 When a snapshot is sent to another pool, the received snapshot has the same
599 is suitable to identify a snapshot across pools.
600 .It Sy logicalreferenced
601 The amount of space that is
603 accessible by this dataset.
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 The amount of space that is
620 consumed by this dataset and all its descendents.
624 The logical space ignores the effect of the
628 properties, giving a quantity closer to the amount of data that applications
630 However, it does include space consumed by metadata.
632 This property can also be referred to by its shortened column name,
635 For file systems, indicates whether the file system is currently mounted.
636 This property can be either
641 For cloned file systems or volumes, the snapshot from which the clone was
646 .It Sy receive_resume_token
647 For filesystems or volumes which have saved partially-completed state from
649 this opaque token can be provided to
651 to resume and complete the
654 The amount of data that is accessible by this dataset, which may or may not be
655 shared with other datasets in the pool.
656 When a snapshot or clone is created, it initially references the same amount of
657 space as the file system or snapshot it was created from, since its contents are
660 This property can also be referred to by its shortened column name,
662 .It Sy refcompressratio
663 The compression ratio achieved for the
665 space of this dataset, expressed as a multiplier.
669 .It Sy snapshot_count
670 The total number of snapshots that exist under this location in the dataset
672 This value is only available when a
674 has been set somewhere in the tree under which the dataset resides.
682 The amount of space consumed by this dataset and all its descendents.
683 This is the value that is checked against this dataset's quota and reservation.
684 The space used does not include this dataset's reservation, but does take into
685 account the reservations of any descendent datasets.
686 The amount of space that a dataset consumes from its parent, as well as the
687 amount of space that is freed if this dataset is recursively destroyed, is the
688 greater of its space used and its reservation.
690 The used space of a snapshot
695 is space that is referenced exclusively by this snapshot.
696 If this snapshot is destroyed, the amount of
699 Space that is shared by multiple snapshots isn't accounted for in this metric.
700 When a snapshot is destroyed, space that was previously shared with this
701 snapshot can become unique to snapshots adjacent to it, thus changing the used
702 space of those snapshots.
703 The used space of the latest snapshot can also be affected by changes in the
707 space of a snapshot is a subset of the
709 space of the snapshot.
711 The amount of space used, available, or referenced does not take into account
713 Pending changes are generally accounted for within a few seconds.
714 Committing a change to a disk using
718 does not necessarily guarantee that the space usage information is updated
723 properties decompose the
725 properties into the various reasons that space is used.
728 .Sy usedbychildren No +
729 .Sy usedbydataset No +
730 .Sy usedbyrefreservation No +
731 .Sy usedbysnapshots .
732 These properties are only available for datasets created on
736 .It Sy usedbychildren
737 The amount of space used by children of this dataset, which would be freed if
738 all the dataset's children were destroyed.
740 The amount of space used by this dataset itself, which would be freed if the
741 dataset were destroyed
742 .Po after first removing any
744 and destroying any necessary snapshots or descendents
746 .It Sy usedbyrefreservation
747 The amount of space used by a
749 set on this dataset, which would be freed if the
752 .It Sy usedbysnapshots
753 The amount of space consumed by snapshots of this dataset.
754 In particular, it is the amount of space that would be freed if all of this
755 dataset's snapshots were destroyed.
756 Note that this is not simply the sum of the snapshots'
758 properties because space can be shared by multiple snapshots.
759 .It Sy userused Ns @ Ns Em user
760 The amount of space consumed by the specified user in this dataset.
761 Space is charged to the owner of each file, as displayed by
763 The amount of space charged is displayed by
769 subcommand for more information.
771 Unprivileged users can access only their own space usage.
772 The root user, or a user who has been granted the
776 can access everyone's usage.
779 .Sy userused Ns @ Ns Em ...
780 properties are not displayed by
781 .Nm zfs Cm get Sy all .
782 The user's name must be appended after the @ symbol, using one of the following
784 .Bl -bullet -width ""
798 .Sy joe.smith@mydomain
807 This property is set to the number of user holds on this snapshot.
808 User holds are set by using the
811 .It Sy groupused Ns @ Ns Em group
812 The amount of space consumed by the specified group in this dataset.
813 Space is charged to the group of each file, as displayed by
816 .Sy userused Ns @ Ns Em user
817 property for more information.
819 Unprivileged users can only access their own groups' space usage.
820 The root user, or a user who has been granted the
824 can access all groups' usage.
826 For volumes, specifies the block size of the volume.
829 cannot be changed once the volume has been written, so it should be set at
830 volume creation time.
833 for volumes is 8 Kbytes.
834 Any power of 2 from 512 bytes to 128 Kbytes is valid.
836 This property can also be referred to by its shortened column name,
841 by this dataset, that was written since the previous snapshot
842 .Pq i.e. that is not referenced by the previous snapshot .
843 .It Sy written Ns @ Ns Em snapshot
846 space written to this dataset since the specified snapshot.
847 This is the space that is referenced by this dataset but was not referenced by
848 the specified snapshot.
852 may be specified as a short snapshot name
853 .Po just the part after the
856 in which case it will be interpreted as a snapshot in the same filesystem as
860 may be a full snapshot name
861 .Po Em filesystem Ns @ Ns Em snapshot Pc ,
862 which for clones may be a snapshot in the origin's filesystem
863 .Pq or the origin of the origin's filesystem, etc.
866 The following native properties can be used to change the behavior of a ZFS
870 .Sy aclinherit Ns = Ns Sy discard Ns | Ns Sy noallow Ns | Ns
871 .Sy restricted Ns | Ns Sy passthrough Ns | Ns Sy passthrough-x
873 Controls how ACEs are inherited when files and directories are created.
874 .Bl -tag -width "passthrough-x"
876 does not inherit any ACEs.
878 only inherits inheritable ACEs that specify
886 permissions when the ACE is inherited.
888 inherits all inheritable ACEs without any modifications.
897 ACEs inherit the execute permission only if the file creation mode also requests
901 When the property value is set to
903 files are created with a mode determined by the inheritable ACEs.
904 If no inheritable ACEs exist that affect the mode, then the mode is set in
905 accordance to the requested mode from the application.
907 .Sy aclmode Ns = Ns Sy discard Ns | Ns Sy groupmask Ns | Ns
908 .Sy passthrough Ns | Ns Sy restricted
910 Controls how an ACL is modified during
912 and how inherited ACEs are modified by the file creation mode.
913 .Bl -tag -width "passthrough"
915 default, deletes all ACEs except for those representing the mode of the file or
916 directory requested by
919 reduces permissions granted by all
921 entries found in the ACL such that they are no greater than the group
922 permissions specified by the mode.
924 indicates that no changes are made to the ACL other than creating or updating
925 the necessary ACEs to represent the new mode of the file or directory.
929 operation to return an error when used on any file or directory which has a
930 non-trivial ACL, with entries in addition to those that represent the mode.
934 is required to change the set user ID, set group ID, or sticky bit on a file or
935 directory, as they do not have equivalent ACEs.
938 on a file or directory with a non-trivial ACL when
942 you must first remove all ACEs except for those that represent the current mode.
943 .It Sy atime Ns = Ns Sy on Ns | Ns Sy off
944 Controls whether the access time for files is updated when they are read.
945 Turning this property off avoids producing write traffic when reading files and
946 can result in significant performance gains, though it might confuse mailers
947 and other similar utilities.
950 .It Sy canmount Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy noauto
951 If this property is set to
953 the file system cannot be mounted, and is ignored by
954 .Nm zfs Cm mount Fl a .
955 Setting this property to
957 is similar to setting the
961 except that the dataset still has a normal
963 property, which can be inherited.
964 Setting this property to
966 allows datasets to be used solely as a mechanism to inherit properties.
967 One example of setting
968 .Sy canmount Ns = Ns Sy off
969 is to have two datasets with the same
971 so that the children of both datasets appear in the same directory, but might
972 have different inherited characteristics.
976 a dataset can only be mounted and unmounted explicitly.
977 The dataset is not mounted automatically when the dataset is created or
978 imported, nor is it mounted by the
979 .Nm zfs Cm mount Fl a
980 command or unmounted by the
981 .Nm zfs Cm unmount Fl a
984 This property is not inherited.
986 .Sy checksum Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy fletcher2 Ns | Ns
987 .Sy fletcher4 Ns | Ns Sy sha256 Ns | Ns Sy noparity Ns | Ns
988 .Sy sha512 Ns | Ns Sy skein Ns | Ns Sy edonr
990 Controls the checksum used to verify data integrity.
993 which automatically selects an appropriate algorithm
996 but this may change in future releases
1000 disables integrity checking on user data.
1003 not only disables integrity but also disables maintaining parity for user data.
1004 This setting is used internally by a dump device residing on a RAID-Z pool and
1005 should not be used by any other dataset.
1006 Disabling checksums is
1008 a recommended practice.
1015 checksum algorithms require enabling the appropriate features on the pool.
1017 .Xr zpool-features 5
1018 for more information on these algorithms.
1020 Changing this property affects only newly-written data.
1022 Salted checksum algorithms
1023 .Pq Cm edonr , skein
1024 are currently not supported for any filesystem on the boot pools.
1026 .Sy compression Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy gzip Ns | Ns
1027 .Sy gzip- Ns Em N Ns | Ns Sy lz4 Ns | Ns Sy lzjb Ns | Ns Sy zle
1029 Controls the compression algorithm used for this dataset.
1031 Setting compression to
1033 indicates that the current default compression algorithm should be used.
1034 The default balances compression and decompression speed, with compression ratio
1035 and is expected to work well on a wide variety of workloads.
1036 Unlike all other settings for this property,
1038 does not select a fixed compression type.
1039 As new compression algorithms are added to ZFS and enabled on a pool, the
1040 default compression algorithm may change.
1041 The current default compression algorithm is either
1050 compression algorithm is a high-performance replacement for the
1053 It features significantly faster compression and decompression, as well as a
1054 moderately higher compression ratio than
1056 but can only be used on pools with the
1061 .Xr zpool-features 5
1062 for details on ZFS feature flags and the
1068 compression algorithm is optimized for performance while providing decent data
1073 compression algorithm uses the same compression as the
1078 level by using the value
1082 is an integer from 1
1085 .Pq best compression ratio .
1090 .Po which is also the default for
1096 compression algorithm compresses runs of zeros.
1098 This property can also be referred to by its shortened column name
1100 Changing this property affects only newly-written data.
1101 .It Sy copies Ns = Ns Sy 1 Ns | Ns Sy 2 Ns | Ns Sy 3
1102 Controls the number of copies of data stored for this dataset.
1103 These copies are in addition to any redundancy provided by the pool, for
1104 example, mirroring or RAID-Z.
1105 The copies are stored on different disks, if possible.
1106 The space used by multiple copies is charged to the associated file and dataset,
1109 property and counting against quotas and reservations.
1111 Changing this property only affects newly-written data.
1112 Therefore, set this property at file system creation time by using the
1113 .Fl o Sy copies Ns = Ns Ar N
1115 .It Sy devices Ns = Ns Sy on Ns | Ns Sy off
1116 Controls whether device nodes can be opened on this file system.
1117 The default value is
1119 .It Sy exec Ns = Ns Sy on Ns | Ns Sy off
1120 Controls whether processes can be executed from within this file system.
1121 The default value is
1123 .It Sy filesystem_limit Ns = Ns Em count Ns | Ns Sy none
1124 Limits the number of filesystems and volumes that can exist under this point in
1126 The limit is not enforced if the user is allowed to change the limit.
1128 .Sy filesystem_limit
1131 a descendent of a filesystem that already has a
1132 .Sy filesystem_limit
1133 does not override the ancestor's
1134 .Sy filesystem_limit ,
1135 but rather imposes an additional limit.
1136 This feature must be enabled to be used
1138 .Xr zpool-features 5
1140 .It Sy mountpoint Ns = Ns Pa path Ns | Ns Sy none Ns | Ns Sy legacy
1141 Controls the mount point used for this file system.
1144 section for more information on how this property is used.
1148 property is changed for a file system, the file system and any children that
1149 inherit the mount point are unmounted.
1152 then they remain unmounted.
1153 Otherwise, they are automatically remounted in the new location if the property
1158 or if they were mounted before the property was changed.
1159 In addition, any shared file systems are unshared and shared in the new
1161 .It Sy nbmand Ns = Ns Sy on Ns | Ns Sy off
1162 Controls whether the file system should be mounted with
1164 .Pq Non Blocking mandatory locks .
1165 This is used for SMB clients.
1166 Changes to this property only take effect when the file system is umounted and
1170 for more information on
1173 .It Sy primarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1174 Controls what is cached in the primary cache
1176 If this property is set to
1178 then both user data and metadata is cached.
1179 If this property is set to
1181 then neither user data nor metadata is cached.
1182 If this property is set to
1184 then only metadata is cached.
1185 The default value is
1187 .It Sy quota Ns = Ns Em size Ns | Ns Sy none
1188 Limits the amount of space a dataset and its descendents can consume.
1189 This property enforces a hard limit on the amount of space used.
1190 This includes all space consumed by descendents, including file systems and
1192 Setting a quota on a descendent of a dataset that already has a quota does not
1193 override the ancestor's quota, but rather imposes an additional limit.
1195 Quotas cannot be set on volumes, as the
1197 property acts as an implicit quota.
1198 .It Sy snapshot_limit Ns = Ns Em count Ns | Ns Sy none
1199 Limits the number of snapshots that can be created on a dataset and its
1203 on a descendent of a dataset that already has a
1205 does not override the ancestor's
1206 .Sy snapshot_limit ,
1207 but rather imposes an additional limit.
1208 The limit is not enforced if the user is allowed to change the limit.
1209 For example, this means that recursive snapshots taken from the global zone are
1210 counted against each delegated dataset within a zone.
1211 This feature must be enabled to be used
1213 .Xr zpool-features 5
1215 .It Sy userquota@ Ns Em user Ns = Ns Em size Ns | Ns Sy none
1216 Limits the amount of space consumed by the specified user.
1217 User space consumption is identified by the
1218 .Sy userspace@ Ns Em user
1221 Enforcement of user quotas may be delayed by several seconds.
1222 This delay means that a user might exceed their quota before the system notices
1223 that they are over quota and begins to refuse additional writes with the
1227 .Nm zfs Cm userspace
1228 subcommand for more information.
1230 Unprivileged users can only access their own groups' space usage.
1231 The root user, or a user who has been granted the
1235 can get and set everyone's quota.
1237 This property is not available on volumes, on file systems before version 4, or
1238 on pools before version 15.
1240 .Sy userquota@ Ns Em ...
1241 properties are not displayed by
1242 .Nm zfs Cm get Sy all .
1243 The user's name must be appended after the
1245 symbol, using one of the following forms:
1253 .Em POSIX numeric ID
1260 .Sy joe.smith@mydomain
1268 .It Sy groupquota@ Ns Em group Ns = Ns Em size Ns | Ns Sy none
1269 Limits the amount of space consumed by the specified group.
1270 Group space consumption is identified by the
1271 .Sy groupused@ Ns Em group
1274 Unprivileged users can access only their own groups' space usage.
1275 The root user, or a user who has been granted the
1279 can get and set all groups' quotas.
1280 .It Sy readonly Ns = Ns Sy on Ns | Ns Sy off
1281 Controls whether this dataset can be modified.
1282 The default value is
1285 This property can also be referred to by its shortened column name,
1287 .It Sy recordsize Ns = Ns Em size
1288 Specifies a suggested block size for files in the file system.
1289 This property is designed solely for use with database workloads that access
1290 files in fixed-size records.
1291 ZFS automatically tunes block sizes according to internal algorithms optimized
1292 for typical access patterns.
1294 For databases that create very large files but access them in small random
1295 chunks, these algorithms may be suboptimal.
1298 greater than or equal to the record size of the database can result in
1299 significant performance gains.
1300 Use of this property for general purpose file systems is strongly discouraged,
1301 and may adversely affect performance.
1303 The size specified must be a power of two greater than or equal to 512 and less
1304 than or equal to 128 Kbytes.
1307 feature is enabled on the pool, the size may be up to 1 Mbyte.
1309 .Xr zpool-features 5
1310 for details on ZFS feature flags.
1312 Changing the file system's
1314 affects only files created afterward; existing files are unaffected.
1316 This property can also be referred to by its shortened column name,
1318 .It Sy redundant_metadata Ns = Ns Sy all Ns | Ns Sy most
1319 Controls what types of metadata are stored redundantly.
1320 ZFS stores an extra copy of metadata, so that if a single block is corrupted,
1321 the amount of user data lost is limited.
1322 This extra copy is in addition to any redundancy provided at the pool level
1323 .Pq e.g. by mirroring or RAID-Z ,
1324 and is in addition to an extra copy specified by the
1327 .Pq up to a total of 3 copies .
1328 For example if the pool is mirrored,
1329 .Sy copies Ns = Ns 2 ,
1331 .Sy redundant_metadata Ns = Ns Sy most ,
1332 then ZFS stores 6 copies of most metadata, and 4 copies of data and some
1337 ZFS stores an extra copy of all metadata.
1338 If a single on-disk block is corrupt, at worst a single block of user data
1347 ZFS stores an extra copy of most types of metadata.
1348 This can improve performance of random writes, because less metadata must be
1350 In practice, at worst about 100 blocks
1355 of user data can be lost if a single on-disk block is corrupt.
1356 The exact behavior of which metadata blocks are stored redundantly may change in
1359 The default value is
1361 .It Sy refquota Ns = Ns Em size Ns | Ns Sy none
1362 Limits the amount of space a dataset can consume.
1363 This property enforces a hard limit on the amount of space used.
1364 This hard limit does not include space used by descendents, including file
1365 systems and snapshots.
1366 .It Sy refreservation Ns = Ns Em size Ns | Ns Sy none Ns | Ns Sy auto
1367 The minimum amount of space guaranteed to a dataset, not including its
1369 When the amount of space used is below this value, the dataset is treated as if
1370 it were taking up the amount of space specified by
1371 .Sy refreservation .
1374 reservation is accounted for in the parent datasets' space used, and counts
1375 against the parent datasets' quotas and reservations.
1379 is set, a snapshot is only allowed if there is enough free pool space outside of
1380 this reservation to accommodate the current number of
1382 bytes in the dataset.
1388 a volume is thick provisioned
1392 .Sy refreservation Ns = Ns Sy auto
1393 is only supported on volumes.
1397 .Sx Native Properties
1398 section for more information about sparse volumes.
1400 This property can also be referred to by its shortened column name,
1402 .It Sy reservation Ns = Ns Em size Ns | Ns Sy none
1403 The minimum amount of space guaranteed to a dataset and its descendants.
1404 When the amount of space used is below this value, the dataset is treated as if
1405 it were taking up the amount of space specified by its reservation.
1406 Reservations are accounted for in the parent datasets' space used, and count
1407 against the parent datasets' quotas and reservations.
1409 This property can also be referred to by its shortened column name,
1411 .It Sy secondarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1412 Controls what is cached in the secondary cache
1414 If this property is set to
1416 then both user data and metadata is cached.
1417 If this property is set to
1419 then neither user data nor metadata is cached.
1420 If this property is set to
1422 then only metadata is cached.
1423 The default value is
1425 .It Sy setuid Ns = Ns Sy on Ns | Ns Sy off
1426 Controls whether the setuid bit is respected for the file system.
1427 The default value is
1429 .It Sy sharesmb Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1430 Controls whether the file system is shared via SMB, and what options are to be
1432 A file system with the
1436 is managed through traditional tools such as
1438 Otherwise, the file system is automatically shared and unshared with the
1443 If the property is set to
1447 command is invoked with no options.
1450 command is invoked with options equivalent to the contents of this property.
1452 Because SMB shares requires a resource name, a unique resource name is
1453 constructed from the dataset name.
1454 The constructed name is a copy of the dataset name except that the characters in
1455 the dataset name, which would be invalid in the resource name, are replaced with
1461 is also supported that allows you to replace the data set name with a specified
1463 The specified name is then used to replace the prefix dataset in the case of
1465 For example, if the dataset
1468 .Sy name Ns = Ns Sy john ,
1471 has a resource name of
1474 .Em data/home/john/backups
1475 is shared, it has a resource name of
1478 When SMB shares are created, the SMB share name appears as an entry in the
1485 command to display the share-level ACLs on the entries in this directory.
1489 property is changed for a dataset, the dataset and any children inheriting the
1490 property are re-shared with the new options, only if the property was previously
1493 or if they were shared before the property was changed.
1494 If the new property is set to
1496 the file systems are unshared.
1497 .It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1498 Controls whether the file system is shared via NFS, and what options are to be
1500 A file system with a
1504 is managed through traditional tools such as
1509 Otherwise, the file system is automatically shared and unshared with the
1514 If the property is set to
1517 command is invoked with no options.
1520 command is invoked with options equivalent to the contents of this property.
1524 property is changed for a dataset, the dataset and any children inheriting the
1525 property are re-shared with the new options, only if the property was previously
1527 or if they were shared before the property was changed.
1528 If the new property is
1530 the file systems are unshared.
1531 .It Sy logbias Ns = Ns Sy latency Ns | Ns Sy throughput
1532 Provide a hint to ZFS about handling of synchronous requests in this dataset.
1538 ZFS will use pool log devices
1540 to handle the requests at low latency.
1545 ZFS will not use configured pool log devices.
1546 ZFS will instead optimize synchronous operations for global pool throughput and
1547 efficient use of resources.
1548 .It Sy snapdir Ns = Ns Sy hidden Ns | Ns Sy visible
1549 Controls whether the
1551 directory is hidden or visible in the root of the file system as discussed in
1555 The default value is
1557 .It Sy sync Ns = Ns Sy standard Ns | Ns Sy always Ns | Ns Sy disabled
1558 Controls the behavior of synchronous requests
1559 .Pq e.g. fsync, O_DSYNC .
1563 specified behavior of ensuring all synchronous requests are written to stable
1564 storage and all devices are flushed to ensure data is not cached by device
1566 .Pq this is the default .
1568 causes every file system transaction to be written and flushed before its
1569 system call returns.
1570 This has a large performance penalty.
1572 disables synchronous requests.
1573 File system transactions are only committed to stable storage periodically.
1574 This option will give the highest performance.
1575 However, it is very dangerous as ZFS would be ignoring the synchronous
1576 transaction demands of applications such as databases or NFS.
1577 Administrators should only use this option when the risks are understood.
1578 .It Sy version Ns = Ns Em N Ns | Ns Sy current
1579 The on-disk version of this file system, which is independent of the pool
1581 This property can only be set to later supported versions.
1585 .It Sy volsize Ns = Ns Em size
1586 For volumes, specifies the logical size of the volume.
1587 By default, creating a volume establishes a reservation of equal size.
1588 For storage pools with a version number of 9 or higher, a
1593 are reflected in an equivalent change to the reservation
1599 can only be set to a multiple of
1603 The reservation is kept equal to the volume's logical size to prevent unexpected
1604 behavior for consumers.
1605 Without the reservation, the volume could run out of space, resulting in
1606 undefined behavior or data corruption, depending on how the volume is used.
1607 These effects can also occur when the volume size is changed while it is in use
1608 .Pq particularly when shrinking the size .
1609 Extreme care should be used when adjusting the volume size.
1611 Though not recommended, a
1614 .Qq thin provisioned
1616 can be created by specifying the
1619 .Nm zfs Cm create Fl V
1620 command, or by changing the value of the
1625 property on pool version 8 or earlier
1627 after the volume has been created.
1630 is a volume where the value of
1632 is less than the size of the volume plus the space required to store its
1634 Consequently, writes to a sparse volume can fail with
1636 when the pool is low on space.
1637 For a sparse volume, changes to
1639 are not reflected in the
1641 A volume that is not sparse is said to be
1642 .Qq thick provisioned .
1643 A sparse volume can become thick provisioned by setting
1647 .It Sy vscan Ns = Ns Sy on Ns | Ns Sy off
1648 Controls whether regular files should be scanned for viruses when a file is
1650 In addition to enabling this property, the virus scan service must also be
1651 enabled for virus scanning to occur.
1652 The default value is
1654 .It Sy xattr Ns = Ns Sy on Ns | Ns Sy off
1655 Controls whether extended attributes are enabled for this file system.
1656 The default value is
1658 .It Sy zoned Ns = Ns Sy on Ns | Ns Sy off
1659 Controls whether the dataset is managed from a non-global zone.
1662 section for more information.
1663 The default value is
1667 The following three properties cannot be changed after the file system is
1668 created, and therefore, should be set when the file system is created.
1669 If the properties are not set with the
1673 commands, these properties are inherited from the parent dataset.
1674 If the parent dataset lacks these properties due to having been created prior to
1675 these features being supported, the new file system will have the default values
1676 for these properties.
1679 .Sy casesensitivity Ns = Ns Sy sensitive Ns | Ns
1680 .Sy insensitive Ns | Ns Sy mixed
1682 Indicates whether the file name matching algorithm used by the file system
1683 should be case-sensitive, case-insensitive, or allow a combination of both
1685 The default value for the
1693 file systems have case-sensitive file names.
1699 property indicates that the file system can support requests for both
1700 case-sensitive and case-insensitive matching behavior.
1701 Currently, case-insensitive matching behavior on a file system that supports
1702 mixed behavior is limited to the SMB server product.
1703 For more information about the
1705 value behavior, see the "ZFS Administration Guide".
1707 .Sy normalization Ns = Ns Sy none Ns | Ns Sy formC Ns | Ns
1708 .Sy formD Ns | Ns Sy formKC Ns | Ns Sy formKD
1710 Indicates whether the file system should perform a
1712 normalization of file names whenever two file names are compared, and which
1713 normalization algorithm should be used.
1714 File names are always stored unmodified, names are normalized as part of any
1716 If this property is set to a legal value other than
1720 property was left unspecified, the
1722 property is automatically set to
1724 The default value of the
1728 This property cannot be changed after the file system is created.
1729 .It Sy utf8only Ns = Ns Sy on Ns | Ns Sy off
1730 Indicates whether the file system should reject file names that include
1731 characters that are not present in the
1734 If this property is explicitly set to
1736 the normalization property must either not be explicitly set or be set to
1738 The default value for the
1742 This property cannot be changed after the file system is created.
1746 .Sy casesensitivity ,
1750 properties are also new permissions that can be assigned to non-privileged users
1751 by using the ZFS delegated administration feature.
1752 .Ss "Temporary Mount Point Properties"
1753 When a file system is mounted, either through
1755 for legacy mounts or the
1757 command for normal file systems, its mount options are set according to its
1759 The correlation between properties and mount options is as follows:
1761 PROPERTY MOUNT OPTION
1762 devices devices/nodevices
1765 setuid setuid/nosetuid
1769 In addition, these options can be set on a per-mount basis using the
1771 option, without affecting the property that is stored on disk.
1772 The values specified on the command line override the values stored in the
1776 option is an alias for
1777 .Sy nodevices Ns , Ns Sy nosetuid .
1778 These properties are reported as
1783 If the properties are changed while the dataset is mounted, the new setting
1784 overrides any temporary settings.
1785 .Ss "User Properties"
1786 In addition to the standard native properties, ZFS supports arbitrary user
1788 User properties have no effect on ZFS behavior, but applications or
1789 administrators can use them to annotate datasets
1790 .Pq file systems, volumes, and snapshots .
1792 User property names must contain a colon
1794 character to distinguish them from native properties.
1795 They may contain lowercase letters, numbers, and the following punctuation
1804 The expected convention is that the property name is divided into two portions
1806 .Em module Ns : Ns Em property ,
1807 but this namespace is not enforced by ZFS.
1808 User property names can be at most 256 characters, and cannot begin with a dash
1811 When making programmatic use of user properties, it is strongly suggested to use
1816 component of property names to reduce the chance that two
1817 independently-developed packages use the same property name for different
1820 The values of user properties are arbitrary strings, are always inherited, and
1821 are never validated.
1822 All of the commands that operate on properties
1823 .Po Nm zfs Cm list ,
1828 can be used to manipulate both native properties and user properties.
1831 command to clear a user property.
1832 If the property is not defined in any parent dataset, it is removed entirely.
1833 Property values are limited to 8192 bytes.
1834 .Ss ZFS Volumes as Swap or Dump Devices
1835 During an initial installation a swap device and dump device are created on ZFS
1836 volumes in the ZFS root pool.
1837 By default, the swap area size is based on 1/2 the size of physical memory up to
1839 The size of the dump device depends on the kernel's requirements at installation
1841 Separate ZFS volumes must be used for the swap area and dump devices.
1842 Do not swap to a file on a ZFS file system.
1843 A ZFS swap file configuration is not supported.
1845 If you need to change your swap area or dump device after the system is
1846 installed or upgraded, use the
1852 All subcommands that modify state are logged persistently to the pool in their
1856 Displays a help message.
1861 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1864 Creates a new ZFS file system.
1865 The file system is automatically mounted according to the
1867 property inherited from the parent.
1868 .Bl -tag -width "-o"
1869 .It Fl o Ar property Ns = Ns Ar value
1870 Sets the specified property as if the command
1871 .Nm zfs Cm set Ar property Ns = Ns Ar value
1872 was invoked at the same time the dataset was created.
1873 Any editable ZFS property can also be set at creation time.
1876 options can be specified.
1877 An error results if the same property is specified in multiple
1881 Creates all the non-existing parent datasets.
1882 Datasets created in this manner are automatically mounted according to the
1884 property inherited from their parent.
1885 Any property specified on the command line using the
1888 If the target filesystem already exists, the operation completes successfully.
1894 .Op Fl b Ar blocksize
1895 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1896 .Fl V Ar size Ar volume
1898 Creates a volume of the given size.
1899 The volume is exported as a block device in
1900 .Pa /dev/zvol/{dsk,rdsk}/path ,
1903 is the name of the volume in the ZFS namespace.
1904 The size represents the logical size as exported by the device.
1905 By default, a reservation of equal size is created.
1908 is automatically rounded up to the nearest 128 Kbytes to ensure that the volume
1909 has an integral number of blocks regardless of
1911 .Bl -tag -width "-b"
1912 .It Fl b Ar blocksize
1914 .Fl o Sy volblocksize Ns = Ns Ar blocksize .
1915 If this option is specified in conjunction with
1916 .Fl o Sy volblocksize ,
1917 the resulting behavior is undefined.
1918 .It Fl o Ar property Ns = Ns Ar value
1919 Sets the specified property as if the
1920 .Nm zfs Cm set Ar property Ns = Ns Ar value
1921 command was invoked at the same time the dataset was created.
1922 Any editable ZFS property can also be set at creation time.
1925 options can be specified.
1926 An error results if the same property is specified in multiple
1930 Creates all the non-existing parent datasets.
1931 Datasets created in this manner are automatically mounted according to the
1933 property inherited from their parent.
1934 Any property specified on the command line using the
1937 If the target filesystem already exists, the operation completes successfully.
1939 Creates a sparse volume with no reservation.
1943 .Sx Native Properties
1944 section for more information about sparse volumes.
1950 .Ar filesystem Ns | Ns Ar volume
1952 Destroys the given dataset.
1953 By default, the command unshares any file systems that are currently shared,
1954 unmounts any file systems that are currently mounted, and refuses to destroy a
1955 dataset that has active dependents
1956 .Pq children or clones .
1957 .Bl -tag -width "-R"
1959 Recursively destroy all dependents, including cloned file systems outside the
1962 Force an unmount of any file systems using the
1965 This option has no effect on non-file systems or unmounted file systems.
1970 No data will be deleted.
1971 This is useful in conjunction with the
1975 flags to determine what data would be deleted.
1977 Print machine-parsable verbose information about the deleted data.
1979 Recursively destroy all children.
1981 Print verbose information about the deleted data.
1984 Extreme care should be taken when applying either the
1988 options, as they can destroy large portions of a pool and cause unexpected
1989 behavior for mounted file systems in use.
1994 .Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns
1995 .Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ...
1997 The given snapshots are destroyed immediately if and only if the
2001 option would have destroyed it.
2002 Such immediate destruction would occur, for example, if the snapshot had no
2003 clones and the user-initiated reference count were zero.
2005 If a snapshot does not qualify for immediate destruction, it is marked for
2007 In this state, it exists as a usable, visible snapshot until both of the
2008 preconditions listed above are met, at which point it is destroyed.
2010 An inclusive range of snapshots may be specified by separating the first and
2011 last snapshots with a percent sign.
2012 The first and/or last snapshots may be left blank, in which case the
2013 filesystem's oldest or newest snapshot will be implied.
2016 .Pq or ranges of snapshots
2017 of the same filesystem or volume may be specified in a comma-separated list of
2019 Only the snapshot's short name
2020 .Po the part after the
2023 should be specified when using a range or comma-separated list to identify
2025 .Bl -tag -width "-R"
2027 Recursively destroy all clones of these snapshots, including the clones,
2028 snapshots, and children.
2029 If this flag is specified, the
2031 flag will have no effect.
2033 Defer snapshot deletion.
2038 No data will be deleted.
2039 This is useful in conjunction with the
2043 flags to determine what data would be deleted.
2045 Print machine-parsable verbose information about the deleted data.
2048 .Pq or mark for deferred deletion
2049 all snapshots with this name in descendent file systems.
2051 Print verbose information about the deleted data.
2053 Extreme care should be taken when applying either the
2057 options, as they can destroy large portions of a pool and cause unexpected
2058 behavior for mounted file systems in use.
2063 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
2065 The given bookmark is destroyed.
2070 .Oo Fl o Ar property Ns = Ns value Oc Ns ...
2071 .Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ...
2073 Creates snapshots with the given names.
2074 All previous modifications by successful system calls to the file system are
2075 part of the snapshots.
2076 Snapshots are taken atomically, so that all snapshots correspond to the same
2080 section for details.
2081 .Bl -tag -width "-o"
2082 .It Fl o Ar property Ns = Ns Ar value
2083 Sets the specified property; see
2087 Recursively create snapshots of all descendent datasets
2095 Roll back the given dataset to a previous snapshot.
2096 When a dataset is rolled back, all data that has changed since the snapshot is
2097 discarded, and the dataset reverts to the state at the time of the snapshot.
2098 By default, the command refuses to roll back to a snapshot other than the most
2100 In order to do so, all intermediate snapshots and bookmarks must be destroyed by
2107 options do not recursively destroy the child snapshots of a recursive snapshot.
2108 Only direct snapshots of the specified filesystem are destroyed by either of
2110 To completely roll back a recursive snapshot, you must rollback the individual
2112 .Bl -tag -width "-R"
2114 Destroy any more recent snapshots and bookmarks, as well as any clones of those
2119 option to force an unmount of any clone file systems that are to be destroyed.
2121 Destroy any snapshots and bookmarks more recent than the one specified.
2127 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
2128 .Ar snapshot Ar filesystem Ns | Ns Ar volume
2130 Creates a clone of the given snapshot.
2133 section for details.
2134 The target dataset can be located anywhere in the ZFS hierarchy, and is created
2135 as the same type as the original.
2136 .Bl -tag -width "-o"
2137 .It Fl o Ar property Ns = Ns Ar value
2138 Sets the specified property; see
2142 Creates all the non-existing parent datasets.
2143 Datasets created in this manner are automatically mounted according to the
2145 property inherited from their parent.
2146 If the target filesystem or volume already exists, the operation completes
2152 .Ar clone-filesystem
2154 Promotes a clone file system to no longer be dependent on its
2157 This makes it possible to destroy the file system that the clone was created
2159 The clone parent-child dependency relationship is reversed, so that the origin
2160 file system becomes a clone of the specified file system.
2162 The snapshot that was cloned, and any snapshots previous to this snapshot, are
2163 now owned by the promoted clone.
2164 The space they use moves from the origin file system to the promoted clone, so
2165 enough space must be available to accommodate these snapshots.
2166 No new space is consumed by this operation, but the space accounting is
2168 The promoted clone must not have any conflicting snapshot names of its own.
2171 subcommand can be used to rename any conflicting snapshots.
2176 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2177 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2183 .Ar filesystem Ns | Ns Ar volume
2184 .Ar filesystem Ns | Ns Ar volume
2186 Renames the given dataset.
2187 The new target can be located anywhere in the ZFS hierarchy, with the exception
2189 Snapshots can only be renamed within the parent file system or volume.
2190 When renaming a snapshot, the parent file system of the snapshot does not need
2191 to be specified as part of the second argument.
2192 Renamed file systems can inherit new mount points, in which case they are
2193 unmounted and remounted at the new mount point.
2194 .Bl -tag -width "-a"
2196 Force unmount any filesystems that need to be unmounted in the process.
2198 Creates all the nonexistent parent datasets.
2199 Datasets created in this manner are automatically mounted according to the
2201 property inherited from their parent.
2207 .Ar snapshot Ar snapshot
2209 Recursively rename the snapshots of all descendent datasets.
2210 Snapshots are the only dataset that can be renamed recursively.
2214 .Op Fl r Ns | Ns Fl d Ar depth
2216 .Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc
2217 .Oo Fl s Ar property Oc Ns ...
2218 .Oo Fl S Ar property Oc Ns ...
2219 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2220 .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ...
2222 Lists the property information for the given datasets in tabular form.
2223 If specified, you can list property information by the absolute pathname or the
2225 By default, all file systems and volumes are displayed.
2226 Snapshots are displayed if the
2233 The following fields are displayed,
2234 .Sy name Ns , Ns Sy used Ns , Ns Sy available Ns , Ns Sy referenced Ns , Ns
2236 .Bl -tag -width "-H"
2238 Used for scripting mode.
2239 Do not print headers and separate fields by a single tab instead of arbitrary
2241 .It Fl S Ar property
2244 option, but sorts by property in descending order.
2246 Recursively display any children of the dataset, limiting the recursion to
2252 will display only the dataset and its direct children.
2253 .It Fl o Ar property
2254 A comma-separated list of properties to display.
2255 The property must be:
2258 One of the properties described in the
2259 .Sx Native Properties
2266 to display the dataset name
2270 to display space usage properties on file systems and volumes.
2271 This is a shortcut for specifying
2272 .Fl o Sy name Ns , Ns Sy avail Ns , Ns Sy used Ns , Ns Sy usedsnap Ns , Ns
2273 .Sy usedds Ns , Ns Sy usedrefreserv Ns , Ns Sy usedchild Fl t
2274 .Sy filesystem Ns , Ns Sy volume
2278 Display numbers in parsable
2282 Recursively display any children of the dataset on the command line.
2283 .It Fl s Ar property
2284 A property for sorting the output by column in ascending order based on the
2285 value of the property.
2286 The property must be one of the properties described in the
2288 section, or the special value
2290 to sort by the dataset name.
2291 Multiple properties can be specified at one time using multiple
2296 options are evaluated from left to right in decreasing order of importance.
2297 The following is a list of sorting criteria:
2300 Numeric types sort in numeric order.
2302 String types sort in alphabetical order.
2304 Types inappropriate for a row sort that row to the literal bottom, regardless of
2305 the specified ordering.
2308 If no sorting options are specified the existing behavior of
2312 A comma-separated list of types to display, where
2321 For example, specifying
2323 displays only snapshots.
2328 .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ...
2329 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2331 Sets the property or list of properties to the given value(s) for each dataset.
2332 Only some properties can be edited.
2335 section for more information on what properties can be set and acceptable
2337 Numeric values can be specified as exact values, or in a human-readable form
2339 .Sy B , K , M , G , T , P , E , Z
2340 .Po for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes,
2341 or zettabytes, respectively
2343 User properties can be set on snapshots.
2344 For more information, see the
2350 .Op Fl r Ns | Ns Fl d Ar depth
2352 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2353 .Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc
2354 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2355 .Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ...
2356 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Ns ...
2358 Displays properties for the given datasets.
2359 If no datasets are specified, then the command displays properties for all
2360 datasets on the system.
2361 For each property, the following columns are displayed:
2364 property Property name
2365 value Property value
2366 source Property source. Can either be local, default,
2367 temporary, inherited, or none (-).
2370 All columns are displayed by default, though this can be controlled by using the
2373 This command takes a comma-separated list of properties as described in the
2374 .Sx Native Properties
2381 can be used to display all properties that apply to the given dataset's type
2382 .Pq filesystem, volume, snapshot, or bookmark .
2383 .Bl -tag -width "-H"
2385 Display output in a form more easily parsed by scripts.
2386 Any headers are omitted, and fields are explicitly separated by a single tab
2387 instead of an arbitrary amount of space.
2389 Recursively display any children of the dataset, limiting the recursion to
2393 will display only the dataset and its direct children.
2395 A comma-separated list of columns to display.
2396 .Sy name Ns , Ns Sy property Ns , Ns Sy value Ns , Ns Sy source
2397 is the default value.
2399 Display numbers in parsable
2403 Recursively display properties for any children.
2405 A comma-separated list of sources to display.
2406 Those properties coming from a source other than those in this list are ignored.
2407 Each source must be one of the following:
2414 The default value is all sources.
2416 A comma-separated list of types to display, where
2430 .Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2432 Clears the specified property, causing it to be inherited from an ancestor,
2433 restored to default if no ancestor has the property set, or with the
2435 option reverted to the received value if one exists.
2438 section for a listing of default values, and details on which properties can be
2440 .Bl -tag -width "-r"
2442 Recursively inherit the given property for all children.
2444 Revert the property to the received value if one exists; otherwise operate as
2447 option was not specified.
2452 .Ar filesystem Ns | Ns Ar volume
2454 Remap the indirect blocks in the given filesystem or volume so that they no
2455 longer reference blocks on previously removed vdevs and we can eventually
2456 shrink the size of the indirect mapping objects for the previously removed
2457 vdevs. Note that remapping all blocks might not be possible and that
2458 references from snapshots will still exist and cannot be remapped.
2463 Displays a list of file systems that are not the most recent version.
2469 Displays a list of currently supported file system versions.
2475 .Fl a | Ar filesystem
2477 Upgrades file systems to a new on-disk version.
2478 Once this is done, the file systems will no longer be accessible on systems
2479 running older versions of the software.
2481 streams generated from new snapshots of these file systems cannot be accessed on
2482 systems running older versions of the software.
2484 In general, the file system version is independent of the pool version.
2487 for information on the
2488 .Nm zpool Cm upgrade
2491 In some cases, the file system version and the pool version are interrelated and
2492 the pool version must be upgraded before the file system version can be
2494 .Bl -tag -width "-V"
2496 Upgrade to the specified
2500 flag is not specified, this command upgrades to the most recent version.
2502 option can only be used to increase the version number, and only up to the most
2503 recent version supported by this software.
2505 Upgrade all file systems on all imported pools.
2507 Upgrade the specified file system.
2509 Upgrade the specified file system and all descendent file systems.
2515 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2516 .Oo Fl s Ar field Oc Ns ...
2517 .Oo Fl S Ar field Oc Ns ...
2518 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2519 .Ar filesystem Ns | Ns Ar snapshot
2521 Displays space consumed by, and quotas on, each user in the specified filesystem
2523 This corresponds to the
2524 .Sy userused@ Ns Em user
2526 .Sy userquota@ Ns Em user
2528 .Bl -tag -width "-H"
2530 Do not print headers, use tab-delimited output.
2532 Sort by this field in reverse order.
2536 Translate SID to POSIX ID.
2537 The POSIX ID may be ephemeral if no mapping exists.
2538 Normal POSIX interfaces
2543 perform this translation, so the
2545 option allows the output from
2546 .Nm zfs Cm userspace
2547 to be compared directly with those utilities.
2550 may lead to confusion if some files were created by an SMB user before a
2551 SMB-to-POSIX name mapping was established.
2552 In such a case, some files will be owned by the SMB entity and some by the POSIX
2556 option will report that the POSIX entity has the total usage and quota for both.
2558 Print numeric ID instead of user/group name.
2559 .It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2560 Display only the specified fields from the following set:
2565 The default is to display all fields.
2571 Sort output by this field.
2576 flags may be specified multiple times to sort first by one field, then by
2579 .Fl s Sy type Fl s Sy name .
2580 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2581 Print only the specified types from the following set:
2588 .Fl t Sy posixuser Ns , Ns Sy smbuser .
2589 The default can be changed to include group types.
2595 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2596 .Oo Fl s Ar field Oc Ns ...
2597 .Oo Fl S Ar field Oc Ns ...
2598 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2599 .Ar filesystem Ns | Ns Ar snapshot
2601 Displays space consumed by, and quotas on, each group in the specified
2602 filesystem or snapshot.
2603 This subcommand is identical to
2604 .Nm zfs Cm userspace ,
2605 except that the default types to display are
2606 .Fl t Sy posixgroup Ns , Ns Sy smbgroup .
2611 Displays all ZFS file systems currently mounted.
2617 .Fl a | Ar filesystem
2619 Mounts ZFS file systems.
2620 .Bl -tag -width "-O"
2622 Perform an overlay mount.
2625 for more information.
2627 Mount all available ZFS file systems.
2628 Invoked automatically as part of the boot process.
2630 Mount the specified filesystem.
2632 An optional, comma-separated list of mount options to use temporarily for the
2633 duration of the mount.
2635 .Sx Temporary Mount Point Properties
2636 section for details.
2638 Report mount progress.
2644 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2646 Unmounts currently mounted ZFS file systems.
2647 .Bl -tag -width "-a"
2649 Unmount all available ZFS file systems.
2650 Invoked automatically as part of the shutdown process.
2651 .It Ar filesystem Ns | Ns Ar mountpoint
2652 Unmount the specified filesystem.
2653 The command can also be given a path to a ZFS file system mount point on the
2656 Forcefully unmount the file system, even if it is currently in use.
2661 .Fl a | Ar filesystem
2663 Shares available ZFS file systems.
2664 .Bl -tag -width "-a"
2666 Share all available ZFS file systems.
2667 Invoked automatically as part of the boot process.
2669 Share the specified filesystem according to the
2674 File systems are shared when the
2683 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2685 Unshares currently shared ZFS file systems.
2686 .Bl -tag -width "-a"
2688 Unshare all available ZFS file systems.
2689 Invoked automatically as part of the shutdown process.
2690 .It Ar filesystem Ns | Ns Ar mountpoint
2691 Unshare the specified filesystem.
2692 The command can also be given a path to a ZFS file system shared on the system.
2697 .Ar snapshot bookmark
2699 Creates a bookmark of the given snapshot.
2700 Bookmarks mark the point in time when the snapshot was created, and can be used
2701 as the incremental source for a
2705 This feature must be enabled to be used.
2707 .Xr zpool-features 5
2708 for details on ZFS feature flags and the
2715 .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
2718 Creates a stream representation of the second
2720 which is written to standard output.
2721 The output can be redirected to a file or to a different system
2722 .Po for example, using
2725 By default, a full stream is generated.
2726 .Bl -tag -width "-D"
2728 Generate a deduplicated stream.
2729 Blocks which would have been sent multiple times in the send stream will only be
2731 The receiving system must also support this feature to receive a deduplicated
2733 This flag can be used regardless of the dataset's
2735 property, but performance will be much better if the filesystem uses a
2736 dedup-capable checksum
2740 .It Fl I Ar snapshot
2741 Generate a stream package that sends all intermediary snapshots from the first
2742 snapshot to the second snapshot.
2746 .Fl i Em @a Em fs@b Ns ; Fl i Em @b Em fs@c Ns ; Fl i Em @c Em fs@d .
2747 The incremental source may be specified as with the
2750 .It Fl L, -large-block
2751 Generate a stream which may contain blocks larger than 128KB.
2752 This flag has no effect if the
2754 pool feature is disabled, or if the
2756 property of this filesystem has never been set above 128KB.
2757 The receiving system must have the
2759 pool feature enabled as well.
2761 .Xr zpool-features 5
2762 for details on ZFS feature flags and the
2766 Print machine-parsable verbose information about the stream package generated.
2767 .It Fl R, -replicate
2768 Generate a replication stream package, which will replicate the specified
2769 file system, and all descendent file systems, up to the named snapshot.
2770 When received, all properties, snapshots, descendent file systems, and clones
2777 flags are used in conjunction with the
2779 flag, an incremental replication stream is generated.
2780 The current values of properties, and current snapshot and file system names are
2781 set when the stream is received.
2784 flag is specified when this stream is received, snapshots and file systems that
2785 do not exist on the sending side are destroyed.
2787 Generate a more compact stream by using
2789 records for blocks which are stored more compactly on disk by the
2792 This flag has no effect if the
2794 feature is disabled.
2795 The receiving system must have the
2800 feature is active on the sending system, then the receiving system must have
2801 that feature enabled as well.
2803 .Xr zpool-features 5
2804 for details on ZFS feature flags and the
2807 .It Fl c, -compressed
2808 Generate a more compact stream by using compressed WRITE records for blocks
2809 which are compressed on disk and in memory
2812 property for details
2816 feature is active on the sending system, then the receiving system must have
2817 that feature enabled as well.
2820 feature is enabled on the sending system but the
2822 option is not supplied in conjunction with
2824 then the data will be decompressed before sending so it can be split into
2825 smaller block sizes.
2826 .It Fl i Ar snapshot
2827 Generate an incremental stream from the first
2829 .Pq the incremental source
2832 .Pq the incremental target .
2833 The incremental source can be specified as the last component of the snapshot
2837 character and following
2839 and it is assumed to be from the same file system as the incremental target.
2841 If the destination is a clone, the source may be the origin snapshot, which must
2844 .Em pool/fs@origin ,
2852 Do not generate any actual send data.
2853 This is useful in conjunction with the
2857 flags to determine what data will be sent.
2858 In this case, the verbose output will be written to standard output
2859 .Po contrast with a non-dry-run, where the stream is written to standard output
2860 and the verbose output goes to standard error
2863 Include the dataset's properties in the stream.
2864 This flag is implicit when
2867 The receiving system must also support this feature.
2869 Print verbose information about the stream package generated.
2870 This information includes a per-second report of how much data has been sent.
2872 The format of the stream is committed.
2873 You will be able to receive your streams on future versions of ZFS .
2879 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
2880 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2882 Generate a send stream, which may be of a filesystem, and may be incremental
2884 If the destination is a filesystem or volume, the pool must be read-only, or the
2885 filesystem must not be mounted.
2886 When the stream generated from a filesystem or volume is received, the default
2887 snapshot name will be
2889 .Bl -tag -width "-L"
2890 .It Fl L, -large-block
2891 Generate a stream which may contain blocks larger than 128KB.
2892 This flag has no effect if the
2894 pool feature is disabled, or if the
2896 property of this filesystem has never been set above 128KB.
2897 The receiving system must have the
2899 pool feature enabled as well.
2901 .Xr zpool-features 5
2902 for details on ZFS feature flags and the
2905 .It Fl c, -compressed
2906 Generate a more compact stream by using compressed WRITE records for blocks
2907 which are compressed on disk and in memory
2910 property for details
2914 feature is active on the sending system, then the receiving system must have
2915 that feature enabled as well.
2918 feature is enabled on the sending system but the
2920 option is not supplied in conjunction with
2922 then the data will be decompressed before sending so it can be split into
2923 smaller block sizes.
2925 Generate a more compact stream by using
2927 records for blocks which are stored more compactly on disk by the
2930 This flag has no effect if the
2932 feature is disabled.
2933 The receiving system must have the
2938 feature is active on the sending system, then the receiving system must have
2939 that feature enabled as well.
2941 .Xr zpool-features 5
2942 for details on ZFS feature flags and the
2945 .It Fl i Ar snapshot Ns | Ns Ar bookmark
2946 Generate an incremental send stream.
2947 The incremental source must be an earlier snapshot in the destination's history.
2948 It will commonly be an earlier snapshot in the destination's file system, in
2949 which case it can be specified as the last component of the name
2954 character and following
2957 If the incremental target is a clone, the incremental source can be the origin
2958 snapshot, or an earlier snapshot in the origin's filesystem, or the origin's
2966 .Ar receive_resume_token
2968 Creates a send stream which resumes an interrupted receive.
2970 .Ar receive_resume_token
2971 is the value of this property on the filesystem or volume that was being
2973 See the documentation for
2980 .Op Fl o Sy origin Ns = Ns Ar snapshot
2981 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2987 .Op Fl d Ns | Ns Fl e
2988 .Op Fl o Sy origin Ns = Ns Ar snapshot
2991 Creates a snapshot whose contents are as specified in the stream provided on
2993 If a full stream is received, then a new file system is created as well.
2994 Streams are created using the
2996 subcommand, which by default creates a full stream.
2998 can be used as an alias for
3001 If an incremental stream is received, then the destination file system must
3002 already exist, and its most recent snapshot must match the incremental stream's
3006 the destination device link is destroyed and recreated, which means the
3008 cannot be accessed during the
3012 When a snapshot replication package stream that is generated by using the
3013 .Nm zfs Cm send Fl R
3014 command is received, any snapshots that do not exist on the sending location are
3015 destroyed by using the
3016 .Nm zfs Cm destroy Fl d
3019 The name of the snapshot
3020 .Pq and file system, if a full stream is received
3021 that this subcommand creates depends on the argument type and the use of the
3027 If the argument is a snapshot name, the specified
3030 If the argument is a file system or volume name, a snapshot with the same name
3031 as the sent snapshot is created within the specified
3039 options are specified, the provided target snapshot name is used exactly as
3046 options cause the file system name of the target snapshot to be determined by
3047 appending a portion of the sent snapshot's name to the specified target
3051 option is specified, all but the first element of the sent snapshot's file
3053 .Pq usually the pool name
3054 is used and any required intermediate file systems within the specified one are
3058 option is specified, then only the last element of the sent snapshot's file
3060 .Pq i.e. the name of the source file system itself
3061 is used as the target file system name.
3062 .Bl -tag -width "-F"
3064 Force a rollback of the file system to the most recent snapshot before
3065 performing the receive operation.
3066 If receiving an incremental replication stream
3067 .Po for example, one generated by
3068 .Nm zfs Cm send Fl R Op Fl i Ns | Ns Fl I
3070 destroy snapshots and file systems that do not exist on the sending side.
3072 Discard the first element of the sent snapshot's file system name, using the
3073 remaining elements to determine the name of the target file system for the new
3074 snapshot as described in the paragraph above.
3076 Discard all but the last element of the sent snapshot's file system name, using
3077 that element to determine the name of the target file system for the new
3078 snapshot as described in the paragraph above.
3080 Do not actually receive the stream.
3081 This can be useful in conjunction with the
3083 option to verify the name the receive operation would use.
3084 .It Fl o Sy origin Ns = Ns Ar snapshot
3085 Forces the stream to be received as a clone of the given snapshot.
3086 If the stream is a full send stream, this will create the filesystem
3087 described by the stream as a clone of the specified snapshot.
3088 Which snapshot was specified will not affect the success or failure of the
3089 receive, as long as the snapshot does exist.
3090 If the stream is an incremental send stream, all the normal verification will be
3093 File system that is associated with the received stream is not mounted.
3095 Print verbose information about the stream and the time required to perform the
3098 If the receive is interrupted, save the partially received state, rather
3100 Interruption may be due to premature termination of the stream
3101 .Po e.g. due to network failure or failure of the remote system
3102 if the stream is being read over a network connection
3104 a checksum error in the stream, termination of the
3106 process, or unclean shutdown of the system.
3108 The receive can be resumed with a stream generated by
3109 .Nm zfs Cm send Fl t Ar token ,
3113 .Sy receive_resume_token
3114 property of the filesystem or volume which is received into.
3116 To use this flag, the storage pool must have the
3117 .Sy extensible_dataset
3120 .Xr zpool-features 5
3121 for details on ZFS feature flags.
3127 .Ar filesystem Ns | Ns Ar volume
3129 Abort an interrupted
3130 .Nm zfs Cm receive Fl s ,
3131 deleting its saved partially received state.
3135 .Ar filesystem Ns | Ns Ar volume
3137 Displays permissions that have been delegated on the specified filesystem or
3139 See the other forms of
3141 for more information.
3146 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3147 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3148 .Ar setname Oc Ns ...
3149 .Ar filesystem Ns | Ns Ar volume
3155 .Fl e Ns | Ns Sy everyone
3156 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3157 .Ar setname Oc Ns ...
3158 .Ar filesystem Ns | Ns Ar volume
3160 Delegates ZFS administration permission for the file systems to non-privileged
3162 .Bl -tag -width "-d"
3164 Allow only for the descendent file systems.
3165 .It Fl e Ns | Ns Sy everyone
3166 Specifies that the permissions be delegated to everyone.
3167 .It Fl g Ar group Ns Oo , Ns Ar group Oc Ns ...
3168 Explicitly specify that permissions are delegated to the group.
3172 only for the specified file system.
3173 .It Fl u Ar user Ns Oo , Ns Ar user Oc Ns ...
3174 Explicitly specify that permissions are delegated to the user.
3175 .It Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3176 Specifies to whom the permissions are delegated.
3177 Multiple entities can be specified as a comma-separated list.
3180 options are specified, then the argument is interpreted preferentially as the
3183 then as a user name, and lastly as a group name.
3184 To specify a user or group named
3191 To specify a group with the same name as a user, use the
3195 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3196 .Ar setname Oc Ns ...
3198 The permissions to delegate.
3199 Multiple permissions may be specified as a comma-separated list.
3200 Permission names are the same as ZFS subcommand and property names.
3201 See the property list below.
3202 Property set names, which begin with
3207 form below for details.
3212 options are specified, or both are, then the permissions are allowed for the
3213 file system or volume, and all of its descendents.
3215 Permissions are generally the ability to use a ZFS subcommand or change a ZFS
3217 The following permissions are available:
3220 allow subcommand Must also have the permission that is
3222 clone subcommand Must also have the 'create' ability and
3223 'mount' ability in the origin file system
3224 create subcommand Must also have the 'mount' ability
3225 destroy subcommand Must also have the 'mount' ability
3226 diff subcommand Allows lookup of paths within a dataset
3227 given an object number, and the ability
3228 to create snapshots necessary to
3230 mount subcommand Allows mount/umount of ZFS datasets
3231 promote subcommand Must also have the 'mount' and 'promote'
3232 ability in the origin file system
3233 receive subcommand Must also have the 'mount' and 'create'
3235 rename subcommand Must also have the 'mount' and 'create'
3236 ability in the new parent
3237 rollback subcommand Must also have the 'mount' ability
3239 share subcommand Allows sharing file systems over NFS
3241 snapshot subcommand Must also have the 'mount' ability
3243 groupquota other Allows accessing any groupquota@...
3245 groupused other Allows reading any groupused@... property
3246 userprop other Allows changing any user property
3247 userquota other Allows accessing any userquota@...
3249 userused other Allows reading any userused@... property
3255 casesensitivity property
3257 compression property
3261 filesystem_limit property
3264 normalization property
3265 primarycache property
3270 refreservation property
3271 reservation property
3272 secondarycache property
3277 snapshot_limit property
3280 volblocksize property
3290 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3291 .Ar setname Oc Ns ...
3292 .Ar filesystem Ns | Ns Ar volume
3297 These permissions are granted
3299 to the creator of any newly-created descendent file system.
3303 .Fl s No @ Ns Ar setname
3304 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3305 .Ar setname Oc Ns ...
3306 .Ar filesystem Ns | Ns Ar volume
3308 Defines or adds permissions to a permission set.
3309 The set can be used by other
3311 commands for the specified file system and its descendents.
3312 Sets are evaluated dynamically, so changes to a set are immediately reflected.
3313 Permission sets follow the same naming restrictions as ZFS file systems, but the
3314 name must begin with
3316 and can be no more than 64 characters long.
3321 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3322 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3323 .Ar setname Oc Ns ... Oc
3324 .Ar filesystem Ns | Ns Ar volume
3330 .Fl e Ns | Ns Sy everyone
3331 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3332 .Ar setname Oc Ns ... Oc
3333 .Ar filesystem Ns | Ns Ar volume
3340 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3341 .Ar setname Oc Ns ... Oc
3342 .Ar filesystem Ns | Ns Ar volume
3344 Removes permissions that were granted with the
3347 No permissions are explicitly denied, so other permissions granted are still in
3349 For example, if the permission is granted by an ancestor.
3350 If no permissions are specified, then all permissions for the specified
3362 only removes the permissions that were granted to everyone, not all permissions
3363 for every user and group.
3366 command for a description of the
3369 .Bl -tag -width "-r"
3371 Recursively remove the permissions from this file system and all descendents.
3377 .Fl s No @ Ns Ar setname
3378 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3379 .Ar setname Oc Ns ... Oc
3380 .Ar filesystem Ns | Ns Ar volume
3382 Removes permissions from a permission set.
3383 If no permissions are specified, then all permissions are removed, thus removing
3389 .Ar tag Ar snapshot Ns ...
3391 Adds a single reference, named with the
3393 argument, to the specified snapshot or snapshots.
3394 Each snapshot has its own tag namespace, and tags must be unique within that
3397 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3401 .Bl -tag -width "-r"
3403 Specifies that a hold with the given tag is applied recursively to the snapshots
3404 of all descendent file systems.
3412 Lists all existing user references for the given snapshot or snapshots.
3413 .Bl -tag -width "-r"
3415 Lists the holds that are set on the named descendent snapshots, in addition to
3416 listing the holds on the named snapshot.
3422 .Ar tag Ar snapshot Ns ...
3424 Removes a single reference, named with the
3426 argument, from the specified snapshot or snapshots.
3427 The tag must already exist for each snapshot.
3428 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3432 .Bl -tag -width "-r"
3434 Recursively releases a hold with the given tag on the snapshots of all
3435 descendent file systems.
3441 .Ar snapshot Ar snapshot Ns | Ns Ar filesystem
3443 Display the difference between a snapshot of a given filesystem and another
3444 snapshot of that filesystem from a later time or the current contents of the
3446 The first column is a character indicating the type of change, the other columns
3447 indicate pathname, new pathname
3448 .Pq in case of rename ,
3449 change in link count, and optionally file type and/or change time.
3450 The types of change are:
3452 - The path has been removed
3453 + The path has been created
3454 M The path has been modified
3455 R The path has been renamed
3457 .Bl -tag -width "-F"
3459 Display an indication of the type of file, in a manner similar to the
3475 Give more parsable tab-separated output, without header lines and without
3478 Display the path's inode change time as the first column of output.
3485 .Op Fl m Ar memory_limit
3491 as a ZFS channel program on
3494 program interface allows ZFS administrative operations to be run
3495 programmatically via a Lua script.
3496 The entire script is executed atomically, with no other administrative
3497 operations taking effect concurrently.
3498 A library of ZFS calls is made available to channel program scripts.
3499 Channel programs may only be run with root privileges.
3501 For full documentation of the ZFS channel program interface, see the manual
3506 Display channel program output in JSON format.
3507 When this flag is specified and standard output is empty -
3508 channel program encountered an error.
3509 The details of such an error will be printed to standard error in plain text.
3511 Executes a read-only channel program, which runs faster.
3512 The program cannot change on-disk state by calling functions from
3513 the zfs.sync submodule.
3514 The program can be used to gather information such as properties and
3515 determining if changes would succeed (zfs.check.*).
3516 Without this flag, all pending changes must be synced to disk before
3517 a channel program can complete.
3519 Execution time limit, in milliseconds.
3520 If a channel program executes for longer than the provided timeout, it will
3521 be stopped and an error will be returned.
3522 The default timeout is 1000 ms, and can be set to a maximum of 10000 ms.
3523 .It Fl m Ar memory-limit
3524 Memory limit, in bytes.
3525 If a channel program attempts to allocate more memory than the given limit,
3526 it will be stopped and an error returned.
3527 The default memory limit is 10 MB, and can be set to a maximum of 100 MB.
3529 All remaining argument strings are passed directly to the channel program as
3533 for more information.
3539 utility exits 0 on success, 1 if an error occurs, and 2 if invalid command line
3540 options were specified.
3543 .It Sy Example 1 No Creating a ZFS File System Hierarchy
3544 The following commands create a file system named
3546 and a file system named
3550 is set for the parent file system, and is automatically inherited by the child
3553 # zfs create pool/home
3554 # zfs set mountpoint=/export/home pool/home
3555 # zfs create pool/home/bob
3557 .It Sy Example 2 No Creating a ZFS Snapshot
3558 The following command creates a snapshot named
3560 This snapshot is mounted on demand in the
3562 directory at the root of the
3566 # zfs snapshot pool/home/bob@yesterday
3568 .It Sy Example 3 No Creating and Destroying Multiple Snapshots
3569 The following command creates snapshots named
3573 and all of its descendent file systems.
3574 Each snapshot is mounted on demand in the
3576 directory at the root of its file system.
3577 The second command destroys the newly created snapshots.
3579 # zfs snapshot -r pool/home@yesterday
3580 # zfs destroy -r pool/home@yesterday
3582 .It Sy Example 4 No Disabling and Enabling File System Compression
3583 The following command disables the
3585 property for all file systems under
3587 The next command explicitly enables
3590 .Em pool/home/anne .
3592 # zfs set compression=off pool/home
3593 # zfs set compression=on pool/home/anne
3595 .It Sy Example 5 No Listing ZFS Datasets
3596 The following command lists all active file systems and volumes in the system.
3597 Snapshots are displayed if the
3605 for more information on pool properties.
3608 NAME USED AVAIL REFER MOUNTPOINT
3609 pool 450K 457G 18K /pool
3610 pool/home 315K 457G 21K /export/home
3611 pool/home/anne 18K 457G 18K /export/home/anne
3612 pool/home/bob 276K 457G 276K /export/home/bob
3614 .It Sy Example 6 No Setting a Quota on a ZFS File System
3615 The following command sets a quota of 50 Gbytes for
3618 # zfs set quota=50G pool/home/bob
3620 .It Sy Example 7 No Listing ZFS Properties
3621 The following command lists all properties for
3624 # zfs get all pool/home/bob
3625 NAME PROPERTY VALUE SOURCE
3626 pool/home/bob type filesystem -
3627 pool/home/bob creation Tue Jul 21 15:53 2009 -
3628 pool/home/bob used 21K -
3629 pool/home/bob available 20.0G -
3630 pool/home/bob referenced 21K -
3631 pool/home/bob compressratio 1.00x -
3632 pool/home/bob mounted yes -
3633 pool/home/bob quota 20G local
3634 pool/home/bob reservation none default
3635 pool/home/bob recordsize 128K default
3636 pool/home/bob mountpoint /pool/home/bob default
3637 pool/home/bob sharenfs off default
3638 pool/home/bob checksum on default
3639 pool/home/bob compression on local
3640 pool/home/bob atime on default
3641 pool/home/bob devices on default
3642 pool/home/bob exec on default
3643 pool/home/bob setuid on default
3644 pool/home/bob readonly off default
3645 pool/home/bob zoned off default
3646 pool/home/bob snapdir hidden default
3647 pool/home/bob aclmode discard default
3648 pool/home/bob aclinherit restricted default
3649 pool/home/bob canmount on default
3650 pool/home/bob xattr on default
3651 pool/home/bob copies 1 default
3652 pool/home/bob version 4 -
3653 pool/home/bob utf8only off -
3654 pool/home/bob normalization none -
3655 pool/home/bob casesensitivity sensitive -
3656 pool/home/bob vscan off default
3657 pool/home/bob nbmand off default
3658 pool/home/bob sharesmb off default
3659 pool/home/bob refquota none default
3660 pool/home/bob refreservation none default
3661 pool/home/bob primarycache all default
3662 pool/home/bob secondarycache all default
3663 pool/home/bob usedbysnapshots 0 -
3664 pool/home/bob usedbydataset 21K -
3665 pool/home/bob usedbychildren 0 -
3666 pool/home/bob usedbyrefreservation 0 -
3669 The following command gets a single property value.
3671 # zfs get -H -o value compression pool/home/bob
3674 The following command lists all properties with local settings for
3677 # zfs get -r -s local -o name,property,value all pool/home/bob
3679 pool/home/bob quota 20G
3680 pool/home/bob compression on
3682 .It Sy Example 8 No Rolling Back a ZFS File System
3683 The following command reverts the contents of
3685 to the snapshot named
3687 deleting all intermediate snapshots.
3689 # zfs rollback -r pool/home/anne@yesterday
3691 .It Sy Example 9 No Creating a ZFS Clone
3692 The following command creates a writable file system whose initial contents are
3694 .Em pool/home/bob@yesterday .
3696 # zfs clone pool/home/bob@yesterday pool/clone
3698 .It Sy Example 10 No Promoting a ZFS Clone
3699 The following commands illustrate how to test out changes to a file system, and
3700 then replace the original file system with the changed one, using clones, clone
3701 promotion, and renaming:
3703 # zfs create pool/project/production
3704 populate /pool/project/production with data
3705 # zfs snapshot pool/project/production@today
3706 # zfs clone pool/project/production@today pool/project/beta
3707 make changes to /pool/project/beta and test them
3708 # zfs promote pool/project/beta
3709 # zfs rename pool/project/production pool/project/legacy
3710 # zfs rename pool/project/beta pool/project/production
3711 once the legacy version is no longer needed, it can be destroyed
3712 # zfs destroy pool/project/legacy
3714 .It Sy Example 11 No Inheriting ZFS Properties
3715 The following command causes
3721 property from their parent.
3723 # zfs inherit checksum pool/home/bob pool/home/anne
3725 .It Sy Example 12 No Remotely Replicating ZFS Data
3726 The following commands send a full stream and then an incremental stream to a
3727 remote machine, restoring them into
3728 .Em poolB/received/fs@a
3730 .Em poolB/received/fs@b ,
3733 must contain the file system
3734 .Em poolB/received ,
3735 and must not initially contain
3736 .Em poolB/received/fs .
3738 # zfs send pool/fs@a | \e
3739 ssh host zfs receive poolB/received/fs@a
3740 # zfs send -i a pool/fs@b | \e
3741 ssh host zfs receive poolB/received/fs
3743 .It Sy Example 13 No Using the zfs receive -d Option
3744 The following command sends a full stream of
3745 .Em poolA/fsA/fsB@snap
3746 to a remote machine, receiving it into
3747 .Em poolB/received/fsA/fsB@snap .
3750 portion of the received snapshot's name is determined from the name of the sent
3753 must contain the file system
3754 .Em poolB/received .
3756 .Em poolB/received/fsA
3757 does not exist, it is created as an empty file system.
3759 # zfs send poolA/fsA/fsB@snap | \e
3760 ssh host zfs receive -d poolB/received
3762 .It Sy Example 14 No Setting User Properties
3763 The following example sets the user-defined
3764 .Sy com.example:department
3765 property for a dataset.
3767 # zfs set com.example:department=12345 tank/accounting
3769 .It Sy Example 15 No Performing a Rolling Snapshot
3770 The following example shows how to maintain a history of snapshots with a
3771 consistent naming scheme.
3772 To keep a week's worth of snapshots, the user destroys the oldest snapshot,
3773 renames the remaining snapshots, and then creates a new snapshot, as follows:
3775 # zfs destroy -r pool/users@7daysago
3776 # zfs rename -r pool/users@6daysago @7daysago
3777 # zfs rename -r pool/users@5daysago @6daysago
3778 # zfs rename -r pool/users@yesterday @5daysago
3779 # zfs rename -r pool/users@yesterday @4daysago
3780 # zfs rename -r pool/users@yesterday @3daysago
3781 # zfs rename -r pool/users@yesterday @2daysago
3782 # zfs rename -r pool/users@today @yesterday
3783 # zfs snapshot -r pool/users@today
3785 .It Sy Example 16 No Setting sharenfs Property Options on a ZFS File System
3786 The following commands show how to set
3788 property options to enable
3792 addresses and to enable root access for system
3798 # zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home
3803 for host name resolution, specify the fully qualified hostname.
3804 .It Sy Example 17 No Delegating ZFS Administration Permissions on a ZFS Dataset
3805 The following example shows how to set permissions so that user
3807 can create, destroy, mount, and take snapshots on
3813 # zfs allow cindys create,destroy,mount,snapshot tank/cindys
3814 # zfs allow tank/cindys
3815 ---- Permissions on tank/cindys --------------------------------------
3816 Local+Descendent permissions:
3817 user cindys create,destroy,mount,snapshot
3822 mount point permission is set to 755 by default, user
3824 will be unable to mount file systems under
3826 Add an ACE similar to the following syntax to provide mount point access:
3828 # chmod A+user:cindys:add_subdirectory:allow /tank/cindys
3830 .It Sy Example 18 No Delegating Create Time Permissions on a ZFS Dataset
3831 The following example shows how to grant anyone in the group
3833 to create file systems in
3835 This syntax also allows staff members to destroy their own file systems, but not
3836 destroy anyone else's file system.
3841 # zfs allow staff create,mount tank/users
3842 # zfs allow -c destroy tank/users
3843 # zfs allow tank/users
3844 ---- Permissions on tank/users ---------------------------------------
3847 Local+Descendent permissions:
3848 group staff create,mount
3850 .It Sy Example 19 No Defining and Granting a Permission Set on a ZFS Dataset
3851 The following example shows how to define and grant a permission set on the
3858 # zfs allow -s @pset create,destroy,snapshot,mount tank/users
3859 # zfs allow staff @pset tank/users
3860 # zfs allow tank/users
3861 ---- Permissions on tank/users ---------------------------------------
3863 @pset create,destroy,mount,snapshot
3864 Local+Descendent permissions:
3867 .It Sy Example 20 No Delegating Property Permissions on a ZFS Dataset
3868 The following example shows to grant the ability to set quotas and reservations
3876 # zfs allow cindys quota,reservation users/home
3877 # zfs allow users/home
3878 ---- Permissions on users/home ---------------------------------------
3879 Local+Descendent permissions:
3880 user cindys quota,reservation
3881 cindys% zfs set quota=10G users/home/marks
3882 cindys% zfs get quota users/home/marks
3883 NAME PROPERTY VALUE SOURCE
3884 users/home/marks quota 10G local
3886 .It Sy Example 21 No Removing ZFS Delegated Permissions on a ZFS Dataset
3887 The following example shows how to remove the snapshot permission from the
3896 # zfs unallow staff snapshot tank/users
3897 # zfs allow tank/users
3898 ---- Permissions on tank/users ---------------------------------------
3900 @pset create,destroy,mount,snapshot
3901 Local+Descendent permissions:
3904 .It Sy Example 22 No Showing the differences between a snapshot and a ZFS Dataset
3905 The following example shows how to see what has changed between a prior
3906 snapshot of a ZFS dataset and its current state.
3909 option is used to indicate type information for the files affected.
3911 # zfs diff -F tank/test@before tank/test
3913 M F /tank/test/linked (+1)
3914 R F /tank/test/oldname -> /tank/test/newname
3915 - F /tank/test/deleted
3916 + F /tank/test/created
3917 M F /tank/test/modified
3920 .Sh INTERFACE STABILITY