4 .\" The contents of this file are subject to the terms of the
5 .\" Common Development and Distribution License (the "License").
6 .\" You may not use this file except in compliance with the License.
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 .\" or http://www.opensolaris.org/os/licensing.
10 .\" See the License for the specific language governing permissions
11 .\" and limitations under the License.
13 .\" When distributing Covered Code, include this CDDL HEADER in each
14 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 .\" If applicable, add the following below this CDDL HEADER, with the
16 .\" fields enclosed by brackets "[]" replaced with your own identifying
17 .\" information: Portions Copyright [yyyy] [name of copyright owner]
22 .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
23 .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
24 .\" Copyright (c) 2011, 2016 by Delphix. All rights reserved.
25 .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
26 .\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
27 .\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
28 .\" Copyright (c) 2014 Integros [integros.com]
29 .\" Copyright 2016 Nexenta Systems, Inc.
30 .\" Copyright 2016 Richard Laager. All rights reserved.
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 command configures ZFS datasets within a ZFS storage pool, as described in
278 A dataset is identified by a unique path within the ZFS namespace.
281 pool/{filesystem,volume,snapshot}
284 where the maximum length of a dataset name is
288 A dataset can be one of the following:
289 .Bl -tag -width "file system"
291 A ZFS dataset of type
293 can be mounted within the standard system namespace and behaves like other file
295 While ZFS file systems are designed to be POSIX compliant, known issues exist
296 that prevent compliance in some cases.
297 Applications that depend on standards conformance might fail due to non-standard
298 behavior when checking file system free space.
300 A logical volume exported as a raw or block device.
301 This type of dataset should only be used under special circumstances.
302 File systems are typically used in most environments.
304 A read-only version of a file system or volume at a given point in time.
306 .Ar filesystem Ns @ Ns Ar name
308 .Ar volume Ns @ Ns Ar name .
312 but without the hold on on-disk data. It can be used as the source of a send
313 (but not for a receive). It is specified as
314 .Ar filesystem Ns # Ns Ar name
316 .Ar volume Ns # Ns Ar name .
318 .Ss ZFS File System Hierarchy
319 A ZFS storage pool is a logical collection of devices that provide space for
321 A storage pool is also the root of the ZFS file system hierarchy.
323 The root of the pool can be accessed as a file system, such as mounting and
324 unmounting, taking snapshots, and setting properties.
325 The physical storage characteristics, however, are managed by the
331 for more information on creating and administering pools.
333 A snapshot is a read-only copy of a file system or volume.
334 Snapshots can be created extremely quickly, and initially consume no additional
335 space within the pool.
336 As data within the active dataset changes, the snapshot consumes more data than
337 would otherwise be shared with the active dataset.
339 Snapshots can have arbitrary names.
340 Snapshots of volumes can be cloned or rolled back, visibility is determined
343 property of the parent volume.
345 File system snapshots can be accessed under the
347 directory in the root of the file system.
348 Snapshots are automatically mounted on demand and may be unmounted at regular
350 The visibility of the
352 directory can be controlled by the
356 A bookmark is like a snapshot, a read-only copy of a file system or volume.
357 Bookmarks can be created extremely quickly, compared to snapshots, and they
358 consume no additional space within the pool. Bookmarks can also have arbitrary
359 names, much like snapshots.
361 Unlike snapshots, bookmarks can not be accessed through the filesystem in any
362 way. From a storage standpoint a bookmark just provides a way to reference
363 when a snapshot was created as a distinct object. Bookmarks are initially
364 tied to a snapshot, not the filesystem or volume, and they will survive if the
365 snapshot itself is destroyed. Since they are very light weight there's little
366 incentive to destroy them.
368 A clone is a writable volume or file system whose initial contents are the same
370 As with snapshots, creating a clone is nearly instantaneous, and initially
371 consumes no additional space.
373 Clones can only be created from a snapshot.
374 When a snapshot is cloned, it creates an implicit dependency between the parent
376 Even though the clone is created somewhere else in the dataset hierarchy, the
377 original snapshot cannot be destroyed as long as a clone exists.
380 property exposes this dependency, and the
382 command lists any such dependencies, if they exist.
384 The clone parent-child dependency relationship can be reversed by using the
389 file system to become a clone of the specified file system, which makes it
390 possible to destroy the file system that the clone was created from.
392 Creating a ZFS file system is a simple operation, so the number of file systems
393 per system is likely to be numerous.
394 To cope with this, ZFS automatically manages mounting and unmounting file
395 systems without the need to edit the
398 All automatically managed file systems are mounted by ZFS at boot time.
400 By default, file systems are mounted under
404 is the name of the file system in the ZFS namespace.
405 Directories are created and destroyed as needed.
407 A file system can also have a mount point set in the
410 This directory is created as needed, and ZFS automatically mounts the file
412 .Nm zfs Cm mount Fl a
419 property can be inherited, so if
425 automatically inherits a mount point of
426 .Pa /export/stuff/user .
432 prevents the file system from being mounted.
434 If needed, ZFS file systems can also be managed with traditional tools
440 If a file system's mount point is set to
442 ZFS makes no attempt to manage the file system, and the administrator is
443 responsible for mounting and unmounting the file system.
445 Deduplication is the process for removing redundant data at the block level,
446 reducing the total amount of data stored. If a file system has the
448 property enabled, duplicate data blocks are removed synchronously. The result
449 is that only unique data is stored and common components are shared among files.
451 Deduplicating data is a very resource-intensive operation. It is generally
452 recommended that you have at least 1.25 GiB of RAM per 1 TiB of storage when
453 you enable deduplication. Calculating the exact requirement depends heavily
454 on the type of data stored in the pool.
456 Enabling deduplication on an improperly-designed system can result in
457 performance issues (slow IO and administrative operations). It can potentially
458 lead to problems importing a pool due to memory exhaustion. Deduplication
459 can consume significant processing power (CPU) and memory as well as generate
462 Before creating a pool with deduplication enabled, ensure that you have planned
463 your hardware requirements appropriately and implemented appropriate recovery
464 practices, such as regular backups. As an alternative to deduplication
466 .Sy compression=lz4 ,
467 as a less resource-intensive alternative.
468 .Ss Native Properties
469 Properties are divided into two types, native properties and user-defined
474 Native properties either export internal statistics or control ZFS behavior.
475 In addition, native properties are either editable or read-only.
476 User properties have no effect on ZFS behavior, but you can use them to annotate
477 datasets in a way that is meaningful in your environment.
478 For more information about user properties, see the
482 Every dataset has a set of properties that export statistics about the dataset
483 as well as control various behaviors.
484 Properties are inherited from the parent unless overridden by the child.
485 Some properties apply only to certain types of datasets
486 .Pq file systems, volumes, or snapshots .
488 The values of numeric properties can be specified using human-readable suffixes
498 The following are all valid
501 .Li 1536M, 1.5g, 1.50GB .
503 The values of non-numeric properties are case sensitive and must be lowercase,
510 The following native properties consist of read-only statistics about the
512 These properties can be neither set, nor inherited.
513 Native properties apply to all dataset types unless otherwise noted.
514 .Bl -tag -width "usedbyrefreservation"
516 The amount of space available to the dataset and all its children, assuming that
517 there is no other activity in the pool.
518 Because space is shared within a pool, availability can be limited by any number
519 of factors, including physical pool size, quotas, reservations, or other
520 datasets within the pool.
522 This property can also be referred to by its shortened column name,
525 For non-snapshots, the compression ratio achieved for the
527 space of this dataset, expressed as a multiplier.
530 property includes descendant datasets, and, for clones, does not include the
531 space shared with the origin snapshot.
537 Compression can be turned on by running:
538 .Nm zfs Cm set Sy compression Ns = Ns Sy on Ar dataset .
542 The transaction group (txg) in which the dataset was created. Bookmarks have
545 as the snapshot they are initially tied to. This property is suitable for
546 ordering a list of snapshots, e.g. for incremental send and receive.
548 The time this dataset was created.
550 For snapshots, this property is a comma-separated list of filesystems or volumes
551 which are clones of this snapshot.
554 property is this snapshot.
557 property is not empty, then this snapshot can not be destroyed
564 The roles of origin and clone can be swapped by promoting the clone with the
570 if the snapshot has been marked for deferred destroy by using the
571 .Nm zfs Cm destroy Fl d
573 Otherwise, the property is
575 .It Sy filesystem_count
576 The total number of filesystems and volumes that exist under this location in
578 This value is only available when a
580 has been set somewhere in the tree under which the dataset resides.
582 The 64 bit GUID of this dataset or bookmark which does not change over its
583 entire lifetime. When a snapshot is sent to another pool, the received
584 snapshot has the same GUID. Thus, the
586 is suitable to identify a snapshot across pools.
587 .It Sy logicalreferenced
588 The amount of space that is
590 accessible by this dataset.
594 The logical space ignores the effect of the
598 properties, giving a quantity closer to the amount of data that applications
600 However, it does include space consumed by metadata.
602 This property can also be referred to by its shortened column name,
605 The amount of space that is
607 consumed by this dataset and all its descendents.
611 The logical space ignores the effect of the
615 properties, giving a quantity closer to the amount of data that applications
617 However, it does include space consumed by metadata.
619 This property can also be referred to by its shortened column name,
622 For file systems, indicates whether the file system is currently mounted.
623 This property can be either
628 For cloned file systems or volumes, the snapshot from which the clone was
633 .It Sy receive_resume_token
634 For filesystems or volumes which have saved partially-completed state from
636 this opaque token can be provided to
638 to resume and complete the
641 The amount of data that is accessible by this dataset, which may or may not be
642 shared with other datasets in the pool.
643 When a snapshot or clone is created, it initially references the same amount of
644 space as the file system or snapshot it was created from, since its contents are
647 This property can also be referred to by its shortened column name,
649 .It Sy refcompressratio
650 The compression ratio achieved for the
652 space of this dataset, expressed as a multiplier.
656 .It Sy snapshot_count
657 The total number of snapshots that exist under this location in the dataset
659 This value is only available when a
661 has been set somewhere in the tree under which the dataset resides.
669 The amount of space consumed by this dataset and all its descendents.
670 This is the value that is checked against this dataset's quota and reservation.
671 The space used does not include this dataset's reservation, but does take into
672 account the reservations of any descendent datasets.
673 The amount of space that a dataset consumes from its parent, as well as the
674 amount of space that is freed if this dataset is recursively destroyed, is the
675 greater of its space used and its reservation.
677 The used space of a snapshot
682 is space that is referenced exclusively by this snapshot.
683 If this snapshot is destroyed, the amount of
686 Space that is shared by multiple snapshots isn't accounted for in this metric.
687 When a snapshot is destroyed, space that was previously shared with this
688 snapshot can become unique to snapshots adjacent to it, thus changing the used
689 space of those snapshots.
690 The used space of the latest snapshot can also be affected by changes in the
694 space of a snapshot is a subset of the
696 space of the snapshot.
698 The amount of space used, available, or referenced does not take into account
700 Pending changes are generally accounted for within a few seconds.
701 Committing a change to a disk using
705 does not necessarily guarantee that the space usage information is updated
710 properties decompose the
712 properties into the various reasons that space is used.
715 .Sy usedbychildren No +
716 .Sy usedbydataset No +
717 .Sy usedbyrefreservation No +
718 .Sy usedbysnapshots .
719 These properties are only available for datasets created on
723 .It Sy usedbychildren
724 The amount of space used by children of this dataset, which would be freed if
725 all the dataset's children were destroyed.
727 The amount of space used by this dataset itself, which would be freed if the
728 dataset were destroyed
729 .Po after first removing any
731 and destroying any necessary snapshots or descendents
733 .It Sy usedbyrefreservation
734 The amount of space used by a
736 set on this dataset, which would be freed if the
739 .It Sy usedbysnapshots
740 The amount of space consumed by snapshots of this dataset.
741 In particular, it is the amount of space that would be freed if all of this
742 dataset's snapshots were destroyed.
743 Note that this is not simply the sum of the snapshots'
745 properties because space can be shared by multiple snapshots.
746 .It Sy userused Ns @ Ns Em user
747 The amount of space consumed by the specified user in this dataset.
748 Space is charged to the owner of each file, as displayed by
750 The amount of space charged is displayed by
756 subcommand for more information.
758 Unprivileged users can access only their own space usage.
759 The root user, or a user who has been granted the
763 can access everyone's usage.
766 .Sy userused Ns @ Ns Em ...
767 properties are not displayed by
768 .Nm zfs Cm get Sy all .
769 The user's name must be appended after the @ symbol, using one of the following
771 .Bl -bullet -width ""
785 .Sy joe.smith@mydomain
794 Files created on Linux always have POSIX owners.
795 .It Sy userobjused Ns @ Ns Em user
798 property is similar to
800 but instead it counts the number of objects consumed by a user. This property
801 counts all objects allocated on behalf of the user, it may differ from the
802 results of system tools such as
807 is set on a file system additional objects will be created per-file to store
808 extended attributes. These additional objects are reflected in the
810 value and are counted against the user's
812 When a file system is configured to use
814 no additional internal objects are normally required.
816 This property is set to the number of user holds on this snapshot.
817 User holds are set by using the
820 .It Sy groupused Ns @ Ns Em group
821 The amount of space consumed by the specified group in this dataset.
822 Space is charged to the group of each file, as displayed by
825 .Sy userused Ns @ Ns Em user
826 property for more information.
828 Unprivileged users can only access their own groups' space usage.
829 The root user, or a user who has been granted the
833 can access all groups' usage.
834 .It Sy groupobjused Ns @ Ns Em group
835 The number of objects consumed by the specified group in this dataset.
836 Multiple objects may be charged to the group for each file when extended
837 attributes are in use. See the
838 .Sy userobjused Ns @ Ns Em user
839 property for more information.
841 Unprivileged users can only access their own groups' space usage.
842 The root user, or a user who has been granted the
846 can access all groups' usage.
848 For volumes, specifies the block size of the volume.
851 cannot be changed once the volume has been written, so it should be set at
852 volume creation time.
855 for volumes is 8 Kbytes.
856 Any power of 2 from 512 bytes to 128 Kbytes is valid.
858 This property can also be referred to by its shortened column name,
863 by this dataset, that was written since the previous snapshot
864 .Pq i.e. that is not referenced by the previous snapshot .
865 .It Sy written Ns @ Ns Em snapshot
868 space written to this dataset since the specified snapshot.
869 This is the space that is referenced by this dataset but was not referenced by
870 the specified snapshot.
874 may be specified as a short snapshot name
875 .Po just the part after the
878 in which case it will be interpreted as a snapshot in the same filesystem as
882 may be a full snapshot name
883 .Po Em filesystem Ns @ Ns Em snapshot Pc ,
884 which for clones may be a snapshot in the origin's filesystem
885 .Pq or the origin of the origin's filesystem, etc.
888 The following native properties can be used to change the behavior of a ZFS
892 .Sy aclinherit Ns = Ns Sy discard Ns | Ns Sy noallow Ns | Ns
893 .Sy restricted Ns | Ns Sy passthrough Ns | Ns Sy passthrough-x
895 Controls how ACEs are inherited when files and directories are created.
896 .Bl -tag -width "passthrough-x"
898 does not inherit any ACEs.
900 only inherits inheritable ACEs that specify
908 permissions when the ACE is inherited.
910 inherits all inheritable ACEs without any modifications.
919 ACEs inherit the execute permission only if the file creation mode also requests
923 When the property value is set to
925 files are created with a mode determined by the inheritable ACEs.
926 If no inheritable ACEs exist that affect the mode, then the mode is set in
927 accordance to the requested mode from the application.
931 property does not apply to posix ACLs.
932 .It Sy acltype Ns = Ns Sy off Ns | Ns Sy noacl Ns | Ns Sy posixacl
933 Controls whether ACLs are enabled and if so what type of ACL to use.
934 .Bl -tag -width "posixacl"
936 default, when a file system has the
938 property set to off then ACLs are disabled.
943 indicates posix ACLs should be used. Posix ACLs are specific to Linux and are
944 not functional on other platforms. Posix ACLs are stored as an extended
945 attribute and therefore will not overwrite any existing NFSv4 ACLs which
949 To obtain the best performance when setting
951 users are strongly encouraged to set the
953 property. This will result in the posix ACL being stored more efficiently on
954 disk. But as a consequence of this all new extended attributes will only be
955 accessible from OpenZFS implementations which support the
959 property for more details.
960 .It Sy atime Ns = Ns Sy on Ns | Ns Sy off
961 Controls whether the access time for files is updated when they are read.
962 Turning this property off avoids producing write traffic when reading files and
963 can result in significant performance gains, though it might confuse mailers
964 and other similar utilities. The values
968 are equivalent to the
972 mount options. The default value is
977 .It Sy canmount Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy noauto
978 If this property is set to
980 the file system cannot be mounted, and is ignored by
981 .Nm zfs Cm mount Fl a .
982 Setting this property to
984 is similar to setting the
988 except that the dataset still has a normal
990 property, which can be inherited.
991 Setting this property to
993 allows datasets to be used solely as a mechanism to inherit properties.
994 One example of setting
995 .Sy canmount Ns = Ns Sy off
996 is to have two datasets with the same
998 so that the children of both datasets appear in the same directory, but might
999 have different inherited characteristics.
1003 a dataset can only be mounted and unmounted explicitly.
1004 The dataset is not mounted automatically when the dataset is created or
1005 imported, nor is it mounted by the
1006 .Nm zfs Cm mount Fl a
1007 command or unmounted by the
1008 .Nm zfs Cm unmount Fl a
1011 This property is not inherited.
1013 .Sy checksum Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy fletcher2 Ns | Ns
1014 .Sy fletcher4 Ns | Ns Sy sha256 Ns | Ns Sy noparity Ns | Ns
1015 .Sy sha512 Ns | Ns Sy skein Ns | Ns Sy edonr
1017 Controls the checksum used to verify data integrity.
1018 The default value is
1020 which automatically selects an appropriate algorithm
1023 but this may change in future releases
1027 disables integrity checking on user data.
1030 not only disables integrity but also disables maintaining parity for user data.
1031 This setting is used internally by a dump device residing on a RAID-Z pool and
1032 should not be used by any other dataset.
1033 Disabling checksums is
1035 a recommended practice.
1042 checksum algorithms require enabling the appropriate features on the pool.
1044 .Xr zpool-features 5
1045 for more information on these algorithms.
1047 Changing this property affects only newly-written data.
1049 .Sy compression Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy gzip Ns | Ns
1050 .Sy gzip- Ns Em N Ns | Ns Sy lz4 Ns | Ns Sy lzjb Ns | Ns Sy zle
1052 Controls the compression algorithm used for this dataset.
1054 Setting compression to
1056 indicates that the current default compression algorithm should be used.
1057 The default balances compression and decompression speed, with compression ratio
1058 and is expected to work well on a wide variety of workloads.
1059 Unlike all other settings for this property,
1061 does not select a fixed compression type.
1062 As new compression algorithms are added to ZFS and enabled on a pool, the
1063 default compression algorithm may change.
1064 The current default compression algorithm is either
1073 compression algorithm is a high-performance replacement for the
1076 It features significantly faster compression and decompression, as well as a
1077 moderately higher compression ratio than
1079 but can only be used on pools with the
1084 .Xr zpool-features 5
1085 for details on ZFS feature flags and the
1091 compression algorithm is optimized for performance while providing decent data
1096 compression algorithm uses the same compression as the
1101 level by using the value
1105 is an integer from 1
1108 .Pq best compression ratio .
1113 .Po which is also the default for
1119 compression algorithm compresses runs of zeros.
1121 This property can also be referred to by its shortened column name
1123 Changing this property affects only newly-written data.
1125 .Sy context Ns = Ns Sy none Ns | Ns
1126 .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level
1128 This flag sets the SELinux context for all files in the file system under
1129 a mount point for that file system. See
1131 for more information.
1133 .Sy fscontext Ns = Ns Sy none Ns | Ns
1134 .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level
1136 This flag sets the SELinux context for the file system file system being
1139 for more information.
1141 .Sy defcontext Ns = Ns Sy none Ns | Ns
1142 .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level
1144 This flag sets the SELinux default context for unlabeled files. See
1146 for more information.
1148 .Sy rootcontext Ns = Ns Sy none Ns | Ns
1149 .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level
1151 This flag sets the SELinux context for the root inode of the file system. See
1153 for more information.
1154 .It Sy copies Ns = Ns Sy 1 Ns | Ns Sy 2 Ns | Ns Sy 3
1155 Controls the number of copies of data stored for this dataset.
1156 These copies are in addition to any redundancy provided by the pool, for
1157 example, mirroring or RAID-Z.
1158 The copies are stored on different disks, if possible.
1159 The space used by multiple copies is charged to the associated file and dataset,
1162 property and counting against quotas and reservations.
1164 Changing this property only affects newly-written data.
1165 Therefore, set this property at file system creation time by using the
1166 .Fl o Sy copies Ns = Ns Ar N
1169 Remember that ZFS will not import a pool with a missing top-level vdev. Do
1171 create, for example a two-disk striped pool and set
1173 on some datasets thinking you have setup redundancy for them. When a disk
1174 fails you will not be able to import the pool and will have lost all of your
1176 .It Sy devices Ns = Ns Sy on Ns | Ns Sy off
1177 Controls whether device nodes can be opened on this file system.
1178 The default value is
1184 are equivalent to the
1190 .Sy dnodesize Ns = Ns Sy legacy Ns | Ns Sy auto Ns | Ns Sy 1k Ns | Ns
1191 .Sy 2k Ns | Ns Sy 4k Ns | Ns Sy 8k Ns | Ns Sy 16k
1193 Specifies a compatibility mode or literal value for the size of dnodes in the
1194 file system. The default value is
1196 Setting this property to a value other than
1198 requires the large_dnode pool feature to be enabled.
1204 if the dataset uses the
1206 property setting and the workload makes heavy use of extended attributes. This
1207 may be applicable to SELinux-enabled systems, Lustre servers, and Samba
1208 servers, for example. Literal values are supported for cases where the optimal
1209 size is known in advance and for performance testing.
1215 if you need to receive a send stream of this dataset on a pool that doesn't
1216 enable the large_dnode feature, or if you need to import this pool on a system
1217 that doesn't support the large_dnode feature.
1219 This property can also be referred to by its shortened column name,
1221 .It Sy exec Ns = Ns Sy on Ns | Ns Sy off
1222 Controls whether processes can be executed from within this file system.
1223 The default value is
1229 are equivalent to the
1234 .It Sy filesystem_limit Ns = Ns Em count Ns | Ns Sy none
1235 Limits the number of filesystems and volumes that can exist under this point in
1237 The limit is not enforced if the user is allowed to change the limit.
1239 .Sy filesystem_limit
1242 a descendent of a filesystem that already has a
1243 .Sy filesystem_limit
1244 does not override the ancestor's
1245 .Sy filesystem_limit ,
1246 but rather imposes an additional limit.
1247 This feature must be enabled to be used
1249 .Xr zpool-features 5
1251 .It Sy mountpoint Ns = Ns Pa path Ns | Ns Sy none Ns | Ns Sy legacy
1252 Controls the mount point used for this file system.
1255 section for more information on how this property is used.
1259 property is changed for a file system, the file system and any children that
1260 inherit the mount point are unmounted.
1263 then they remain unmounted.
1264 Otherwise, they are automatically remounted in the new location if the property
1269 or if they were mounted before the property was changed.
1270 In addition, any shared file systems are unshared and shared in the new
1272 .It Sy nbmand Ns = Ns Sy on Ns | Ns Sy off
1273 Controls whether the file system should be mounted with
1275 .Pq Non Blocking mandatory locks .
1276 This is used for SMB clients.
1277 Changes to this property only take effect when the file system is umounted and
1281 for more information on
1283 mounts. This property is not used on Linux.
1284 .It Sy overlay Ns = Ns Sy off Ns | Ns Sy on
1285 Allow mounting on a busy directory or a directory which already contains
1286 files or directories. This is the default mount behavior for Linux file systems.
1287 For consistency with OpenZFS on other platforms overlay mounts are
1291 to enable overlay mounts.
1292 .It Sy primarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1293 Controls what is cached in the primary cache
1295 If this property is set to
1297 then both user data and metadata is cached.
1298 If this property is set to
1300 then neither user data nor metadata is cached.
1301 If this property is set to
1303 then only metadata is cached.
1304 The default value is
1306 .It Sy quota Ns = Ns Em size Ns | Ns Sy none
1307 Limits the amount of space a dataset and its descendents can consume.
1308 This property enforces a hard limit on the amount of space used.
1309 This includes all space consumed by descendents, including file systems and
1311 Setting a quota on a descendent of a dataset that already has a quota does not
1312 override the ancestor's quota, but rather imposes an additional limit.
1314 Quotas cannot be set on volumes, as the
1316 property acts as an implicit quota.
1317 .It Sy snapshot_limit Ns = Ns Em count Ns | Ns Sy none
1318 Limits the number of snapshots that can be created on a dataset and its
1322 on a descendent of a dataset that already has a
1324 does not override the ancestor's
1325 .Sy snapshot_limit ,
1326 but rather imposes an additional limit.
1327 The limit is not enforced if the user is allowed to change the limit.
1328 For example, this means that recursive snapshots taken from the global zone are
1329 counted against each delegated dataset within a zone.
1330 This feature must be enabled to be used
1332 .Xr zpool-features 5
1334 .It Sy userquota@ Ns Em user Ns = Ns Em size Ns | Ns Sy none
1335 Limits the amount of space consumed by the specified user.
1336 User space consumption is identified by the
1337 .Sy userspace@ Ns Em user
1340 Enforcement of user quotas may be delayed by several seconds.
1341 This delay means that a user might exceed their quota before the system notices
1342 that they are over quota and begins to refuse additional writes with the
1346 .Nm zfs Cm userspace
1347 subcommand for more information.
1349 Unprivileged users can only access their own groups' space usage.
1350 The root user, or a user who has been granted the
1354 can get and set everyone's quota.
1356 This property is not available on volumes, on file systems before version 4, or
1357 on pools before version 15.
1359 .Sy userquota@ Ns Em ...
1360 properties are not displayed by
1361 .Nm zfs Cm get Sy all .
1362 The user's name must be appended after the
1364 symbol, using one of the following forms:
1372 .Em POSIX numeric ID
1379 .Sy joe.smith@mydomain
1388 Files created on Linux always have POSIX owners.
1389 .It Sy userobjquota@ Ns Em user Ns = Ns Em size Ns | Ns Sy none
1394 but it limits the number of objects a user can create. Please refer to
1396 for more information about how objects are counted.
1397 .It Sy groupquota@ Ns Em group Ns = Ns Em size Ns | Ns Sy none
1398 Limits the amount of space consumed by the specified group.
1399 Group space consumption is identified by the
1400 .Sy groupused@ Ns Em group
1403 Unprivileged users can access only their own groups' space usage.
1404 The root user, or a user who has been granted the
1408 can get and set all groups' quotas.
1409 .It Sy groupobjquota@ Ns Em group Ns = Ns Em size Ns | Ns Sy none
1414 but it limits number of objects a group can consume. Please refer to
1416 for more information about how objects are counted.
1417 .It Sy readonly Ns = Ns Sy on Ns | Ns Sy off
1418 Controls whether this dataset can be modified.
1419 The default value is
1425 are equivalent to the
1431 This property can also be referred to by its shortened column name,
1433 .It Sy recordsize Ns = Ns Em size
1434 Specifies a suggested block size for files in the file system.
1435 This property is designed solely for use with database workloads that access
1436 files in fixed-size records.
1437 ZFS automatically tunes block sizes according to internal algorithms optimized
1438 for typical access patterns.
1440 For databases that create very large files but access them in small random
1441 chunks, these algorithms may be suboptimal.
1444 greater than or equal to the record size of the database can result in
1445 significant performance gains.
1446 Use of this property for general purpose file systems is strongly discouraged,
1447 and may adversely affect performance.
1449 The size specified must be a power of two greater than or equal to 512 and less
1450 than or equal to 128 Kbytes.
1453 feature is enabled on the pool, the size may be up to 1 Mbyte.
1455 .Xr zpool-features 5
1456 for details on ZFS feature flags.
1458 Changing the file system's
1460 affects only files created afterward; existing files are unaffected.
1462 This property can also be referred to by its shortened column name,
1464 .It Sy redundant_metadata Ns = Ns Sy all Ns | Ns Sy most
1465 Controls what types of metadata are stored redundantly.
1466 ZFS stores an extra copy of metadata, so that if a single block is corrupted,
1467 the amount of user data lost is limited.
1468 This extra copy is in addition to any redundancy provided at the pool level
1469 .Pq e.g. by mirroring or RAID-Z ,
1470 and is in addition to an extra copy specified by the
1473 .Pq up to a total of 3 copies .
1474 For example if the pool is mirrored,
1475 .Sy copies Ns = Ns 2 ,
1477 .Sy redundant_metadata Ns = Ns Sy most ,
1478 then ZFS stores 6 copies of most metadata, and 4 copies of data and some
1483 ZFS stores an extra copy of all metadata.
1484 If a single on-disk block is corrupt, at worst a single block of user data
1493 ZFS stores an extra copy of most types of metadata.
1494 This can improve performance of random writes, because less metadata must be
1496 In practice, at worst about 100 blocks
1501 of user data can be lost if a single on-disk block is corrupt.
1502 The exact behavior of which metadata blocks are stored redundantly may change in
1505 The default value is
1507 .It Sy refquota Ns = Ns Em size Ns | Ns Sy none
1508 Limits the amount of space a dataset can consume.
1509 This property enforces a hard limit on the amount of space used.
1510 This hard limit does not include space used by descendents, including file
1511 systems and snapshots.
1512 .It Sy refreservation Ns = Ns Em size Ns | Ns Sy none
1513 The minimum amount of space guaranteed to a dataset, not including its
1515 When the amount of space used is below this value, the dataset is treated as if
1516 it were taking up the amount of space specified by
1517 .Sy refreservation .
1520 reservation is accounted for in the parent datasets' space used, and counts
1521 against the parent datasets' quotas and reservations.
1525 is set, a snapshot is only allowed if there is enough free pool space outside of
1526 this reservation to accommodate the current number of
1528 bytes in the dataset.
1530 This property can also be referred to by its shortened column name,
1532 .It Sy relatime Ns = Ns Sy on Ns | Ns Sy off
1533 Controls the manner in which the access time is updated when
1535 is set. Turning this property on causes the access time to be updated relative
1536 to the modify or change time. Access time is only updated if the previous
1537 access time was earlier than the current modify or change time or if the
1538 existing access time hasn't been updated within the past 24 hours. The default
1545 are equivalent to the
1550 .It Sy reservation Ns = Ns Em size Ns | Ns Sy none
1551 The minimum amount of space guaranteed to a dataset and its descendants.
1552 When the amount of space used is below this value, the dataset is treated as if
1553 it were taking up the amount of space specified by its reservation.
1554 Reservations are accounted for in the parent datasets' space used, and count
1555 against the parent datasets' quotas and reservations.
1557 This property can also be referred to by its shortened column name,
1559 .It Sy secondarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1560 Controls what is cached in the secondary cache
1562 If this property is set to
1564 then both user data and metadata is cached.
1565 If this property is set to
1567 then neither user data nor metadata is cached.
1568 If this property is set to
1570 then only metadata is cached.
1571 The default value is
1573 .It Sy setuid Ns = Ns Sy on Ns | Ns Sy off
1574 Controls whether the setuid bit is respected for the file system.
1575 The default value is
1581 are equivalent to the
1586 .It Sy sharesmb Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1587 Controls whether the file system is shared by using
1588 .Sy Samba USERSHARES
1589 and what options are to be used. Otherwise, the file system is automatically
1590 shared and unshared with the
1594 commands. If the property is set to on, the
1596 command is invoked to create a
1599 Because SMB shares requires a resource name, a unique resource name is
1600 constructed from the dataset name. The constructed name is a copy of the
1601 dataset name except that the characters in the dataset name, which would be
1602 invalid in the resource name, are replaced with underscore (_) characters.
1603 Linux does not currently support additional options which might be available
1610 the file systems are unshared.
1612 The share is created with the ACL (Access Control List) "Everyone:F" ("F"
1613 stands for "full permissions", ie. read and write permissions) and no guest
1614 access (which means Samba must be able to authenticate a real user, system
1615 passwd/shadow, LDAP or smbpasswd based) by default. This means that any
1616 additional access control (disallow specific user specific access etc) must
1617 be done on the underlying file system.
1618 .It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1619 Controls whether the file system is shared via NFS, and what options are to be
1621 A file system with a
1627 command and entries in the
1630 Otherwise, the file system is automatically shared and unshared with the
1635 If the property is set to
1637 the dataset is shared using the default options:
1639 .Em sec=sys,rw,crossmnt,no_subtree_check,no_root_squash
1643 for the meaning of the default options. Otherwise, the
1645 command is invoked with options equivalent to the contents of this property.
1649 property is changed for a dataset, the dataset and any children inheriting the
1650 property are re-shared with the new options, only if the property was previously
1652 or if they were shared before the property was changed.
1653 If the new property is
1655 the file systems are unshared.
1656 .It Sy logbias Ns = Ns Sy latency Ns | Ns Sy throughput
1657 Provide a hint to ZFS about handling of synchronous requests in this dataset.
1663 ZFS will use pool log devices
1665 to handle the requests at low latency.
1670 ZFS will not use configured pool log devices.
1671 ZFS will instead optimize synchronous operations for global pool throughput and
1672 efficient use of resources.
1673 .It Sy snapdev Ns = Ns Sy hidden Ns | Ns Sy visible
1674 Controls whether the volume snapshot devices under
1675 .Em /dev/zvol/<pool>
1676 are hidden or visible. The default value is
1678 .It Sy snapdir Ns = Ns Sy hidden Ns | Ns Sy visible
1679 Controls whether the
1681 directory is hidden or visible in the root of the file system as discussed in
1685 The default value is
1687 .It Sy sync Ns = Ns Sy standard Ns | Ns Sy always Ns | Ns Sy disabled
1688 Controls the behavior of synchronous requests
1689 .Pq e.g. fsync, O_DSYNC .
1693 specified behavior of ensuring all synchronous requests are written to stable
1694 storage and all devices are flushed to ensure data is not cached by device
1696 .Pq this is the default .
1698 causes every file system transaction to be written and flushed before its
1699 system call returns.
1700 This has a large performance penalty.
1702 disables synchronous requests.
1703 File system transactions are only committed to stable storage periodically.
1704 This option will give the highest performance.
1705 However, it is very dangerous as ZFS would be ignoring the synchronous
1706 transaction demands of applications such as databases or NFS.
1707 Administrators should only use this option when the risks are understood.
1708 .It Sy version Ns = Ns Em N Ns | Ns Sy current
1709 The on-disk version of this file system, which is independent of the pool
1711 This property can only be set to later supported versions.
1715 .It Sy volsize Ns = Ns Em size
1716 For volumes, specifies the logical size of the volume.
1717 By default, creating a volume establishes a reservation of equal size.
1718 For storage pools with a version number of 9 or higher, a
1723 are reflected in an equivalent change to the reservation
1729 can only be set to a multiple of
1733 The reservation is kept equal to the volume's logical size to prevent unexpected
1734 behavior for consumers.
1735 Without the reservation, the volume could run out of space, resulting in
1736 undefined behavior or data corruption, depending on how the volume is used.
1737 These effects can also occur when the volume size is changed while it is in use
1738 .Pq particularly when shrinking the size .
1739 Extreme care should be used when adjusting the volume size.
1741 Though not recommended, a
1744 .Qq thin provisioning
1746 can be created by specifying the
1749 .Nm zfs Cm create Fl V
1750 command, or by changing the reservation after the volume has been created.
1753 is a volume where the reservation is less then the volume size.
1754 Consequently, writes to a sparse volume can fail with
1756 when the pool is low on space.
1757 For a sparse volume, changes to
1759 are not reflected in the reservation.
1760 .It Sy volmode Ns = Ns Cm default | full | geom | dev | none
1761 This property specifies how volumes should be exposed to the OS.
1764 exposes volumes as fully fledged block devices, providing maximal
1765 functionality. The value
1767 is just an alias for
1769 and is kept for compatibility.
1772 hides its partitions.
1773 Volumes with property set to
1775 are not exposed outside ZFS, but can be snapshoted, cloned, replicated, etc,
1776 that can be suitable for backup purposes.
1779 means that volumes exposition is controlled by system-wide tunable
1786 are encoded as 1, 2 and 3 respectively.
1787 The default values is
1789 .It Sy vscan Ns = Ns Sy on Ns | Ns Sy off
1790 Controls whether regular files should be scanned for viruses when a file is
1792 In addition to enabling this property, the virus scan service must also be
1793 enabled for virus scanning to occur.
1794 The default value is
1796 This property is not used on Linux.
1797 .It Sy xattr Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy sa
1798 Controls whether extended attributes are enabled for this file system. Two
1799 styles of extended attributes are supported either directory based or system
1802 The default value of
1804 enables directory based extended attributes. This style of extended attribute
1805 imposes no practical limit on either the size or number of attributes which
1806 can be set on a file. Although under Linux the
1810 system calls limit the maximum size to 64K. This is the most compatible
1811 style of extended attribute and is supported by all OpenZFS implementations.
1813 System attribute based xattrs can be enabled by setting the value to
1815 The key advantage of this type of xattr is improved performance. Storing
1816 extended attributes as system attributes significantly decreases the amount of
1817 disk IO required. Up to 64K of data may be stored per-file in the space
1818 reserved for system attributes. If there is not enough space available for
1819 an extended attribute then it will be automatically written as a directory
1820 based xattr. System attribute based extended attributes are not accessible
1821 on platforms which do not support the
1825 The use of system attribute based xattrs is strongly encouraged for users of
1826 SELinux or posix ACLs. Both of these features heavily rely of extended
1827 attributes and benefit significantly from the reduced access time.
1833 are equivalent to the
1838 .It Sy zoned Ns = Ns Sy on Ns | Ns Sy off
1839 Controls whether the dataset is managed from a non-global zone. Zones are a
1840 Solaris feature and are not relevant on Linux. The default value is
1844 The following three properties cannot be changed after the file system is
1845 created, and therefore, should be set when the file system is created.
1846 If the properties are not set with the
1850 commands, these properties are inherited from the parent dataset.
1851 If the parent dataset lacks these properties due to having been created prior to
1852 these features being supported, the new file system will have the default values
1853 for these properties.
1856 .Sy casesensitivity Ns = Ns Sy sensitive Ns | Ns
1857 .Sy insensitive Ns | Ns Sy mixed
1859 Indicates whether the file name matching algorithm used by the file system
1860 should be case-sensitive, case-insensitive, or allow a combination of both
1862 The default value for the
1870 file systems have case-sensitive file names.
1876 property indicates that the file system can support requests for both
1877 case-sensitive and case-insensitive matching behavior.
1878 Currently, case-insensitive matching behavior on a file system that supports
1879 mixed behavior is limited to the SMB server product.
1880 For more information about the
1882 value behavior, see the "ZFS Administration Guide".
1884 .Sy normalization Ns = Ns Sy none Ns | Ns Sy formC Ns | Ns
1885 .Sy formD Ns | Ns Sy formKC Ns | Ns Sy formKD
1887 Indicates whether the file system should perform a
1889 normalization of file names whenever two file names are compared, and which
1890 normalization algorithm should be used.
1891 File names are always stored unmodified, names are normalized as part of any
1893 If this property is set to a legal value other than
1897 property was left unspecified, the
1899 property is automatically set to
1901 The default value of the
1905 This property cannot be changed after the file system is created.
1906 .It Sy utf8only Ns = Ns Sy on Ns | Ns Sy off
1907 Indicates whether the file system should reject file names that include
1908 characters that are not present in the
1911 If this property is explicitly set to
1913 the normalization property must either not be explicitly set or be set to
1915 The default value for the
1919 This property cannot be changed after the file system is created.
1923 .Sy casesensitivity ,
1927 properties are also new permissions that can be assigned to non-privileged users
1928 by using the ZFS delegated administration feature.
1929 .Ss "Temporary Mount Point Properties"
1930 When a file system is mounted, either through
1932 for legacy mounts or the
1934 command for normal file systems, its mount options are set according to its
1936 The correlation between properties and mount options is as follows:
1938 PROPERTY MOUNT OPTION
1940 canmount auto/noauto
1944 relatime relatime/norelatime
1949 In addition, these options can be set on a per-mount basis using the
1951 option, without affecting the property that is stored on disk.
1952 The values specified on the command line override the values stored in the
1956 option is an alias for
1957 .Sy nodevices Ns , Ns Sy nosetuid .
1958 These properties are reported as
1963 If the properties are changed while the dataset is mounted, the new setting
1964 overrides any temporary settings.
1965 .Ss "User Properties"
1966 In addition to the standard native properties, ZFS supports arbitrary user
1968 User properties have no effect on ZFS behavior, but applications or
1969 administrators can use them to annotate datasets
1970 .Pq file systems, volumes, and snapshots .
1972 User property names must contain a colon
1974 character to distinguish them from native properties.
1975 They may contain lowercase letters, numbers, and the following punctuation
1984 The expected convention is that the property name is divided into two portions
1986 .Em module Ns : Ns Em property ,
1987 but this namespace is not enforced by ZFS.
1988 User property names can be at most 256 characters, and cannot begin with a dash
1991 When making programmatic use of user properties, it is strongly suggested to use
1996 component of property names to reduce the chance that two
1997 independently-developed packages use the same property name for different
2000 The values of user properties are arbitrary strings, are always inherited, and
2001 are never validated.
2002 All of the commands that operate on properties
2003 .Po Nm zfs Cm list ,
2008 can be used to manipulate both native properties and user properties.
2011 command to clear a user property.
2012 If the property is not defined in any parent dataset, it is removed entirely.
2013 Property values are limited to 8192 bytes.
2014 .Ss ZFS Volumes as Swap
2015 ZFS volumes may be used as swap devices. After creating the volume with the
2016 .Nm zfs Cm create Fl V
2017 command set up and enable the swap area using the
2021 commands. Do not swap to a file on a ZFS file system. A ZFS swap file
2022 configuration is not supported.
2024 All subcommands that modify state are logged persistently to the pool in their
2028 Displays a help message.
2033 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
2036 Creates a new ZFS file system.
2037 The file system is automatically mounted according to the
2039 property inherited from the parent.
2040 .Bl -tag -width "-o"
2041 .It Fl o Ar property Ns = Ns Ar value
2042 Sets the specified property as if the command
2043 .Nm zfs Cm set Ar property Ns = Ns Ar value
2044 was invoked at the same time the dataset was created.
2045 Any editable ZFS property can also be set at creation time.
2048 options can be specified.
2049 An error results if the same property is specified in multiple
2053 Creates all the non-existing parent datasets.
2054 Datasets created in this manner are automatically mounted according to the
2056 property inherited from their parent.
2057 Any property specified on the command line using the
2060 If the target filesystem already exists, the operation completes successfully.
2066 .Op Fl b Ar blocksize
2067 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
2068 .Fl V Ar size Ar volume
2070 Creates a volume of the given size.
2071 The volume is exported as a block device in
2072 .Pa /dev/zvol/path ,
2075 is the name of the volume in the ZFS namespace.
2076 The size represents the logical size as exported by the device.
2077 By default, a reservation of equal size is created.
2080 is automatically rounded up to the nearest 128 Kbytes to ensure that the volume
2081 has an integral number of blocks regardless of
2083 .Bl -tag -width "-b"
2084 .It Fl b Ar blocksize
2086 .Fl o Sy volblocksize Ns = Ns Ar blocksize .
2087 If this option is specified in conjunction with
2088 .Fl o Sy volblocksize ,
2089 the resulting behavior is undefined.
2090 .It Fl o Ar property Ns = Ns Ar value
2091 Sets the specified property as if the
2092 .Nm zfs Cm set Ar property Ns = Ns Ar value
2093 command was invoked at the same time the dataset was created.
2094 Any editable ZFS property can also be set at creation time.
2097 options can be specified.
2098 An error results if the same property is specified in multiple
2102 Creates all the non-existing parent datasets.
2103 Datasets created in this manner are automatically mounted according to the
2105 property inherited from their parent.
2106 Any property specified on the command line using the
2109 If the target filesystem already exists, the operation completes successfully.
2111 Creates a sparse volume with no reservation.
2115 .Sx Native Properties
2116 section for more information about sparse volumes.
2122 .Ar filesystem Ns | Ns Ar volume
2124 Destroys the given dataset.
2125 By default, the command unshares any file systems that are currently shared,
2126 unmounts any file systems that are currently mounted, and refuses to destroy a
2127 dataset that has active dependents
2128 .Pq children or clones .
2129 .Bl -tag -width "-R"
2131 Recursively destroy all dependents, including cloned file systems outside the
2134 Force an unmount of any file systems using the
2137 This option has no effect on non-file systems or unmounted file systems.
2142 No data will be deleted.
2143 This is useful in conjunction with the
2147 flags to determine what data would be deleted.
2149 Print machine-parsable verbose information about the deleted data.
2151 Recursively destroy all children.
2153 Print verbose information about the deleted data.
2156 Extreme care should be taken when applying either the
2160 options, as they can destroy large portions of a pool and cause unexpected
2161 behavior for mounted file systems in use.
2166 .Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns
2167 .Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ...
2169 The given snapshots are destroyed immediately if and only if the
2173 option would have destroyed it.
2174 Such immediate destruction would occur, for example, if the snapshot had no
2175 clones and the user-initiated reference count were zero.
2177 If a snapshot does not qualify for immediate destruction, it is marked for
2179 In this state, it exists as a usable, visible snapshot until both of the
2180 preconditions listed above are met, at which point it is destroyed.
2182 An inclusive range of snapshots may be specified by separating the first and
2183 last snapshots with a percent sign.
2184 The first and/or last snapshots may be left blank, in which case the
2185 filesystem's oldest or newest snapshot will be implied.
2188 .Pq or ranges of snapshots
2189 of the same filesystem or volume may be specified in a comma-separated list of
2191 Only the snapshot's short name
2192 .Po the part after the
2195 should be specified when using a range or comma-separated list to identify
2197 .Bl -tag -width "-R"
2199 Recursively destroy all clones of these snapshots, including the clones,
2200 snapshots, and children.
2201 If this flag is specified, the
2203 flag will have no effect.
2205 Defer snapshot deletion.
2210 No data will be deleted.
2211 This is useful in conjunction with the
2215 flags to determine what data would be deleted.
2217 Print machine-parsable verbose information about the deleted data.
2220 .Pq or mark for deferred deletion
2221 all snapshots with this name in descendent file systems.
2223 Print verbose information about the deleted data.
2225 Extreme care should be taken when applying either the
2229 options, as they can destroy large portions of a pool and cause unexpected
2230 behavior for mounted file systems in use.
2235 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
2237 The given bookmark is destroyed.
2242 .Oo Fl o Ar property Ns = Ns value Oc Ns ...
2243 .Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ...
2245 Creates snapshots with the given names.
2246 All previous modifications by successful system calls to the file system are
2247 part of the snapshots.
2248 Snapshots are taken atomically, so that all snapshots correspond to the same
2252 section for details.
2253 .Bl -tag -width "-o"
2254 .It Fl o Ar property Ns = Ns Ar value
2255 Sets the specified property; see
2259 Recursively create snapshots of all descendent datasets
2267 Roll back the given dataset to a previous snapshot.
2268 When a dataset is rolled back, all data that has changed since the snapshot is
2269 discarded, and the dataset reverts to the state at the time of the snapshot.
2270 By default, the command refuses to roll back to a snapshot other than the most
2272 In order to do so, all intermediate snapshots and bookmarks must be destroyed by
2279 options do not recursively destroy the child snapshots of a recursive snapshot.
2280 Only direct snapshots of the specified filesystem are destroyed by either of
2282 To completely roll back a recursive snapshot, you must rollback the individual
2284 .Bl -tag -width "-R"
2286 Destroy any more recent snapshots and bookmarks, as well as any clones of those
2291 option to force an unmount of any clone file systems that are to be destroyed.
2293 Destroy any snapshots and bookmarks more recent than the one specified.
2299 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
2300 .Ar snapshot Ar filesystem Ns | Ns Ar volume
2302 Creates a clone of the given snapshot.
2305 section for details.
2306 The target dataset can be located anywhere in the ZFS hierarchy, and is created
2307 as the same type as the original.
2308 .Bl -tag -width "-o"
2309 .It Fl o Ar property Ns = Ns Ar value
2310 Sets the specified property; see
2314 Creates all the non-existing parent datasets.
2315 Datasets created in this manner are automatically mounted according to the
2317 property inherited from their parent.
2318 If the target filesystem or volume already exists, the operation completes
2324 .Ar clone-filesystem
2326 Promotes a clone file system to no longer be dependent on its
2329 This makes it possible to destroy the file system that the clone was created
2331 The clone parent-child dependency relationship is reversed, so that the origin
2332 file system becomes a clone of the specified file system.
2334 The snapshot that was cloned, and any snapshots previous to this snapshot, are
2335 now owned by the promoted clone.
2336 The space they use moves from the origin file system to the promoted clone, so
2337 enough space must be available to accommodate these snapshots.
2338 No new space is consumed by this operation, but the space accounting is
2340 The promoted clone must not have any conflicting snapshot names of its own.
2343 subcommand can be used to rename any conflicting snapshots.
2348 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2349 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2355 .Ar filesystem Ns | Ns Ar volume
2356 .Ar filesystem Ns | Ns Ar volume
2358 Renames the given dataset.
2359 The new target can be located anywhere in the ZFS hierarchy, with the exception
2361 Snapshots can only be renamed within the parent file system or volume.
2362 When renaming a snapshot, the parent file system of the snapshot does not need
2363 to be specified as part of the second argument.
2364 Renamed file systems can inherit new mount points, in which case they are
2365 unmounted and remounted at the new mount point.
2366 .Bl -tag -width "-a"
2368 Force unmount any filesystems that need to be unmounted in the process.
2370 Creates all the nonexistent parent datasets.
2371 Datasets created in this manner are automatically mounted according to the
2373 property inherited from their parent.
2379 .Ar snapshot Ar snapshot
2381 Recursively rename the snapshots of all descendent datasets.
2382 Snapshots are the only dataset that can be renamed recursively.
2386 .Op Fl r Ns | Ns Fl d Ar depth
2388 .Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc
2389 .Oo Fl s Ar property Oc Ns ...
2390 .Oo Fl S Ar property Oc Ns ...
2391 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2392 .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ...
2394 Lists the property information for the given datasets in tabular form.
2395 If specified, you can list property information by the absolute pathname or the
2397 By default, all file systems and volumes are displayed.
2398 Snapshots are displayed if the
2405 The following fields are displayed,
2406 .Sy name Ns , Ns Sy used Ns , Ns Sy available Ns , Ns Sy referenced Ns , Ns
2408 .Bl -tag -width "-H"
2410 Used for scripting mode.
2411 Do not print headers and separate fields by a single tab instead of arbitrary
2413 .It Fl S Ar property
2416 option, but sorts by property in descending order.
2418 Recursively display any children of the dataset, limiting the recursion to
2424 will display only the dataset and its direct children.
2425 .It Fl o Ar property
2426 A comma-separated list of properties to display.
2427 The property must be:
2430 One of the properties described in the
2431 .Sx Native Properties
2438 to display the dataset name
2442 to display space usage properties on file systems and volumes.
2443 This is a shortcut for specifying
2444 .Fl o Sy name Ns , Ns Sy avail Ns , Ns Sy used Ns , Ns Sy usedsnap Ns , Ns
2445 .Sy usedds Ns , Ns Sy usedrefreserv Ns , Ns Sy usedchild Fl t
2446 .Sy filesystem Ns , Ns Sy volume
2450 Display numbers in parsable
2454 Recursively display any children of the dataset on the command line.
2455 .It Fl s Ar property
2456 A property for sorting the output by column in ascending order based on the
2457 value of the property.
2458 The property must be one of the properties described in the
2460 section, or the special value
2462 to sort by the dataset name.
2463 Multiple properties can be specified at one time using multiple
2468 options are evaluated from left to right in decreasing order of importance.
2469 The following is a list of sorting criteria:
2472 Numeric types sort in numeric order.
2474 String types sort in alphabetical order.
2476 Types inappropriate for a row sort that row to the literal bottom, regardless of
2477 the specified ordering.
2480 If no sorting options are specified the existing behavior of
2484 A comma-separated list of types to display, where
2493 For example, specifying
2495 displays only snapshots.
2500 .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ...
2501 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2503 Sets the property or list of properties to the given value(s) for each dataset.
2504 Only some properties can be edited.
2507 section for more information on what properties can be set and acceptable
2509 Numeric values can be specified as exact values, or in a human-readable form
2511 .Sy B , K , M , G , T , P , E , Z
2512 .Po for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes,
2513 or zettabytes, respectively
2515 User properties can be set on snapshots.
2516 For more information, see the
2522 .Op Fl r Ns | Ns Fl d Ar depth
2524 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2525 .Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc
2526 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2527 .Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ...
2528 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Ns ...
2530 Displays properties for the given datasets.
2531 If no datasets are specified, then the command displays properties for all
2532 datasets on the system.
2533 For each property, the following columns are displayed:
2536 property Property name
2537 value Property value
2538 source Property source. Can either be local, default,
2539 temporary, inherited, or none (-).
2542 All columns are displayed by default, though this can be controlled by using the
2545 This command takes a comma-separated list of properties as described in the
2546 .Sx Native Properties
2553 can be used to display all properties that apply to the given dataset's type
2554 .Pq filesystem, volume, snapshot, or bookmark .
2555 .Bl -tag -width "-H"
2557 Display output in a form more easily parsed by scripts.
2558 Any headers are omitted, and fields are explicitly separated by a single tab
2559 instead of an arbitrary amount of space.
2561 Recursively display any children of the dataset, limiting the recursion to
2565 will display only the dataset and its direct children.
2567 A comma-separated list of columns to display.
2568 .Sy name Ns , Ns Sy property Ns , Ns Sy value Ns , Ns Sy source
2569 is the default value.
2571 Display numbers in parsable
2575 Recursively display properties for any children.
2577 A comma-separated list of sources to display.
2578 Those properties coming from a source other than those in this list are ignored.
2579 Each source must be one of the following:
2586 The default value is all sources.
2588 A comma-separated list of types to display, where
2602 .Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2604 Clears the specified property, causing it to be inherited from an ancestor,
2605 restored to default if no ancestor has the property set, or with the
2607 option reverted to the received value if one exists.
2610 section for a listing of default values, and details on which properties can be
2612 .Bl -tag -width "-r"
2614 Recursively inherit the given property for all children.
2616 Revert the property to the received value if one exists; otherwise operate as
2619 option was not specified.
2625 Displays a list of file systems that are not the most recent version.
2631 Displays a list of currently supported file system versions.
2637 .Fl a | Ar filesystem
2639 Upgrades file systems to a new on-disk version.
2640 Once this is done, the file systems will no longer be accessible on systems
2641 running older versions of the software.
2643 streams generated from new snapshots of these file systems cannot be accessed on
2644 systems running older versions of the software.
2646 In general, the file system version is independent of the pool version.
2649 for information on the
2650 .Nm zpool Cm upgrade
2653 In some cases, the file system version and the pool version are interrelated and
2654 the pool version must be upgraded before the file system version can be
2656 .Bl -tag -width "-V"
2658 Upgrade to the specified
2662 flag is not specified, this command upgrades to the most recent version.
2664 option can only be used to increase the version number, and only up to the most
2665 recent version supported by this software.
2667 Upgrade all file systems on all imported pools.
2669 Upgrade the specified file system.
2671 Upgrade the specified file system and all descendent file systems.
2677 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2678 .Oo Fl s Ar field Oc Ns ...
2679 .Oo Fl S Ar field Oc Ns ...
2680 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2681 .Ar filesystem Ns | Ns Ar snapshot
2683 Displays space consumed by, and quotas on, each user in the specified filesystem
2685 This corresponds to the
2686 .Sy userused@ Ns Em user ,
2687 .Sy userobjused@ Ns Em user ,
2688 .Sy userquota@ Ns Em user,
2690 .Sy userobjquota@ Ns Em user
2692 .Bl -tag -width "-H"
2694 Do not print headers, use tab-delimited output.
2696 Sort by this field in reverse order.
2700 Translate SID to POSIX ID.
2701 The POSIX ID may be ephemeral if no mapping exists.
2702 Normal POSIX interfaces
2707 perform this translation, so the
2709 option allows the output from
2710 .Nm zfs Cm userspace
2711 to be compared directly with those utilities.
2714 may lead to confusion if some files were created by an SMB user before a
2715 SMB-to-POSIX name mapping was established.
2716 In such a case, some files will be owned by the SMB entity and some by the POSIX
2720 option will report that the POSIX entity has the total usage and quota for both.
2722 Print numeric ID instead of user/group name.
2723 .It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2724 Display only the specified fields from the following set:
2729 The default is to display all fields.
2735 Sort output by this field.
2740 flags may be specified multiple times to sort first by one field, then by
2743 .Fl s Sy type Fl s Sy name .
2744 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2745 Print only the specified types from the following set:
2752 .Fl t Sy posixuser Ns , Ns Sy smbuser .
2753 The default can be changed to include group types.
2759 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2760 .Oo Fl s Ar field Oc Ns ...
2761 .Oo Fl S Ar field Oc Ns ...
2762 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2763 .Ar filesystem Ns | Ns Ar snapshot
2765 Displays space consumed by, and quotas on, each group in the specified
2766 filesystem or snapshot.
2767 This subcommand is identical to
2768 .Nm zfs Cm userspace ,
2769 except that the default types to display are
2770 .Fl t Sy posixgroup Ns , Ns Sy smbgroup .
2775 Displays all ZFS file systems currently mounted.
2781 .Fl a | Ar filesystem
2783 Mounts ZFS file systems.
2784 .Bl -tag -width "-O"
2786 Perform an overlay mount.
2789 for more information.
2791 Mount all available ZFS file systems.
2792 Invoked automatically as part of the boot process.
2794 Mount the specified filesystem.
2796 An optional, comma-separated list of mount options to use temporarily for the
2797 duration of the mount.
2799 .Sx Temporary Mount Point Properties
2800 section for details.
2802 Report mount progress.
2808 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2810 Unmounts currently mounted ZFS file systems.
2811 .Bl -tag -width "-a"
2813 Unmount all available ZFS file systems.
2814 Invoked automatically as part of the shutdown process.
2815 .It Ar filesystem Ns | Ns Ar mountpoint
2816 Unmount the specified filesystem.
2817 The command can also be given a path to a ZFS file system mount point on the
2820 Forcefully unmount the file system, even if it is currently in use.
2825 .Fl a | Ar filesystem
2827 Shares available ZFS file systems.
2828 .Bl -tag -width "-a"
2830 Share all available ZFS file systems.
2831 Invoked automatically as part of the boot process.
2833 Share the specified filesystem according to the
2838 File systems are shared when the
2847 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2849 Unshares currently shared ZFS file systems.
2850 .Bl -tag -width "-a"
2852 Unshare all available ZFS file systems.
2853 Invoked automatically as part of the shutdown process.
2854 .It Ar filesystem Ns | Ns Ar mountpoint
2855 Unshare the specified filesystem.
2856 The command can also be given a path to a ZFS file system shared on the system.
2861 .Ar snapshot bookmark
2863 Creates a bookmark of the given snapshot.
2864 Bookmarks mark the point in time when the snapshot was created, and can be used
2865 as the incremental source for a
2869 This feature must be enabled to be used.
2871 .Xr zpool-features 5
2872 for details on ZFS feature flags and the
2879 .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
2882 Creates a stream representation of the second
2884 which is written to standard output.
2885 The output can be redirected to a file or to a different system
2886 .Po for example, using
2889 By default, a full stream is generated.
2890 .Bl -tag -width "-D"
2892 Generate a deduplicated stream.
2893 Blocks which would have been sent multiple times in the send stream will only be
2895 The receiving system must also support this feature to receive a deduplicated
2897 This flag can be used regardless of the dataset's
2899 property, but performance will be much better if the filesystem uses a
2900 dedup-capable checksum
2904 .It Fl I Ar snapshot
2905 Generate a stream package that sends all intermediary snapshots from the first
2906 snapshot to the second snapshot.
2910 .Fl i Em @a Em fs@b Ns ; Fl i Em @b Em fs@c Ns ; Fl i Em @c Em fs@d .
2911 The incremental source may be specified as with the
2914 .It Fl L, -large-block
2915 Generate a stream which may contain blocks larger than 128KB.
2916 This flag has no effect if the
2918 pool feature is disabled, or if the
2920 property of this filesystem has never been set above 128KB.
2921 The receiving system must have the
2923 pool feature enabled as well.
2925 .Xr zpool-features 5
2926 for details on ZFS feature flags and the
2930 Print machine-parsable verbose information about the stream package generated.
2931 .It Fl R, -replicate
2932 Generate a replication stream package, which will replicate the specified
2933 file system, and all descendent file systems, up to the named snapshot.
2934 When received, all properties, snapshots, descendent file systems, and clones
2941 flags are used in conjunction with the
2943 flag, an incremental replication stream is generated.
2944 The current values of properties, and current snapshot and file system names are
2945 set when the stream is received.
2948 flag is specified when this stream is received, snapshots and file systems that
2949 do not exist on the sending side are destroyed.
2951 Generate a more compact stream by using
2953 records for blocks which are stored more compactly on disk by the
2956 This flag has no effect if the
2958 feature is disabled.
2959 The receiving system must have the
2964 feature is active on the sending system, then the receiving system must have
2965 that feature enabled as well.
2967 .Xr zpool-features 5
2968 for details on ZFS feature flags and the
2971 .It Fl c, -compressed
2972 Generate a more compact stream by using compressed WRITE records for blocks
2973 which are compressed on disk and in memory
2976 property for details
2980 feature is active on the sending system, then the receiving system must have
2981 that feature enabled as well.
2984 feature is enabled on the sending system but the
2986 option is not supplied in conjunction with
2988 then the data will be decompressed before sending so it can be split into
2989 smaller block sizes.
2990 .It Fl i Ar snapshot
2991 Generate an incremental stream from the first
2993 .Pq the incremental source
2996 .Pq the incremental target .
2997 The incremental source can be specified as the last component of the snapshot
3001 character and following
3003 and it is assumed to be from the same file system as the incremental target.
3005 If the destination is a clone, the source may be the origin snapshot, which must
3008 .Em pool/fs@origin ,
3016 Do not generate any actual send data.
3017 This is useful in conjunction with the
3021 flags to determine what data will be sent.
3022 In this case, the verbose output will be written to standard output
3023 .Po contrast with a non-dry-run, where the stream is written to standard output
3024 and the verbose output goes to standard error
3027 Include the dataset's properties in the stream.
3028 This flag is implicit when
3031 The receiving system must also support this feature.
3033 Print verbose information about the stream package generated.
3034 This information includes a per-second report of how much data has been sent.
3036 The format of the stream is committed.
3037 You will be able to receive your streams on future versions of ZFS .
3043 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
3044 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
3046 Generate a send stream, which may be of a filesystem, and may be incremental
3048 If the destination is a filesystem or volume, the pool must be read-only, or the
3049 filesystem must not be mounted.
3050 When the stream generated from a filesystem or volume is received, the default
3051 snapshot name will be
3053 .Bl -tag -width "-L"
3054 .It Fl L, -large-block
3055 Generate a stream which may contain blocks larger than 128KB.
3056 This flag has no effect if the
3058 pool feature is disabled, or if the
3060 property of this filesystem has never been set above 128KB.
3061 The receiving system must have the
3063 pool feature enabled as well.
3065 .Xr zpool-features 5
3066 for details on ZFS feature flags and the
3069 .It Fl c, -compressed
3070 Generate a more compact stream by using compressed WRITE records for blocks
3071 which are compressed on disk and in memory
3074 property for details
3078 feature is active on the sending system, then the receiving system must have
3079 that feature enabled as well.
3082 feature is enabled on the sending system but the
3084 option is not supplied in conjunction with
3086 then the data will be decompressed before sending so it can be split into
3087 smaller block sizes.
3089 Generate a more compact stream by using
3091 records for blocks which are stored more compactly on disk by the
3094 This flag has no effect if the
3096 feature is disabled.
3097 The receiving system must have the
3102 feature is active on the sending system, then the receiving system must have
3103 that feature enabled as well.
3105 .Xr zpool-features 5
3106 for details on ZFS feature flags and the
3109 .It Fl i Ar snapshot Ns | Ns Ar bookmark
3110 Generate an incremental send stream.
3111 The incremental source must be an earlier snapshot in the destination's history.
3112 It will commonly be an earlier snapshot in the destination's file system, in
3113 which case it can be specified as the last component of the name
3118 character and following
3121 If the incremental target is a clone, the incremental source can be the origin
3122 snapshot, or an earlier snapshot in the origin's filesystem, or the origin's
3130 .Ar receive_resume_token
3132 Creates a send stream which resumes an interrupted receive.
3134 .Ar receive_resume_token
3135 is the value of this property on the filesystem or volume that was being
3137 See the documentation for
3144 .Op Fl o Sy origin Ns = Ns Ar snapshot
3145 .Op Fl o Ar property Ns = Ns Ar value
3146 .Op Fl x Ar property
3147 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
3153 .Op Fl d Ns | Ns Fl e
3154 .Op Fl o Sy origin Ns = Ns Ar snapshot
3155 .Op Fl o Ar property Ns = Ns Ar value
3156 .Op Fl x Ar property
3159 Creates a snapshot whose contents are as specified in the stream provided on
3161 If a full stream is received, then a new file system is created as well.
3162 Streams are created using the
3164 subcommand, which by default creates a full stream.
3166 can be used as an alias for
3169 If an incremental stream is received, then the destination file system must
3170 already exist, and its most recent snapshot must match the incremental stream's
3174 the destination device link is destroyed and recreated, which means the
3176 cannot be accessed during the
3180 When a snapshot replication package stream that is generated by using the
3181 .Nm zfs Cm send Fl R
3182 command is received, any snapshots that do not exist on the sending location are
3183 destroyed by using the
3184 .Nm zfs Cm destroy Fl d
3188 .Sy Fl o Em property=value
3190 .Sy Fl x Em property
3191 is specified, it applies to the effective value of the property throughout
3192 the entire subtree of replicated datasets. Effective property values will be
3197 ) on the topmost in the replicated subtree. In descendant datasets, if the
3198 property is set by the send stream, it will be overridden by forcing the
3199 property to be inherited from the top‐most file system. Received properties
3200 are retained in spite of being overridden and may be restored with
3201 .Nm zfs Cm inherit Fl S .
3203 .Sy Fl o Em origin=snapshot
3204 is a special case because, even if
3206 is a read-only property and cannot be set, it's allowed to receive the send
3207 stream as a clone of the given snapshot.
3209 The name of the snapshot
3210 .Pq and file system, if a full stream is received
3211 that this subcommand creates depends on the argument type and the use of the
3217 If the argument is a snapshot name, the specified
3220 If the argument is a file system or volume name, a snapshot with the same name
3221 as the sent snapshot is created within the specified
3229 options are specified, the provided target snapshot name is used exactly as
3236 options cause the file system name of the target snapshot to be determined by
3237 appending a portion of the sent snapshot's name to the specified target
3241 option is specified, all but the first element of the sent snapshot's file
3243 .Pq usually the pool name
3244 is used and any required intermediate file systems within the specified one are
3248 option is specified, then only the last element of the sent snapshot's file
3250 .Pq i.e. the name of the source file system itself
3251 is used as the target file system name.
3252 .Bl -tag -width "-F"
3254 Force a rollback of the file system to the most recent snapshot before
3255 performing the receive operation.
3256 If receiving an incremental replication stream
3257 .Po for example, one generated by
3258 .Nm zfs Cm send Fl R Op Fl i Ns | Ns Fl I
3260 destroy snapshots and file systems that do not exist on the sending side.
3262 Discard the first element of the sent snapshot's file system name, using the
3263 remaining elements to determine the name of the target file system for the new
3264 snapshot as described in the paragraph above.
3266 Discard all but the last element of the sent snapshot's file system name, using
3267 that element to determine the name of the target file system for the new
3268 snapshot as described in the paragraph above.
3270 Do not actually receive the stream.
3271 This can be useful in conjunction with the
3273 option to verify the name the receive operation would use.
3274 .It Fl o Sy origin Ns = Ns Ar snapshot
3275 Forces the stream to be received as a clone of the given snapshot.
3276 If the stream is a full send stream, this will create the filesystem
3277 described by the stream as a clone of the specified snapshot.
3278 Which snapshot was specified will not affect the success or failure of the
3279 receive, as long as the snapshot does exist.
3280 If the stream is an incremental send stream, all the normal verification will be
3282 .It Fl o Em property=value
3283 Sets the specified property as if the command
3284 .Nm zfs Cm set Em property=value
3285 was invoked immediately before the receive. When receiving a stream from
3286 .Nm zfs Cm send Fl R ,
3287 causes the property to be inherited by all descendant datasets, as through
3288 .Nm zfs Cm inherit Em property
3289 was run on any descendant datasets that have this property set on the
3292 Any editable property can be set at receive time. Set-once properties bound
3293 to the received data, such as
3296 .Sy casesensitivity ,
3297 cannot be set at receive time even when the datasets are newly created by
3298 .Nm zfs Cm receive .
3299 Additionally both settable properties
3303 cannot be set at receive time.
3307 option may be specified multiple times, for different properties. An error
3308 results if the same property is specified in multiple
3314 If the receive is interrupted, save the partially received state, rather
3316 Interruption may be due to premature termination of the stream
3317 .Po e.g. due to network failure or failure of the remote system
3318 if the stream is being read over a network connection
3320 a checksum error in the stream, termination of the
3322 process, or unclean shutdown of the system.
3324 The receive can be resumed with a stream generated by
3325 .Nm zfs Cm send Fl t Ar token ,
3329 .Sy receive_resume_token
3330 property of the filesystem or volume which is received into.
3332 To use this flag, the storage pool must have the
3333 .Sy extensible_dataset
3336 .Xr zpool-features 5
3337 for details on ZFS feature flags.
3339 File system that is associated with the received stream is not mounted.
3341 Print verbose information about the stream and the time required to perform the
3343 .It Fl x Em property
3344 Ensures that the effective value of the specified property after the
3345 receive is unaffected by the value of that property in the send stream (if any),
3346 as if the property had been excluded from the send stream.
3348 If the specified property is not present in the send stream, this option does
3351 If a received property needs to be overridden, the effective value will be
3352 set or inherited, depending on whether the property is inheritable or not.
3354 In the case of an incremental update,
3356 leaves any existing local setting or explicit inheritance unchanged.
3360 restrictions on set-once and special properties apply equally to
3367 .Ar filesystem Ns | Ns Ar volume
3369 Abort an interrupted
3370 .Nm zfs Cm receive Fl s ,
3371 deleting its saved partially received state.
3375 .Ar filesystem Ns | Ns Ar volume
3377 Displays permissions that have been delegated on the specified filesystem or
3379 See the other forms of
3381 for more information.
3383 Delegations are supported under Linux with the exception of
3391 These permissions cannot be delegated because the Linux
3393 command restricts modifications of the global namespace to the root user.
3398 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3399 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3400 .Ar setname Oc Ns ...
3401 .Ar filesystem Ns | Ns Ar volume
3406 .Fl e Ns | Ns Sy everyone
3407 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3408 .Ar setname Oc Ns ...
3409 .Ar filesystem Ns | Ns Ar volume
3411 Delegates ZFS administration permission for the file systems to non-privileged
3413 .Bl -tag -width "-d"
3415 Allow only for the descendent file systems.
3416 .It Fl e Ns | Ns Sy everyone
3417 Specifies that the permissions be delegated to everyone.
3418 .It Fl g Ar group Ns Oo , Ns Ar group Oc Ns ...
3419 Explicitly specify that permissions are delegated to the group.
3423 only for the specified file system.
3424 .It Fl u Ar user Ns Oo , Ns Ar user Oc Ns ...
3425 Explicitly specify that permissions are delegated to the user.
3426 .It Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3427 Specifies to whom the permissions are delegated.
3428 Multiple entities can be specified as a comma-separated list.
3431 options are specified, then the argument is interpreted preferentially as the
3434 then as a user name, and lastly as a group name.
3435 To specify a user or group named
3442 To specify a group with the same name as a user, use the
3446 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3447 .Ar setname Oc Ns ...
3449 The permissions to delegate.
3450 Multiple permissions may be specified as a comma-separated list.
3451 Permission names are the same as ZFS subcommand and property names.
3452 See the property list below.
3453 Property set names, which begin with
3458 form below for details.
3463 options are specified, or both are, then the permissions are allowed for the
3464 file system or volume, and all of its descendents.
3466 Permissions are generally the ability to use a ZFS subcommand or change a ZFS
3468 The following permissions are available:
3471 allow subcommand Must also have the permission that is
3473 clone subcommand Must also have the 'create' ability and
3474 'mount' ability in the origin file system
3475 create subcommand Must also have the 'mount' ability
3476 destroy subcommand Must also have the 'mount' ability
3477 diff subcommand Allows lookup of paths within a dataset
3478 given an object number, and the ability
3479 to create snapshots necessary to
3481 mount subcommand Allows mount/umount of ZFS datasets
3482 promote subcommand Must also have the 'mount' and 'promote'
3483 ability in the origin file system
3484 receive subcommand Must also have the 'mount' and 'create'
3486 rename subcommand Must also have the 'mount' and 'create'
3487 ability in the new parent
3488 rollback subcommand Must also have the 'mount' ability
3490 share subcommand Allows sharing file systems over NFS
3492 snapshot subcommand Must also have the 'mount' ability
3494 groupquota other Allows accessing any groupquota@...
3496 groupused other Allows reading any groupused@... property
3497 userprop other Allows changing any user property
3498 userquota other Allows accessing any userquota@...
3500 userused other Allows reading any userused@... property
3506 casesensitivity property
3508 compression property
3512 filesystem_limit property
3515 normalization property
3516 primarycache property
3521 refreservation property
3522 reservation property
3523 secondarycache property
3528 snapshot_limit property
3531 volblocksize property
3541 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3542 .Ar setname Oc Ns ...
3543 .Ar filesystem Ns | Ns Ar volume
3548 These permissions are granted
3550 to the creator of any newly-created descendent file system.
3554 .Fl s No @ Ns Ar setname
3555 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3556 .Ar setname Oc Ns ...
3557 .Ar filesystem Ns | Ns Ar volume
3559 Defines or adds permissions to a permission set.
3560 The set can be used by other
3562 commands for the specified file system and its descendents.
3563 Sets are evaluated dynamically, so changes to a set are immediately reflected.
3564 Permission sets follow the same naming restrictions as ZFS file systems, but the
3565 name must begin with
3567 and can be no more than 64 characters long.
3572 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3573 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3574 .Ar setname Oc Ns ... Oc
3575 .Ar filesystem Ns | Ns Ar volume
3580 .Fl e Ns | Ns Sy everyone
3581 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3582 .Ar setname Oc Ns ... Oc
3583 .Ar filesystem Ns | Ns Ar volume
3589 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3590 .Ar setname Oc Ns ... Oc
3591 .Ar filesystem Ns | Ns Ar volume
3593 Removes permissions that were granted with the
3596 No permissions are explicitly denied, so other permissions granted are still in
3598 For example, if the permission is granted by an ancestor.
3599 If no permissions are specified, then all permissions for the specified
3611 only removes the permissions that were granted to everyone, not all permissions
3612 for every user and group.
3615 command for a description of the
3618 .Bl -tag -width "-r"
3620 Recursively remove the permissions from this file system and all descendents.
3626 .Fl s No @ Ns Ar setname
3627 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3628 .Ar setname Oc Ns ... Oc
3629 .Ar filesystem Ns | Ns Ar volume
3631 Removes permissions from a permission set.
3632 If no permissions are specified, then all permissions are removed, thus removing
3638 .Ar tag Ar snapshot Ns ...
3640 Adds a single reference, named with the
3642 argument, to the specified snapshot or snapshots.
3643 Each snapshot has its own tag namespace, and tags must be unique within that
3646 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3650 .Bl -tag -width "-r"
3652 Specifies that a hold with the given tag is applied recursively to the snapshots
3653 of all descendent file systems.
3661 Lists all existing user references for the given snapshot or snapshots.
3662 .Bl -tag -width "-r"
3664 Lists the holds that are set on the named descendent snapshots, in addition to
3665 listing the holds on the named snapshot.
3671 .Ar tag Ar snapshot Ns ...
3673 Removes a single reference, named with the
3675 argument, from the specified snapshot or snapshots.
3676 The tag must already exist for each snapshot.
3677 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3681 .Bl -tag -width "-r"
3683 Recursively releases a hold with the given tag on the snapshots of all
3684 descendent file systems.
3690 .Ar snapshot Ar snapshot Ns | Ns Ar filesystem
3692 Display the difference between a snapshot of a given filesystem and another
3693 snapshot of that filesystem from a later time or the current contents of the
3695 The first column is a character indicating the type of change, the other columns
3696 indicate pathname, new pathname
3697 .Pq in case of rename ,
3698 change in link count, and optionally file type and/or change time.
3699 The types of change are:
3701 - The path has been removed
3702 + The path has been created
3703 M The path has been modified
3704 R The path has been renamed
3706 .Bl -tag -width "-F"
3708 Display an indication of the type of file, in a manner similar to the
3724 Give more parsable tab-separated output, without header lines and without
3727 Display the path's inode change time as the first column of output.
3733 utility exits 0 on success, 1 if an error occurs, and 2 if invalid command line
3734 options were specified.
3737 .It Sy Example 1 No Creating a ZFS File System Hierarchy
3738 The following commands create a file system named
3740 and a file system named
3744 is set for the parent file system, and is automatically inherited by the child
3747 # zfs create pool/home
3748 # zfs set mountpoint=/export/home pool/home
3749 # zfs create pool/home/bob
3751 .It Sy Example 2 No Creating a ZFS Snapshot
3752 The following command creates a snapshot named
3754 This snapshot is mounted on demand in the
3756 directory at the root of the
3760 # zfs snapshot pool/home/bob@yesterday
3762 .It Sy Example 3 No Creating and Destroying Multiple Snapshots
3763 The following command creates snapshots named
3767 and all of its descendent file systems.
3768 Each snapshot is mounted on demand in the
3770 directory at the root of its file system.
3771 The second command destroys the newly created snapshots.
3773 # zfs snapshot -r pool/home@yesterday
3774 # zfs destroy -r pool/home@yesterday
3776 .It Sy Example 4 No Disabling and Enabling File System Compression
3777 The following command disables the
3779 property for all file systems under
3781 The next command explicitly enables
3784 .Em pool/home/anne .
3786 # zfs set compression=off pool/home
3787 # zfs set compression=on pool/home/anne
3789 .It Sy Example 5 No Listing ZFS Datasets
3790 The following command lists all active file systems and volumes in the system.
3791 Snapshots are displayed if the
3799 for more information on pool properties.
3802 NAME USED AVAIL REFER MOUNTPOINT
3803 pool 450K 457G 18K /pool
3804 pool/home 315K 457G 21K /export/home
3805 pool/home/anne 18K 457G 18K /export/home/anne
3806 pool/home/bob 276K 457G 276K /export/home/bob
3808 .It Sy Example 6 No Setting a Quota on a ZFS File System
3809 The following command sets a quota of 50 Gbytes for
3812 # zfs set quota=50G pool/home/bob
3814 .It Sy Example 7 No Listing ZFS Properties
3815 The following command lists all properties for
3818 # zfs get all pool/home/bob
3819 NAME PROPERTY VALUE SOURCE
3820 pool/home/bob type filesystem -
3821 pool/home/bob creation Tue Jul 21 15:53 2009 -
3822 pool/home/bob used 21K -
3823 pool/home/bob available 20.0G -
3824 pool/home/bob referenced 21K -
3825 pool/home/bob compressratio 1.00x -
3826 pool/home/bob mounted yes -
3827 pool/home/bob quota 20G local
3828 pool/home/bob reservation none default
3829 pool/home/bob recordsize 128K default
3830 pool/home/bob mountpoint /pool/home/bob default
3831 pool/home/bob sharenfs off default
3832 pool/home/bob checksum on default
3833 pool/home/bob compression on local
3834 pool/home/bob atime on default
3835 pool/home/bob devices on default
3836 pool/home/bob exec on default
3837 pool/home/bob setuid on default
3838 pool/home/bob readonly off default
3839 pool/home/bob zoned off default
3840 pool/home/bob snapdir hidden default
3841 pool/home/bob acltype off default
3842 pool/home/bob aclinherit restricted default
3843 pool/home/bob canmount on default
3844 pool/home/bob xattr on default
3845 pool/home/bob copies 1 default
3846 pool/home/bob version 4 -
3847 pool/home/bob utf8only off -
3848 pool/home/bob normalization none -
3849 pool/home/bob casesensitivity sensitive -
3850 pool/home/bob vscan off default
3851 pool/home/bob nbmand off default
3852 pool/home/bob sharesmb off default
3853 pool/home/bob refquota none default
3854 pool/home/bob refreservation none default
3855 pool/home/bob primarycache all default
3856 pool/home/bob secondarycache all default
3857 pool/home/bob usedbysnapshots 0 -
3858 pool/home/bob usedbydataset 21K -
3859 pool/home/bob usedbychildren 0 -
3860 pool/home/bob usedbyrefreservation 0 -
3863 The following command gets a single property value.
3865 # zfs get -H -o value compression pool/home/bob
3868 The following command lists all properties with local settings for
3871 # zfs get -r -s local -o name,property,value all pool/home/bob
3873 pool/home/bob quota 20G
3874 pool/home/bob compression on
3876 .It Sy Example 8 No Rolling Back a ZFS File System
3877 The following command reverts the contents of
3879 to the snapshot named
3881 deleting all intermediate snapshots.
3883 # zfs rollback -r pool/home/anne@yesterday
3885 .It Sy Example 9 No Creating a ZFS Clone
3886 The following command creates a writable file system whose initial contents are
3888 .Em pool/home/bob@yesterday .
3890 # zfs clone pool/home/bob@yesterday pool/clone
3892 .It Sy Example 10 No Promoting a ZFS Clone
3893 The following commands illustrate how to test out changes to a file system, and
3894 then replace the original file system with the changed one, using clones, clone
3895 promotion, and renaming:
3897 # zfs create pool/project/production
3898 populate /pool/project/production with data
3899 # zfs snapshot pool/project/production@today
3900 # zfs clone pool/project/production@today pool/project/beta
3901 make changes to /pool/project/beta and test them
3902 # zfs promote pool/project/beta
3903 # zfs rename pool/project/production pool/project/legacy
3904 # zfs rename pool/project/beta pool/project/production
3905 once the legacy version is no longer needed, it can be destroyed
3906 # zfs destroy pool/project/legacy
3908 .It Sy Example 11 No Inheriting ZFS Properties
3909 The following command causes
3915 property from their parent.
3917 # zfs inherit checksum pool/home/bob pool/home/anne
3919 .It Sy Example 12 No Remotely Replicating ZFS Data
3920 The following commands send a full stream and then an incremental stream to a
3921 remote machine, restoring them into
3922 .Em poolB/received/fs@a
3924 .Em poolB/received/fs@b ,
3927 must contain the file system
3928 .Em poolB/received ,
3929 and must not initially contain
3930 .Em poolB/received/fs .
3932 # zfs send pool/fs@a | \e
3933 ssh host zfs receive poolB/received/fs@a
3934 # zfs send -i a pool/fs@b | \e
3935 ssh host zfs receive poolB/received/fs
3937 .It Sy Example 13 No Using the zfs receive -d Option
3938 The following command sends a full stream of
3939 .Em poolA/fsA/fsB@snap
3940 to a remote machine, receiving it into
3941 .Em poolB/received/fsA/fsB@snap .
3944 portion of the received snapshot's name is determined from the name of the sent
3947 must contain the file system
3948 .Em poolB/received .
3950 .Em poolB/received/fsA
3951 does not exist, it is created as an empty file system.
3953 # zfs send poolA/fsA/fsB@snap | \e
3954 ssh host zfs receive -d poolB/received
3956 .It Sy Example 14 No Setting User Properties
3957 The following example sets the user-defined
3958 .Sy com.example:department
3959 property for a dataset.
3961 # zfs set com.example:department=12345 tank/accounting
3963 .It Sy Example 15 No Performing a Rolling Snapshot
3964 The following example shows how to maintain a history of snapshots with a
3965 consistent naming scheme.
3966 To keep a week's worth of snapshots, the user destroys the oldest snapshot,
3967 renames the remaining snapshots, and then creates a new snapshot, as follows:
3969 # zfs destroy -r pool/users@7daysago
3970 # zfs rename -r pool/users@6daysago @7daysago
3971 # zfs rename -r pool/users@5daysago @6daysago
3972 # zfs rename -r pool/users@yesterday @5daysago
3973 # zfs rename -r pool/users@yesterday @4daysago
3974 # zfs rename -r pool/users@yesterday @3daysago
3975 # zfs rename -r pool/users@yesterday @2daysago
3976 # zfs rename -r pool/users@today @yesterday
3977 # zfs snapshot -r pool/users@today
3979 .It Sy Example 16 No Setting sharenfs Property Options on a ZFS File System
3980 The following commands show how to set
3982 property options to enable
3986 addresses and to enable root access for system
3992 # zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home
3997 for host name resolution, specify the fully qualified hostname.
3998 .It Sy Example 17 No Delegating ZFS Administration Permissions on a ZFS Dataset
3999 The following example shows how to set permissions so that user
4001 can create, destroy, mount, and take snapshots on
4007 # zfs allow cindys create,destroy,mount,snapshot tank/cindys
4008 # zfs allow tank/cindys
4009 ---- Permissions on tank/cindys --------------------------------------
4010 Local+Descendent permissions:
4011 user cindys create,destroy,mount,snapshot
4016 mount point permission is set to 755 by default, user
4018 will be unable to mount file systems under
4020 Add an ACE similar to the following syntax to provide mount point access:
4022 # chmod A+user:cindys:add_subdirectory:allow /tank/cindys
4024 .It Sy Example 18 No Delegating Create Time Permissions on a ZFS Dataset
4025 The following example shows how to grant anyone in the group
4027 to create file systems in
4029 This syntax also allows staff members to destroy their own file systems, but not
4030 destroy anyone else's file system.
4035 # zfs allow staff create,mount tank/users
4036 # zfs allow -c destroy tank/users
4037 # zfs allow tank/users
4038 ---- Permissions on tank/users ---------------------------------------
4041 Local+Descendent permissions:
4042 group staff create,mount
4044 .It Sy Example 19 No Defining and Granting a Permission Set on a ZFS Dataset
4045 The following example shows how to define and grant a permission set on the
4052 # zfs allow -s @pset create,destroy,snapshot,mount tank/users
4053 # zfs allow staff @pset tank/users
4054 # zfs allow tank/users
4055 ---- Permissions on tank/users ---------------------------------------
4057 @pset create,destroy,mount,snapshot
4058 Local+Descendent permissions:
4061 .It Sy Example 20 No Delegating Property Permissions on a ZFS Dataset
4062 The following example shows to grant the ability to set quotas and reservations
4070 # zfs allow cindys quota,reservation users/home
4071 # zfs allow users/home
4072 ---- Permissions on users/home ---------------------------------------
4073 Local+Descendent permissions:
4074 user cindys quota,reservation
4075 cindys% zfs set quota=10G users/home/marks
4076 cindys% zfs get quota users/home/marks
4077 NAME PROPERTY VALUE SOURCE
4078 users/home/marks quota 10G local
4080 .It Sy Example 21 No Removing ZFS Delegated Permissions on a ZFS Dataset
4081 The following example shows how to remove the snapshot permission from the
4090 # zfs unallow staff snapshot tank/users
4091 # zfs allow tank/users
4092 ---- Permissions on tank/users ---------------------------------------
4094 @pset create,destroy,mount,snapshot
4095 Local+Descendent permissions:
4098 .It Sy Example 22 No Showing the differences between a snapshot and a ZFS Dataset
4099 The following example shows how to see what has changed between a prior
4100 snapshot of a ZFS dataset and its current state.
4103 option is used to indicate type information for the files affected.
4105 # zfs diff -F tank/test@before tank/test
4107 M F /tank/test/linked (+1)
4108 R F /tank/test/oldname -> /tank/test/newname
4109 - F /tank/test/deleted
4110 + F /tank/test/created
4111 M F /tank/test/modified
4113 .It Sy Example 23 No Creating a bookmark
4114 The following example create a bookmark to a snapshot. This bookmark
4115 can then be used instead of snapshot in send streams.
4117 # zfs bookmark rpool@snapshot rpool#bookmark
4119 .It Sy Example 24 No Setting sharesmb Property Options on a ZFS File System
4120 The following example show how to share SMB filesystem through ZFS. Note that
4121 that a user and his/her password must be given.
4123 # smbmount //127.0.0.1/share_tmp /mnt/tmp \\
4124 -o user=workgroup/turbo,password=obrut,uid=1000
4128 .Em /etc/samba/smb.conf
4129 configuration required:
4131 Samba will need to listen to 'localhost' (127.0.0.1) for the ZFS utilities to
4132 communicate with Samba. This is the default behavior for most Linux
4135 Samba must be able to authenticate a user. This can be done in a number of
4136 ways, depending on if using the system password file, LDAP or the Samba
4137 specific smbpasswd file. How to do this is outside the scope of this manual.
4140 man page for more information.
4143 .Sy USERSHARE section
4146 man page for all configuration options in case you need to modify any options
4147 to the share afterwards. Do note that any changes done with the
4149 command will be undone if the share is ever unshared (such as at a reboot etc).
4151 .Sh INTERFACE STABILITY