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 vscan Ns = Ns Sy on Ns | Ns Sy off
1761 Controls whether regular files should be scanned for viruses when a file is
1763 In addition to enabling this property, the virus scan service must also be
1764 enabled for virus scanning to occur.
1765 The default value is
1767 This property is not used on Linux.
1768 .It Sy xattr Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy sa
1769 Controls whether extended attributes are enabled for this file system. Two
1770 styles of extended attributes are supported either directory based or system
1773 The default value of
1775 enables directory based extended attributes. This style of extended attribute
1776 imposes no practical limit on either the size or number of attributes which
1777 can be set on a file. Although under Linux the
1781 system calls limit the maximum size to 64K. This is the most compatible
1782 style of extended attribute and is supported by all OpenZFS implementations.
1784 System attribute based xattrs can be enabled by setting the value to
1786 The key advantage of this type of xattr is improved performance. Storing
1787 extended attributes as system attributes significantly decreases the amount of
1788 disk IO required. Up to 64K of data may be stored per-file in the space
1789 reserved for system attributes. If there is not enough space available for
1790 an extended attribute then it will be automatically written as a directory
1791 based xattr. System attribute based extended attributes are not accessible
1792 on platforms which do not support the
1796 The use of system attribute based xattrs is strongly encouraged for users of
1797 SELinux or posix ACLs. Both of these features heavily rely of extended
1798 attributes and benefit significantly from the reduced access time.
1804 are equivalent to the
1809 .It Sy zoned Ns = Ns Sy on Ns | Ns Sy off
1810 Controls whether the dataset is managed from a non-global zone. Zones are a
1811 Solaris feature and are not relevant on Linux. The default value is
1815 The following three properties cannot be changed after the file system is
1816 created, and therefore, should be set when the file system is created.
1817 If the properties are not set with the
1821 commands, these properties are inherited from the parent dataset.
1822 If the parent dataset lacks these properties due to having been created prior to
1823 these features being supported, the new file system will have the default values
1824 for these properties.
1827 .Sy casesensitivity Ns = Ns Sy sensitive Ns | Ns
1828 .Sy insensitive Ns | Ns Sy mixed
1830 Indicates whether the file name matching algorithm used by the file system
1831 should be case-sensitive, case-insensitive, or allow a combination of both
1833 The default value for the
1841 file systems have case-sensitive file names.
1847 property indicates that the file system can support requests for both
1848 case-sensitive and case-insensitive matching behavior.
1849 Currently, case-insensitive matching behavior on a file system that supports
1850 mixed behavior is limited to the SMB server product.
1851 For more information about the
1853 value behavior, see the "ZFS Administration Guide".
1855 .Sy normalization Ns = Ns Sy none Ns | Ns Sy formC Ns | Ns
1856 .Sy formD Ns | Ns Sy formKC Ns | Ns Sy formKD
1858 Indicates whether the file system should perform a
1860 normalization of file names whenever two file names are compared, and which
1861 normalization algorithm should be used.
1862 File names are always stored unmodified, names are normalized as part of any
1864 If this property is set to a legal value other than
1868 property was left unspecified, the
1870 property is automatically set to
1872 The default value of the
1876 This property cannot be changed after the file system is created.
1877 .It Sy utf8only Ns = Ns Sy on Ns | Ns Sy off
1878 Indicates whether the file system should reject file names that include
1879 characters that are not present in the
1882 If this property is explicitly set to
1884 the normalization property must either not be explicitly set or be set to
1886 The default value for the
1890 This property cannot be changed after the file system is created.
1894 .Sy casesensitivity ,
1898 properties are also new permissions that can be assigned to non-privileged users
1899 by using the ZFS delegated administration feature.
1900 .Ss "Temporary Mount Point Properties"
1901 When a file system is mounted, either through
1903 for legacy mounts or the
1905 command for normal file systems, its mount options are set according to its
1907 The correlation between properties and mount options is as follows:
1909 PROPERTY MOUNT OPTION
1911 canmount auto/noauto
1915 relatime relatime/norelatime
1920 In addition, these options can be set on a per-mount basis using the
1922 option, without affecting the property that is stored on disk.
1923 The values specified on the command line override the values stored in the
1927 option is an alias for
1928 .Sy nodevices Ns , Ns Sy nosetuid .
1929 These properties are reported as
1934 If the properties are changed while the dataset is mounted, the new setting
1935 overrides any temporary settings.
1936 .Ss "User Properties"
1937 In addition to the standard native properties, ZFS supports arbitrary user
1939 User properties have no effect on ZFS behavior, but applications or
1940 administrators can use them to annotate datasets
1941 .Pq file systems, volumes, and snapshots .
1943 User property names must contain a colon
1945 character to distinguish them from native properties.
1946 They may contain lowercase letters, numbers, and the following punctuation
1955 The expected convention is that the property name is divided into two portions
1957 .Em module Ns : Ns Em property ,
1958 but this namespace is not enforced by ZFS.
1959 User property names can be at most 256 characters, and cannot begin with a dash
1962 When making programmatic use of user properties, it is strongly suggested to use
1967 component of property names to reduce the chance that two
1968 independently-developed packages use the same property name for different
1971 The values of user properties are arbitrary strings, are always inherited, and
1972 are never validated.
1973 All of the commands that operate on properties
1974 .Po Nm zfs Cm list ,
1979 can be used to manipulate both native properties and user properties.
1982 command to clear a user property.
1983 If the property is not defined in any parent dataset, it is removed entirely.
1984 Property values are limited to 8192 bytes.
1985 .Ss ZFS Volumes as Swap
1986 ZFS volumes may be used as swap devices. After creating the volume with the
1987 .Nm zfs Cm create Fl V
1988 command set up and enable the swap area using the
1992 commands. Do not swap to a file on a ZFS file system. A ZFS swap file
1993 configuration is not supported.
1995 All subcommands that modify state are logged persistently to the pool in their
1999 Displays a help message.
2004 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
2007 Creates a new ZFS file system.
2008 The file system is automatically mounted according to the
2010 property inherited from the parent.
2011 .Bl -tag -width "-o"
2012 .It Fl o Ar property Ns = Ns Ar value
2013 Sets the specified property as if the command
2014 .Nm zfs Cm set Ar property Ns = Ns Ar value
2015 was invoked at the same time the dataset was created.
2016 Any editable ZFS property can also be set at creation time.
2019 options can be specified.
2020 An error results if the same property is specified in multiple
2024 Creates all the non-existing parent datasets.
2025 Datasets created in this manner are automatically mounted according to the
2027 property inherited from their parent.
2028 Any property specified on the command line using the
2031 If the target filesystem already exists, the operation completes successfully.
2037 .Op Fl b Ar blocksize
2038 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
2039 .Fl V Ar size Ar volume
2041 Creates a volume of the given size.
2042 The volume is exported as a block device in
2043 .Pa /dev/zvol/path ,
2046 is the name of the volume in the ZFS namespace.
2047 The size represents the logical size as exported by the device.
2048 By default, a reservation of equal size is created.
2051 is automatically rounded up to the nearest 128 Kbytes to ensure that the volume
2052 has an integral number of blocks regardless of
2054 .Bl -tag -width "-b"
2055 .It Fl b Ar blocksize
2057 .Fl o Sy volblocksize Ns = Ns Ar blocksize .
2058 If this option is specified in conjunction with
2059 .Fl o Sy volblocksize ,
2060 the resulting behavior is undefined.
2061 .It Fl o Ar property Ns = Ns Ar value
2062 Sets the specified property as if the
2063 .Nm zfs Cm set Ar property Ns = Ns Ar value
2064 command was invoked at the same time the dataset was created.
2065 Any editable ZFS property can also be set at creation time.
2068 options can be specified.
2069 An error results if the same property is specified in multiple
2073 Creates all the non-existing parent datasets.
2074 Datasets created in this manner are automatically mounted according to the
2076 property inherited from their parent.
2077 Any property specified on the command line using the
2080 If the target filesystem already exists, the operation completes successfully.
2082 Creates a sparse volume with no reservation.
2086 .Sx Native Properties
2087 section for more information about sparse volumes.
2093 .Ar filesystem Ns | Ns Ar volume
2095 Destroys the given dataset.
2096 By default, the command unshares any file systems that are currently shared,
2097 unmounts any file systems that are currently mounted, and refuses to destroy a
2098 dataset that has active dependents
2099 .Pq children or clones .
2100 .Bl -tag -width "-R"
2102 Recursively destroy all dependents, including cloned file systems outside the
2105 Force an unmount of any file systems using the
2108 This option has no effect on non-file systems or unmounted file systems.
2113 No data will be deleted.
2114 This is useful in conjunction with the
2118 flags to determine what data would be deleted.
2120 Print machine-parsable verbose information about the deleted data.
2122 Recursively destroy all children.
2124 Print verbose information about the deleted data.
2127 Extreme care should be taken when applying either the
2131 options, as they can destroy large portions of a pool and cause unexpected
2132 behavior for mounted file systems in use.
2137 .Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns
2138 .Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ...
2140 The given snapshots are destroyed immediately if and only if the
2144 option would have destroyed it.
2145 Such immediate destruction would occur, for example, if the snapshot had no
2146 clones and the user-initiated reference count were zero.
2148 If a snapshot does not qualify for immediate destruction, it is marked for
2150 In this state, it exists as a usable, visible snapshot until both of the
2151 preconditions listed above are met, at which point it is destroyed.
2153 An inclusive range of snapshots may be specified by separating the first and
2154 last snapshots with a percent sign.
2155 The first and/or last snapshots may be left blank, in which case the
2156 filesystem's oldest or newest snapshot will be implied.
2159 .Pq or ranges of snapshots
2160 of the same filesystem or volume may be specified in a comma-separated list of
2162 Only the snapshot's short name
2163 .Po the part after the
2166 should be specified when using a range or comma-separated list to identify
2168 .Bl -tag -width "-R"
2170 Recursively destroy all clones of these snapshots, including the clones,
2171 snapshots, and children.
2172 If this flag is specified, the
2174 flag will have no effect.
2176 Defer snapshot deletion.
2181 No data will be deleted.
2182 This is useful in conjunction with the
2186 flags to determine what data would be deleted.
2188 Print machine-parsable verbose information about the deleted data.
2191 .Pq or mark for deferred deletion
2192 all snapshots with this name in descendent file systems.
2194 Print verbose information about the deleted data.
2196 Extreme care should be taken when applying either the
2200 options, as they can destroy large portions of a pool and cause unexpected
2201 behavior for mounted file systems in use.
2206 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
2208 The given bookmark is destroyed.
2213 .Oo Fl o Ar property Ns = Ns value Oc Ns ...
2214 .Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ...
2216 Creates snapshots with the given names.
2217 All previous modifications by successful system calls to the file system are
2218 part of the snapshots.
2219 Snapshots are taken atomically, so that all snapshots correspond to the same
2223 section for details.
2224 .Bl -tag -width "-o"
2225 .It Fl o Ar property Ns = Ns Ar value
2226 Sets the specified property; see
2230 Recursively create snapshots of all descendent datasets
2238 Roll back the given dataset to a previous snapshot.
2239 When a dataset is rolled back, all data that has changed since the snapshot is
2240 discarded, and the dataset reverts to the state at the time of the snapshot.
2241 By default, the command refuses to roll back to a snapshot other than the most
2243 In order to do so, all intermediate snapshots and bookmarks must be destroyed by
2250 options do not recursively destroy the child snapshots of a recursive snapshot.
2251 Only direct snapshots of the specified filesystem are destroyed by either of
2253 To completely roll back a recursive snapshot, you must rollback the individual
2255 .Bl -tag -width "-R"
2257 Destroy any more recent snapshots and bookmarks, as well as any clones of those
2262 option to force an unmount of any clone file systems that are to be destroyed.
2264 Destroy any snapshots and bookmarks more recent than the one specified.
2270 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
2271 .Ar snapshot Ar filesystem Ns | Ns Ar volume
2273 Creates a clone of the given snapshot.
2276 section for details.
2277 The target dataset can be located anywhere in the ZFS hierarchy, and is created
2278 as the same type as the original.
2279 .Bl -tag -width "-o"
2280 .It Fl o Ar property Ns = Ns Ar value
2281 Sets the specified property; see
2285 Creates all the non-existing parent datasets.
2286 Datasets created in this manner are automatically mounted according to the
2288 property inherited from their parent.
2289 If the target filesystem or volume already exists, the operation completes
2295 .Ar clone-filesystem
2297 Promotes a clone file system to no longer be dependent on its
2300 This makes it possible to destroy the file system that the clone was created
2302 The clone parent-child dependency relationship is reversed, so that the origin
2303 file system becomes a clone of the specified file system.
2305 The snapshot that was cloned, and any snapshots previous to this snapshot, are
2306 now owned by the promoted clone.
2307 The space they use moves from the origin file system to the promoted clone, so
2308 enough space must be available to accommodate these snapshots.
2309 No new space is consumed by this operation, but the space accounting is
2311 The promoted clone must not have any conflicting snapshot names of its own.
2314 subcommand can be used to rename any conflicting snapshots.
2319 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2320 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2326 .Ar filesystem Ns | Ns Ar volume
2327 .Ar filesystem Ns | Ns Ar volume
2329 Renames the given dataset.
2330 The new target can be located anywhere in the ZFS hierarchy, with the exception
2332 Snapshots can only be renamed within the parent file system or volume.
2333 When renaming a snapshot, the parent file system of the snapshot does not need
2334 to be specified as part of the second argument.
2335 Renamed file systems can inherit new mount points, in which case they are
2336 unmounted and remounted at the new mount point.
2337 .Bl -tag -width "-a"
2339 Force unmount any filesystems that need to be unmounted in the process.
2341 Creates all the nonexistent parent datasets.
2342 Datasets created in this manner are automatically mounted according to the
2344 property inherited from their parent.
2350 .Ar snapshot Ar snapshot
2352 Recursively rename the snapshots of all descendent datasets.
2353 Snapshots are the only dataset that can be renamed recursively.
2357 .Op Fl r Ns | Ns Fl d Ar depth
2359 .Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc
2360 .Oo Fl s Ar property Oc Ns ...
2361 .Oo Fl S Ar property Oc Ns ...
2362 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2363 .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ...
2365 Lists the property information for the given datasets in tabular form.
2366 If specified, you can list property information by the absolute pathname or the
2368 By default, all file systems and volumes are displayed.
2369 Snapshots are displayed if the
2376 The following fields are displayed,
2377 .Sy name Ns , Ns Sy used Ns , Ns Sy available Ns , Ns Sy referenced Ns , Ns
2379 .Bl -tag -width "-H"
2381 Used for scripting mode.
2382 Do not print headers and separate fields by a single tab instead of arbitrary
2384 .It Fl S Ar property
2387 option, but sorts by property in descending order.
2389 Recursively display any children of the dataset, limiting the recursion to
2395 will display only the dataset and its direct children.
2396 .It Fl o Ar property
2397 A comma-separated list of properties to display.
2398 The property must be:
2401 One of the properties described in the
2402 .Sx Native Properties
2409 to display the dataset name
2413 to display space usage properties on file systems and volumes.
2414 This is a shortcut for specifying
2415 .Fl o Sy name Ns , Ns Sy avail Ns , Ns Sy used Ns , Ns Sy usedsnap Ns , Ns
2416 .Sy usedds Ns , Ns Sy usedrefreserv Ns , Ns Sy usedchild Fl t
2417 .Sy filesystem Ns , Ns Sy volume
2421 Display numbers in parsable
2425 Recursively display any children of the dataset on the command line.
2426 .It Fl s Ar property
2427 A property for sorting the output by column in ascending order based on the
2428 value of the property.
2429 The property must be one of the properties described in the
2431 section, or the special value
2433 to sort by the dataset name.
2434 Multiple properties can be specified at one time using multiple
2439 options are evaluated from left to right in decreasing order of importance.
2440 The following is a list of sorting criteria:
2443 Numeric types sort in numeric order.
2445 String types sort in alphabetical order.
2447 Types inappropriate for a row sort that row to the literal bottom, regardless of
2448 the specified ordering.
2451 If no sorting options are specified the existing behavior of
2455 A comma-separated list of types to display, where
2464 For example, specifying
2466 displays only snapshots.
2471 .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ...
2472 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2474 Sets the property or list of properties to the given value(s) for each dataset.
2475 Only some properties can be edited.
2478 section for more information on what properties can be set and acceptable
2480 Numeric values can be specified as exact values, or in a human-readable form
2482 .Sy B , K , M , G , T , P , E , Z
2483 .Po for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes,
2484 or zettabytes, respectively
2486 User properties can be set on snapshots.
2487 For more information, see the
2493 .Op Fl r Ns | Ns Fl d Ar depth
2495 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2496 .Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc
2497 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2498 .Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ...
2499 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Ns ...
2501 Displays properties for the given datasets.
2502 If no datasets are specified, then the command displays properties for all
2503 datasets on the system.
2504 For each property, the following columns are displayed:
2507 property Property name
2508 value Property value
2509 source Property source. Can either be local, default,
2510 temporary, inherited, or none (-).
2513 All columns are displayed by default, though this can be controlled by using the
2516 This command takes a comma-separated list of properties as described in the
2517 .Sx Native Properties
2524 can be used to display all properties that apply to the given dataset's type
2525 .Pq filesystem, volume, snapshot, or bookmark .
2526 .Bl -tag -width "-H"
2528 Display output in a form more easily parsed by scripts.
2529 Any headers are omitted, and fields are explicitly separated by a single tab
2530 instead of an arbitrary amount of space.
2532 Recursively display any children of the dataset, limiting the recursion to
2536 will display only the dataset and its direct children.
2538 A comma-separated list of columns to display.
2539 .Sy name Ns , Ns Sy property Ns , Ns Sy value Ns , Ns Sy source
2540 is the default value.
2542 Display numbers in parsable
2546 Recursively display properties for any children.
2548 A comma-separated list of sources to display.
2549 Those properties coming from a source other than those in this list are ignored.
2550 Each source must be one of the following:
2557 The default value is all sources.
2559 A comma-separated list of types to display, where
2573 .Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2575 Clears the specified property, causing it to be inherited from an ancestor,
2576 restored to default if no ancestor has the property set, or with the
2578 option reverted to the received value if one exists.
2581 section for a listing of default values, and details on which properties can be
2583 .Bl -tag -width "-r"
2585 Recursively inherit the given property for all children.
2587 Revert the property to the received value if one exists; otherwise operate as
2590 option was not specified.
2596 Displays a list of file systems that are not the most recent version.
2602 Displays a list of currently supported file system versions.
2608 .Fl a | Ar filesystem
2610 Upgrades file systems to a new on-disk version.
2611 Once this is done, the file systems will no longer be accessible on systems
2612 running older versions of the software.
2614 streams generated from new snapshots of these file systems cannot be accessed on
2615 systems running older versions of the software.
2617 In general, the file system version is independent of the pool version.
2620 for information on the
2621 .Nm zpool Cm upgrade
2624 In some cases, the file system version and the pool version are interrelated and
2625 the pool version must be upgraded before the file system version can be
2627 .Bl -tag -width "-V"
2629 Upgrade to the specified
2633 flag is not specified, this command upgrades to the most recent version.
2635 option can only be used to increase the version number, and only up to the most
2636 recent version supported by this software.
2638 Upgrade all file systems on all imported pools.
2640 Upgrade the specified file system.
2642 Upgrade the specified file system and all descendent file systems.
2648 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2649 .Oo Fl s Ar field Oc Ns ...
2650 .Oo Fl S Ar field Oc Ns ...
2651 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2652 .Ar filesystem Ns | Ns Ar snapshot
2654 Displays space consumed by, and quotas on, each user in the specified filesystem
2656 This corresponds to the
2657 .Sy userused@ Ns Em user ,
2658 .Sy userobjused@ Ns Em user ,
2659 .Sy userquota@ Ns Em user,
2661 .Sy userobjquota@ Ns Em user
2663 .Bl -tag -width "-H"
2665 Do not print headers, use tab-delimited output.
2667 Sort by this field in reverse order.
2671 Translate SID to POSIX ID.
2672 The POSIX ID may be ephemeral if no mapping exists.
2673 Normal POSIX interfaces
2678 perform this translation, so the
2680 option allows the output from
2681 .Nm zfs Cm userspace
2682 to be compared directly with those utilities.
2685 may lead to confusion if some files were created by an SMB user before a
2686 SMB-to-POSIX name mapping was established.
2687 In such a case, some files will be owned by the SMB entity and some by the POSIX
2691 option will report that the POSIX entity has the total usage and quota for both.
2693 Print numeric ID instead of user/group name.
2694 .It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2695 Display only the specified fields from the following set:
2700 The default is to display all fields.
2706 Sort output by this field.
2711 flags may be specified multiple times to sort first by one field, then by
2714 .Fl s Sy type Fl s Sy name .
2715 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2716 Print only the specified types from the following set:
2723 .Fl t Sy posixuser Ns , Ns Sy smbuser .
2724 The default can be changed to include group types.
2730 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2731 .Oo Fl s Ar field Oc Ns ...
2732 .Oo Fl S Ar field Oc Ns ...
2733 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2734 .Ar filesystem Ns | Ns Ar snapshot
2736 Displays space consumed by, and quotas on, each group in the specified
2737 filesystem or snapshot.
2738 This subcommand is identical to
2739 .Nm zfs Cm userspace ,
2740 except that the default types to display are
2741 .Fl t Sy posixgroup Ns , Ns Sy smbgroup .
2746 Displays all ZFS file systems currently mounted.
2752 .Fl a | Ar filesystem
2754 Mounts ZFS file systems.
2755 .Bl -tag -width "-O"
2757 Perform an overlay mount.
2760 for more information.
2762 Mount all available ZFS file systems.
2763 Invoked automatically as part of the boot process.
2765 Mount the specified filesystem.
2767 An optional, comma-separated list of mount options to use temporarily for the
2768 duration of the mount.
2770 .Sx Temporary Mount Point Properties
2771 section for details.
2773 Report mount progress.
2779 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2781 Unmounts currently mounted ZFS file systems.
2782 .Bl -tag -width "-a"
2784 Unmount all available ZFS file systems.
2785 Invoked automatically as part of the shutdown process.
2786 .It Ar filesystem Ns | Ns Ar mountpoint
2787 Unmount the specified filesystem.
2788 The command can also be given a path to a ZFS file system mount point on the
2791 Forcefully unmount the file system, even if it is currently in use.
2796 .Fl a | Ar filesystem
2798 Shares available ZFS file systems.
2799 .Bl -tag -width "-a"
2801 Share all available ZFS file systems.
2802 Invoked automatically as part of the boot process.
2804 Share the specified filesystem according to the
2809 File systems are shared when the
2818 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2820 Unshares currently shared ZFS file systems.
2821 .Bl -tag -width "-a"
2823 Unshare all available ZFS file systems.
2824 Invoked automatically as part of the shutdown process.
2825 .It Ar filesystem Ns | Ns Ar mountpoint
2826 Unshare the specified filesystem.
2827 The command can also be given a path to a ZFS file system shared on the system.
2832 .Ar snapshot bookmark
2834 Creates a bookmark of the given snapshot.
2835 Bookmarks mark the point in time when the snapshot was created, and can be used
2836 as the incremental source for a
2840 This feature must be enabled to be used.
2842 .Xr zpool-features 5
2843 for details on ZFS feature flags and the
2850 .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
2853 Creates a stream representation of the second
2855 which is written to standard output.
2856 The output can be redirected to a file or to a different system
2857 .Po for example, using
2860 By default, a full stream is generated.
2861 .Bl -tag -width "-D"
2863 Generate a deduplicated stream.
2864 Blocks which would have been sent multiple times in the send stream will only be
2866 The receiving system must also support this feature to receive a deduplicated
2868 This flag can be used regardless of the dataset's
2870 property, but performance will be much better if the filesystem uses a
2871 dedup-capable checksum
2875 .It Fl I Ar snapshot
2876 Generate a stream package that sends all intermediary snapshots from the first
2877 snapshot to the second snapshot.
2881 .Fl i Em @a Em fs@b Ns ; Fl i Em @b Em fs@c Ns ; Fl i Em @c Em fs@d .
2882 The incremental source may be specified as with the
2885 .It Fl L, -large-block
2886 Generate a stream which may contain blocks larger than 128KB.
2887 This flag has no effect if the
2889 pool feature is disabled, or if the
2891 property of this filesystem has never been set above 128KB.
2892 The receiving system must have the
2894 pool feature enabled as well.
2896 .Xr zpool-features 5
2897 for details on ZFS feature flags and the
2901 Print machine-parsable verbose information about the stream package generated.
2902 .It Fl R, -replicate
2903 Generate a replication stream package, which will replicate the specified
2904 file system, and all descendent file systems, up to the named snapshot.
2905 When received, all properties, snapshots, descendent file systems, and clones
2912 flags are used in conjunction with the
2914 flag, an incremental replication stream is generated.
2915 The current values of properties, and current snapshot and file system names are
2916 set when the stream is received.
2919 flag is specified when this stream is received, snapshots and file systems that
2920 do not exist on the sending side are destroyed.
2922 Generate a more compact stream by using
2924 records for blocks which are stored more compactly on disk by the
2927 This flag has no effect if the
2929 feature is disabled.
2930 The receiving system must have the
2935 feature is active on the sending system, then the receiving system must have
2936 that feature enabled as well.
2938 .Xr zpool-features 5
2939 for details on ZFS feature flags and the
2942 .It Fl c, -compressed
2943 Generate a more compact stream by using compressed WRITE records for blocks
2944 which are compressed on disk and in memory
2947 property for details
2951 feature is active on the sending system, then the receiving system must have
2952 that feature enabled as well.
2955 feature is enabled on the sending system but the
2957 option is not supplied in conjunction with
2959 then the data will be decompressed before sending so it can be split into
2960 smaller block sizes.
2961 .It Fl i Ar snapshot
2962 Generate an incremental stream from the first
2964 .Pq the incremental source
2967 .Pq the incremental target .
2968 The incremental source can be specified as the last component of the snapshot
2972 character and following
2974 and it is assumed to be from the same file system as the incremental target.
2976 If the destination is a clone, the source may be the origin snapshot, which must
2979 .Em pool/fs@origin ,
2987 Do not generate any actual send data.
2988 This is useful in conjunction with the
2992 flags to determine what data will be sent.
2993 In this case, the verbose output will be written to standard output
2994 .Po contrast with a non-dry-run, where the stream is written to standard output
2995 and the verbose output goes to standard error
2998 Include the dataset's properties in the stream.
2999 This flag is implicit when
3002 The receiving system must also support this feature.
3004 Print verbose information about the stream package generated.
3005 This information includes a per-second report of how much data has been sent.
3007 The format of the stream is committed.
3008 You will be able to receive your streams on future versions of ZFS .
3014 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
3015 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
3017 Generate a send stream, which may be of a filesystem, and may be incremental
3019 If the destination is a filesystem or volume, the pool must be read-only, or the
3020 filesystem must not be mounted.
3021 When the stream generated from a filesystem or volume is received, the default
3022 snapshot name will be
3024 .Bl -tag -width "-L"
3025 .It Fl L, -large-block
3026 Generate a stream which may contain blocks larger than 128KB.
3027 This flag has no effect if the
3029 pool feature is disabled, or if the
3031 property of this filesystem has never been set above 128KB.
3032 The receiving system must have the
3034 pool feature enabled as well.
3036 .Xr zpool-features 5
3037 for details on ZFS feature flags and the
3040 .It Fl c, -compressed
3041 Generate a more compact stream by using compressed WRITE records for blocks
3042 which are compressed on disk and in memory
3045 property for details
3049 feature is active on the sending system, then the receiving system must have
3050 that feature enabled as well.
3053 feature is enabled on the sending system but the
3055 option is not supplied in conjunction with
3057 then the data will be decompressed before sending so it can be split into
3058 smaller block sizes.
3060 Generate a more compact stream by using
3062 records for blocks which are stored more compactly on disk by the
3065 This flag has no effect if the
3067 feature is disabled.
3068 The receiving system must have the
3073 feature is active on the sending system, then the receiving system must have
3074 that feature enabled as well.
3076 .Xr zpool-features 5
3077 for details on ZFS feature flags and the
3080 .It Fl i Ar snapshot Ns | Ns Ar bookmark
3081 Generate an incremental send stream.
3082 The incremental source must be an earlier snapshot in the destination's history.
3083 It will commonly be an earlier snapshot in the destination's file system, in
3084 which case it can be specified as the last component of the name
3089 character and following
3092 If the incremental target is a clone, the incremental source can be the origin
3093 snapshot, or an earlier snapshot in the origin's filesystem, or the origin's
3101 .Ar receive_resume_token
3103 Creates a send stream which resumes an interrupted receive.
3105 .Ar receive_resume_token
3106 is the value of this property on the filesystem or volume that was being
3108 See the documentation for
3115 .Op Fl o Sy origin Ns = Ns Ar snapshot
3116 .Op Fl o Ar property Ns = Ns Ar value
3117 .Op Fl x Ar property
3118 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
3124 .Op Fl d Ns | Ns Fl e
3125 .Op Fl o Sy origin Ns = Ns Ar snapshot
3126 .Op Fl o Ar property Ns = Ns Ar value
3127 .Op Fl x Ar property
3130 Creates a snapshot whose contents are as specified in the stream provided on
3132 If a full stream is received, then a new file system is created as well.
3133 Streams are created using the
3135 subcommand, which by default creates a full stream.
3137 can be used as an alias for
3140 If an incremental stream is received, then the destination file system must
3141 already exist, and its most recent snapshot must match the incremental stream's
3145 the destination device link is destroyed and recreated, which means the
3147 cannot be accessed during the
3151 When a snapshot replication package stream that is generated by using the
3152 .Nm zfs Cm send Fl R
3153 command is received, any snapshots that do not exist on the sending location are
3154 destroyed by using the
3155 .Nm zfs Cm destroy Fl d
3159 .Sy Fl o Em property=value
3161 .Sy Fl x Em property
3162 is specified, it applies to the effective value of the property throughout
3163 the entire subtree of replicated datasets. Effective property values will be
3168 ) on the topmost in the replicated subtree. In descendant datasets, if the
3169 property is set by the send stream, it will be overridden by forcing the
3170 property to be inherited from the top‐most file system. Received properties
3171 are retained in spite of being overridden and may be restored with
3172 .Nm zfs Cm inherit Fl S .
3174 .Sy Fl o Em origin=snapshot
3175 is a special case because, even if
3177 is a read-only property and cannot be set, it's allowed to receive the send
3178 stream as a clone of the given snapshot.
3180 The name of the snapshot
3181 .Pq and file system, if a full stream is received
3182 that this subcommand creates depends on the argument type and the use of the
3188 If the argument is a snapshot name, the specified
3191 If the argument is a file system or volume name, a snapshot with the same name
3192 as the sent snapshot is created within the specified
3200 options are specified, the provided target snapshot name is used exactly as
3207 options cause the file system name of the target snapshot to be determined by
3208 appending a portion of the sent snapshot's name to the specified target
3212 option is specified, all but the first element of the sent snapshot's file
3214 .Pq usually the pool name
3215 is used and any required intermediate file systems within the specified one are
3219 option is specified, then only the last element of the sent snapshot's file
3221 .Pq i.e. the name of the source file system itself
3222 is used as the target file system name.
3223 .Bl -tag -width "-F"
3225 Force a rollback of the file system to the most recent snapshot before
3226 performing the receive operation.
3227 If receiving an incremental replication stream
3228 .Po for example, one generated by
3229 .Nm zfs Cm send Fl R Op Fl i Ns | Ns Fl I
3231 destroy snapshots and file systems that do not exist on the sending side.
3233 Discard the first element of the sent snapshot's file system name, using the
3234 remaining elements to determine the name of the target file system for the new
3235 snapshot as described in the paragraph above.
3237 Discard all but the last element of the sent snapshot's file system name, using
3238 that element to determine the name of the target file system for the new
3239 snapshot as described in the paragraph above.
3241 Do not actually receive the stream.
3242 This can be useful in conjunction with the
3244 option to verify the name the receive operation would use.
3245 .It Fl o Sy origin Ns = Ns Ar snapshot
3246 Forces the stream to be received as a clone of the given snapshot.
3247 If the stream is a full send stream, this will create the filesystem
3248 described by the stream as a clone of the specified snapshot.
3249 Which snapshot was specified will not affect the success or failure of the
3250 receive, as long as the snapshot does exist.
3251 If the stream is an incremental send stream, all the normal verification will be
3253 .It Fl o Em property=value
3254 Sets the specified property as if the command
3255 .Nm zfs Cm set Em property=value
3256 was invoked immediately before the receive. When receiving a stream from
3257 .Nm zfs Cm send Fl R ,
3258 causes the property to be inherited by all descendant datasets, as through
3259 .Nm zfs Cm inherit Em property
3260 was run on any descendant datasets that have this property set on the
3263 Any editable property can be set at receive time. Set-once properties bound
3264 to the received data, such as
3267 .Sy casesensitivity ,
3268 cannot be set at receive time even when the datasets are newly created by
3269 .Nm zfs Cm receive .
3270 Additionally both settable properties
3274 cannot be set at receive time.
3278 option may be specified multiple times, for different properties. An error
3279 results if the same property is specified in multiple
3285 If the receive is interrupted, save the partially received state, rather
3287 Interruption may be due to premature termination of the stream
3288 .Po e.g. due to network failure or failure of the remote system
3289 if the stream is being read over a network connection
3291 a checksum error in the stream, termination of the
3293 process, or unclean shutdown of the system.
3295 The receive can be resumed with a stream generated by
3296 .Nm zfs Cm send Fl t Ar token ,
3300 .Sy receive_resume_token
3301 property of the filesystem or volume which is received into.
3303 To use this flag, the storage pool must have the
3304 .Sy extensible_dataset
3307 .Xr zpool-features 5
3308 for details on ZFS feature flags.
3310 File system that is associated with the received stream is not mounted.
3312 Print verbose information about the stream and the time required to perform the
3314 .It Fl x Em property
3315 Ensures that the effective value of the specified property after the
3316 receive is unaffected by the value of that property in the send stream (if any),
3317 as if the property had been excluded from the send stream.
3319 If the specified property is not present in the send stream, this option does
3322 If a received property needs to be overridden, the effective value will be
3323 set or inherited, depending on whether the property is inheritable or not.
3325 In the case of an incremental update,
3327 leaves any existing local setting or explicit inheritance unchanged.
3331 restrictions on set-once and special properties apply equally to
3338 .Ar filesystem Ns | Ns Ar volume
3340 Abort an interrupted
3341 .Nm zfs Cm receive Fl s ,
3342 deleting its saved partially received state.
3346 .Ar filesystem Ns | Ns Ar volume
3348 Displays permissions that have been delegated on the specified filesystem or
3350 See the other forms of
3352 for more information.
3354 Delegations are supported under Linux with the exception of
3362 These permissions cannot be delegated because the Linux
3364 command restricts modifications of the global namespace to the root user.
3369 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3370 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3371 .Ar setname Oc Ns ...
3372 .Ar filesystem Ns | Ns Ar volume
3377 .Fl e Ns | Ns Sy everyone
3378 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3379 .Ar setname Oc Ns ...
3380 .Ar filesystem Ns | Ns Ar volume
3382 Delegates ZFS administration permission for the file systems to non-privileged
3384 .Bl -tag -width "-d"
3386 Allow only for the descendent file systems.
3387 .It Fl e Ns | Ns Sy everyone
3388 Specifies that the permissions be delegated to everyone.
3389 .It Fl g Ar group Ns Oo , Ns Ar group Oc Ns ...
3390 Explicitly specify that permissions are delegated to the group.
3394 only for the specified file system.
3395 .It Fl u Ar user Ns Oo , Ns Ar user Oc Ns ...
3396 Explicitly specify that permissions are delegated to the user.
3397 .It Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3398 Specifies to whom the permissions are delegated.
3399 Multiple entities can be specified as a comma-separated list.
3402 options are specified, then the argument is interpreted preferentially as the
3405 then as a user name, and lastly as a group name.
3406 To specify a user or group named
3413 To specify a group with the same name as a user, use the
3417 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3418 .Ar setname Oc Ns ...
3420 The permissions to delegate.
3421 Multiple permissions may be specified as a comma-separated list.
3422 Permission names are the same as ZFS subcommand and property names.
3423 See the property list below.
3424 Property set names, which begin with
3429 form below for details.
3434 options are specified, or both are, then the permissions are allowed for the
3435 file system or volume, and all of its descendents.
3437 Permissions are generally the ability to use a ZFS subcommand or change a ZFS
3439 The following permissions are available:
3442 allow subcommand Must also have the permission that is
3444 clone subcommand Must also have the 'create' ability and
3445 'mount' ability in the origin file system
3446 create subcommand Must also have the 'mount' ability
3447 destroy subcommand Must also have the 'mount' ability
3448 diff subcommand Allows lookup of paths within a dataset
3449 given an object number, and the ability
3450 to create snapshots necessary to
3452 mount subcommand Allows mount/umount of ZFS datasets
3453 promote subcommand Must also have the 'mount' and 'promote'
3454 ability in the origin file system
3455 receive subcommand Must also have the 'mount' and 'create'
3457 rename subcommand Must also have the 'mount' and 'create'
3458 ability in the new parent
3459 rollback subcommand Must also have the 'mount' ability
3461 share subcommand Allows sharing file systems over NFS
3463 snapshot subcommand Must also have the 'mount' ability
3465 groupquota other Allows accessing any groupquota@...
3467 groupused other Allows reading any groupused@... property
3468 userprop other Allows changing any user property
3469 userquota other Allows accessing any userquota@...
3471 userused other Allows reading any userused@... property
3477 casesensitivity property
3479 compression property
3483 filesystem_limit property
3486 normalization property
3487 primarycache property
3492 refreservation property
3493 reservation property
3494 secondarycache property
3499 snapshot_limit property
3502 volblocksize property
3512 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3513 .Ar setname Oc Ns ...
3514 .Ar filesystem Ns | Ns Ar volume
3519 These permissions are granted
3521 to the creator of any newly-created descendent file system.
3525 .Fl s No @ Ns Ar setname
3526 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3527 .Ar setname Oc Ns ...
3528 .Ar filesystem Ns | Ns Ar volume
3530 Defines or adds permissions to a permission set.
3531 The set can be used by other
3533 commands for the specified file system and its descendents.
3534 Sets are evaluated dynamically, so changes to a set are immediately reflected.
3535 Permission sets follow the same naming restrictions as ZFS file systems, but the
3536 name must begin with
3538 and can be no more than 64 characters long.
3543 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3544 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3545 .Ar setname Oc Ns ... Oc
3546 .Ar filesystem Ns | Ns Ar volume
3551 .Fl e Ns | Ns Sy everyone
3552 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3553 .Ar setname Oc Ns ... Oc
3554 .Ar filesystem Ns | Ns Ar volume
3560 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3561 .Ar setname Oc Ns ... Oc
3562 .Ar filesystem Ns | Ns Ar volume
3564 Removes permissions that were granted with the
3567 No permissions are explicitly denied, so other permissions granted are still in
3569 For example, if the permission is granted by an ancestor.
3570 If no permissions are specified, then all permissions for the specified
3582 only removes the permissions that were granted to everyone, not all permissions
3583 for every user and group.
3586 command for a description of the
3589 .Bl -tag -width "-r"
3591 Recursively remove the permissions from this file system and all descendents.
3597 .Fl s No @ Ns Ar setname
3598 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3599 .Ar setname Oc Ns ... Oc
3600 .Ar filesystem Ns | Ns Ar volume
3602 Removes permissions from a permission set.
3603 If no permissions are specified, then all permissions are removed, thus removing
3609 .Ar tag Ar snapshot Ns ...
3611 Adds a single reference, named with the
3613 argument, to the specified snapshot or snapshots.
3614 Each snapshot has its own tag namespace, and tags must be unique within that
3617 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3621 .Bl -tag -width "-r"
3623 Specifies that a hold with the given tag is applied recursively to the snapshots
3624 of all descendent file systems.
3632 Lists all existing user references for the given snapshot or snapshots.
3633 .Bl -tag -width "-r"
3635 Lists the holds that are set on the named descendent snapshots, in addition to
3636 listing the holds on the named snapshot.
3642 .Ar tag Ar snapshot Ns ...
3644 Removes a single reference, named with the
3646 argument, from the specified snapshot or snapshots.
3647 The tag must already exist for each snapshot.
3648 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3652 .Bl -tag -width "-r"
3654 Recursively releases a hold with the given tag on the snapshots of all
3655 descendent file systems.
3661 .Ar snapshot Ar snapshot Ns | Ns Ar filesystem
3663 Display the difference between a snapshot of a given filesystem and another
3664 snapshot of that filesystem from a later time or the current contents of the
3666 The first column is a character indicating the type of change, the other columns
3667 indicate pathname, new pathname
3668 .Pq in case of rename ,
3669 change in link count, and optionally file type and/or change time.
3670 The types of change are:
3672 - The path has been removed
3673 + The path has been created
3674 M The path has been modified
3675 R The path has been renamed
3677 .Bl -tag -width "-F"
3679 Display an indication of the type of file, in a manner similar to the
3695 Give more parsable tab-separated output, without header lines and without
3698 Display the path's inode change time as the first column of output.
3704 utility exits 0 on success, 1 if an error occurs, and 2 if invalid command line
3705 options were specified.
3708 .It Sy Example 1 No Creating a ZFS File System Hierarchy
3709 The following commands create a file system named
3711 and a file system named
3715 is set for the parent file system, and is automatically inherited by the child
3718 # zfs create pool/home
3719 # zfs set mountpoint=/export/home pool/home
3720 # zfs create pool/home/bob
3722 .It Sy Example 2 No Creating a ZFS Snapshot
3723 The following command creates a snapshot named
3725 This snapshot is mounted on demand in the
3727 directory at the root of the
3731 # zfs snapshot pool/home/bob@yesterday
3733 .It Sy Example 3 No Creating and Destroying Multiple Snapshots
3734 The following command creates snapshots named
3738 and all of its descendent file systems.
3739 Each snapshot is mounted on demand in the
3741 directory at the root of its file system.
3742 The second command destroys the newly created snapshots.
3744 # zfs snapshot -r pool/home@yesterday
3745 # zfs destroy -r pool/home@yesterday
3747 .It Sy Example 4 No Disabling and Enabling File System Compression
3748 The following command disables the
3750 property for all file systems under
3752 The next command explicitly enables
3755 .Em pool/home/anne .
3757 # zfs set compression=off pool/home
3758 # zfs set compression=on pool/home/anne
3760 .It Sy Example 5 No Listing ZFS Datasets
3761 The following command lists all active file systems and volumes in the system.
3762 Snapshots are displayed if the
3770 for more information on pool properties.
3773 NAME USED AVAIL REFER MOUNTPOINT
3774 pool 450K 457G 18K /pool
3775 pool/home 315K 457G 21K /export/home
3776 pool/home/anne 18K 457G 18K /export/home/anne
3777 pool/home/bob 276K 457G 276K /export/home/bob
3779 .It Sy Example 6 No Setting a Quota on a ZFS File System
3780 The following command sets a quota of 50 Gbytes for
3783 # zfs set quota=50G pool/home/bob
3785 .It Sy Example 7 No Listing ZFS Properties
3786 The following command lists all properties for
3789 # zfs get all pool/home/bob
3790 NAME PROPERTY VALUE SOURCE
3791 pool/home/bob type filesystem -
3792 pool/home/bob creation Tue Jul 21 15:53 2009 -
3793 pool/home/bob used 21K -
3794 pool/home/bob available 20.0G -
3795 pool/home/bob referenced 21K -
3796 pool/home/bob compressratio 1.00x -
3797 pool/home/bob mounted yes -
3798 pool/home/bob quota 20G local
3799 pool/home/bob reservation none default
3800 pool/home/bob recordsize 128K default
3801 pool/home/bob mountpoint /pool/home/bob default
3802 pool/home/bob sharenfs off default
3803 pool/home/bob checksum on default
3804 pool/home/bob compression on local
3805 pool/home/bob atime on default
3806 pool/home/bob devices on default
3807 pool/home/bob exec on default
3808 pool/home/bob setuid on default
3809 pool/home/bob readonly off default
3810 pool/home/bob zoned off default
3811 pool/home/bob snapdir hidden default
3812 pool/home/bob acltype off default
3813 pool/home/bob aclinherit restricted default
3814 pool/home/bob canmount on default
3815 pool/home/bob xattr on default
3816 pool/home/bob copies 1 default
3817 pool/home/bob version 4 -
3818 pool/home/bob utf8only off -
3819 pool/home/bob normalization none -
3820 pool/home/bob casesensitivity sensitive -
3821 pool/home/bob vscan off default
3822 pool/home/bob nbmand off default
3823 pool/home/bob sharesmb off default
3824 pool/home/bob refquota none default
3825 pool/home/bob refreservation none default
3826 pool/home/bob primarycache all default
3827 pool/home/bob secondarycache all default
3828 pool/home/bob usedbysnapshots 0 -
3829 pool/home/bob usedbydataset 21K -
3830 pool/home/bob usedbychildren 0 -
3831 pool/home/bob usedbyrefreservation 0 -
3834 The following command gets a single property value.
3836 # zfs get -H -o value compression pool/home/bob
3839 The following command lists all properties with local settings for
3842 # zfs get -r -s local -o name,property,value all pool/home/bob
3844 pool/home/bob quota 20G
3845 pool/home/bob compression on
3847 .It Sy Example 8 No Rolling Back a ZFS File System
3848 The following command reverts the contents of
3850 to the snapshot named
3852 deleting all intermediate snapshots.
3854 # zfs rollback -r pool/home/anne@yesterday
3856 .It Sy Example 9 No Creating a ZFS Clone
3857 The following command creates a writable file system whose initial contents are
3859 .Em pool/home/bob@yesterday .
3861 # zfs clone pool/home/bob@yesterday pool/clone
3863 .It Sy Example 10 No Promoting a ZFS Clone
3864 The following commands illustrate how to test out changes to a file system, and
3865 then replace the original file system with the changed one, using clones, clone
3866 promotion, and renaming:
3868 # zfs create pool/project/production
3869 populate /pool/project/production with data
3870 # zfs snapshot pool/project/production@today
3871 # zfs clone pool/project/production@today pool/project/beta
3872 make changes to /pool/project/beta and test them
3873 # zfs promote pool/project/beta
3874 # zfs rename pool/project/production pool/project/legacy
3875 # zfs rename pool/project/beta pool/project/production
3876 once the legacy version is no longer needed, it can be destroyed
3877 # zfs destroy pool/project/legacy
3879 .It Sy Example 11 No Inheriting ZFS Properties
3880 The following command causes
3886 property from their parent.
3888 # zfs inherit checksum pool/home/bob pool/home/anne
3890 .It Sy Example 12 No Remotely Replicating ZFS Data
3891 The following commands send a full stream and then an incremental stream to a
3892 remote machine, restoring them into
3893 .Em poolB/received/fs@a
3895 .Em poolB/received/fs@b ,
3898 must contain the file system
3899 .Em poolB/received ,
3900 and must not initially contain
3901 .Em poolB/received/fs .
3903 # zfs send pool/fs@a | \e
3904 ssh host zfs receive poolB/received/fs@a
3905 # zfs send -i a pool/fs@b | \e
3906 ssh host zfs receive poolB/received/fs
3908 .It Sy Example 13 No Using the zfs receive -d Option
3909 The following command sends a full stream of
3910 .Em poolA/fsA/fsB@snap
3911 to a remote machine, receiving it into
3912 .Em poolB/received/fsA/fsB@snap .
3915 portion of the received snapshot's name is determined from the name of the sent
3918 must contain the file system
3919 .Em poolB/received .
3921 .Em poolB/received/fsA
3922 does not exist, it is created as an empty file system.
3924 # zfs send poolA/fsA/fsB@snap | \e
3925 ssh host zfs receive -d poolB/received
3927 .It Sy Example 14 No Setting User Properties
3928 The following example sets the user-defined
3929 .Sy com.example:department
3930 property for a dataset.
3932 # zfs set com.example:department=12345 tank/accounting
3934 .It Sy Example 15 No Performing a Rolling Snapshot
3935 The following example shows how to maintain a history of snapshots with a
3936 consistent naming scheme.
3937 To keep a week's worth of snapshots, the user destroys the oldest snapshot,
3938 renames the remaining snapshots, and then creates a new snapshot, as follows:
3940 # zfs destroy -r pool/users@7daysago
3941 # zfs rename -r pool/users@6daysago @7daysago
3942 # zfs rename -r pool/users@5daysago @6daysago
3943 # zfs rename -r pool/users@yesterday @5daysago
3944 # zfs rename -r pool/users@yesterday @4daysago
3945 # zfs rename -r pool/users@yesterday @3daysago
3946 # zfs rename -r pool/users@yesterday @2daysago
3947 # zfs rename -r pool/users@today @yesterday
3948 # zfs snapshot -r pool/users@today
3950 .It Sy Example 16 No Setting sharenfs Property Options on a ZFS File System
3951 The following commands show how to set
3953 property options to enable
3957 addresses and to enable root access for system
3963 # zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home
3968 for host name resolution, specify the fully qualified hostname.
3969 .It Sy Example 17 No Delegating ZFS Administration Permissions on a ZFS Dataset
3970 The following example shows how to set permissions so that user
3972 can create, destroy, mount, and take snapshots on
3978 # zfs allow cindys create,destroy,mount,snapshot tank/cindys
3979 # zfs allow tank/cindys
3980 ---- Permissions on tank/cindys --------------------------------------
3981 Local+Descendent permissions:
3982 user cindys create,destroy,mount,snapshot
3987 mount point permission is set to 755 by default, user
3989 will be unable to mount file systems under
3991 Add an ACE similar to the following syntax to provide mount point access:
3993 # chmod A+user:cindys:add_subdirectory:allow /tank/cindys
3995 .It Sy Example 18 No Delegating Create Time Permissions on a ZFS Dataset
3996 The following example shows how to grant anyone in the group
3998 to create file systems in
4000 This syntax also allows staff members to destroy their own file systems, but not
4001 destroy anyone else's file system.
4006 # zfs allow staff create,mount tank/users
4007 # zfs allow -c destroy tank/users
4008 # zfs allow tank/users
4009 ---- Permissions on tank/users ---------------------------------------
4012 Local+Descendent permissions:
4013 group staff create,mount
4015 .It Sy Example 19 No Defining and Granting a Permission Set on a ZFS Dataset
4016 The following example shows how to define and grant a permission set on the
4023 # zfs allow -s @pset create,destroy,snapshot,mount tank/users
4024 # zfs allow staff @pset tank/users
4025 # zfs allow tank/users
4026 ---- Permissions on tank/users ---------------------------------------
4028 @pset create,destroy,mount,snapshot
4029 Local+Descendent permissions:
4032 .It Sy Example 20 No Delegating Property Permissions on a ZFS Dataset
4033 The following example shows to grant the ability to set quotas and reservations
4041 # zfs allow cindys quota,reservation users/home
4042 # zfs allow users/home
4043 ---- Permissions on users/home ---------------------------------------
4044 Local+Descendent permissions:
4045 user cindys quota,reservation
4046 cindys% zfs set quota=10G users/home/marks
4047 cindys% zfs get quota users/home/marks
4048 NAME PROPERTY VALUE SOURCE
4049 users/home/marks quota 10G local
4051 .It Sy Example 21 No Removing ZFS Delegated Permissions on a ZFS Dataset
4052 The following example shows how to remove the snapshot permission from the
4061 # zfs unallow staff snapshot tank/users
4062 # zfs allow tank/users
4063 ---- Permissions on tank/users ---------------------------------------
4065 @pset create,destroy,mount,snapshot
4066 Local+Descendent permissions:
4069 .It Sy Example 22 No Showing the differences between a snapshot and a ZFS Dataset
4070 The following example shows how to see what has changed between a prior
4071 snapshot of a ZFS dataset and its current state.
4074 option is used to indicate type information for the files affected.
4076 # zfs diff -F tank/test@before tank/test
4078 M F /tank/test/linked (+1)
4079 R F /tank/test/oldname -> /tank/test/newname
4080 - F /tank/test/deleted
4081 + F /tank/test/created
4082 M F /tank/test/modified
4084 .It Sy Example 23 No Creating a bookmark
4085 The following example create a bookmark to a snapshot. This bookmark
4086 can then be used instead of snapshot in send streams.
4088 # zfs bookmark rpool@snapshot rpool#bookmark
4090 .It Sy Example 24 No Setting sharesmb Property Options on a ZFS File System
4091 The following example show how to share SMB filesystem through ZFS. Note that
4092 that a user and his/her password must be given.
4094 # smbmount //127.0.0.1/share_tmp /mnt/tmp \\
4095 -o user=workgroup/turbo,password=obrut,uid=1000
4099 .Em /etc/samba/smb.conf
4100 configuration required:
4102 Samba will need to listen to 'localhost' (127.0.0.1) for the ZFS utilities to
4103 communicate with Samba. This is the default behavior for most Linux
4106 Samba must be able to authenticate a user. This can be done in a number of
4107 ways, depending on if using the system password file, LDAP or the Samba
4108 specific smbpasswd file. How to do this is outside the scope of this manual.
4111 man page for more information.
4114 .Sy USERSHARE section
4117 man page for all configuration options in case you need to modify any options
4118 to the share afterwards. Do note that any changes done with the
4120 command will be undone if the share is ever unshared (such as at a reboot etc).
4122 .Sh INTERFACE STABILITY