4 .\" The contents of this file are subject to the terms of the
5 .\" Common Development and Distribution License (the "License").
6 .\" You may not use this file except in compliance with the License.
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 .\" or http://www.opensolaris.org/os/licensing.
10 .\" See the License for the specific language governing permissions
11 .\" and limitations under the License.
13 .\" When distributing Covered Code, include this CDDL HEADER in each
14 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 .\" If applicable, add the following below this CDDL HEADER, with the
16 .\" fields enclosed by brackets "[]" replaced with your own identifying
17 .\" information: Portions Copyright [yyyy] [name of copyright owner]
22 .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
23 .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
24 .\" Copyright (c) 2011, 2016 by Delphix. All rights reserved.
25 .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
26 .\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
27 .\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
28 .\" Copyright (c) 2014 Integros [integros.com]
29 .\" Copyright 2016 Richard Laager. All rights reserved.
30 .\" Copyright 2017 Nexenta Systems, Inc.
37 .Nd configures ZFS file systems
44 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
50 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
51 .Fl V Ar size Ar volume
55 .Ar filesystem Ns | Ns Ar volume
59 .Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns
60 .Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ...
63 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
67 .Oo Fl o Ar property Ns = Ns value Oc Ns ...
68 .Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ...
76 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
77 .Ar snapshot Ar filesystem Ns | Ns Ar volume
84 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
85 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
89 .Ar filesystem Ns | Ns Ar volume
90 .Ar filesystem Ns | Ns Ar volume
94 .Ar snapshot Ar snapshot
97 .Op Fl r Ns | Ns Fl d Ar depth
99 .Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc
100 .Oo Fl s Ar property Oc Ns ...
101 .Oo Fl S Ar property Oc Ns ...
102 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
103 .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ...
106 .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ...
107 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
110 .Op Fl r Ns | Ns Fl d Ar depth
112 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
113 .Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc
114 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
115 .Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ...
116 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Ns ...
120 .Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
130 .Fl a | Ar filesystem
134 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
135 .Oo Fl s Ar field Oc Ns ...
136 .Oo Fl S Ar field Oc Ns ...
137 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
138 .Ar filesystem Ns | Ns Ar snapshot
142 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
143 .Oo Fl s Ar field Oc Ns ...
144 .Oo Fl S Ar field Oc Ns ...
145 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
146 .Ar filesystem Ns | Ns Ar snapshot
153 .Fl a | Ar filesystem
157 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
160 .Fl a | Ar filesystem
163 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
166 .Ar snapshot bookmark
170 .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
175 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
176 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
180 .Fl t Ar receive_resume_token
184 .Op Fl o Sy origin Ns = Ns Ar snapshot
185 .Op Fl o Ar property Ns = Ns Ar value
187 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
191 .Op Fl d Ns | Ns Fl e
192 .Op Fl o Sy origin Ns = Ns Ar snapshot
193 .Op Fl o Ar property Ns = Ns Ar value
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
276 .Op Fl L Ar keylocation
277 .Fl a | Ar filesystem
281 .Fl a | Ar filesystem
285 .Op Fl o Ar keylocation Ns = Ns Ar value
286 .Op Fl o Ar keyformat Ns = Ns Ar value
287 .Op Fl o Ar pbkdf2iters Ns = Ns Ar value
297 command configures ZFS datasets within a ZFS storage pool, as described in
299 A dataset is identified by a unique path within the ZFS namespace.
302 pool/{filesystem,volume,snapshot}
305 where the maximum length of a dataset name is
309 A dataset can be one of the following:
310 .Bl -tag -width "file system"
312 A ZFS dataset of type
314 can be mounted within the standard system namespace and behaves like other file
316 While ZFS file systems are designed to be POSIX compliant, known issues exist
317 that prevent compliance in some cases.
318 Applications that depend on standards conformance might fail due to non-standard
319 behavior when checking file system free space.
321 A logical volume exported as a raw or block device.
322 This type of dataset should only be used under special circumstances.
323 File systems are typically used in most environments.
325 A read-only version of a file system or volume at a given point in time.
327 .Ar filesystem Ns @ Ns Ar name
329 .Ar volume Ns @ Ns Ar name .
333 but without the hold on on-disk data. It can be used as the source of a send
334 (but not for a receive). It is specified as
335 .Ar filesystem Ns # Ns Ar name
337 .Ar volume Ns # Ns Ar name .
339 .Ss ZFS File System Hierarchy
340 A ZFS storage pool is a logical collection of devices that provide space for
342 A storage pool is also the root of the ZFS file system hierarchy.
344 The root of the pool can be accessed as a file system, such as mounting and
345 unmounting, taking snapshots, and setting properties.
346 The physical storage characteristics, however, are managed by the
352 for more information on creating and administering pools.
354 A snapshot is a read-only copy of a file system or volume.
355 Snapshots can be created extremely quickly, and initially consume no additional
356 space within the pool.
357 As data within the active dataset changes, the snapshot consumes more data than
358 would otherwise be shared with the active dataset.
360 Snapshots can have arbitrary names.
361 Snapshots of volumes can be cloned or rolled back, visibility is determined
364 property of the parent volume.
366 File system snapshots can be accessed under the
368 directory in the root of the file system.
369 Snapshots are automatically mounted on demand and may be unmounted at regular
371 The visibility of the
373 directory can be controlled by the
377 A bookmark is like a snapshot, a read-only copy of a file system or volume.
378 Bookmarks can be created extremely quickly, compared to snapshots, and they
379 consume no additional space within the pool. Bookmarks can also have arbitrary
380 names, much like snapshots.
382 Unlike snapshots, bookmarks can not be accessed through the filesystem in any
383 way. From a storage standpoint a bookmark just provides a way to reference
384 when a snapshot was created as a distinct object. Bookmarks are initially
385 tied to a snapshot, not the filesystem or volume, and they will survive if the
386 snapshot itself is destroyed. Since they are very light weight there's little
387 incentive to destroy them.
389 A clone is a writable volume or file system whose initial contents are the same
391 As with snapshots, creating a clone is nearly instantaneous, and initially
392 consumes no additional space.
394 Clones can only be created from a snapshot.
395 When a snapshot is cloned, it creates an implicit dependency between the parent
397 Even though the clone is created somewhere else in the dataset hierarchy, the
398 original snapshot cannot be destroyed as long as a clone exists.
401 property exposes this dependency, and the
403 command lists any such dependencies, if they exist.
405 The clone parent-child dependency relationship can be reversed by using the
410 file system to become a clone of the specified file system, which makes it
411 possible to destroy the file system that the clone was created from.
413 Creating a ZFS file system is a simple operation, so the number of file systems
414 per system is likely to be numerous.
415 To cope with this, ZFS automatically manages mounting and unmounting file
416 systems without the need to edit the
419 All automatically managed file systems are mounted by ZFS at boot time.
421 By default, file systems are mounted under
425 is the name of the file system in the ZFS namespace.
426 Directories are created and destroyed as needed.
428 A file system can also have a mount point set in the
431 This directory is created as needed, and ZFS automatically mounts the file
433 .Nm zfs Cm mount Fl a
440 property can be inherited, so if
446 automatically inherits a mount point of
447 .Pa /export/stuff/user .
453 prevents the file system from being mounted.
455 If needed, ZFS file systems can also be managed with traditional tools
461 If a file system's mount point is set to
463 ZFS makes no attempt to manage the file system, and the administrator is
464 responsible for mounting and unmounting the file system.
466 Deduplication is the process for removing redundant data at the block level,
467 reducing the total amount of data stored. If a file system has the
469 property enabled, duplicate data blocks are removed synchronously. The result
470 is that only unique data is stored and common components are shared among files.
472 Deduplicating data is a very resource-intensive operation. It is generally
473 recommended that you have at least 1.25 GiB of RAM per 1 TiB of storage when
474 you enable deduplication. Calculating the exact requirement depends heavily
475 on the type of data stored in the pool.
477 Enabling deduplication on an improperly-designed system can result in
478 performance issues (slow IO and administrative operations). It can potentially
479 lead to problems importing a pool due to memory exhaustion. Deduplication
480 can consume significant processing power (CPU) and memory as well as generate
483 Before creating a pool with deduplication enabled, ensure that you have planned
484 your hardware requirements appropriately and implemented appropriate recovery
485 practices, such as regular backups. As an alternative to deduplication
488 as a less resource-intensive alternative.
489 .Ss Native Properties
490 Properties are divided into two types, native properties and user-defined
495 Native properties either export internal statistics or control ZFS behavior.
496 In addition, native properties are either editable or read-only.
497 User properties have no effect on ZFS behavior, but you can use them to annotate
498 datasets in a way that is meaningful in your environment.
499 For more information about user properties, see the
503 Every dataset has a set of properties that export statistics about the dataset
504 as well as control various behaviors.
505 Properties are inherited from the parent unless overridden by the child.
506 Some properties apply only to certain types of datasets
507 .Pq file systems, volumes, or snapshots .
509 The values of numeric properties can be specified using human-readable suffixes
519 The following are all valid
522 .Li 1536M, 1.5g, 1.50GB .
524 The values of non-numeric properties are case sensitive and must be lowercase,
531 The following native properties consist of read-only statistics about the
533 These properties can be neither set, nor inherited.
534 Native properties apply to all dataset types unless otherwise noted.
535 .Bl -tag -width "usedbyrefreservation"
537 The amount of space available to the dataset and all its children, assuming that
538 there is no other activity in the pool.
539 Because space is shared within a pool, availability can be limited by any number
540 of factors, including physical pool size, quotas, reservations, or other
541 datasets within the pool.
543 This property can also be referred to by its shortened column name,
546 For non-snapshots, the compression ratio achieved for the
548 space of this dataset, expressed as a multiplier.
551 property includes descendant datasets, and, for clones, does not include the
552 space shared with the origin snapshot.
558 Compression can be turned on by running:
559 .Nm zfs Cm set Sy compression Ns = Ns Sy on Ar dataset .
563 The transaction group (txg) in which the dataset was created. Bookmarks have
566 as the snapshot they are initially tied to. This property is suitable for
567 ordering a list of snapshots, e.g. for incremental send and receive.
569 The time this dataset was created.
571 For snapshots, this property is a comma-separated list of filesystems or volumes
572 which are clones of this snapshot.
575 property is this snapshot.
578 property is not empty, then this snapshot can not be destroyed
585 The roles of origin and clone can be swapped by promoting the clone with the
591 if the snapshot has been marked for deferred destroy by using the
592 .Nm zfs Cm destroy Fl d
594 Otherwise, the property is
596 .It Sy encryptionroot
597 For encrypted datasets, indicates where the dataset is currently inheriting its
598 encryption key from. Loading or unloading a key for the
600 will implicitly load / unload the key for any inheriting datasets (see
603 .Nm zfs Cm unload-key
605 Clones will always share an
606 encryption key with their origin. See the
609 .It Sy filesystem_count
610 The total number of filesystems and volumes that exist under this location in
612 This value is only available when a
614 has been set somewhere in the tree under which the dataset resides.
616 Indicates if an encryption key is currently loaded into ZFS. The possible
625 .Nm zfs Cm unload-key .
627 The 64 bit GUID of this dataset or bookmark which does not change over its
628 entire lifetime. When a snapshot is sent to another pool, the received
629 snapshot has the same GUID. Thus, the
631 is suitable to identify a snapshot across pools.
632 .It Sy logicalreferenced
633 The amount of space that is
635 accessible by this dataset.
639 The logical space ignores the effect of the
643 properties, giving a quantity closer to the amount of data that applications
645 However, it does include space consumed by metadata.
647 This property can also be referred to by its shortened column name,
650 The amount of space that is
652 consumed by this dataset and all its descendents.
656 The logical space ignores the effect of the
660 properties, giving a quantity closer to the amount of data that applications
662 However, it does include space consumed by metadata.
664 This property can also be referred to by its shortened column name,
667 For file systems, indicates whether the file system is currently mounted.
668 This property can be either
673 For cloned file systems or volumes, the snapshot from which the clone was
678 .It Sy receive_resume_token
679 For filesystems or volumes which have saved partially-completed state from
681 this opaque token can be provided to
683 to resume and complete the
686 The amount of data that is accessible by this dataset, which may or may not be
687 shared with other datasets in the pool.
688 When a snapshot or clone is created, it initially references the same amount of
689 space as the file system or snapshot it was created from, since its contents are
692 This property can also be referred to by its shortened column name,
694 .It Sy refcompressratio
695 The compression ratio achieved for the
697 space of this dataset, expressed as a multiplier.
701 .It Sy snapshot_count
702 The total number of snapshots that exist under this location in the dataset
704 This value is only available when a
706 has been set somewhere in the tree under which the dataset resides.
714 The amount of space consumed by this dataset and all its descendents.
715 This is the value that is checked against this dataset's quota and reservation.
716 The space used does not include this dataset's reservation, but does take into
717 account the reservations of any descendent datasets.
718 The amount of space that a dataset consumes from its parent, as well as the
719 amount of space that is freed if this dataset is recursively destroyed, is the
720 greater of its space used and its reservation.
722 The used space of a snapshot
727 is space that is referenced exclusively by this snapshot.
728 If this snapshot is destroyed, the amount of
731 Space that is shared by multiple snapshots isn't accounted for in this metric.
732 When a snapshot is destroyed, space that was previously shared with this
733 snapshot can become unique to snapshots adjacent to it, thus changing the used
734 space of those snapshots.
735 The used space of the latest snapshot can also be affected by changes in the
739 space of a snapshot is a subset of the
741 space of the snapshot.
743 The amount of space used, available, or referenced does not take into account
745 Pending changes are generally accounted for within a few seconds.
746 Committing a change to a disk using
750 does not necessarily guarantee that the space usage information is updated
755 properties decompose the
757 properties into the various reasons that space is used.
760 .Sy usedbychildren No +
761 .Sy usedbydataset No +
762 .Sy usedbyrefreservation No +
763 .Sy usedbysnapshots .
764 These properties are only available for datasets created on
768 .It Sy usedbychildren
769 The amount of space used by children of this dataset, which would be freed if
770 all the dataset's children were destroyed.
772 The amount of space used by this dataset itself, which would be freed if the
773 dataset were destroyed
774 .Po after first removing any
776 and destroying any necessary snapshots or descendents
778 .It Sy usedbyrefreservation
779 The amount of space used by a
781 set on this dataset, which would be freed if the
784 .It Sy usedbysnapshots
785 The amount of space consumed by snapshots of this dataset.
786 In particular, it is the amount of space that would be freed if all of this
787 dataset's snapshots were destroyed.
788 Note that this is not simply the sum of the snapshots'
790 properties because space can be shared by multiple snapshots.
791 .It Sy userused Ns @ Ns Em user
792 The amount of space consumed by the specified user in this dataset.
793 Space is charged to the owner of each file, as displayed by
795 The amount of space charged is displayed by
801 subcommand for more information.
803 Unprivileged users can access only their own space usage.
804 The root user, or a user who has been granted the
808 can access everyone's usage.
811 .Sy userused Ns @ Ns Em ...
812 properties are not displayed by
813 .Nm zfs Cm get Sy all .
814 The user's name must be appended after the @ symbol, using one of the following
816 .Bl -bullet -width ""
830 .Sy joe.smith@mydomain
839 Files created on Linux always have POSIX owners.
840 .It Sy userobjused Ns @ Ns Em user
843 property is similar to
845 but instead it counts the number of objects consumed by a user. This property
846 counts all objects allocated on behalf of the user, it may differ from the
847 results of system tools such as
852 is set on a file system additional objects will be created per-file to store
853 extended attributes. These additional objects are reflected in the
855 value and are counted against the user's
857 When a file system is configured to use
859 no additional internal objects are normally required.
861 This property is set to the number of user holds on this snapshot.
862 User holds are set by using the
865 .It Sy groupused Ns @ Ns Em group
866 The amount of space consumed by the specified group in this dataset.
867 Space is charged to the group of each file, as displayed by
870 .Sy userused Ns @ Ns Em user
871 property for more information.
873 Unprivileged users can only access their own groups' space usage.
874 The root user, or a user who has been granted the
878 can access all groups' usage.
879 .It Sy groupobjused Ns @ Ns Em group
880 The number of objects consumed by the specified group in this dataset.
881 Multiple objects may be charged to the group for each file when extended
882 attributes are in use. See the
883 .Sy userobjused Ns @ Ns Em user
884 property for more information.
886 Unprivileged users can only access their own groups' space usage.
887 The root user, or a user who has been granted the
891 can access all groups' usage.
893 For volumes, specifies the block size of the volume.
896 cannot be changed once the volume has been written, so it should be set at
897 volume creation time.
900 for volumes is 8 Kbytes.
901 Any power of 2 from 512 bytes to 128 Kbytes is valid.
903 This property can also be referred to by its shortened column name,
908 by this dataset, that was written since the previous snapshot
909 .Pq i.e. that is not referenced by the previous snapshot .
910 .It Sy written Ns @ Ns Em snapshot
913 space written to this dataset since the specified snapshot.
914 This is the space that is referenced by this dataset but was not referenced by
915 the specified snapshot.
919 may be specified as a short snapshot name
920 .Po just the part after the
923 in which case it will be interpreted as a snapshot in the same filesystem as
927 may be a full snapshot name
928 .Po Em filesystem Ns @ Ns Em snapshot Pc ,
929 which for clones may be a snapshot in the origin's filesystem
930 .Pq or the origin of the origin's filesystem, etc.
933 The following native properties can be used to change the behavior of a ZFS
937 .Sy aclinherit Ns = Ns Sy discard Ns | Ns Sy noallow Ns | Ns
938 .Sy restricted Ns | Ns Sy passthrough Ns | Ns Sy passthrough-x
940 Controls how ACEs are inherited when files and directories are created.
941 .Bl -tag -width "passthrough-x"
943 does not inherit any ACEs.
945 only inherits inheritable ACEs that specify
953 permissions when the ACE is inherited.
955 inherits all inheritable ACEs without any modifications.
964 ACEs inherit the execute permission only if the file creation mode also requests
968 When the property value is set to
970 files are created with a mode determined by the inheritable ACEs.
971 If no inheritable ACEs exist that affect the mode, then the mode is set in
972 accordance to the requested mode from the application.
976 property does not apply to posix ACLs.
977 .It Sy acltype Ns = Ns Sy off Ns | Ns Sy noacl Ns | Ns Sy posixacl
978 Controls whether ACLs are enabled and if so what type of ACL to use.
979 .Bl -tag -width "posixacl"
981 default, when a file system has the
983 property set to off then ACLs are disabled.
988 indicates posix ACLs should be used. Posix ACLs are specific to Linux and are
989 not functional on other platforms. Posix ACLs are stored as an extended
990 attribute and therefore will not overwrite any existing NFSv4 ACLs which
994 To obtain the best performance when setting
996 users are strongly encouraged to set the
998 property. This will result in the posix ACL being stored more efficiently on
999 disk. But as a consequence of this all new extended attributes will only be
1000 accessible from OpenZFS implementations which support the
1004 property for more details.
1005 .It Sy atime Ns = Ns Sy on Ns | Ns Sy off
1006 Controls whether the access time for files is updated when they are read.
1007 Turning this property off avoids producing write traffic when reading files and
1008 can result in significant performance gains, though it might confuse mailers
1009 and other similar utilities. The values
1013 are equivalent to the
1017 mount options. The default value is
1022 .It Sy canmount Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy noauto
1023 If this property is set to
1025 the file system cannot be mounted, and is ignored by
1026 .Nm zfs Cm mount Fl a .
1027 Setting this property to
1029 is similar to setting the
1033 except that the dataset still has a normal
1035 property, which can be inherited.
1036 Setting this property to
1038 allows datasets to be used solely as a mechanism to inherit properties.
1039 One example of setting
1040 .Sy canmount Ns = Ns Sy off
1041 is to have two datasets with the same
1043 so that the children of both datasets appear in the same directory, but might
1044 have different inherited characteristics.
1048 a dataset can only be mounted and unmounted explicitly.
1049 The dataset is not mounted automatically when the dataset is created or
1050 imported, nor is it mounted by the
1051 .Nm zfs Cm mount Fl a
1052 command or unmounted by the
1053 .Nm zfs Cm unmount Fl a
1056 This property is not inherited.
1058 .Sy checksum Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy fletcher2 Ns | Ns
1059 .Sy fletcher4 Ns | Ns Sy sha256 Ns | Ns Sy noparity Ns | Ns
1060 .Sy sha512 Ns | Ns Sy skein Ns | Ns Sy edonr
1062 Controls the checksum used to verify data integrity.
1063 The default value is
1065 which automatically selects an appropriate algorithm
1068 but this may change in future releases
1072 disables integrity checking on user data.
1075 not only disables integrity but also disables maintaining parity for user data.
1076 This setting is used internally by a dump device residing on a RAID-Z pool and
1077 should not be used by any other dataset.
1078 Disabling checksums is
1080 a recommended practice.
1087 checksum algorithms require enabling the appropriate features on the pool.
1089 .Xr zpool-features 5
1090 for more information on these algorithms.
1092 Changing this property affects only newly-written data.
1094 .Sy compression Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy gzip Ns | Ns
1095 .Sy gzip- Ns Em N Ns | Ns Sy lz4 Ns | Ns Sy lzjb Ns | Ns Sy zle
1097 Controls the compression algorithm used for this dataset.
1099 Setting compression to
1101 indicates that the current default compression algorithm should be used.
1102 The default balances compression and decompression speed, with compression ratio
1103 and is expected to work well on a wide variety of workloads.
1104 Unlike all other settings for this property,
1106 does not select a fixed compression type.
1107 As new compression algorithms are added to ZFS and enabled on a pool, the
1108 default compression algorithm may change.
1109 The current default compression algorithm is either
1118 compression algorithm is a high-performance replacement for the
1121 It features significantly faster compression and decompression, as well as a
1122 moderately higher compression ratio than
1124 but can only be used on pools with the
1129 .Xr zpool-features 5
1130 for details on ZFS feature flags and the
1136 compression algorithm is optimized for performance while providing decent data
1141 compression algorithm uses the same compression as the
1146 level by using the value
1150 is an integer from 1
1153 .Pq best compression ratio .
1158 .Po which is also the default for
1164 compression algorithm compresses runs of zeros.
1166 This property can also be referred to by its shortened column name
1168 Changing this property affects only newly-written data.
1170 .Sy context Ns = Ns Sy none Ns | Ns
1171 .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level
1173 This flag sets the SELinux context for all files in the file system under
1174 a mount point for that file system. See
1176 for more information.
1178 .Sy fscontext Ns = Ns Sy none Ns | Ns
1179 .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level
1181 This flag sets the SELinux context for the file system file system being
1184 for more information.
1186 .Sy defcontext Ns = Ns Sy none Ns | Ns
1187 .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level
1189 This flag sets the SELinux default context for unlabeled files. See
1191 for more information.
1193 .Sy rootcontext Ns = Ns Sy none Ns | Ns
1194 .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level
1196 This flag sets the SELinux context for the root inode of the file system. See
1198 for more information.
1199 .It Sy copies Ns = Ns Sy 1 Ns | Ns Sy 2 Ns | Ns Sy 3
1200 Controls the number of copies of data stored for this dataset.
1201 These copies are in addition to any redundancy provided by the pool, for
1202 example, mirroring or RAID-Z.
1203 The copies are stored on different disks, if possible.
1204 The space used by multiple copies is charged to the associated file and dataset,
1207 property and counting against quotas and reservations.
1209 Changing this property only affects newly-written data.
1210 Therefore, set this property at file system creation time by using the
1211 .Fl o Sy copies Ns = Ns Ar N
1214 Remember that ZFS will not import a pool with a missing top-level vdev. Do
1216 create, for example a two-disk striped pool and set
1218 on some datasets thinking you have setup redundancy for them. When a disk
1219 fails you will not be able to import the pool and will have lost all of your
1221 .It Sy devices Ns = Ns Sy on Ns | Ns Sy off
1222 Controls whether device nodes can be opened on this file system.
1223 The default value is
1229 are equivalent to the
1235 .Sy dnodesize Ns = Ns Sy legacy Ns | Ns Sy auto Ns | Ns Sy 1k Ns | Ns
1236 .Sy 2k Ns | Ns Sy 4k Ns | Ns Sy 8k Ns | Ns Sy 16k
1238 Specifies a compatibility mode or literal value for the size of dnodes in the
1239 file system. The default value is
1241 Setting this property to a value other than
1243 requires the large_dnode pool feature to be enabled.
1249 if the dataset uses the
1251 property setting and the workload makes heavy use of extended attributes. This
1252 may be applicable to SELinux-enabled systems, Lustre servers, and Samba
1253 servers, for example. Literal values are supported for cases where the optimal
1254 size is known in advance and for performance testing.
1260 if you need to receive a send stream of this dataset on a pool that doesn't
1261 enable the large_dnode feature, or if you need to import this pool on a system
1262 that doesn't support the large_dnode feature.
1264 This property can also be referred to by its shortened column name,
1267 .Sy encryption Ns = Ns Sy off Ns | Ns Sy on Ns | Ns Sy aes-128-ccm Ns | Ns
1268 .Sy aes-192-ccm Ns | Ns Sy aes-256-ccm Ns | Ns Sy aes-128-gcm Ns | Ns
1269 .Sy aes-192-gcm Ns | Ns Sy aes-256-gcm
1271 Controls the encryption cipher suite (block cipher, key length, and mode) used
1272 for this dataset. Requires the
1274 feature to be enabled on the pool.
1277 to be set at dataset creation time.
1280 .Sy encryption Ns = Ns Sy on
1281 when creating a dataset indicates that the default encryption suite will be
1282 selected, which is currently
1284 In order to provide consistent data protection, encryption must be specified at
1285 dataset creation time and it cannot be changed afterwards.
1287 For more details and caveats about encryption see the
1290 .It Sy keyformat Ns = Ns Sy raw Ns | Ns Sy hex Ns | Ns Sy passphrase
1291 Controls what format the user's encryption key will be provided as. This
1292 property is only set when the dataset is encrypted.
1294 Raw keys and hex keys must be 32 bytes long (regardless of the chosen
1295 encryption suite) and must be randomly generated. A raw key can be generated
1296 with the following command:
1298 # dd if=/dev/urandom of=/path/to/output/key bs=32 count=1
1301 Passphrases must be between 8 and 512 bytes long and will be processed through
1302 PBKDF2 before being used (see the
1304 property). Even though the
1305 encryption suite cannot be changed after dataset creation, the keyformat can be
1307 .Nm zfs Cm change-key .
1309 .Sy keylocation Ns = Ns Sy prompt Ns | Ns Sy file:// Ns Em </absolute/file/path>
1311 Controls where the user's encryption key will be loaded from by default for
1315 .Nm zfs Cm mount Cm -l . This property is
1316 only set for encrypted datasets which are encryption roots. If unspecified, the
1320 Even though the encryption suite cannot be changed after dataset creation, the
1321 keylocation can be with either
1324 .Nm zfs Cm change-key .
1327 is selected ZFS will ask for the key at the command prompt when it is required
1328 to access the encrypted data (see
1330 for details). This setting will also allow the key to be passed in via STDIN,
1331 but users should be careful not to place keys which should be kept secret on
1332 the command line. If a file URI is selected, the key will be loaded from the
1333 specified absolute file path.
1334 .It Sy pbkdf2iters Ns = Ns Ar iterations
1335 Controls the number of PBKDF2 iterations that a
1337 encryption key should be run through when processing it into an encryption key.
1338 This property is only defined when encryption is enabled and a keyformat of
1340 is selected. The goal of PBKDF2 is to significantly increase the
1341 computational difficulty needed to brute force a user's passphrase. This is
1342 accomplished by forcing the attacker to run each passphrase through a
1343 computationally expensive hashing function many times before they arrive at the
1344 resulting key. A user who actually knows the passphrase will only have to pay
1345 this cost once. As CPUs become better at processing, this number should be
1346 raised to ensure that a brute force attack is still not possible. The current
1351 This property may be changed with
1352 .Nm zfs Cm change-key .
1353 .It Sy exec Ns = Ns Sy on Ns | Ns Sy off
1354 Controls whether processes can be executed from within this file system.
1355 The default value is
1361 are equivalent to the
1366 .It Sy filesystem_limit Ns = Ns Em count Ns | Ns Sy none
1367 Limits the number of filesystems and volumes that can exist under this point in
1369 The limit is not enforced if the user is allowed to change the limit.
1371 .Sy filesystem_limit
1374 a descendent of a filesystem that already has a
1375 .Sy filesystem_limit
1376 does not override the ancestor's
1377 .Sy filesystem_limit ,
1378 but rather imposes an additional limit.
1379 This feature must be enabled to be used
1381 .Xr zpool-features 5
1383 .It Sy mountpoint Ns = Ns Pa path Ns | Ns Sy none Ns | Ns Sy legacy
1384 Controls the mount point used for this file system.
1387 section for more information on how this property is used.
1391 property is changed for a file system, the file system and any children that
1392 inherit the mount point are unmounted.
1395 then they remain unmounted.
1396 Otherwise, they are automatically remounted in the new location if the property
1401 or if they were mounted before the property was changed.
1402 In addition, any shared file systems are unshared and shared in the new
1404 .It Sy nbmand Ns = Ns Sy on Ns | Ns Sy off
1405 Controls whether the file system should be mounted with
1407 .Pq Non Blocking mandatory locks .
1408 This is used for SMB clients.
1409 Changes to this property only take effect when the file system is umounted and
1413 for more information on
1415 mounts. This property is not used on Linux.
1416 .It Sy overlay Ns = Ns Sy off Ns | Ns Sy on
1417 Allow mounting on a busy directory or a directory which already contains
1418 files or directories. This is the default mount behavior for Linux file systems.
1419 For consistency with OpenZFS on other platforms overlay mounts are
1423 to enable overlay mounts.
1424 .It Sy primarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1425 Controls what is cached in the primary cache
1427 If this property is set to
1429 then both user data and metadata is cached.
1430 If this property is set to
1432 then neither user data nor metadata is cached.
1433 If this property is set to
1435 then only metadata is cached.
1436 The default value is
1438 .It Sy quota Ns = Ns Em size Ns | Ns Sy none
1439 Limits the amount of space a dataset and its descendents can consume.
1440 This property enforces a hard limit on the amount of space used.
1441 This includes all space consumed by descendents, including file systems and
1443 Setting a quota on a descendent of a dataset that already has a quota does not
1444 override the ancestor's quota, but rather imposes an additional limit.
1446 Quotas cannot be set on volumes, as the
1448 property acts as an implicit quota.
1449 .It Sy snapshot_limit Ns = Ns Em count Ns | Ns Sy none
1450 Limits the number of snapshots that can be created on a dataset and its
1454 on a descendent of a dataset that already has a
1456 does not override the ancestor's
1457 .Sy snapshot_limit ,
1458 but rather imposes an additional limit.
1459 The limit is not enforced if the user is allowed to change the limit.
1460 For example, this means that recursive snapshots taken from the global zone are
1461 counted against each delegated dataset within a zone.
1462 This feature must be enabled to be used
1464 .Xr zpool-features 5
1466 .It Sy userquota@ Ns Em user Ns = Ns Em size Ns | Ns Sy none
1467 Limits the amount of space consumed by the specified user.
1468 User space consumption is identified by the
1469 .Sy userspace@ Ns Em user
1472 Enforcement of user quotas may be delayed by several seconds.
1473 This delay means that a user might exceed their quota before the system notices
1474 that they are over quota and begins to refuse additional writes with the
1478 .Nm zfs Cm userspace
1479 subcommand for more information.
1481 Unprivileged users can only access their own groups' space usage.
1482 The root user, or a user who has been granted the
1486 can get and set everyone's quota.
1488 This property is not available on volumes, on file systems before version 4, or
1489 on pools before version 15.
1491 .Sy userquota@ Ns Em ...
1492 properties are not displayed by
1493 .Nm zfs Cm get Sy all .
1494 The user's name must be appended after the
1496 symbol, using one of the following forms:
1504 .Em POSIX numeric ID
1511 .Sy joe.smith@mydomain
1520 Files created on Linux always have POSIX owners.
1521 .It Sy userobjquota@ Ns Em user Ns = Ns Em size Ns | Ns Sy none
1526 but it limits the number of objects a user can create. Please refer to
1528 for more information about how objects are counted.
1529 .It Sy groupquota@ Ns Em group Ns = Ns Em size Ns | Ns Sy none
1530 Limits the amount of space consumed by the specified group.
1531 Group space consumption is identified by the
1532 .Sy groupused@ Ns Em group
1535 Unprivileged users can access only their own groups' space usage.
1536 The root user, or a user who has been granted the
1540 can get and set all groups' quotas.
1541 .It Sy groupobjquota@ Ns Em group Ns = Ns Em size Ns | Ns Sy none
1546 but it limits number of objects a group can consume. Please refer to
1548 for more information about how objects are counted.
1549 .It Sy readonly Ns = Ns Sy on Ns | Ns Sy off
1550 Controls whether this dataset can be modified.
1551 The default value is
1557 are equivalent to the
1563 This property can also be referred to by its shortened column name,
1565 .It Sy recordsize Ns = Ns Em size
1566 Specifies a suggested block size for files in the file system.
1567 This property is designed solely for use with database workloads that access
1568 files in fixed-size records.
1569 ZFS automatically tunes block sizes according to internal algorithms optimized
1570 for typical access patterns.
1572 For databases that create very large files but access them in small random
1573 chunks, these algorithms may be suboptimal.
1576 greater than or equal to the record size of the database can result in
1577 significant performance gains.
1578 Use of this property for general purpose file systems is strongly discouraged,
1579 and may adversely affect performance.
1581 The size specified must be a power of two greater than or equal to 512 and less
1582 than or equal to 128 Kbytes.
1585 feature is enabled on the pool, the size may be up to 1 Mbyte.
1587 .Xr zpool-features 5
1588 for details on ZFS feature flags.
1590 Changing the file system's
1592 affects only files created afterward; existing files are unaffected.
1594 This property can also be referred to by its shortened column name,
1596 .It Sy redundant_metadata Ns = Ns Sy all Ns | Ns Sy most
1597 Controls what types of metadata are stored redundantly.
1598 ZFS stores an extra copy of metadata, so that if a single block is corrupted,
1599 the amount of user data lost is limited.
1600 This extra copy is in addition to any redundancy provided at the pool level
1601 .Pq e.g. by mirroring or RAID-Z ,
1602 and is in addition to an extra copy specified by the
1605 .Pq up to a total of 3 copies .
1606 For example if the pool is mirrored,
1607 .Sy copies Ns = Ns 2 ,
1609 .Sy redundant_metadata Ns = Ns Sy most ,
1610 then ZFS stores 6 copies of most metadata, and 4 copies of data and some
1615 ZFS stores an extra copy of all metadata.
1616 If a single on-disk block is corrupt, at worst a single block of user data
1625 ZFS stores an extra copy of most types of metadata.
1626 This can improve performance of random writes, because less metadata must be
1628 In practice, at worst about 100 blocks
1633 of user data can be lost if a single on-disk block is corrupt.
1634 The exact behavior of which metadata blocks are stored redundantly may change in
1637 The default value is
1639 .It Sy refquota Ns = Ns Em size Ns | Ns Sy none
1640 Limits the amount of space a dataset can consume.
1641 This property enforces a hard limit on the amount of space used.
1642 This hard limit does not include space used by descendents, including file
1643 systems and snapshots.
1644 .It Sy refreservation Ns = Ns Em size Ns | Ns Sy none
1645 The minimum amount of space guaranteed to a dataset, not including its
1647 When the amount of space used is below this value, the dataset is treated as if
1648 it were taking up the amount of space specified by
1649 .Sy refreservation .
1652 reservation is accounted for in the parent datasets' space used, and counts
1653 against the parent datasets' quotas and reservations.
1657 is set, a snapshot is only allowed if there is enough free pool space outside of
1658 this reservation to accommodate the current number of
1660 bytes in the dataset.
1662 This property can also be referred to by its shortened column name,
1664 .It Sy relatime Ns = Ns Sy on Ns | Ns Sy off
1665 Controls the manner in which the access time is updated when
1667 is set. Turning this property on causes the access time to be updated relative
1668 to the modify or change time. Access time is only updated if the previous
1669 access time was earlier than the current modify or change time or if the
1670 existing access time hasn't been updated within the past 24 hours. The default
1677 are equivalent to the
1682 .It Sy reservation Ns = Ns Em size Ns | Ns Sy none
1683 The minimum amount of space guaranteed to a dataset and its descendants.
1684 When the amount of space used is below this value, the dataset is treated as if
1685 it were taking up the amount of space specified by its reservation.
1686 Reservations are accounted for in the parent datasets' space used, and count
1687 against the parent datasets' quotas and reservations.
1689 This property can also be referred to by its shortened column name,
1691 .It Sy secondarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1692 Controls what is cached in the secondary cache
1694 If this property is set to
1696 then both user data and metadata is cached.
1697 If this property is set to
1699 then neither user data nor metadata is cached.
1700 If this property is set to
1702 then only metadata is cached.
1703 The default value is
1705 .It Sy setuid Ns = Ns Sy on Ns | Ns Sy off
1706 Controls whether the setuid bit is respected for the file system.
1707 The default value is
1713 are equivalent to the
1718 .It Sy sharesmb Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1719 Controls whether the file system is shared by using
1720 .Sy Samba USERSHARES
1721 and what options are to be used. Otherwise, the file system is automatically
1722 shared and unshared with the
1726 commands. If the property is set to on, the
1728 command is invoked to create a
1731 Because SMB shares requires a resource name, a unique resource name is
1732 constructed from the dataset name. The constructed name is a copy of the
1733 dataset name except that the characters in the dataset name, which would be
1734 invalid in the resource name, are replaced with underscore (_) characters.
1735 Linux does not currently support additional options which might be available
1742 the file systems are unshared.
1744 The share is created with the ACL (Access Control List) "Everyone:F" ("F"
1745 stands for "full permissions", ie. read and write permissions) and no guest
1746 access (which means Samba must be able to authenticate a real user, system
1747 passwd/shadow, LDAP or smbpasswd based) by default. This means that any
1748 additional access control (disallow specific user specific access etc) must
1749 be done on the underlying file system.
1750 .It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1751 Controls whether the file system is shared via NFS, and what options are to be
1753 A file system with a
1759 command and entries in the
1762 Otherwise, the file system is automatically shared and unshared with the
1767 If the property is set to
1769 the dataset is shared using the default options:
1771 .Em sec=sys,rw,crossmnt,no_subtree_check,no_root_squash
1775 for the meaning of the default options. Otherwise, the
1777 command is invoked with options equivalent to the contents of this property.
1781 property is changed for a dataset, the dataset and any children inheriting the
1782 property are re-shared with the new options, only if the property was previously
1784 or if they were shared before the property was changed.
1785 If the new property is
1787 the file systems are unshared.
1788 .It Sy logbias Ns = Ns Sy latency Ns | Ns Sy throughput
1789 Provide a hint to ZFS about handling of synchronous requests in this dataset.
1795 ZFS will use pool log devices
1797 to handle the requests at low latency.
1802 ZFS will not use configured pool log devices.
1803 ZFS will instead optimize synchronous operations for global pool throughput and
1804 efficient use of resources.
1805 .It Sy snapdev Ns = Ns Sy hidden Ns | Ns Sy visible
1806 Controls whether the volume snapshot devices under
1807 .Em /dev/zvol/<pool>
1808 are hidden or visible. The default value is
1810 .It Sy snapdir Ns = Ns Sy hidden Ns | Ns Sy visible
1811 Controls whether the
1813 directory is hidden or visible in the root of the file system as discussed in
1817 The default value is
1819 .It Sy sync Ns = Ns Sy standard Ns | Ns Sy always Ns | Ns Sy disabled
1820 Controls the behavior of synchronous requests
1821 .Pq e.g. fsync, O_DSYNC .
1825 specified behavior of ensuring all synchronous requests are written to stable
1826 storage and all devices are flushed to ensure data is not cached by device
1828 .Pq this is the default .
1830 causes every file system transaction to be written and flushed before its
1831 system call returns.
1832 This has a large performance penalty.
1834 disables synchronous requests.
1835 File system transactions are only committed to stable storage periodically.
1836 This option will give the highest performance.
1837 However, it is very dangerous as ZFS would be ignoring the synchronous
1838 transaction demands of applications such as databases or NFS.
1839 Administrators should only use this option when the risks are understood.
1840 .It Sy version Ns = Ns Em N Ns | Ns Sy current
1841 The on-disk version of this file system, which is independent of the pool
1843 This property can only be set to later supported versions.
1847 .It Sy volsize Ns = Ns Em size
1848 For volumes, specifies the logical size of the volume.
1849 By default, creating a volume establishes a reservation of equal size.
1850 For storage pools with a version number of 9 or higher, a
1855 are reflected in an equivalent change to the reservation
1861 can only be set to a multiple of
1865 The reservation is kept equal to the volume's logical size to prevent unexpected
1866 behavior for consumers.
1867 Without the reservation, the volume could run out of space, resulting in
1868 undefined behavior or data corruption, depending on how the volume is used.
1869 These effects can also occur when the volume size is changed while it is in use
1870 .Pq particularly when shrinking the size .
1871 Extreme care should be used when adjusting the volume size.
1873 Though not recommended, a
1876 .Qq thin provisioning
1878 can be created by specifying the
1881 .Nm zfs Cm create Fl V
1882 command, or by changing the reservation after the volume has been created.
1885 is a volume where the reservation is less then the volume size.
1886 Consequently, writes to a sparse volume can fail with
1888 when the pool is low on space.
1889 For a sparse volume, changes to
1891 are not reflected in the reservation.
1892 .It Sy volmode Ns = Ns Cm default | full | geom | dev | none
1893 This property specifies how volumes should be exposed to the OS.
1896 exposes volumes as fully fledged block devices, providing maximal
1897 functionality. The value
1899 is just an alias for
1901 and is kept for compatibility.
1904 hides its partitions.
1905 Volumes with property set to
1907 are not exposed outside ZFS, but can be snapshoted, cloned, replicated, etc,
1908 that can be suitable for backup purposes.
1911 means that volumes exposition is controlled by system-wide tunable
1918 are encoded as 1, 2 and 3 respectively.
1919 The default values is
1921 .It Sy vscan Ns = Ns Sy on Ns | Ns Sy off
1922 Controls whether regular files should be scanned for viruses when a file is
1924 In addition to enabling this property, the virus scan service must also be
1925 enabled for virus scanning to occur.
1926 The default value is
1928 This property is not used on Linux.
1929 .It Sy xattr Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy sa
1930 Controls whether extended attributes are enabled for this file system. Two
1931 styles of extended attributes are supported either directory based or system
1934 The default value of
1936 enables directory based extended attributes. This style of extended attribute
1937 imposes no practical limit on either the size or number of attributes which
1938 can be set on a file. Although under Linux the
1942 system calls limit the maximum size to 64K. This is the most compatible
1943 style of extended attribute and is supported by all OpenZFS implementations.
1945 System attribute based xattrs can be enabled by setting the value to
1947 The key advantage of this type of xattr is improved performance. Storing
1948 extended attributes as system attributes significantly decreases the amount of
1949 disk IO required. Up to 64K of data may be stored per-file in the space
1950 reserved for system attributes. If there is not enough space available for
1951 an extended attribute then it will be automatically written as a directory
1952 based xattr. System attribute based extended attributes are not accessible
1953 on platforms which do not support the
1957 The use of system attribute based xattrs is strongly encouraged for users of
1958 SELinux or posix ACLs. Both of these features heavily rely of extended
1959 attributes and benefit significantly from the reduced access time.
1965 are equivalent to the
1970 .It Sy zoned Ns = Ns Sy on Ns | Ns Sy off
1971 Controls whether the dataset is managed from a non-global zone. Zones are a
1972 Solaris feature and are not relevant on Linux. The default value is
1976 The following three properties cannot be changed after the file system is
1977 created, and therefore, should be set when the file system is created.
1978 If the properties are not set with the
1982 commands, these properties are inherited from the parent dataset.
1983 If the parent dataset lacks these properties due to having been created prior to
1984 these features being supported, the new file system will have the default values
1985 for these properties.
1988 .Sy casesensitivity Ns = Ns Sy sensitive Ns | Ns
1989 .Sy insensitive Ns | Ns Sy mixed
1991 Indicates whether the file name matching algorithm used by the file system
1992 should be case-sensitive, case-insensitive, or allow a combination of both
1994 The default value for the
2002 file systems have case-sensitive file names.
2008 property indicates that the file system can support requests for both
2009 case-sensitive and case-insensitive matching behavior.
2010 Currently, case-insensitive matching behavior on a file system that supports
2011 mixed behavior is limited to the SMB server product.
2012 For more information about the
2014 value behavior, see the "ZFS Administration Guide".
2016 .Sy normalization Ns = Ns Sy none Ns | Ns Sy formC Ns | Ns
2017 .Sy formD Ns | Ns Sy formKC Ns | Ns Sy formKD
2019 Indicates whether the file system should perform a
2021 normalization of file names whenever two file names are compared, and which
2022 normalization algorithm should be used.
2023 File names are always stored unmodified, names are normalized as part of any
2025 If this property is set to a legal value other than
2029 property was left unspecified, the
2031 property is automatically set to
2033 The default value of the
2037 This property cannot be changed after the file system is created.
2038 .It Sy utf8only Ns = Ns Sy on Ns | Ns Sy off
2039 Indicates whether the file system should reject file names that include
2040 characters that are not present in the
2043 If this property is explicitly set to
2045 the normalization property must either not be explicitly set or be set to
2047 The default value for the
2051 This property cannot be changed after the file system is created.
2055 .Sy casesensitivity ,
2059 properties are also new permissions that can be assigned to non-privileged users
2060 by using the ZFS delegated administration feature.
2061 .Ss "Temporary Mount Point Properties"
2062 When a file system is mounted, either through
2064 for legacy mounts or the
2066 command for normal file systems, its mount options are set according to its
2068 The correlation between properties and mount options is as follows:
2070 PROPERTY MOUNT OPTION
2072 canmount auto/noauto
2076 relatime relatime/norelatime
2081 In addition, these options can be set on a per-mount basis using the
2083 option, without affecting the property that is stored on disk.
2084 The values specified on the command line override the values stored in the
2088 option is an alias for
2089 .Sy nodevices Ns \&, Ns Sy nosetuid .
2090 These properties are reported as
2095 If the properties are changed while the dataset is mounted, the new setting
2096 overrides any temporary settings.
2097 .Ss "User Properties"
2098 In addition to the standard native properties, ZFS supports arbitrary user
2100 User properties have no effect on ZFS behavior, but applications or
2101 administrators can use them to annotate datasets
2102 .Pq file systems, volumes, and snapshots .
2104 User property names must contain a colon
2106 character to distinguish them from native properties.
2107 They may contain lowercase letters, numbers, and the following punctuation
2116 The expected convention is that the property name is divided into two portions
2118 .Em module Ns \&: Ns Em property ,
2119 but this namespace is not enforced by ZFS.
2120 User property names can be at most 256 characters, and cannot begin with a dash
2123 When making programmatic use of user properties, it is strongly suggested to use
2128 component of property names to reduce the chance that two
2129 independently-developed packages use the same property name for different
2132 The values of user properties are arbitrary strings, are always inherited, and
2133 are never validated.
2134 All of the commands that operate on properties
2135 .Po Nm zfs Cm list ,
2140 can be used to manipulate both native properties and user properties.
2143 command to clear a user property.
2144 If the property is not defined in any parent dataset, it is removed entirely.
2145 Property values are limited to 8192 bytes.
2146 .Ss ZFS Volumes as Swap
2147 ZFS volumes may be used as swap devices. After creating the volume with the
2148 .Nm zfs Cm create Fl V
2149 command set up and enable the swap area using the
2153 commands. Do not swap to a file on a ZFS file system. A ZFS swap file
2154 configuration is not supported.
2158 feature allows for the creation of encrypted filesystems and volumes.
2160 will encrypt all user data including file and zvol data, file attributes,
2161 ACLs, permission bits, directory listings, FUID mappings, and userused /
2164 will not encrypt metadata related to the pool structure, including dataset
2165 names, dataset hierarchy, file size, file holes, and dedup tables. Key rotation
2166 is managed internally by the kernel module and changing the user's key does not
2167 require re-encrypting the entire dataset. Datasets can be scrubbed, resilvered,
2168 renamed, and deleted without the encryption keys being loaded (see the
2170 subcommand for more info on key loading).
2172 Creating an encrypted dataset requires specifying the
2176 properties at creation time, along with an optional
2181 After entering an encryption key, the
2182 created dataset will become an encryption root. Any descendant datasets will
2183 inherit their encryption key from the encryption root, meaning that loading,
2184 unloading, or changing the key for the encryption root will implicitly do the
2185 same for all inheriting datasets. If this inheritence is not desired, simply
2190 when creating the child dataset or use
2191 .Nm zfs Cm change-key
2192 to break the relationship. The one exception is that clones will always use
2193 their origin's encryption key. Encryption root inheritence can be tracked via
2198 Encryption changes the behavior of a few
2200 operations. Encryption is applied after compression so compression ratios are
2201 preserved. Normally checksums in ZFS are 256 bits long, but for encrypted data
2202 the checksum is 128 bits of the user-chosen checksum and 128 bits of MAC from
2203 the encryption suite, which provides additional protection against maliciously
2204 altered data. Deduplication is still possible with encryption enabled but for
2205 security, datasets will only dedup against themselves, their snapshots, and
2208 There are a few limitations on encrypted datasets. Encrypted data cannot be
2211 feature. Encrypted datasets may not have
2212 .Sy copies Ns = Ns Em 3
2213 since the implementation stores some encryption metadata where the third copy
2214 would normally be. Since compression is applied before encryption datasets may
2215 be vulnerable to a CRIME-like attack if applications accessing the data allow
2216 for it. Deduplication with encryption will leak information about which blocks
2217 are equivalent in a dataset and will incur an extra CPU cost per block written.
2219 All subcommands that modify state are logged persistently to the pool in their
2223 Displays a help message.
2228 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
2231 Creates a new ZFS file system.
2232 The file system is automatically mounted according to the
2234 property inherited from the parent.
2235 .Bl -tag -width "-o"
2236 .It Fl o Ar property Ns = Ns Ar value
2237 Sets the specified property as if the command
2238 .Nm zfs Cm set Ar property Ns = Ns Ar value
2239 was invoked at the same time the dataset was created.
2240 Any editable ZFS property can also be set at creation time.
2243 options can be specified.
2244 An error results if the same property is specified in multiple
2248 Creates all the non-existing parent datasets.
2249 Datasets created in this manner are automatically mounted according to the
2251 property inherited from their parent.
2252 Any property specified on the command line using the
2255 If the target filesystem already exists, the operation completes successfully.
2261 .Op Fl b Ar blocksize
2262 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
2263 .Fl V Ar size Ar volume
2265 Creates a volume of the given size.
2266 The volume is exported as a block device in
2267 .Pa /dev/zvol/path ,
2270 is the name of the volume in the ZFS namespace.
2271 The size represents the logical size as exported by the device.
2272 By default, a reservation of equal size is created.
2275 is automatically rounded up to the nearest 128 Kbytes to ensure that the volume
2276 has an integral number of blocks regardless of
2278 .Bl -tag -width "-b"
2279 .It Fl b Ar blocksize
2281 .Fl o Sy volblocksize Ns = Ns Ar blocksize .
2282 If this option is specified in conjunction with
2283 .Fl o Sy volblocksize ,
2284 the resulting behavior is undefined.
2285 .It Fl o Ar property Ns = Ns Ar value
2286 Sets the specified property as if the
2287 .Nm zfs Cm set Ar property Ns = Ns Ar value
2288 command was invoked at the same time the dataset was created.
2289 Any editable ZFS property can also be set at creation time.
2292 options can be specified.
2293 An error results if the same property is specified in multiple
2297 Creates all the non-existing parent datasets.
2298 Datasets created in this manner are automatically mounted according to the
2300 property inherited from their parent.
2301 Any property specified on the command line using the
2304 If the target filesystem already exists, the operation completes successfully.
2306 Creates a sparse volume with no reservation.
2310 .Sx Native Properties
2311 section for more information about sparse volumes.
2317 .Ar filesystem Ns | Ns Ar volume
2319 Destroys the given dataset.
2320 By default, the command unshares any file systems that are currently shared,
2321 unmounts any file systems that are currently mounted, and refuses to destroy a
2322 dataset that has active dependents
2323 .Pq children or clones .
2324 .Bl -tag -width "-R"
2326 Recursively destroy all dependents, including cloned file systems outside the
2329 Force an unmount of any file systems using the
2332 This option has no effect on non-file systems or unmounted file systems.
2337 No data will be deleted.
2338 This is useful in conjunction with the
2342 flags to determine what data would be deleted.
2344 Print machine-parsable verbose information about the deleted data.
2346 Recursively destroy all children.
2348 Print verbose information about the deleted data.
2351 Extreme care should be taken when applying either the
2355 options, as they can destroy large portions of a pool and cause unexpected
2356 behavior for mounted file systems in use.
2361 .Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns
2362 .Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ...
2364 The given snapshots are destroyed immediately if and only if the
2368 option would have destroyed it.
2369 Such immediate destruction would occur, for example, if the snapshot had no
2370 clones and the user-initiated reference count were zero.
2372 If a snapshot does not qualify for immediate destruction, it is marked for
2374 In this state, it exists as a usable, visible snapshot until both of the
2375 preconditions listed above are met, at which point it is destroyed.
2377 An inclusive range of snapshots may be specified by separating the first and
2378 last snapshots with a percent sign.
2379 The first and/or last snapshots may be left blank, in which case the
2380 filesystem's oldest or newest snapshot will be implied.
2383 .Pq or ranges of snapshots
2384 of the same filesystem or volume may be specified in a comma-separated list of
2386 Only the snapshot's short name
2387 .Po the part after the
2390 should be specified when using a range or comma-separated list to identify
2392 .Bl -tag -width "-R"
2394 Recursively destroy all clones of these snapshots, including the clones,
2395 snapshots, and children.
2396 If this flag is specified, the
2398 flag will have no effect.
2400 Defer snapshot deletion.
2405 No data will be deleted.
2406 This is useful in conjunction with the
2410 flags to determine what data would be deleted.
2412 Print machine-parsable verbose information about the deleted data.
2415 .Pq or mark for deferred deletion
2416 all snapshots with this name in descendent file systems.
2418 Print verbose information about the deleted data.
2420 Extreme care should be taken when applying either the
2424 options, as they can destroy large portions of a pool and cause unexpected
2425 behavior for mounted file systems in use.
2430 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
2432 The given bookmark is destroyed.
2437 .Oo Fl o Ar property Ns = Ns value Oc Ns ...
2438 .Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ...
2440 Creates snapshots with the given names.
2441 All previous modifications by successful system calls to the file system are
2442 part of the snapshots.
2443 Snapshots are taken atomically, so that all snapshots correspond to the same
2447 section for details.
2448 .Bl -tag -width "-o"
2449 .It Fl o Ar property Ns = Ns Ar value
2450 Sets the specified property; see
2454 Recursively create snapshots of all descendent datasets
2462 Roll back the given dataset to a previous snapshot.
2463 When a dataset is rolled back, all data that has changed since the snapshot is
2464 discarded, and the dataset reverts to the state at the time of the snapshot.
2465 By default, the command refuses to roll back to a snapshot other than the most
2467 In order to do so, all intermediate snapshots and bookmarks must be destroyed by
2474 options do not recursively destroy the child snapshots of a recursive snapshot.
2475 Only direct snapshots of the specified filesystem are destroyed by either of
2477 To completely roll back a recursive snapshot, you must rollback the individual
2479 .Bl -tag -width "-R"
2481 Destroy any more recent snapshots and bookmarks, as well as any clones of those
2486 option to force an unmount of any clone file systems that are to be destroyed.
2488 Destroy any snapshots and bookmarks more recent than the one specified.
2494 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
2495 .Ar snapshot Ar filesystem Ns | Ns Ar volume
2497 Creates a clone of the given snapshot.
2500 section for details.
2501 The target dataset can be located anywhere in the ZFS hierarchy, and is created
2502 as the same type as the original.
2503 .Bl -tag -width "-o"
2504 .It Fl o Ar property Ns = Ns Ar value
2505 Sets the specified property; see
2509 Creates all the non-existing parent datasets.
2510 Datasets created in this manner are automatically mounted according to the
2512 property inherited from their parent.
2513 If the target filesystem or volume already exists, the operation completes
2519 .Ar clone-filesystem
2521 Promotes a clone file system to no longer be dependent on its
2524 This makes it possible to destroy the file system that the clone was created
2526 The clone parent-child dependency relationship is reversed, so that the origin
2527 file system becomes a clone of the specified file system.
2529 The snapshot that was cloned, and any snapshots previous to this snapshot, are
2530 now owned by the promoted clone.
2531 The space they use moves from the origin file system to the promoted clone, so
2532 enough space must be available to accommodate these snapshots.
2533 No new space is consumed by this operation, but the space accounting is
2535 The promoted clone must not have any conflicting snapshot names of its own.
2538 subcommand can be used to rename any conflicting snapshots.
2543 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2544 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2550 .Ar filesystem Ns | Ns Ar volume
2551 .Ar filesystem Ns | Ns Ar volume
2553 Renames the given dataset.
2554 The new target can be located anywhere in the ZFS hierarchy, with the exception
2556 Snapshots can only be renamed within the parent file system or volume.
2557 When renaming a snapshot, the parent file system of the snapshot does not need
2558 to be specified as part of the second argument.
2559 Renamed file systems can inherit new mount points, in which case they are
2560 unmounted and remounted at the new mount point.
2561 .Bl -tag -width "-a"
2563 Force unmount any filesystems that need to be unmounted in the process.
2565 Creates all the nonexistent parent datasets.
2566 Datasets created in this manner are automatically mounted according to the
2568 property inherited from their parent.
2574 .Ar snapshot Ar snapshot
2576 Recursively rename the snapshots of all descendent datasets.
2577 Snapshots are the only dataset that can be renamed recursively.
2581 .Op Fl r Ns | Ns Fl d Ar depth
2583 .Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc
2584 .Oo Fl s Ar property Oc Ns ...
2585 .Oo Fl S Ar property Oc Ns ...
2586 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2587 .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ...
2589 Lists the property information for the given datasets in tabular form.
2590 If specified, you can list property information by the absolute pathname or the
2592 By default, all file systems and volumes are displayed.
2593 Snapshots are displayed if the
2600 The following fields are displayed,
2601 .Sy name Ns \&, Ns Sy used Ns \&, Ns Sy available Ns \&, Ns Sy referenced Ns \&, Ns
2603 .Bl -tag -width "-H"
2605 Used for scripting mode.
2606 Do not print headers and separate fields by a single tab instead of arbitrary
2608 .It Fl S Ar property
2611 option, but sorts by property in descending order.
2613 Recursively display any children of the dataset, limiting the recursion to
2619 will display only the dataset and its direct children.
2620 .It Fl o Ar property
2621 A comma-separated list of properties to display.
2622 The property must be:
2625 One of the properties described in the
2626 .Sx Native Properties
2633 to display the dataset name
2637 to display space usage properties on file systems and volumes.
2638 This is a shortcut for specifying
2639 .Fl o Sy name Ns \&, Ns Sy avail Ns \&, Ns Sy used Ns \&, Ns Sy usedsnap Ns \&, Ns
2640 .Sy usedds Ns \&, Ns Sy usedrefreserv Ns \&, Ns Sy usedchild Fl t
2641 .Sy filesystem Ns \&, Ns Sy volume
2645 Display numbers in parsable
2649 Recursively display any children of the dataset on the command line.
2650 .It Fl s Ar property
2651 A property for sorting the output by column in ascending order based on the
2652 value of the property.
2653 The property must be one of the properties described in the
2655 section, or the special value
2657 to sort by the dataset name.
2658 Multiple properties can be specified at one time using multiple
2663 options are evaluated from left to right in decreasing order of importance.
2664 The following is a list of sorting criteria:
2667 Numeric types sort in numeric order.
2669 String types sort in alphabetical order.
2671 Types inappropriate for a row sort that row to the literal bottom, regardless of
2672 the specified ordering.
2675 If no sorting options are specified the existing behavior of
2679 A comma-separated list of types to display, where
2688 For example, specifying
2690 displays only snapshots.
2695 .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ...
2696 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2698 Sets the property or list of properties to the given value(s) for each dataset.
2699 Only some properties can be edited.
2702 section for more information on what properties can be set and acceptable
2704 Numeric values can be specified as exact values, or in a human-readable form
2706 .Sy B , K , M , G , T , P , E , Z
2707 .Po for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes,
2708 or zettabytes, respectively
2710 User properties can be set on snapshots.
2711 For more information, see the
2717 .Op Fl r Ns | Ns Fl d Ar depth
2719 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2720 .Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc
2721 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2722 .Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ...
2723 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Ns ...
2725 Displays properties for the given datasets.
2726 If no datasets are specified, then the command displays properties for all
2727 datasets on the system.
2728 For each property, the following columns are displayed:
2731 property Property name
2732 value Property value
2733 source Property source. Can either be local, default,
2734 temporary, inherited, or none (-).
2737 All columns are displayed by default, though this can be controlled by using the
2740 This command takes a comma-separated list of properties as described in the
2741 .Sx Native Properties
2748 can be used to display all properties that apply to the given dataset's type
2749 .Pq filesystem, volume, snapshot, or bookmark .
2750 .Bl -tag -width "-H"
2752 Display output in a form more easily parsed by scripts.
2753 Any headers are omitted, and fields are explicitly separated by a single tab
2754 instead of an arbitrary amount of space.
2756 Recursively display any children of the dataset, limiting the recursion to
2760 will display only the dataset and its direct children.
2762 A comma-separated list of columns to display.
2763 .Sy name Ns \&, Ns Sy property Ns \&, Ns Sy value Ns \&, Ns Sy source
2764 is the default value.
2766 Display numbers in parsable
2770 Recursively display properties for any children.
2772 A comma-separated list of sources to display.
2773 Those properties coming from a source other than those in this list are ignored.
2774 Each source must be one of the following:
2781 The default value is all sources.
2783 A comma-separated list of types to display, where
2797 .Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2799 Clears the specified property, causing it to be inherited from an ancestor,
2800 restored to default if no ancestor has the property set, or with the
2802 option reverted to the received value if one exists.
2805 section for a listing of default values, and details on which properties can be
2807 .Bl -tag -width "-r"
2809 Recursively inherit the given property for all children.
2811 Revert the property to the received value if one exists; otherwise operate as
2814 option was not specified.
2820 Displays a list of file systems that are not the most recent version.
2826 Displays a list of currently supported file system versions.
2832 .Fl a | Ar filesystem
2834 Upgrades file systems to a new on-disk version.
2835 Once this is done, the file systems will no longer be accessible on systems
2836 running older versions of the software.
2838 streams generated from new snapshots of these file systems cannot be accessed on
2839 systems running older versions of the software.
2841 In general, the file system version is independent of the pool version.
2844 for information on the
2845 .Nm zpool Cm upgrade
2848 In some cases, the file system version and the pool version are interrelated and
2849 the pool version must be upgraded before the file system version can be
2851 .Bl -tag -width "-V"
2853 Upgrade to the specified
2857 flag is not specified, this command upgrades to the most recent version.
2859 option can only be used to increase the version number, and only up to the most
2860 recent version supported by this software.
2862 Upgrade all file systems on all imported pools.
2864 Upgrade the specified file system.
2866 Upgrade the specified file system and all descendent file systems.
2872 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2873 .Oo Fl s Ar field Oc Ns ...
2874 .Oo Fl S Ar field Oc Ns ...
2875 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2876 .Ar filesystem Ns | Ns Ar snapshot
2878 Displays space consumed by, and quotas on, each user in the specified filesystem
2880 This corresponds to the
2881 .Sy userused@ Ns Em user ,
2882 .Sy userobjused@ Ns Em user ,
2883 .Sy userquota@ Ns Em user,
2885 .Sy userobjquota@ Ns Em user
2887 .Bl -tag -width "-H"
2889 Do not print headers, use tab-delimited output.
2891 Sort by this field in reverse order.
2895 Translate SID to POSIX ID.
2896 The POSIX ID may be ephemeral if no mapping exists.
2897 Normal POSIX interfaces
2902 perform this translation, so the
2904 option allows the output from
2905 .Nm zfs Cm userspace
2906 to be compared directly with those utilities.
2909 may lead to confusion if some files were created by an SMB user before a
2910 SMB-to-POSIX name mapping was established.
2911 In such a case, some files will be owned by the SMB entity and some by the POSIX
2915 option will report that the POSIX entity has the total usage and quota for both.
2917 Print numeric ID instead of user/group name.
2918 .It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2919 Display only the specified fields from the following set:
2924 The default is to display all fields.
2930 Sort output by this field.
2935 flags may be specified multiple times to sort first by one field, then by
2938 .Fl s Sy type Fl s Sy name .
2939 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2940 Print only the specified types from the following set:
2947 .Fl t Sy posixuser Ns \&, Ns Sy smbuser .
2948 The default can be changed to include group types.
2954 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2955 .Oo Fl s Ar field Oc Ns ...
2956 .Oo Fl S Ar field Oc Ns ...
2957 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2958 .Ar filesystem Ns | Ns Ar snapshot
2960 Displays space consumed by, and quotas on, each group in the specified
2961 filesystem or snapshot.
2962 This subcommand is identical to
2963 .Nm zfs Cm userspace ,
2964 except that the default types to display are
2965 .Fl t Sy posixgroup Ns \&, Ns Sy smbgroup .
2970 Displays all ZFS file systems currently mounted.
2976 .Fl a | Ar filesystem
2978 Mounts ZFS file systems.
2979 .Bl -tag -width "-O"
2981 Perform an overlay mount.
2984 for more information.
2986 Mount all available ZFS file systems.
2987 Invoked automatically as part of the boot process.
2989 Mount the specified filesystem.
2991 An optional, comma-separated list of mount options to use temporarily for the
2992 duration of the mount.
2994 .Sx Temporary Mount Point Properties
2995 section for details.
2997 Load keys for encrypted filesystems as they are being mounted. This is
2998 equivalent to executing
3000 on each encryption root before mounting it. Note that if a filesystem has a
3004 this will cause the terminal to interactively block after asking for the key.
3006 Report mount progress.
3012 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
3014 Unmounts currently mounted ZFS file systems.
3015 .Bl -tag -width "-a"
3017 Unmount all available ZFS file systems.
3018 Invoked automatically as part of the shutdown process.
3019 .It Ar filesystem Ns | Ns Ar mountpoint
3020 Unmount the specified filesystem.
3021 The command can also be given a path to a ZFS file system mount point on the
3024 Forcefully unmount the file system, even if it is currently in use.
3029 .Fl a | Ar filesystem
3031 Shares available ZFS file systems.
3032 .Bl -tag -width "-a"
3034 Share all available ZFS file systems.
3035 Invoked automatically as part of the boot process.
3037 Share the specified filesystem according to the
3042 File systems are shared when the
3051 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
3053 Unshares currently shared ZFS file systems.
3054 .Bl -tag -width "-a"
3056 Unshare all available ZFS file systems.
3057 Invoked automatically as part of the shutdown process.
3058 .It Ar filesystem Ns | Ns Ar mountpoint
3059 Unshare the specified filesystem.
3060 The command can also be given a path to a ZFS file system shared on the system.
3065 .Ar snapshot bookmark
3067 Creates a bookmark of the given snapshot.
3068 Bookmarks mark the point in time when the snapshot was created, and can be used
3069 as the incremental source for a
3073 This feature must be enabled to be used.
3075 .Xr zpool-features 5
3076 for details on ZFS feature flags and the
3083 .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
3086 Creates a stream representation of the second
3088 which is written to standard output.
3089 The output can be redirected to a file or to a different system
3090 .Po for example, using
3093 By default, a full stream is generated.
3094 .Bl -tag -width "-D"
3096 Generate a deduplicated stream.
3097 Blocks which would have been sent multiple times in the send stream will only be
3099 The receiving system must also support this feature to receive a deduplicated
3101 This flag can be used regardless of the dataset's
3103 property, but performance will be much better if the filesystem uses a
3104 dedup-capable checksum
3108 .It Fl I Ar snapshot
3109 Generate a stream package that sends all intermediary snapshots from the first
3110 snapshot to the second snapshot.
3114 .Fl i Em @a Em fs@b Ns \&; Fl i Em @b Em fs@c Ns \&; Fl i Em @c Em fs@d .
3115 The incremental source may be specified as with the
3118 .It Fl L, -large-block
3119 Generate a stream which may contain blocks larger than 128KB.
3120 This flag has no effect if the
3122 pool feature is disabled, or if the
3124 property of this filesystem has never been set above 128KB.
3125 The receiving system must have the
3127 pool feature enabled as well.
3129 .Xr zpool-features 5
3130 for details on ZFS feature flags and the
3134 Print machine-parsable verbose information about the stream package generated.
3135 .It Fl R, -replicate
3136 Generate a replication stream package, which will replicate the specified
3137 file system, and all descendent file systems, up to the named snapshot.
3138 When received, all properties, snapshots, descendent file systems, and clones
3145 flags are used in conjunction with the
3147 flag, an incremental replication stream is generated.
3148 The current values of properties, and current snapshot and file system names are
3149 set when the stream is received.
3152 flag is specified when this stream is received, snapshots and file systems that
3153 do not exist on the sending side are destroyed.
3155 Generate a more compact stream by using
3157 records for blocks which are stored more compactly on disk by the
3160 This flag has no effect if the
3162 feature is disabled.
3163 The receiving system must have the
3168 feature is active on the sending system, then the receiving system must have
3169 that feature enabled as well.
3171 .Xr zpool-features 5
3172 for details on ZFS feature flags and the
3175 .It Fl c, -compressed
3176 Generate a more compact stream by using compressed WRITE records for blocks
3177 which are compressed on disk and in memory
3180 property for details
3184 feature is active on the sending system, then the receiving system must have
3185 that feature enabled as well.
3188 feature is enabled on the sending system but the
3190 option is not supplied in conjunction with
3192 then the data will be decompressed before sending so it can be split into
3193 smaller block sizes.
3195 For encrypted datasets, send data exactly as it exists on disk. This allows
3196 backups to be taken even if encryption keys are not currently loaded. The
3197 backup may then be received on an untrusted machine since that machine will
3198 not have the encryption keys to read the protected data or alter it without
3199 being detected. Upon being received, the dataset will have the same encryption
3200 keys as it did on the send side, although the
3202 property will be defaulted to
3204 if not otherwise provided. For unencrypted datasets, this flag will be
3207 Note that if you do not use this flag for sending encrypted datasets, data will
3208 be sent unencrypted and may be re-encrypted with a different encryption key on
3209 the receiving system, which will disable the ability to do a raw send to that
3210 system for incrementals.
3211 .It Fl i Ar snapshot
3212 Generate an incremental stream from the first
3214 .Pq the incremental source
3217 .Pq the incremental target .
3218 The incremental source can be specified as the last component of the snapshot
3222 character and following
3224 and it is assumed to be from the same file system as the incremental target.
3226 If the destination is a clone, the source may be the origin snapshot, which must
3229 .Em pool/fs@origin ,
3237 Do not generate any actual send data.
3238 This is useful in conjunction with the
3242 flags to determine what data will be sent.
3243 In this case, the verbose output will be written to standard output
3244 .Po contrast with a non-dry-run, where the stream is written to standard output
3245 and the verbose output goes to standard error
3248 Include the dataset's properties in the stream.
3249 This flag is implicit when
3252 The receiving system must also support this feature.
3254 Print verbose information about the stream package generated.
3255 This information includes a per-second report of how much data has been sent.
3258 The format of the stream is committed.
3259 You will be able to receive your streams on future versions of ZFS.
3264 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
3265 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
3267 Generate a send stream, which may be of a filesystem, and may be incremental
3269 If the destination is a filesystem or volume, the pool must be read-only, or the
3270 filesystem must not be mounted.
3271 When the stream generated from a filesystem or volume is received, the default
3272 snapshot name will be
3274 .Bl -tag -width "-L"
3275 .It Fl L, -large-block
3276 Generate a stream which may contain blocks larger than 128KB.
3277 This flag has no effect if the
3279 pool feature is disabled, or if the
3281 property of this filesystem has never been set above 128KB.
3282 The receiving system must have the
3284 pool feature enabled as well.
3286 .Xr zpool-features 5
3287 for details on ZFS feature flags and the
3290 .It Fl c, -compressed
3291 Generate a more compact stream by using compressed WRITE records for blocks
3292 which are compressed on disk and in memory
3295 property for details
3299 feature is active on the sending system, then the receiving system must have
3300 that feature enabled as well.
3303 feature is enabled on the sending system but the
3305 option is not supplied in conjunction with
3307 then the data will be decompressed before sending so it can be split into
3308 smaller block sizes.
3310 For encrypted datasets, send data exactly as it exists on disk. This allows
3311 backups to be taken even if encryption keys are not currently loaded. The
3312 backup may then be received on an untrusted machine since that machine will
3313 not have the encryption keys to read the protected data or alter it without
3314 being detected. Upon being received, the dataset will have the same encryption
3315 keys as it did on the send side, although the
3317 property will be defaulted to
3319 if not otherwise provided. For unencrypted datasets, this flag will be
3322 Note that if you do not use this flag for sending encrypted datasets, data will
3323 be sent unencrypted and may be re-encrypted with a different encryption key on
3324 the receiving system, which will disable the ability to do a raw send to that
3325 system for incrementals.
3327 Generate a more compact stream by using
3329 records for blocks which are stored more compactly on disk by the
3332 This flag has no effect if the
3334 feature is disabled.
3335 The receiving system must have the
3340 feature is active on the sending system, then the receiving system must have
3341 that feature enabled as well. Note that streams generated using this flag are
3342 unable to be received into an encrypted dataset.
3344 .Xr zpool-features 5
3345 for details on ZFS feature flags and the
3348 .It Fl i Ar snapshot Ns | Ns Ar bookmark
3349 Generate an incremental send stream.
3350 The incremental source must be an earlier snapshot in the destination's history.
3351 It will commonly be an earlier snapshot in the destination's file system, in
3352 which case it can be specified as the last component of the name
3357 character and following
3360 If the incremental target is a clone, the incremental source can be the origin
3361 snapshot, or an earlier snapshot in the origin's filesystem, or the origin's
3369 .Ar receive_resume_token
3371 Creates a send stream which resumes an interrupted receive.
3373 .Ar receive_resume_token
3374 is the value of this property on the filesystem or volume that was being
3376 See the documentation for
3383 .Op Fl o Sy origin Ns = Ns Ar snapshot
3384 .Op Fl o Ar property Ns = Ns Ar value
3385 .Op Fl x Ar property
3386 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
3392 .Op Fl d Ns | Ns Fl e
3393 .Op Fl o Sy origin Ns = Ns Ar snapshot
3394 .Op Fl o Ar property Ns = Ns Ar value
3395 .Op Fl x Ar property
3398 Creates a snapshot whose contents are as specified in the stream provided on
3400 If a full stream is received, then a new file system is created as well.
3401 Streams are created using the
3403 subcommand, which by default creates a full stream.
3405 can be used as an alias for
3408 If an incremental stream is received, then the destination file system must
3409 already exist, and its most recent snapshot must match the incremental stream's
3413 the destination device link is destroyed and recreated, which means the
3415 cannot be accessed during the
3419 When a snapshot replication package stream that is generated by using the
3420 .Nm zfs Cm send Fl R
3421 command is received, any snapshots that do not exist on the sending location are
3422 destroyed by using the
3423 .Nm zfs Cm destroy Fl d
3427 .Sy Fl o Em property=value
3429 .Sy Fl x Em property
3430 is specified, it applies to the effective value of the property throughout
3431 the entire subtree of replicated datasets. Effective property values will be
3436 ) on the topmost in the replicated subtree. In descendant datasets, if the
3437 property is set by the send stream, it will be overridden by forcing the
3438 property to be inherited from the top‐most file system. Received properties
3439 are retained in spite of being overridden and may be restored with
3440 .Nm zfs Cm inherit Fl S .
3442 .Sy Fl o Em origin=snapshot
3443 is a special case because, even if
3445 is a read-only property and cannot be set, it's allowed to receive the send
3446 stream as a clone of the given snapshot.
3448 The name of the snapshot
3449 .Pq and file system, if a full stream is received
3450 that this subcommand creates depends on the argument type and the use of the
3456 If the argument is a snapshot name, the specified
3459 If the argument is a file system or volume name, a snapshot with the same name
3460 as the sent snapshot is created within the specified
3468 options are specified, the provided target snapshot name is used exactly as
3475 options cause the file system name of the target snapshot to be determined by
3476 appending a portion of the sent snapshot's name to the specified target
3480 option is specified, all but the first element of the sent snapshot's file
3482 .Pq usually the pool name
3483 is used and any required intermediate file systems within the specified one are
3487 option is specified, then only the last element of the sent snapshot's file
3489 .Pq i.e. the name of the source file system itself
3490 is used as the target file system name.
3491 .Bl -tag -width "-F"
3493 Force a rollback of the file system to the most recent snapshot before
3494 performing the receive operation.
3495 If receiving an incremental replication stream
3496 .Po for example, one generated by
3497 .Nm zfs Cm send Fl R Op Fl i Ns | Ns Fl I
3499 destroy snapshots and file systems that do not exist on the sending side.
3501 Discard the first element of the sent snapshot's file system name, using the
3502 remaining elements to determine the name of the target file system for the new
3503 snapshot as described in the paragraph above.
3505 Discard all but the last element of the sent snapshot's file system name, using
3506 that element to determine the name of the target file system for the new
3507 snapshot as described in the paragraph above.
3509 Do not actually receive the stream.
3510 This can be useful in conjunction with the
3512 option to verify the name the receive operation would use.
3513 .It Fl o Sy origin Ns = Ns Ar snapshot
3514 Forces the stream to be received as a clone of the given snapshot.
3515 If the stream is a full send stream, this will create the filesystem
3516 described by the stream as a clone of the specified snapshot.
3517 Which snapshot was specified will not affect the success or failure of the
3518 receive, as long as the snapshot does exist.
3519 If the stream is an incremental send stream, all the normal verification will be
3521 .It Fl o Em property=value
3522 Sets the specified property as if the command
3523 .Nm zfs Cm set Em property=value
3524 was invoked immediately before the receive. When receiving a stream from
3525 .Nm zfs Cm send Fl R ,
3526 causes the property to be inherited by all descendant datasets, as through
3527 .Nm zfs Cm inherit Em property
3528 was run on any descendant datasets that have this property set on the
3531 Any editable property can be set at receive time. Set-once properties bound
3532 to the received data, such as
3535 .Sy casesensitivity ,
3536 cannot be set at receive time even when the datasets are newly created by
3537 .Nm zfs Cm receive .
3538 Additionally both settable properties
3542 cannot be set at receive time.
3546 option may be specified multiple times, for different properties. An error
3547 results if the same property is specified in multiple
3553 If the receive is interrupted, save the partially received state, rather
3555 Interruption may be due to premature termination of the stream
3556 .Po e.g. due to network failure or failure of the remote system
3557 if the stream is being read over a network connection
3559 a checksum error in the stream, termination of the
3561 process, or unclean shutdown of the system.
3563 The receive can be resumed with a stream generated by
3564 .Nm zfs Cm send Fl t Ar token ,
3568 .Sy receive_resume_token
3569 property of the filesystem or volume which is received into.
3571 To use this flag, the storage pool must have the
3572 .Sy extensible_dataset
3575 .Xr zpool-features 5
3576 for details on ZFS feature flags.
3578 File system that is associated with the received stream is not mounted.
3580 Print verbose information about the stream and the time required to perform the
3582 .It Fl x Em property
3583 Ensures that the effective value of the specified property after the
3584 receive is unaffected by the value of that property in the send stream (if any),
3585 as if the property had been excluded from the send stream.
3587 If the specified property is not present in the send stream, this option does
3590 If a received property needs to be overridden, the effective value will be
3591 set or inherited, depending on whether the property is inheritable or not.
3593 In the case of an incremental update,
3595 leaves any existing local setting or explicit inheritance unchanged.
3599 restrictions on set-once and special properties apply equally to
3606 .Ar filesystem Ns | Ns Ar volume
3608 Abort an interrupted
3609 .Nm zfs Cm receive Fl s ,
3610 deleting its saved partially received state.
3614 .Ar filesystem Ns | Ns Ar volume
3616 Displays permissions that have been delegated on the specified filesystem or
3618 See the other forms of
3620 for more information.
3622 Delegations are supported under Linux with the exception of
3630 These permissions cannot be delegated because the Linux
3632 command restricts modifications of the global namespace to the root user.
3637 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3638 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3639 .Ar setname Oc Ns ...
3640 .Ar filesystem Ns | Ns Ar volume
3645 .Fl e Ns | Ns Sy everyone
3646 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3647 .Ar setname Oc Ns ...
3648 .Ar filesystem Ns | Ns Ar volume
3650 Delegates ZFS administration permission for the file systems to non-privileged
3652 .Bl -tag -width "-d"
3654 Allow only for the descendent file systems.
3655 .It Fl e Ns | Ns Sy everyone
3656 Specifies that the permissions be delegated to everyone.
3657 .It Fl g Ar group Ns Oo , Ns Ar group Oc Ns ...
3658 Explicitly specify that permissions are delegated to the group.
3662 only for the specified file system.
3663 .It Fl u Ar user Ns Oo , Ns Ar user Oc Ns ...
3664 Explicitly specify that permissions are delegated to the user.
3665 .It Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3666 Specifies to whom the permissions are delegated.
3667 Multiple entities can be specified as a comma-separated list.
3670 options are specified, then the argument is interpreted preferentially as the
3673 then as a user name, and lastly as a group name.
3674 To specify a user or group named
3681 To specify a group with the same name as a user, use the
3685 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3686 .Ar setname Oc Ns ...
3688 The permissions to delegate.
3689 Multiple permissions may be specified as a comma-separated list.
3690 Permission names are the same as ZFS subcommand and property names.
3691 See the property list below.
3692 Property set names, which begin with
3697 form below for details.
3702 options are specified, or both are, then the permissions are allowed for the
3703 file system or volume, and all of its descendents.
3705 Permissions are generally the ability to use a ZFS subcommand or change a ZFS
3707 The following permissions are available:
3710 allow subcommand Must also have the permission that is
3712 clone subcommand Must also have the 'create' ability and
3713 'mount' ability in the origin file system
3714 create subcommand Must also have the 'mount' ability
3715 destroy subcommand Must also have the 'mount' ability
3716 diff subcommand Allows lookup of paths within a dataset
3717 given an object number, and the ability
3718 to create snapshots necessary to
3720 load-key subcommand Allows loading and unloading of encryption key
3721 (see 'zfs load-key' and 'zfs unload-key').
3722 change-key subcommand Allows changing an encryption key via
3724 mount subcommand Allows mount/umount of ZFS datasets
3725 promote subcommand Must also have the 'mount' and 'promote'
3726 ability in the origin file system
3727 receive subcommand Must also have the 'mount' and 'create'
3729 rename subcommand Must also have the 'mount' and 'create'
3730 ability in the new parent
3731 rollback subcommand Must also have the 'mount' ability
3733 share subcommand Allows sharing file systems over NFS
3735 snapshot subcommand Must also have the 'mount' ability
3737 groupquota other Allows accessing any groupquota@...
3739 groupused other Allows reading any groupused@... property
3740 userprop other Allows changing any user property
3741 userquota other Allows accessing any userquota@...
3743 userused other Allows reading any userused@... property
3749 casesensitivity property
3751 compression property
3755 filesystem_limit property
3758 normalization property
3759 primarycache property
3764 refreservation property
3765 reservation property
3766 secondarycache property
3771 snapshot_limit property
3774 volblocksize property
3784 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3785 .Ar setname Oc Ns ...
3786 .Ar filesystem Ns | Ns Ar volume
3791 These permissions are granted
3793 to the creator of any newly-created descendent file system.
3797 .Fl s No @ Ns Ar setname
3798 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3799 .Ar setname Oc Ns ...
3800 .Ar filesystem Ns | Ns Ar volume
3802 Defines or adds permissions to a permission set.
3803 The set can be used by other
3805 commands for the specified file system and its descendents.
3806 Sets are evaluated dynamically, so changes to a set are immediately reflected.
3807 Permission sets follow the same naming restrictions as ZFS file systems, but the
3808 name must begin with
3810 and can be no more than 64 characters long.
3815 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3816 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3817 .Ar setname Oc Ns ... Oc
3818 .Ar filesystem Ns | Ns Ar volume
3823 .Fl e Ns | Ns Sy everyone
3824 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3825 .Ar setname Oc Ns ... Oc
3826 .Ar filesystem Ns | Ns Ar volume
3832 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3833 .Ar setname Oc Ns ... Oc
3834 .Ar filesystem Ns | Ns Ar volume
3836 Removes permissions that were granted with the
3839 No permissions are explicitly denied, so other permissions granted are still in
3841 For example, if the permission is granted by an ancestor.
3842 If no permissions are specified, then all permissions for the specified
3854 only removes the permissions that were granted to everyone, not all permissions
3855 for every user and group.
3858 command for a description of the
3861 .Bl -tag -width "-r"
3863 Recursively remove the permissions from this file system and all descendents.
3869 .Fl s No @ Ns Ar setname
3870 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3871 .Ar setname Oc Ns ... Oc
3872 .Ar filesystem Ns | Ns Ar volume
3874 Removes permissions from a permission set.
3875 If no permissions are specified, then all permissions are removed, thus removing
3881 .Ar tag Ar snapshot Ns ...
3883 Adds a single reference, named with the
3885 argument, to the specified snapshot or snapshots.
3886 Each snapshot has its own tag namespace, and tags must be unique within that
3889 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3893 .Bl -tag -width "-r"
3895 Specifies that a hold with the given tag is applied recursively to the snapshots
3896 of all descendent file systems.
3904 Lists all existing user references for the given snapshot or snapshots.
3905 .Bl -tag -width "-r"
3907 Lists the holds that are set on the named descendent snapshots, in addition to
3908 listing the holds on the named snapshot.
3914 .Ar tag Ar snapshot Ns ...
3916 Removes a single reference, named with the
3918 argument, from the specified snapshot or snapshots.
3919 The tag must already exist for each snapshot.
3920 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3924 .Bl -tag -width "-r"
3926 Recursively releases a hold with the given tag on the snapshots of all
3927 descendent file systems.
3933 .Ar snapshot Ar snapshot Ns | Ns Ar filesystem
3935 Display the difference between a snapshot of a given filesystem and another
3936 snapshot of that filesystem from a later time or the current contents of the
3938 The first column is a character indicating the type of change, the other columns
3939 indicate pathname, new pathname
3940 .Pq in case of rename ,
3941 change in link count, and optionally file type and/or change time.
3942 The types of change are:
3944 - The path has been removed
3945 + The path has been created
3946 M The path has been modified
3947 R The path has been renamed
3949 .Bl -tag -width "-F"
3951 Display an indication of the type of file, in a manner similar to the
3967 Give more parsable tab-separated output, without header lines and without
3970 Display the path's inode change time as the first column of output.
3976 .Op Fl L Ar keylocation
3977 .Fl a | Ar filesystem
3981 allowing it and all children that inherit the
3983 property to be accessed. The key will be expected in the format specified by the
3985 and location specified by the
3987 property. Note that if the
3991 the terminal will interactively wait for the key to be entered. Loading a key
3992 will not automatically mount the dataset. If that functionality is desired,
3993 .Nm zfs Cm mount Sy -l
3994 will ask for the key and mount the dataset. Once the key is loaded the
3996 property will become
3998 .Bl -tag -width "-r"
4000 Recursively loads the keys for the specified filesystem and all descendent
4003 Loads the keys for all encryption roots in all imported pools.
4007 load-key. This will cause zfs to simply check that the
4008 provided key is correct. This command may be run even if the key is already
4010 .It Fl L Ar keylocation
4015 property. This will not change the value of the property on the dataset. Note
4016 that if used with either
4021 may only be given as
4028 .Fl a | Ar filesystem
4030 Unloads a key from ZFS, removing the ability to access the dataset and all of
4031 its children that inherit the
4033 property. This requires that the dataset is not currently open or mounted. Once
4034 the key is unloaded the
4036 property will become
4038 .Bl -tag -width "-r"
4040 Recursively unloads the keys for the specified filesystem and all descendent
4043 Unloads the keys for all encryption roots in all imported pools.
4049 .Op Fl o Ar keylocation Ns = Ns Ar value
4050 .Op Fl o Ar keyformat Ns = Ns Ar value
4051 .Op Fl o Ar pbkdf2iters Ns = Ns Ar value
4061 Allows a user to change the encryption key used to access a dataset. This
4062 command requires that the existing key for the dataset is already loaded into
4063 ZFS. This command may also be used to change the
4068 properties as needed. If the dataset was not previously an encryption root it
4069 will become one. Alternatively, the
4071 flag may be provided to cause an encryption root to inherit the parent's key
4073 .Bl -tag -width "-r"
4075 Ensures the key is loaded before attempting to change the key. This is
4076 effectively equivalent to
4077 .Qq Nm zfs Cm load-key Ar filesystem ; Nm zfs Cm change-key Ar filesystem
4078 .It Fl o Ar property Ns = Ns Ar value
4079 Allows the user to set encryption key properties (
4084 ) while changing the key. This is the only way to alter
4088 after the dataset has been created.
4090 Indicates that zfs should make
4092 inherit the key of its parent. Note that this command can only be run on an
4093 encryption root that has an encrypted parent.
4099 utility exits 0 on success, 1 if an error occurs, and 2 if invalid command line
4100 options were specified.
4103 .It Sy Example 1 No Creating a ZFS File System Hierarchy
4104 The following commands create a file system named
4106 and a file system named
4110 is set for the parent file system, and is automatically inherited by the child
4113 # zfs create pool/home
4114 # zfs set mountpoint=/export/home pool/home
4115 # zfs create pool/home/bob
4117 .It Sy Example 2 No Creating a ZFS Snapshot
4118 The following command creates a snapshot named
4120 This snapshot is mounted on demand in the
4122 directory at the root of the
4126 # zfs snapshot pool/home/bob@yesterday
4128 .It Sy Example 3 No Creating and Destroying Multiple Snapshots
4129 The following command creates snapshots named
4133 and all of its descendent file systems.
4134 Each snapshot is mounted on demand in the
4136 directory at the root of its file system.
4137 The second command destroys the newly created snapshots.
4139 # zfs snapshot -r pool/home@yesterday
4140 # zfs destroy -r pool/home@yesterday
4142 .It Sy Example 4 No Disabling and Enabling File System Compression
4143 The following command disables the
4145 property for all file systems under
4147 The next command explicitly enables
4150 .Em pool/home/anne .
4152 # zfs set compression=off pool/home
4153 # zfs set compression=on pool/home/anne
4155 .It Sy Example 5 No Listing ZFS Datasets
4156 The following command lists all active file systems and volumes in the system.
4157 Snapshots are displayed if the
4165 for more information on pool properties.
4168 NAME USED AVAIL REFER MOUNTPOINT
4169 pool 450K 457G 18K /pool
4170 pool/home 315K 457G 21K /export/home
4171 pool/home/anne 18K 457G 18K /export/home/anne
4172 pool/home/bob 276K 457G 276K /export/home/bob
4174 .It Sy Example 6 No Setting a Quota on a ZFS File System
4175 The following command sets a quota of 50 Gbytes for
4178 # zfs set quota=50G pool/home/bob
4180 .It Sy Example 7 No Listing ZFS Properties
4181 The following command lists all properties for
4184 # zfs get all pool/home/bob
4185 NAME PROPERTY VALUE SOURCE
4186 pool/home/bob type filesystem -
4187 pool/home/bob creation Tue Jul 21 15:53 2009 -
4188 pool/home/bob used 21K -
4189 pool/home/bob available 20.0G -
4190 pool/home/bob referenced 21K -
4191 pool/home/bob compressratio 1.00x -
4192 pool/home/bob mounted yes -
4193 pool/home/bob quota 20G local
4194 pool/home/bob reservation none default
4195 pool/home/bob recordsize 128K default
4196 pool/home/bob mountpoint /pool/home/bob default
4197 pool/home/bob sharenfs off default
4198 pool/home/bob checksum on default
4199 pool/home/bob compression on local
4200 pool/home/bob atime on default
4201 pool/home/bob devices on default
4202 pool/home/bob exec on default
4203 pool/home/bob setuid on default
4204 pool/home/bob readonly off default
4205 pool/home/bob zoned off default
4206 pool/home/bob snapdir hidden default
4207 pool/home/bob acltype off default
4208 pool/home/bob aclinherit restricted default
4209 pool/home/bob canmount on default
4210 pool/home/bob xattr on default
4211 pool/home/bob copies 1 default
4212 pool/home/bob version 4 -
4213 pool/home/bob utf8only off -
4214 pool/home/bob normalization none -
4215 pool/home/bob casesensitivity sensitive -
4216 pool/home/bob vscan off default
4217 pool/home/bob nbmand off default
4218 pool/home/bob sharesmb off default
4219 pool/home/bob refquota none default
4220 pool/home/bob refreservation none default
4221 pool/home/bob primarycache all default
4222 pool/home/bob secondarycache all default
4223 pool/home/bob usedbysnapshots 0 -
4224 pool/home/bob usedbydataset 21K -
4225 pool/home/bob usedbychildren 0 -
4226 pool/home/bob usedbyrefreservation 0 -
4229 The following command gets a single property value.
4231 # zfs get -H -o value compression pool/home/bob
4234 The following command lists all properties with local settings for
4237 # zfs get -r -s local -o name,property,value all pool/home/bob
4239 pool/home/bob quota 20G
4240 pool/home/bob compression on
4242 .It Sy Example 8 No Rolling Back a ZFS File System
4243 The following command reverts the contents of
4245 to the snapshot named
4247 deleting all intermediate snapshots.
4249 # zfs rollback -r pool/home/anne@yesterday
4251 .It Sy Example 9 No Creating a ZFS Clone
4252 The following command creates a writable file system whose initial contents are
4254 .Em pool/home/bob@yesterday .
4256 # zfs clone pool/home/bob@yesterday pool/clone
4258 .It Sy Example 10 No Promoting a ZFS Clone
4259 The following commands illustrate how to test out changes to a file system, and
4260 then replace the original file system with the changed one, using clones, clone
4261 promotion, and renaming:
4263 # zfs create pool/project/production
4264 populate /pool/project/production with data
4265 # zfs snapshot pool/project/production@today
4266 # zfs clone pool/project/production@today pool/project/beta
4267 make changes to /pool/project/beta and test them
4268 # zfs promote pool/project/beta
4269 # zfs rename pool/project/production pool/project/legacy
4270 # zfs rename pool/project/beta pool/project/production
4271 once the legacy version is no longer needed, it can be destroyed
4272 # zfs destroy pool/project/legacy
4274 .It Sy Example 11 No Inheriting ZFS Properties
4275 The following command causes
4281 property from their parent.
4283 # zfs inherit checksum pool/home/bob pool/home/anne
4285 .It Sy Example 12 No Remotely Replicating ZFS Data
4286 The following commands send a full stream and then an incremental stream to a
4287 remote machine, restoring them into
4288 .Em poolB/received/fs@a
4290 .Em poolB/received/fs@b ,
4293 must contain the file system
4294 .Em poolB/received ,
4295 and must not initially contain
4296 .Em poolB/received/fs .
4298 # zfs send pool/fs@a | \e
4299 ssh host zfs receive poolB/received/fs@a
4300 # zfs send -i a pool/fs@b | \e
4301 ssh host zfs receive poolB/received/fs
4303 .It Sy Example 13 No Using the zfs receive -d Option
4304 The following command sends a full stream of
4305 .Em poolA/fsA/fsB@snap
4306 to a remote machine, receiving it into
4307 .Em poolB/received/fsA/fsB@snap .
4310 portion of the received snapshot's name is determined from the name of the sent
4313 must contain the file system
4314 .Em poolB/received .
4316 .Em poolB/received/fsA
4317 does not exist, it is created as an empty file system.
4319 # zfs send poolA/fsA/fsB@snap | \e
4320 ssh host zfs receive -d poolB/received
4322 .It Sy Example 14 No Setting User Properties
4323 The following example sets the user-defined
4324 .Sy com.example:department
4325 property for a dataset.
4327 # zfs set com.example:department=12345 tank/accounting
4329 .It Sy Example 15 No Performing a Rolling Snapshot
4330 The following example shows how to maintain a history of snapshots with a
4331 consistent naming scheme.
4332 To keep a week's worth of snapshots, the user destroys the oldest snapshot,
4333 renames the remaining snapshots, and then creates a new snapshot, as follows:
4335 # zfs destroy -r pool/users@7daysago
4336 # zfs rename -r pool/users@6daysago @7daysago
4337 # zfs rename -r pool/users@5daysago @6daysago
4338 # zfs rename -r pool/users@yesterday @5daysago
4339 # zfs rename -r pool/users@yesterday @4daysago
4340 # zfs rename -r pool/users@yesterday @3daysago
4341 # zfs rename -r pool/users@yesterday @2daysago
4342 # zfs rename -r pool/users@today @yesterday
4343 # zfs snapshot -r pool/users@today
4345 .It Sy Example 16 No Setting sharenfs Property Options on a ZFS File System
4346 The following commands show how to set
4348 property options to enable
4352 addresses and to enable root access for system
4358 # zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home
4363 for host name resolution, specify the fully qualified hostname.
4364 .It Sy Example 17 No Delegating ZFS Administration Permissions on a ZFS Dataset
4365 The following example shows how to set permissions so that user
4367 can create, destroy, mount, and take snapshots on
4373 # zfs allow cindys create,destroy,mount,snapshot tank/cindys
4374 # zfs allow tank/cindys
4375 ---- Permissions on tank/cindys --------------------------------------
4376 Local+Descendent permissions:
4377 user cindys create,destroy,mount,snapshot
4382 mount point permission is set to 755 by default, user
4384 will be unable to mount file systems under
4386 Add an ACE similar to the following syntax to provide mount point access:
4388 # chmod A+user:cindys:add_subdirectory:allow /tank/cindys
4390 .It Sy Example 18 No Delegating Create Time Permissions on a ZFS Dataset
4391 The following example shows how to grant anyone in the group
4393 to create file systems in
4395 This syntax also allows staff members to destroy their own file systems, but not
4396 destroy anyone else's file system.
4401 # zfs allow staff create,mount tank/users
4402 # zfs allow -c destroy tank/users
4403 # zfs allow tank/users
4404 ---- Permissions on tank/users ---------------------------------------
4407 Local+Descendent permissions:
4408 group staff create,mount
4410 .It Sy Example 19 No Defining and Granting a Permission Set on a ZFS Dataset
4411 The following example shows how to define and grant a permission set on the
4418 # zfs allow -s @pset create,destroy,snapshot,mount tank/users
4419 # zfs allow staff @pset tank/users
4420 # zfs allow tank/users
4421 ---- Permissions on tank/users ---------------------------------------
4423 @pset create,destroy,mount,snapshot
4424 Local+Descendent permissions:
4427 .It Sy Example 20 No Delegating Property Permissions on a ZFS Dataset
4428 The following example shows to grant the ability to set quotas and reservations
4436 # zfs allow cindys quota,reservation users/home
4437 # zfs allow users/home
4438 ---- Permissions on users/home ---------------------------------------
4439 Local+Descendent permissions:
4440 user cindys quota,reservation
4441 cindys% zfs set quota=10G users/home/marks
4442 cindys% zfs get quota users/home/marks
4443 NAME PROPERTY VALUE SOURCE
4444 users/home/marks quota 10G local
4446 .It Sy Example 21 No Removing ZFS Delegated Permissions on a ZFS Dataset
4447 The following example shows how to remove the snapshot permission from the
4456 # zfs unallow staff snapshot tank/users
4457 # zfs allow tank/users
4458 ---- Permissions on tank/users ---------------------------------------
4460 @pset create,destroy,mount,snapshot
4461 Local+Descendent permissions:
4464 .It Sy Example 22 No Showing the differences between a snapshot and a ZFS Dataset
4465 The following example shows how to see what has changed between a prior
4466 snapshot of a ZFS dataset and its current state.
4469 option is used to indicate type information for the files affected.
4471 # zfs diff -F tank/test@before tank/test
4473 M F /tank/test/linked (+1)
4474 R F /tank/test/oldname -> /tank/test/newname
4475 - F /tank/test/deleted
4476 + F /tank/test/created
4477 M F /tank/test/modified
4479 .It Sy Example 23 No Creating a bookmark
4480 The following example create a bookmark to a snapshot. This bookmark
4481 can then be used instead of snapshot in send streams.
4483 # zfs bookmark rpool@snapshot rpool#bookmark
4485 .It Sy Example 24 No Setting sharesmb Property Options on a ZFS File System
4486 The following example show how to share SMB filesystem through ZFS. Note that
4487 that a user and his/her password must be given.
4489 # smbmount //127.0.0.1/share_tmp /mnt/tmp \\
4490 -o user=workgroup/turbo,password=obrut,uid=1000
4494 .Em /etc/samba/smb.conf
4495 configuration required:
4497 Samba will need to listen to 'localhost' (127.0.0.1) for the ZFS utilities to
4498 communicate with Samba. This is the default behavior for most Linux
4501 Samba must be able to authenticate a user. This can be done in a number of
4502 ways, depending on if using the system password file, LDAP or the Samba
4503 specific smbpasswd file. How to do this is outside the scope of this manual.
4506 man page for more information.
4509 .Sy USERSHARE section
4512 man page for all configuration options in case you need to modify any options
4513 to the share afterwards. Do note that any changes done with the
4515 command will be undone if the share is ever unshared (such as at a reboot etc).
4517 .Sh INTERFACE STABILITY