2 .\" Copyright (c) 2013, Martin Matuska <mm@FreeBSD.org>.
3 .\" All Rights Reserved.
5 .\" The contents of this file are subject to the terms of the
6 .\" Common Development and Distribution License (the "License").
7 .\" You may not use this file except in compliance with the License.
9 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 .\" or http://www.opensolaris.org/os/licensing.
11 .\" See the License for the specific language governing permissions
12 .\" and limitations under the License.
14 .\" When distributing Covered Code, include this CDDL HEADER in each
15 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 .\" If applicable, add the following below this CDDL HEADER, with the
17 .\" fields enclosed by brackets "[]" replaced with your own identifying
18 .\" information: Portions Copyright [yyyy] [name of copyright owner]
20 .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved.
21 .\" Copyright (c) 2013 by Delphix. All rights reserved.
22 .\" Copyright (c) 2011, Pawel Jakub Dawidek <pjd@FreeBSD.org>
23 .\" Copyright (c) 2012, Bryan Drewery <bdrewery@FreeBSD.org>
24 .\" Copyright (c) 2012, Glen Barber <gjb@FreeBSD.org>
25 .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
26 .\" Copyright (c) 2013 Nexenta Systems, Inc. All Rights Reserved.
27 .\" Copyright (c) 2013, Joyent, Inc. All rights reserved.
28 .\" Copyright (c) 2013, Steven Hartland <smh@FreeBSD.org>
29 .\" Copyright (c) 2014, Xin LI <delphij@FreeBSD.org>
38 .Nd configures ZFS file systems
45 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... Ar filesystem
50 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
56 .Ar filesystem Ns | Ns Ar volume
61 .Ar filesystem Ns | Ns volume
64 .Op , Ns Ar snap Op % Ns Ar snap
69 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
71 .Cm snapshot Ns | Ns Cm snap
73 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
74 .Ar filesystem@snapname Ns | Ns Ar volume@snapname
75 .Ar filesystem@snapname Ns | Ns Ar volume@snapname Ns ...
83 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
84 .Ar snapshot filesystem Ns | Ns Ar volume
91 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
92 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
97 .Ar filesystem Ns | Ns Ar volume
98 .Ar filesystem Ns | Ns Ar volume
102 .Ar snapshot snapshot
107 .Ar filesystem filesystem
110 .Op Fl r Ns | Ns Fl d Ar depth
112 .Op Fl o Ar property Ns Oo , Ns property Ns Oc Ns ...
113 .Op Fl t Ar type Ns Oo , Ns type Ns Oc Ns ...
114 .Oo Fl s Ar property Oc Ns ...
115 .Oo Fl S Ar property Oc Ns ...
116 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
119 .Ar property Ns = Ns Ar value
120 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
123 .Op Fl r Ns | Ns Fl d Ar depth
125 .Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ...
126 .Op Fl t Ar type Ns Oo Ns , Ar type Oc Ns ...
127 .Op Fl s Ar source Ns Oo Ns , Ns Ar source Oc Ns ...
128 .Ar all | property Ns Oo Ns , Ns Ar property Oc Ns ...
129 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
134 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
142 .Fl a | Ar filesystem
146 .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
147 .Oo Fl s Ar field Oc Ns ...
148 .Oo Fl S Ar field Oc Ns ...
149 .Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ...
150 .Ar filesystem Ns | Ns Ar snapshot
154 .Op Fl o Ar field Ns Oo , Ns field Oc Ns ...
155 .Oo Fl s Ar field Oc Ns ...
156 .Oo Fl S Ar field Oc Ns ...
157 .Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ...
158 .Ar filesystem Ns | Ns Ar snapshot
164 .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
165 .Fl a | Ar filesystem
167 .Cm unmount Ns | Ns Cm umount
169 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
172 .Fl a | Ar filesystem
175 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
183 .Op Fl i Ar snapshot | Fl I Ar snapshot
187 .Op Fl i Ar snapshot Ns | Ns bookmark
188 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
190 .Cm receive Ns | Ns Cm recv
192 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
194 .Cm receive Ns | Ns Cm recv
200 .Ar filesystem Ns | Ns Ar volume
204 .Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
205 .Ar perm Ns | Ns Ar @setname Ns
206 .Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ...
207 .Ar filesystem Ns | Ns Ar volume
211 .Fl e Ns | Ns Cm everyone
212 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
214 .Ar filesystem Ns | Ns Ar volume
218 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
220 .Ar filesystem Ns | Ns Ar volume
225 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
227 .Ar filesystem Ns | Ns Ar volume
231 .Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
232 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
234 .Ar filesystem Ns | Ns Ar volume
238 .Fl e Ns | Ns Cm everyone
239 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
241 .Ar filesystem Ns | Ns Ar volume
246 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
248 .Ar filesystem Ns | Ns Ar volume
254 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
256 .Ar filesystem Ns | Ns Ar volume
260 .Ar tag snapshot Ns ...
268 .Ar tag snapshot Ns ...
273 .Op Ar snapshot Ns | Ns Ar filesystem
276 .Ar jailid Ns | Ns Ar jailname filesystem
279 .Ar jailid Ns | Ns Ar jailname filesystem
287 storage pool, as described in
289 A dataset is identified by a unique path within the
291 namespace. For example:
292 .Bd -ragged -offset 4n
293 .No pool/ Ns Brq filesystem,volume,snapshot
296 where the maximum length of a dataset name is
300 A dataset can be one of the following:
307 can be mounted within the standard system namespace and behaves like other file
310 file systems are designed to be
312 compliant, known issues exist that prevent compliance in some cases.
313 Applications that depend on standards conformance might fail due to nonstandard
314 behavior when checking file system free space.
316 A logical volume exported as a raw or block device. This type of dataset should
317 only be used under special circumstances. File systems are typically used in
320 A read-only version of a file system or volume at a given point in time. It is
326 .Ss ZFS File System Hierarchy
329 storage pool is a logical collection of devices that provide space for
330 datasets. A storage pool is also the root of the
332 file system hierarchy.
334 The root of the pool can be accessed as a file system, such as mounting and
335 unmounting, taking snapshots, and setting properties. The physical storage
336 characteristics, however, are managed by the
342 for more information on creating and administering pools.
344 A snapshot is a read-only copy of a file system or volume. Snapshots can be
345 created extremely quickly, and initially consume no additional space within the
346 pool. As data within the active dataset changes, the snapshot consumes more
347 data than would otherwise be shared with the active dataset.
349 Snapshots can have arbitrary names. Snapshots of volumes can be cloned or
350 rolled back, but cannot be accessed independently.
352 File system snapshots can be accessed under the
354 directory in the root of the file system. Snapshots are automatically mounted
355 on demand and may be unmounted at regular intervals. The visibility of the
357 directory can be controlled by the
361 A clone is a writable volume or file system whose initial contents are the same
362 as another dataset. As with snapshots, creating a clone is nearly
363 instantaneous, and initially consumes no additional space.
365 Clones can only be created from a snapshot. When a snapshot is cloned, it
366 creates an implicit dependency between the parent and child. Even though the
367 clone is created somewhere else in the dataset hierarchy, the original snapshot
368 cannot be destroyed as long as a clone exists. The
370 property exposes this dependency, and the
372 command lists any such dependencies, if they exist.
374 The clone parent-child dependency relationship can be reversed by using the
376 subcommand. This causes the "origin" file system to become a clone of the
377 specified file system, which makes it possible to destroy the file system that
378 the clone was created from.
382 file system is a simple operation, so the number of file systems per system is
383 likely to be numerous. To cope with this,
385 automatically manages mounting and unmounting file systems without the need to
388 file. All automatically managed file systems are mounted by
392 By default, file systems are mounted under
396 is the name of the file system in the
398 namespace. Directories are created and destroyed as needed.
400 A file system can also have a mount point set in the
402 property. This directory is created as needed, and
404 automatically mounts the file system when the
406 command is invoked (without editing
410 property can be inherited, so if
416 automatically inherits a mount point of
423 prevents the file system from being mounted.
427 file systems can also be managed with traditional tools
428 .Pq Xr mount 8 , Xr umount 8 , Xr fstab 5 .
429 If a file system's mount point is set to
432 makes no attempt to manage the file system, and the administrator is
433 responsible for mounting and unmounting the file system.
436 dataset can be attached to a jail by using the
438 subcommand. You cannot attach a dataset to one jail and the children of the
439 same dataset to another jails. To allow management of the dataset from within
442 property has to be set. The
444 property cannot be changed from within a jail.
447 dataset can be detached from a jail using the
451 After a dataset is attached to a jail and the jailed property is set, a jailed
452 file system cannot be mounted outside the jail, since the jail administrator
453 might have set the mount point to an unacceptable value.
455 Deduplication is the process for removing redundant data at the block-level,
456 reducing the total amount of data stored. If a file system has the
458 property enabled, duplicate data blocks are removed synchronously. The result
459 is that only unique data is stored and common components are shared among
461 .Ss Native Properties
462 Properties are divided into two types, native properties and user-defined (or
463 "user") properties. Native properties either export internal statistics or
466 behavior. In addition, native properties are either editable or read-only. User
467 properties have no effect on
469 behavior, but you can use them to annotate datasets in a way that is meaningful
470 in your environment. For more information about user properties, see the
471 .Qq Sx User Properties
474 Every dataset has a set of properties that export statistics about the dataset
475 as well as control various behaviors. Properties are inherited from the parent
476 unless overridden by the child. Some properties apply only to certain types of
477 datasets (file systems, volumes, or snapshots).
479 The values of numeric properties can be specified using human-readable suffixes
481 .Sy k , KB , M , Gb ,
484 for zettabyte). The following are all valid (and equal) specifications:
485 .Bd -ragged -offset 4n
489 The values of non-numeric properties are case sensitive and must be lowercase,
491 .Sy mountpoint , sharenfs , No and Sy sharesmb .
493 The following native properties consist of read-only statistics about the
494 dataset. These properties can be neither set, nor inherited. Native properties
495 apply to all dataset types unless otherwise noted.
498 The amount of space available to the dataset and all its children, assuming
499 that there is no other activity in the pool. Because space is shared within a
500 pool, availability can be limited by any number of factors, including physical
501 pool size, quotas, reservations, or other datasets within the pool.
503 This property can also be referred to by its shortened column name,
506 For non-snapshots, the compression ratio achieved for the
508 space of this dataset, expressed as a multiplier. The
510 property includes descendant datasets, and, for clones, does not include
511 the space shared with the origin snapshot. For snapshots, the
515 property. Compression can be turned on by running:
516 .Qq Nm Cm set compression=on Ar dataset
520 The time this dataset was created.
522 For snapshots, this property is a comma-separated list of filesystems or
523 volumes which are clones of this snapshot. The clones'
525 property is this snapshot. If the
527 property is not empty, then this snapshot can not be destroyed (even with the
535 if the snapshot has been marked for deferred destroy by using the
537 command. Otherwise, the property is
539 .It Sy logicalreferenced
540 The amount of space that is
542 accessible by this dataset.
546 The logical space ignores the effect of the
550 properties, giving a quantity closer to the amount of data that applications
552 However, it does include space consumed by metadata.
554 This property can also be referred to by its shortened column name,
557 The amount of space that is
559 consumed by this dataset and all its descendents.
563 The logical space ignores the effect of the
567 properties, giving a quantity closer to the amount of data that applications
570 This property can also be referred to by its shortened column name,
573 For file systems, indicates whether the file system is currently mounted. This
574 property can be either
579 For cloned file systems or volumes, the snapshot from which the clone was
580 created. See also the
584 The amount of data that is accessible by this dataset, which may or may not be
585 shared with other datasets in the pool. When a snapshot or clone is created, it
586 initially references the same amount of space as the file system or snapshot it
587 was created from, since its contents are identical.
589 This property can also be referred to by its shortened column name,
591 .It Sy refcompressratio
592 The compression ratio achieved for the
594 space of this dataset, expressed as a multiplier. See also the
599 .Sy filesystem , volume , No or Sy snapshot .
601 The amount of space consumed by this dataset and all its descendents. This is
602 the value that is checked against this dataset's quota and reservation. The
603 space used does not include this dataset's reservation, but does take into
604 account the reservations of any descendent datasets. The amount of space that a
605 dataset consumes from its parent, as well as the amount of space that are freed
606 if this dataset is recursively destroyed, is the greater of its space used and
609 When snapshots (see the
611 section) are created, their space is
612 initially shared between the snapshot and the file system, and possibly with
613 previous snapshots. As the file system changes, space that was previously
614 shared becomes unique to the snapshot, and counted in the snapshot's space
615 used. Additionally, deleting snapshots can increase the amount of space unique
616 to (and used by) other snapshots.
618 The amount of space used, available, or referenced does not take into account
619 pending changes. Pending changes are generally accounted for within a few
620 seconds. Committing a change to a disk using
624 does not necessarily guarantee that the space usage information is updated
629 properties decompose the
631 properties into the various reasons that space is used. Specifically,
633 .Sy usedbysnapshots + usedbydataset + usedbychildren + usedbyrefreservation .
634 These properties are only available for datasets created
637 pool version 13 pools and higher.
638 .It Sy usedbysnapshots
639 The amount of space consumed by snapshots of this dataset. In particular, it is
640 the amount of space that would be freed if all of this dataset's snapshots were
641 destroyed. Note that this is not simply the sum of the snapshots'
643 properties because space can be shared by multiple snapshots.
645 The amount of space used by this dataset itself, which would be freed if the
646 dataset were destroyed (after first removing any
648 and destroying any necessary snapshots or descendents).
649 .It Sy usedbychildren
650 The amount of space used by children of this dataset, which would be freed if
651 all the dataset's children were destroyed.
652 .It Sy usedbyrefreservation
653 The amount of space used by a
655 set on this dataset, which would be freed if the
658 .It Sy userused@ Ns Ar user
659 The amount of space consumed by the specified user in this dataset. Space is
660 charged to the owner of each file, as displayed by
662 The amount of space charged is displayed by
668 subcommand for more information.
670 Unprivileged users can access only their own space usage. The root user, or a
671 user who has been granted the
675 can access everyone's usage.
679 properties are not displayed by
681 The user's name must be appended after the
683 symbol, using one of the following forms:
684 .Bl -bullet -offset 2n
686 POSIX name (for example,
689 POSIX numeric ID (for example,
693 This property is set to the number of user holds on this snapshot. User holds
697 .It Sy groupused@ Ns Ar group
698 The amount of space consumed by the specified group in this dataset. Space is
699 charged to the group of each file, as displayed by
702 .Sy userused@ Ns Ar user
703 property for more information.
705 Unprivileged users can only access their own groups' space usage. The root
706 user, or a user who has been granted the
710 can access all groups' usage.
711 .It Sy volblocksize Ns = Ns Ar blocksize
712 For volumes, specifies the block size of the volume. The
714 cannot be changed once the volume has been written, so it should be set at
715 volume creation time. The default
717 for volumes is 8 Kbytes. Any
718 power of 2 from 512 bytes to 128 Kbytes is valid.
720 This property can also be referred to by its shortened column name,
725 space written to this dataset since the previous snapshot.
726 .It Sy written@ Ns Ar snapshot
729 space written to this dataset since the specified snapshot. This is the space
730 that is referenced by this dataset but was not referenced by the specified
735 may be specified as a short snapshot name (just the part after the
737 in which case it will be interpreted as a snapshot in the same filesystem as
740 may be a full snapshot name
741 .Pq Em filesystem@snapshot ,
742 which for clones may be a snapshot in the origin's filesystem (or the origin of
743 the origin's filesystem, etc).
746 The following native properties can be used to change the behavior of a
751 .Sy aclinherit Ns = Ns Cm discard |
759 entries are inherited when files and directories are created. A file system
766 entries. A file system with an
770 only inherits inheritable
772 entries that specify "deny" permissions. The property value
774 (the default) removes the
780 entry is inherited. A file system with an
784 inherits all inheritable
786 entries without any modifications made to the
788 entries when they are inherited. A file system with an
792 has the same meaning as
795 .Em owner@ , group@ , No and Em everyone@ Tn ACE Ns s
796 inherit the execute permission only if the file creation mode also requests the
799 When the property value is set to
801 files are created with a mode determined by the inheritable
805 exist that affect the mode, then the mode is set in accordance to the requested
806 mode from the application.
807 .It Sy aclmode Ns = Ns Cm discard | groupmask | passthrough | restricted
812 A file system with an
816 (the default) deletes all
818 entries that do not represent the mode of the file. An
822 reduces permissions granted in all
826 such that they are no greater than the group permissions specified by
828 A file system with an
832 indicates that no changes are made to the
834 other than creating or updating the necessary
836 entries to represent the new mode of the file or directory.
843 operation to return an error when used on any file or directory which has
846 whose entries can not be represented by a mode.
848 is required to change the set user ID, set group ID, or sticky bits on a file
849 or directory, as they do not have equivalent
854 on a file or directory with a non-trivial
860 you must first remove all
862 entries which do not represent the current mode.
863 .It Sy atime Ns = Ns Cm on | off
864 Controls whether the access time for files is updated when they are read.
865 Turning this property off avoids producing write traffic when reading files and
866 can result in significant performance gains, though it might confuse mailers
867 and other similar utilities. The default value is
869 .It Sy canmount Ns = Ns Cm on | off | noauto
870 If this property is set to
872 the file system cannot be mounted, and is ignored by
873 .Qq Nm Cm mount Fl a .
874 Setting this property to
876 is similar to setting the
880 except that the dataset still has a normal
882 property, which can be inherited. Setting this property to
884 allows datasets to be used solely as a mechanism to inherit properties. One
886 .Sy canmount Ns = Ns Cm off
887 is to have two datasets with the same
889 so that the children of both datasets appear in the same directory, but might
890 have different inherited characteristics.
894 value is set, a dataset can only be mounted and unmounted explicitly. The
895 dataset is not mounted automatically when the dataset is created or imported,
896 nor is it mounted by the
898 command or unmounted by the
899 .Qq Nm Cm umount Fl a
902 This property is not inherited.
903 .It Sy checksum Ns = Ns Cm on | off | fletcher2 | fletcher4 | sha256 | noparity
904 Controls the checksum used to verify data integrity. The default value is
906 which automatically selects an appropriate algorithm (currently,
908 but this may change in future releases). The value
910 disables integrity checking on user data.
914 disables integrity but also disables maintaining parity for user data. This
915 setting is used internally by a dump device residing on a RAID-Z pool and should
916 not be used by any other dataset.
917 Disabling checksums is
919 a recommended practice.
920 .It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | zle | Cm lz4
921 Controls the compression algorithm used for this dataset. The
923 compression algorithm is optimized for performance while providing decent data
924 compression. Setting compression to
928 compression algorithm. The
930 compression algorithm uses the same compression as the
932 command. You can specify the
934 level by using the value
938 is an integer from 1 (fastest) to 9 (best compression ratio). Currently,
942 (which is also the default for
946 compression algorithm compresses runs of zeros.
950 compression algorithm is a high-performance replacement
953 algorithm. It features significantly faster
954 compression and decompression, as well as a moderately higher
955 compression ratio than
957 but can only be used on pools with
964 for details on ZFS feature flags and the
968 This property can also be referred to by its shortened column name
970 Changing this property affects only newly-written data.
971 .It Sy copies Ns = Ns Cm 1 | 2 | 3
972 Controls the number of copies of data stored for this dataset. These copies are
973 in addition to any redundancy provided by the pool, for example, mirroring or
974 RAID-Z. The copies are stored on different disks, if possible. The space used
975 by multiple copies is charged to the associated file and dataset, changing the
977 property and counting against quotas and reservations.
979 Changing this property only affects newly-written data. Therefore, set this
980 property at file system creation time by using the
981 .Fl o Cm copies= Ns Ar N
983 .It Sy dedup Ns = Ns Cm on | off | verify | sha256 Ns Op Cm ,verify
984 Configures deduplication for a dataset. The default value is
986 The default deduplication checksum is
988 (this may change in the future).
991 is enabled, the checksum defined here overrides the
993 property. Setting the value to
995 has the same effect as the setting
1001 will do a byte-to-byte comparsion in case of two blocks having the same
1002 signature to make sure the block contents are identical.
1003 .It Sy devices Ns = Ns Cm on | off
1006 property is currently not supported on
1008 .It Sy exec Ns = Ns Cm on | off
1009 Controls whether processes can be executed from within this file system. The
1012 .It Sy mlslabel Ns = Ns Ar label | Cm none
1015 property is currently not supported on
1017 .It Sy mountpoint Ns = Ns Ar path | Cm none | legacy
1018 Controls the mount point used for this file system. See the
1020 section for more information on how this property is used.
1024 property is changed for a file system, the file system and any children that
1025 inherit the mount point are unmounted. If the new value is
1027 then they remain unmounted. Otherwise, they are automatically remounted in the
1028 new location if the property was previously
1032 or if they were mounted before the property was changed. In addition, any
1033 shared file systems are unshared and shared in the new location.
1034 .It Sy nbmand Ns = Ns Cm on | off
1037 property is currently not supported on
1039 .It Sy primarycache Ns = Ns Cm all | none | metadata
1040 Controls what is cached in the primary cache (ARC). If this property is set to
1042 then both user data and metadata is cached. If this property is set to
1044 then neither user data nor metadata is cached. If this property is set to
1046 then only metadata is cached. The default value is
1048 .It Sy quota Ns = Ns Ar size | Cm none
1049 Limits the amount of space a dataset and its descendents can consume. This
1050 property enforces a hard limit on the amount of space used. This includes all
1051 space consumed by descendents, including file systems and snapshots. Setting a
1052 quota on a descendent of a dataset that already has a quota does not override
1053 the ancestor's quota, but rather imposes an additional limit.
1055 Quotas cannot be set on volumes, as the
1057 property acts as an implicit quota.
1058 .It Sy userquota@ Ns Ar user Ns = Ns Ar size | Cm none
1059 Limits the amount of space consumed by the specified user.
1064 space calculation does not include space that is used by descendent datasets,
1065 such as snapshots and clones. User space consumption is identified by the
1066 .Sy userspace@ Ns Ar user
1069 Enforcement of user quotas may be delayed by several seconds. This delay means
1070 that a user might exceed their quota before the system notices that they are
1071 over quota and begins to refuse additional writes with the
1073 error message. See the
1075 subcommand for more information.
1077 Unprivileged users can only access their own groups' space usage. The root
1078 user, or a user who has been granted the
1082 can get and set everyone's quota.
1084 This property is not available on volumes, on file systems before version 4, or
1085 on pools before version 15. The
1086 .Sy userquota@ Ns ...
1087 properties are not displayed by
1089 The user's name must be appended after the
1091 symbol, using one of the following forms:
1092 .Bl -bullet -offset 2n
1094 POSIX name (for example,
1097 POSIX numeric ID (for example,
1100 .It Sy groupquota@ Ns Ar group Ns = Ns Ar size | Cm none
1101 Limits the amount of space consumed by the specified group. Group space
1102 consumption is identified by the
1103 .Sy userquota@ Ns Ar user
1106 Unprivileged users can access only their own groups' space usage. The root
1107 user, or a user who has been granted the
1111 can get and set all groups' quotas.
1112 .It Sy readonly Ns = Ns Cm on | off
1113 Controls whether this dataset can be modified. The default value is
1115 .It Sy recordsize Ns = Ns Ar size
1116 Specifies a suggested block size for files in the file system. This property is
1117 designed solely for use with database workloads that access files in fixed-size
1120 automatically tunes block sizes according to internal algorithms optimized for
1121 typical access patterns.
1123 For databases that create very large files but access them in small random
1124 chunks, these algorithms may be suboptimal. Specifying a
1126 greater than or equal to the record size of the database can result in
1127 significant performance gains. Use of this property for general purpose file
1128 systems is strongly discouraged, and may adversely affect performance.
1130 The size specified must be a power of two greater than or equal to 512 and less
1131 than or equal to 128 Kbytes.
1133 Changing the file system's
1135 affects only files created afterward; existing files are unaffected.
1137 This property can also be referred to by its shortened column name,
1139 .It Sy refquota Ns = Ns Ar size | Cm none
1140 Limits the amount of space a dataset can consume. This property enforces a hard
1141 limit on the amount of space used. This hard limit does not include space used
1142 by descendents, including file systems and snapshots.
1143 .It Sy refreservation Ns = Ns Ar size | Cm none
1144 The minimum amount of space guaranteed to a dataset, not including its
1145 descendents. When the amount of space used is below this value, the dataset is
1146 treated as if it were taking up the amount of space specified by
1147 .Sy refreservation .
1150 reservation is accounted for in the parent datasets' space used, and counts
1151 against the parent datasets' quotas and reservations.
1155 is set, a snapshot is only allowed if there is enough free pool space outside
1156 of this reservation to accommodate the current number of "referenced" bytes in
1159 This property can also be referred to by its shortened column name,
1161 .It Sy reservation Ns = Ns Ar size | Cm none
1162 The minimum amount of space guaranteed to a dataset and its descendents. When
1163 the amount of space used is below this value, the dataset is treated as if it
1164 were taking up the amount of space specified by its reservation. Reservations
1165 are accounted for in the parent datasets' space used, and count against the
1166 parent datasets' quotas and reservations.
1168 This property can also be referred to by its shortened column name,
1170 .It Sy secondarycache Ns = Ns Cm all | none | metadata
1171 Controls what is cached in the secondary cache (L2ARC). If this property is set
1174 then both user data and metadata is cached. If this property is set to
1176 then neither user data nor metadata is cached. If this property is set to
1178 then only metadata is cached. The default value is
1180 .It Sy setuid Ns = Ns Cm on | off
1181 Controls whether the
1183 bit is respected for the file system. The default value is
1185 .It Sy sharesmb Ns = Ns Cm on | off | Ar opts
1188 property currently has no effect on
1190 .It Sy sharenfs Ns = Ns Cm on | off | Ar opts
1191 Controls whether the file system is shared via
1193 and what options are used. A file system with a
1197 is managed the traditional way via
1199 Otherwise, the file system is automatically shared and unshared with the
1203 commands. If the property is set to
1207 export options are used. Otherwise,
1209 export options are equivalent to the contents of this property. The export
1210 options may be comma-separated. See
1212 for a list of valid options.
1216 property is changed for a dataset, the
1219 .It Sy logbias Ns = Ns Cm latency | throughput
1222 about handling of synchronous requests in this dataset.
1229 will use pool log devices (if configured) to handle the requests at low
1235 will not use configured pool log devices.
1237 will instead optimize synchronous operations for global pool throughput and
1238 efficient use of resources.
1239 .It Sy snapdir Ns = Ns Cm hidden | visible
1240 Controls whether the
1242 directory is hidden or visible in the root of the file system as discussed in
1245 section. The default value is
1247 .It Sy sync Ns = Ns Cm standard | always | disabled
1248 Controls the behavior of synchronous requests (e.g.
1250 O_DSYNC). This property accepts the following values:
1251 .Bl -tag -offset 4n -width 8n
1253 This is the POSIX specified behavior of ensuring all synchronous requests are
1254 written to stable storage and all devices are flushed to ensure data is not
1255 cached by device controllers (this is the default).
1257 All file system transactions are written and flushed before their system calls
1258 return. This has a large performance penalty.
1260 Disables synchronous requests. File system transactions are only committed to
1261 stable storage periodically. This option will give the highest performance.
1262 However, it is very dangerous as
1264 would be ignoring the synchronous transaction demands of applications such as
1267 Administrators should only use this option when the risks are understood.
1269 .It Sy volsize Ns = Ns Ar size
1270 For volumes, specifies the logical size of the volume. By default, creating a
1271 volume establishes a reservation of equal size. For storage pools with a
1272 version number of 9 or higher, a
1274 is set instead. Any changes to
1276 are reflected in an equivalent change to the reservation (or
1277 .Sy refreservation ) .
1280 can only be set to a multiple of
1284 The reservation is kept equal to the volume's logical size to prevent
1285 unexpected behavior for consumers. Without the reservation, the volume could
1286 run out of space, resulting in undefined behavior or data corruption, depending
1287 on how the volume is used. These effects can also occur when the volume size is
1288 changed while it is in use (particularly when shrinking the size). Extreme care
1289 should be used when adjusting the volume size.
1291 Though not recommended, a "sparse volume" (also known as "thin provisioning")
1292 can be created by specifying the
1295 .Qq Nm Cm create Fl V
1296 command, or by changing the reservation after the volume has been created. A
1297 "sparse volume" is a volume where the reservation is less then the volume size.
1298 Consequently, writes to a sparse volume can fail with
1300 when the pool is low on space. For a sparse volume, changes to
1302 are not reflected in the reservation.
1303 .It Sy vscan Ns = Ns Cm off | on
1306 property is currently not supported on
1308 .It Sy xattr Ns = Ns Cm off | on
1311 property is currently not supported on
1313 .It Sy jailed Ns = Ns Cm off | on
1314 Controls whether the dataset is managed from a jail. See the
1316 section for more information. The default value is
1320 The following three properties cannot be changed after the file system is
1321 created, and therefore, should be set when the file system is created. If the
1322 properties are not set with the
1326 commands, these properties are inherited from the parent dataset. If the parent
1327 dataset lacks these properties due to having been created prior to these
1328 features being supported, the new file system will have the default values for
1331 .It Sy casesensitivity Ns = Ns Cm sensitive | insensitive | mixed
1332 Indicates whether the file name matching algorithm used by the file system
1333 should be case-sensitive, case-insensitive, or allow a combination of both
1334 styles of matching. The default value for the
1338 Traditionally, UNIX and POSIX file systems have case-sensitive file names.
1344 property indicates that the
1345 file system can support requests for both case-sensitive and case-insensitive
1347 .It Sy normalization Ns = Ns Cm none | formC | formD | formKC | formKD
1348 Indicates whether the file system should perform a
1350 normalization of file names whenever two file names are compared, and which
1351 normalization algorithm should be used. File names are always stored
1352 unmodified, names are normalized as part of any comparison process. If this
1353 property is set to a legal value other than
1357 property was left unspecified, the
1359 property is automatically set to
1361 The default value of the
1365 This property cannot be changed after the file system is created.
1366 .It Sy utf8only Ns = Ns Cm on | off
1367 Indicates whether the file system should reject file names that include
1368 characters that are not present in the
1370 character code set. If this property is explicitly set to
1372 the normalization property must either not be explicitly set or be set to
1374 The default value for the
1378 This property cannot be changed after the file system is created.
1382 .Sy casesensitivity , normalization , No and Sy utf8only
1383 properties are also new permissions that can be assigned to non-privileged
1386 delegated administration feature.
1387 .Ss Temporary Mount Point Properties
1388 When a file system is mounted, either through
1390 for legacy mounts or the
1392 command for normal file systems, its mount options are set according to its
1393 properties. The correlation between properties and mount options is as follows:
1394 .Bl -column -offset 4n "PROPERTY" "MOUNT OPTION"
1395 .It PROPERTY MOUNT OPTION
1396 .It atime atime/noatime
1397 .It exec exec/noexec
1399 .It setuid suid/nosuid
1402 In addition, these options can be set on a per-mount basis using the
1404 option, without affecting the property that is stored on disk. The values
1405 specified on the command line override the values stored in the dataset. These
1406 properties are reported as "temporary" by the
1408 command. If the properties are changed while the dataset is mounted, the new
1409 setting overrides any temporary settings.
1411 In addition to the standard native properties,
1413 supports arbitrary user properties. User properties have no effect on
1415 behavior, but applications or administrators can use them to annotate datasets
1416 (file systems, volumes, and snapshots).
1418 User property names must contain a colon
1420 character to distinguish them from native properties. They may contain
1421 lowercase letters, numbers, and the following punctuation characters: colon
1429 The expected convention is that the property name is divided into two portions
1431 .Em module Ns Sy \&: Ns Em property ,
1432 but this namespace is not enforced by
1434 User property names can be at most 256 characters, and cannot begin with a dash
1437 When making programmatic use of user properties, it is strongly suggested to
1442 component of property names to reduce the chance that two
1443 independently-developed packages use the same property name for different
1444 purposes. Property names beginning with
1446 are reserved for use by Sun Microsystems.
1448 The values of user properties are arbitrary strings, are always inherited, and
1449 are never validated. All of the commands that operate on properties
1456 can be used to manipulate both native properties and user properties. Use the
1458 command to clear a user property. If the property is not defined in any parent
1459 dataset, it is removed entirely. Property values are limited to 1024
1462 All subcommands that modify state are logged persistently to the pool in their
1470 Displays a help message.
1475 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1481 file system. The file system is automatically mounted according to the
1483 property inherited from the parent.
1484 .Bl -tag -width indent
1486 Creates all the non-existing parent datasets. Datasets created in this manner
1487 are automatically mounted according to the
1489 property inherited from their parent. Any property specified on the command
1492 option is ignored. If the target filesystem already exists, the operation
1493 completes successfully.
1494 .It Fl o Ar property Ns = Ns Ar value
1495 Sets the specified property as if the command
1496 .Qq Nm Cm set Ar property Ns = Ns Ar value
1497 was invoked at the same time the dataset was created. Any editable
1499 property can also be set at creation time. Multiple
1501 options can be specified. An error results if the same property is specified in
1510 .Op Fl b Ar blocksize
1511 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1516 Creates a volume of the given size. The volume is exported as a block device in
1517 .Pa /dev/zvol/path ,
1520 is the name of the volume in the
1522 namespace. The size represents the logical size as exported by the device. By
1523 default, a reservation of equal size is created.
1526 is automatically rounded up to the nearest 128 Kbytes to ensure that
1527 the volume has an integral number of blocks regardless of
1529 .Bl -tag -width indent
1531 Creates all the non-existing parent datasets. Datasets created in this manner
1532 are automatically mounted according to the
1534 property inherited from their parent. Any property specified on the command
1537 option is ignored. If the target filesystem already exists, the operation
1538 completes successfully.
1540 Creates a sparse volume with no reservation. See
1543 .Qq Sx Native Properties
1544 section for more information about sparse volumes.
1545 .It Fl b Ar blocksize
1547 .Fl o Cm volblocksize Ns = Ns Ar blocksize .
1548 If this option is specified in conjunction with
1549 .Fl o Cm volblocksize ,
1550 the resulting behavior is undefined.
1551 .It Fl o Ar property Ns = Ns Ar value
1552 Sets the specified property as if the
1553 .Qq Nm Cm set Ar property Ns = Ns Ar value
1554 command was invoked at the same time the dataset was created. Any editable
1556 property can also be set at creation time. Multiple
1558 options can be specified. An error results if the same property is specified in
1567 .Ar filesystem Ns | Ns Ar volume
1570 Destroys the given dataset. By default, the command unshares any file systems
1571 that are currently shared, unmounts any file systems that are currently
1572 mounted, and refuses to destroy a dataset that has active dependents (children
1574 .Bl -tag -width indent
1576 Recursively destroy all children.
1578 Recursively destroy all dependents, including cloned file systems outside the
1581 Force an unmount of any file systems using the
1582 .Qq Nm Cm unmount Fl f
1583 command. This option has no effect on non-file systems or unmounted file
1586 Do a dry-run ("No-op") deletion. No data will be deleted. This is useful in
1587 conjunction with the
1591 flags to determine what data would be deleted.
1593 Print machine-parsable verbose information about the deleted data.
1595 Print verbose information about the deleted data.
1598 Extreme care should be taken when applying either the
1602 options, as they can destroy large portions of a pool and cause unexpected
1603 behavior for mounted file systems in use.
1610 .Op % Ns Ar snapname
1615 The given snapshots are destroyed immediately if and only if the
1619 option would have destroyed it. Such immediate destruction would occur, for
1620 example, if the snapshot had no clones and the user-initiated reference count
1623 If a snapshot does not qualify for immediate destruction, it is marked for
1624 deferred deletion. In this state, it exists as a usable, visible snapshot until
1625 both of the preconditions listed above are met, at which point it is destroyed.
1627 An inclusive range of snapshots may be specified by separating the
1628 first and last snapshots with a percent sign
1630 The first and/or last snapshots may be left blank, in which case the
1631 filesystem's oldest or newest snapshot will be implied.
1634 (or ranges of snapshots) of the same filesystem or volume may be specified
1635 in a comma-separated list of snapshots.
1636 Only the snapshot's short name (the
1639 should be specified when using a range or comma-separated list to identify
1641 .Bl -tag -width indent
1643 Destroy (or mark for deferred deletion) all snapshots with this name in
1644 descendent file systems.
1646 Recursively destroy all clones of these snapshots, including the clones,
1647 snapshots, and children.
1648 If this flag is specified, the
1650 flag will have no effect.
1652 Do a dry-run ("No-op") deletion. No data will be deleted. This is useful in
1653 conjunction with the
1657 flags to determine what data would be deleted.
1659 Print machine-parsable verbose information about the deleted data.
1661 Print verbose information about the deleted data.
1663 Defer snapshot deletion.
1666 Extreme care should be taken when applying either the
1670 options, as they can destroy large portions of a pool and cause unexpected
1671 behavior for mounted file systems in use.
1675 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
1678 The given bookmark is destroyed.
1681 .Cm snapshot Ns | Ns Cm snap
1683 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1684 .Ar filesystem@snapname Ns | Ns volume@snapname
1685 .Ar filesystem@snapname Ns | Ns volume@snapname Ns ...
1688 Creates snapshots with the given names. All previous modifications by
1689 successful system calls to the file system are part of the snapshots.
1690 Snapshots are taken atomically, so that all snapshots correspond to the same
1691 moment in time. See the
1693 section for details.
1694 .Bl -tag -width indent
1696 Recursively create snapshots of all descendent datasets
1697 .It Fl o Ar property Ns = Ns Ar value
1698 Sets the specified property; see
1709 Roll back the given dataset to a previous snapshot. When a dataset is rolled
1710 back, all data that has changed since the snapshot is discarded, and the
1711 dataset reverts to the state at the time of the snapshot. By default, the
1712 command refuses to roll back to a snapshot other than the most recent one. In
1713 order to do so, all intermediate snapshots and bookmarks must be destroyed
1720 options do not recursively destroy the child snapshots of a
1722 Only direct snapshots of the specified filesystem
1723 are destroyed by either of these options.
1724 To completely roll back a
1725 recursive snapshot, you must rollback the individual child snapshots.
1726 .Bl -tag -width indent
1728 Destroy any snapshots and bookmarks more recent than the one specified.
1730 Destroy any more recent snapshots and bookmarks, as well as any clones of those
1735 option to force an unmount of any clone file systems that are to be destroyed.
1741 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1742 .Ar snapshot filesystem Ns | Ns Ar volume
1745 Creates a clone of the given snapshot. See the
1747 section for details. The target dataset can be located anywhere in the
1749 hierarchy, and is created as the same type as the original.
1750 .Bl -tag -width indent
1752 Creates all the non-existing parent datasets. Datasets created in this manner
1753 are automatically mounted according to the
1755 property inherited from their parent. If the target filesystem or volume
1756 already exists, the operation completes successfully.
1757 .It Fl o Ar property Ns = Ns Ar value
1758 Sets the specified property; see
1765 .Ar clone-filesystem
1768 Promotes a clone file system to no longer be dependent on its "origin"
1769 snapshot. This makes it possible to destroy the file system that the clone was
1770 created from. The clone parent-child dependency relationship is reversed, so
1771 that the origin file system becomes a clone of the specified file system.
1773 The snapshot that was cloned, and any snapshots previous to this snapshot, are
1774 now owned by the promoted clone. The space they use moves from the origin file
1775 system to the promoted clone, so enough space must be available to accommodate
1776 these snapshots. No new space is consumed by this operation, but the space
1777 accounting is adjusted. The promoted clone must not have any conflicting
1778 snapshot names of its own. The
1780 subcommand can be used to rename any conflicting snapshots.
1785 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1786 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1793 .Ar filesystem Ns | Ns Ar volume
1794 .Ar filesystem Ns | Ns Ar volume
1801 .Ar filesystem filesystem
1804 Renames the given dataset. The new target can be located anywhere in the
1806 hierarchy, with the exception of snapshots. Snapshots can only be renamed
1807 within the parent file system or volume. When renaming a snapshot, the parent
1808 file system of the snapshot does not need to be specified as part of the second
1809 argument. Renamed file systems can inherit new mount points, in which case they
1810 are unmounted and remounted at the new mount point.
1811 .Bl -tag -width indent
1813 Creates all the nonexistent parent datasets. Datasets created in this manner
1814 are automatically mounted according to the
1816 property inherited from their parent.
1818 Do not remount file systems during rename. If a file system's
1824 file system is not unmounted even if this option is not given.
1826 Force unmount any filesystems that need to be unmounted in the process.
1827 This flag has no effect if used together with the
1835 .Ar snapshot snapshot
1838 Recursively rename the snapshots of all descendent datasets. Snapshots are the
1839 only dataset that can be renamed recursively.
1843 .Op Fl r Ns | Ns Fl d Ar depth
1845 .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
1846 .Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
1847 .Oo Fl s Ar property Oc Ns ...
1848 .Oo Fl S Ar property Oc Ns ...
1849 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
1852 Lists the property information for the given datasets in tabular form. If
1853 specified, you can list property information by the absolute pathname or the
1854 relative pathname. By default, all file systems and volumes are displayed.
1855 Snapshots are displayed if the
1861 The following fields are displayed,
1862 .Sy name , used , available , referenced , mountpoint .
1863 .Bl -tag -width indent
1865 Recursively display any children of the dataset on the command line.
1867 Recursively display any children of the dataset, limiting the recursion to
1871 will display only the dataset and its direct children.
1873 Used for scripting mode. Do not print headers and separate fields by a single
1874 tab instead of arbitrary white space.
1876 Display numbers in parsable (exact) values.
1877 .It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
1878 A comma-separated list of properties to display. The property must be:
1879 .Bl -bullet -offset 2n
1881 One of the properties described in the
1882 .Qq Sx Native Properties
1889 to display the dataset name
1893 to display space usage properties on file systems and volumes. This is a
1894 shortcut for specifying
1896 .Sy name,avail,used,usedsnap,usedds,usedrefreserv,usedchild
1898 .Sy filesystem,volume
1901 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
1902 A comma-separated list of types to display, where
1905 .Sy filesystem , snapshot , snap , volume , bookmark , No or Sy all .
1906 For example, specifying
1908 displays only snapshots.
1909 .It Fl s Ar property
1910 A property for sorting the output by column in ascending order based on the
1911 value of the property. The property must be one of the properties described in
1914 section, or the special value
1916 to sort by the dataset name. Multiple properties can be specified at one time
1919 property options. Multiple
1921 options are evaluated from left to right in decreasing order of importance.
1923 The following is a list of sorting criteria:
1924 .Bl -bullet -offset 2n
1926 Numeric types sort in numeric order.
1928 String types sort in alphabetical order.
1930 Types inappropriate for a row sort that row to the literal bottom, regardless
1931 of the specified ordering.
1933 If no sorting options are specified the existing behavior of
1937 .It Fl S Ar property
1940 option, but sorts by property in descending order.
1945 .Ar property Ns = Ns Ar value
1946 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1949 Sets the property to the given value for each dataset. Only some properties can
1950 be edited. See the "Properties" section for more information on what properties
1951 can be set and acceptable values. Numeric values can be specified as exact
1952 values, or in a human-readable form with a suffix of
1953 .Sy B , K , M , G , T , P , E , Z
1954 (for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes, or
1955 zettabytes, respectively). User properties can be set on snapshots. For more
1956 information, see the
1957 .Qq Sx User Properties
1962 .Op Fl r Ns | Ns Fl d Ar depth
1964 .Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ...
1965 .Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
1966 .Op Fl s Ar source Ns Oo , Ns Ar source Oc Ns ...
1967 .Ar all | property Ns Oo , Ns Ar property Oc Ns ...
1968 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
1971 Displays properties for the given datasets. If no datasets are specified, then
1972 the command displays properties for all datasets on the system. For each
1973 property, the following columns are displayed:
1975 .Bl -hang -width "property" -offset indent -compact
1983 Property source. Can either be local, default, temporary, inherited, or none
1987 All columns except the
1989 column are displayed by default. The columns to display can be specified
1992 option. This command takes a comma-separated list of properties as described in
1994 .Qq Sx Native Properties
1996 .Qq Sx User Properties
2001 can be used to display all properties that apply to the given dataset's type
2002 (filesystem, volume, snapshot, or bookmark).
2003 .Bl -tag -width indent
2005 Recursively display properties for any children.
2007 Recursively display any children of the dataset, limiting the recursion to
2011 will display only the dataset and its direct children.
2013 Display output in a form more easily parsed by scripts. Any headers are
2014 omitted, and fields are explicitly separated by a single tab instead of an
2015 arbitrary amount of space.
2017 Display numbers in parsable (exact) values.
2018 .It Fl o Cm all | Ar field Ns Oo , Ns Ar field Oc Ns ...
2019 A comma-separated list of columns to display. Supported values are
2020 .Sy name,property,value,received,source .
2022 .Sy name,property,value,source .
2025 specifies all columns.
2026 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2027 A comma-separated list of types to display, where
2030 .Sy filesystem , snapshot , volume , No or Sy all .
2031 For example, specifying
2033 displays only snapshots.
2034 .It Fl s Ar source Ns Oo , Ns Ar source Oc Ns ...
2035 A comma-separated list of sources to display. Those properties coming from a
2036 source other than those in this list are ignored. Each source must be one of
2038 .Sy local,default,inherited,temporary,received,none .
2039 The default value is all sources.
2046 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2049 Clears the specified property, causing it to be inherited from an ancestor. If
2050 no ancestor has the property set, then the default value is used. See the
2052 section for a listing of default values, and details on which properties can be
2054 .Bl -tag -width indent
2056 Recursively inherit the given property for all children.
2058 For properties with a received value, revert to this value. This flag has no
2059 effect on properties that do not have a received value.
2067 Displays a list of file systems that are not the most recent version.
2068 .Bl -tag -width indent
2072 filesystem versions supported by the current software. The current
2074 filesystem version and all previous supported versions are displayed, along
2075 with an explanation of the features provided with each version.
2082 .Fl a | Ar filesystem
2085 Upgrades file systems to a new on-disk version. Once this is done, the file
2086 systems will no longer be accessible on systems running older versions of the
2089 streams generated from new snapshots of these file systems cannot be accessed
2090 on systems running older versions of the software.
2092 In general, the file system version is independent of the pool version. See
2094 for information on the
2095 .Nm zpool Cm upgrade
2098 In some cases, the file system version and the pool version are interrelated
2099 and the pool version must be upgraded before the file system version can be
2101 .Bl -tag -width indent
2103 Upgrade the specified file system and all descendent file systems.
2105 Upgrade to the specified
2109 flag is not specified, this command upgrades to the most recent version. This
2110 option can only be used to increase the version number, and only up to the most
2111 recent version supported by this software.
2113 Upgrade all file systems on all imported pools.
2115 Upgrade the specified file system.
2121 .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2122 .Oo Fl s Ar field Oc Ns ...
2123 .Oo Fl S Ar field Oc Ns ...
2124 .Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2125 .Ar filesystem Ns | Ns Ar snapshot
2128 Displays space consumed by, and quotas on, each user in the specified
2129 filesystem or snapshot. This corresponds to the
2130 .Sy userused@ Ns Ar user
2132 .Sy userquota@ Ns Ar user
2134 .Bl -tag -width indent
2136 Print numeric ID instead of user/group name.
2138 Do not print headers, use tab-delimited output.
2140 Use exact (parsable) numeric output.
2141 .It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2142 Display only the specified fields from the following set:
2143 .Sy type,name,used,quota .
2144 The default is to display all fields.
2146 Sort output by this field. The
2150 flags may be specified multiple times to sort first by one field, then by
2151 another. The default is
2152 .Fl s Cm type Fl s Cm name .
2154 Sort by this field in reverse order. See
2156 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2157 Print only the specified types from the following set:
2158 .Sy all,posixuser,smbuser,posixgroup,smbgroup .
2161 .Fl t Cm posixuser,smbuser .
2163 The default can be changed to include group types.
2165 Translate SID to POSIX ID. This flag currently has no effect on
2172 .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2173 .Oo Fl s Ar field Oc Ns ...
2174 .Oo Fl S Ar field Oc Ns ...
2175 .Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2176 .Ar filesystem Ns | Ns Ar snapshot
2179 Displays space consumed by, and quotas on, each group in the specified
2180 filesystem or snapshot. This subcommand is identical to
2181 .Qq Nm Cm userspace ,
2182 except that the default types to display are
2183 .Fl t Sy posixgroup,smbgroup .
2191 file systems currently mounted.
2192 .Bl -tag -width indent
2199 .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
2200 .Fl a | Ar filesystem
2206 .Bl -tag -width indent
2208 Report mount progress.
2210 Perform an overlay mount. Overlay mounts are not supported on
2212 .It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
2213 An optional, comma-separated list of mount options to use temporarily for the
2214 duration of the mount. See the
2215 .Qq Sx Temporary Mount Point Properties
2216 section for details.
2221 This command may be executed on
2225 For more information, see variable
2230 Mount the specified filesystem.
2234 .Cm unmount Ns | Ns Cm umount
2236 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2239 Unmounts currently mounted
2242 .Bl -tag -width indent
2244 Forcefully unmount the file system, even if it is currently in use.
2246 Unmount all available
2249 .It Ar filesystem | mountpoint
2250 Unmount the specified filesystem. The command can also be given a path to a
2252 file system mount point on the system.
2257 .Fl a | Ar filesystem
2262 file systems that have the
2265 .Bl -tag -width indent
2269 file systems that have the
2272 This command may be executed on
2276 For more information, see variable
2281 Share the specified filesystem according to the
2283 property. File systems are shared when the
2290 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2295 file systems that have the
2298 .Bl -tag -width indent
2302 file systems that have the
2305 This command may be executed on
2309 For more information, see variable
2313 .It Ar filesystem | mountpoint
2314 Unshare the specified filesystem. The command can also be given a path to a
2316 file system shared on the system.
2325 Creates a bookmark of the given snapshot.
2326 Bookmarks mark the point in time
2327 when the snapshot was created, and can be used as the incremental source for
2332 This feature must be enabled to be used.
2334 .Xr zpool-features 7
2335 for details on ZFS feature flags and the
2342 .Op Fl i Ar snapshot | Fl I Ar snapshot
2346 Creates a stream representation of the last
2348 argument (not part of
2352 which is written to standard output. The output can be redirected to
2353 a file or to a different system (for example, using
2355 By default, a full stream is generated.
2356 .Bl -tag -width indent
2357 .It Fl i Ar snapshot
2358 Generate an incremental stream from the first
2359 .Ar snapshot Pq the incremental source
2361 .Ar snapshot Pq the incremental target .
2362 The incremental source can be specified as the last component of the
2364 .Pq the Em @ No character and following
2366 it is assumed to be from the same file system as the incremental target.
2368 If the destination is a clone, the source may be the origin snapshot, which
2369 must be fully specified (for example,
2370 .Cm pool/fs@origin ,
2373 .It Fl I Ar snapshot
2374 Generate a stream package that sends all intermediary snapshots from the first
2381 .Ic -i @a fs@b; -i @b fs@c; -i @c fs@d .
2383 source may be specified as with the
2387 Generate a replication stream package, which will replicate the specified
2388 filesystem, and all descendent file systems, up to the named snapshot. When
2389 received, all properties, snapshots, descendent file systems, and clones are
2396 flags are used in conjunction with the
2398 flag, an incremental replication stream is generated. The current values of
2399 properties, and current snapshot and file system names are set when the stream
2402 flag is specified when this stream is received, snapshots and file systems that
2403 do not exist on the sending side are destroyed.
2405 Generate a deduplicated stream. Blocks which would have been sent multiple
2406 times in the send stream will only be sent once. The receiving system must
2407 also support this feature to receive a deduplicated stream. This flag can
2408 be used regardless of the dataset's
2410 property, but performance will be much better if the filesystem uses a
2411 dedup-capable checksum (eg.
2414 Include the dataset's properties in the stream. This flag is implicit when
2416 is specified. The receiving system must also support this feature.
2418 Do a dry-run ("No-op") send. Do not generate any actual send data. This is
2419 useful in conjunction with the
2423 flags to determine what data will be sent.
2425 Print machine-parsable verbose information about the stream package generated.
2427 Print verbose information about the stream package generated.
2428 This information includes a per-second report of how much data has been sent.
2431 The format of the stream is committed. You will be able to receive your streams
2432 on future versions of
2437 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
2438 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2441 Generate a send stream, which may be of a filesystem, and may be
2442 incremental from a bookmark.
2443 If the destination is a filesystem or volume,
2444 the pool must be read-only, or the filesystem must not be mounted.
2446 stream generated from a filesystem or volume is received, the default snapshot
2449 .Bl -tag -width indent
2450 .It Fl i Ar snapshot Ns | Ns bookmark
2451 Generate an incremental send stream.
2452 The incremental source must be an earlier
2453 snapshot in the destination's history.
2454 It will commonly be an earlier
2455 snapshot in the destination's filesystem, in which case it can be
2456 specified as the last component of the name
2457 .Pq the Em # No or Em @ No character and following .
2459 If the incremental target is a clone, the incremental source can
2460 be the origin snapshot, or an earlier snapshot in the origin's filesystem,
2461 or the origin's origin, etc.
2465 .Cm receive Ns | Ns Cm recv
2467 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2471 .Cm receive Ns | Ns Cm recv
2477 Creates a snapshot whose contents are as specified in the stream provided on
2478 standard input. If a full stream is received, then a new file system is created
2479 as well. Streams are created using the
2481 subcommand, which by default creates a full stream.
2483 can be used as an alias for
2486 If an incremental stream is received, then the destination file system must
2487 already exist, and its most recent snapshot must match the incremental stream's
2490 the destination device link is destroyed and recreated, which means the
2492 cannot be accessed during the
2496 When a snapshot replication package stream that is generated by using the
2498 command is received, any snapshots that do not exist on the sending location
2499 are destroyed by using the
2500 .Qq Nm Cm destroy Fl d
2503 The name of the snapshot (and file system, if a full stream is received) that
2504 this subcommand creates depends on the argument type and the
2510 If the argument is a snapshot name, the specified
2512 is created. If the argument is a file system or volume name, a snapshot with
2513 the same name as the sent snapshot is created within the specified
2521 option is specified, the snapshot name is determined by appending the sent
2522 snapshot's name to the specified
2526 option is specified, all but the pool name of the sent snapshot path is
2527 appended (for example,
2529 appended from sent snapshot
2533 option is specified, only the tail of the sent snapshot path is appended (for
2536 appended from sent snapshot
2540 any file systems needed to replicate the path of the sent snapshot are created
2541 within the specified file system.
2542 .Bl -tag -width indent
2544 Use the full sent snapshot path without the first element (without pool name)
2545 to determine the name of the new snapshot as described in the paragraph above.
2547 Use only the last element of the sent snapshot path to determine the name of
2548 the new snapshot as described in the paragraph above.
2550 File system that is associated with the received stream is not mounted.
2552 Print verbose information about the stream and the time required to perform the
2555 Do not actually receive the stream. This can be useful in conjunction with the
2557 option to verify the name the receive operation would use.
2559 Force a rollback of the file system to the most recent snapshot before
2560 performing the receive operation. If receiving an incremental replication
2561 stream (for example, one generated by
2562 .Qq Nm Cm send Fl R Fi iI ) ,
2563 destroy snapshots and file systems that do not exist on the sending side.
2568 .Ar filesystem Ns | Ns Ar volume
2571 Displays permissions that have been delegated on the specified filesystem or
2572 volume. See the other forms of
2574 for more information.
2579 .Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
2580 .Ar perm Ns | Ns Ar @setname Ns
2581 .Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ...
2582 .Ar filesystem Ns | Ns Ar volume
2588 .Fl e Ns | Ns Cm everyone
2589 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
2591 .Ar filesystem Ns | Ns Ar volume
2596 administration permission for the file systems to non-privileged users.
2597 .Bl -tag -width indent
2600 .Ar user Ns | Ns Ar group Ns Oo , Ar user Ns | Ns Ar group Oc Ns ...
2602 Specifies to whom the permissions are delegated. Multiple entities can be
2603 specified as a comma-separated list. If neither of the
2605 options are specified, then the argument is interpreted preferentially as the
2608 then as a user name, and lastly as a group name. To specify
2609 a user or group named
2615 options. To specify a group with the same name as a user, use the
2618 .It Op Fl e Ns | Ns Cm everyone
2619 Specifies that the permissions be delegated to
2622 .Ar perm Ns | Ns Ar @setname Ns Oo , Ns Ar perm Ns | Ns Ar @setname Oc Ns ...
2624 The permissions to delegate. Multiple permissions
2625 may be specified as a comma-separated list. Permission names are the same as
2627 subcommand and property names. See the property list below. Property set names,
2628 which begin with an at sign
2630 may be specified. See the
2632 form below for details.
2635 .Ar filesystem Ns | Ns Ar volume
2637 Specifies where the permissions are delegated. If neither of the
2639 options are specified, or both are, then the permissions are allowed for the
2640 file system or volume, and all of its descendents. If only the
2642 option is used, then is allowed "locally" only for the specified file system.
2645 option is used, then is allowed only for the descendent file systems.
2648 Permissions are generally the ability to use a
2650 subcommand or change a
2652 property. The following permissions are available:
2653 .Bl -column -offset 4n "secondarycache" "subcommand"
2654 .It NAME Ta TYPE Ta NOTES
2655 .It allow Ta subcommand Ta Must Xo
2656 also have the permission that is being allowed
2658 .It clone Ta subcommand Ta Must Xo
2659 also have the 'create' ability and 'mount' ability in the origin file system
2661 .It create Ta subcommand Ta Must also have the 'mount' ability
2662 .It destroy Ta subcommand Ta Must also have the 'mount' ability
2663 .It diff Ta subcommand Ta Allows lookup of paths within a dataset given an
2664 object number, and the ability to create snapshots necessary to 'zfs diff'
2665 .It hold Ta subcommand Ta Allows adding a user hold to a snapshot
2666 .It mount Ta subcommand Ta Allows mount/umount of Tn ZFS No datasets
2667 .It promote Ta subcommand Ta Must Xo
2668 also have the 'mount' and 'promote' ability in the origin file system
2670 .It receive Ta subcommand Ta Must also have the 'mount' and 'create' ability
2671 .It release Ta subcommand Ta Allows Xo
2672 releasing a user hold which might destroy the snapshot
2674 .It rename Ta subcommand Ta Must Xo
2675 also have the 'mount' and 'create' ability in the new parent
2677 .It rollback Ta subcommand Ta Must also have the 'mount' ability
2678 .It send Ta subcommand
2679 .It share Ta subcommand Ta Allows Xo
2680 sharing file systems over the
2684 .It snapshot Ta subcommand Ta Must also have the 'mount' ability
2685 .It groupquota Ta other Ta Allows accessing any groupquota@... property
2686 .It groupused Ta other Ta Allows reading any groupused@... property
2687 .It userprop Ta other Ta Allows changing any user property
2688 .It userquota Ta other Ta Allows accessing any userquota@... property
2689 .It userused Ta other Ta Allows reading any userused@... property
2690 .It aclinherit Ta property
2691 .It aclmode Ta property
2692 .It atime Ta property
2693 .It canmount Ta property
2694 .It casesensitivity Ta property
2695 .It checksum Ta property
2696 .It compression Ta property
2697 .It copies Ta property
2698 .It dedup Ta property
2699 .It devices Ta property
2700 .It exec Ta property
2701 .It logbias Ta property
2702 .It jailed Ta property
2703 .It mlslabel Ta property
2704 .It mountpoint Ta property
2705 .It nbmand Ta property
2706 .It normalization Ta property
2707 .It primarycache Ta property
2708 .It quota Ta property
2709 .It readonly Ta property
2710 .It recordsize Ta property
2711 .It refquota Ta property
2712 .It refreservation Ta property
2713 .It reservation Ta property
2714 .It secondarycache Ta property
2715 .It setuid Ta property
2716 .It sharenfs Ta property
2717 .It sharesmb Ta property
2718 .It snapdir Ta property
2719 .It sync Ta property
2720 .It utf8only Ta property
2721 .It version Ta property
2722 .It volblocksize Ta property
2723 .It volsize Ta property
2724 .It vscan Ta property
2725 .It xattr Ta property
2731 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
2733 .Ar filesystem Ns | Ns Ar volume
2736 Sets "create time" permissions. These permissions are granted (locally) to the
2737 creator of any newly-created descendent file system.
2743 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
2745 .Ar filesystem Ns | Ns Ar volume
2748 Defines or adds permissions to a permission set. The set can be used by other
2750 commands for the specified file system and its descendents. Sets are evaluated
2751 dynamically, so changes to a set are immediately reflected. Permission sets
2752 follow the same naming restrictions as ZFS file systems, but the name must
2753 begin with an "at sign"
2755 and can be no more than 64 characters long.
2760 .Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
2761 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
2763 .Ar filesystem Ns | Ns Ar volume
2769 .Fl e Ns | Ns Cm everyone
2770 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
2772 .Ar filesystem Ns | Ns Ar volume
2779 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
2781 .Ar filesystem Ns | Ns Ar volume
2784 Removes permissions that were granted with the
2786 command. No permissions are explicitly denied, so other permissions granted are
2787 still in effect. For example, if the permission is granted by an ancestor. If
2788 no permissions are specified, then all permissions for the specified
2789 .Ar user , group , No or everyone
2790 are removed. Specifying
2792 .Po or using the Fl e
2794 .Pc only removes the permissions that were granted to everyone ,
2795 not all permissions for every user and group. See the
2797 command for a description of the
2800 .Bl -tag -width indent
2802 Recursively remove the permissions from this file system and all descendents.
2810 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
2812 .Ar filesystem Ns | Ns Ar volume
2815 Removes permissions from a permission set. If no permissions are specified,
2816 then all permissions are removed, thus removing the set entirely.
2821 .Ar tag snapshot Ns ...
2824 Adds a single reference, named with the
2826 argument, to the specified snapshot or snapshots. Each snapshot has its own tag
2827 namespace, and tags must be unique within that space.
2829 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
2833 .Bl -tag -width indent
2835 Specifies that a hold with the given tag is applied recursively to the
2836 snapshots of all descendent file systems.
2845 Lists all existing user references for the given snapshot or snapshots.
2846 .Bl -tag -width indent
2848 Lists the holds that are set on the named descendent snapshots, in addition to
2849 listing the holds on the named snapshot.
2855 .Ar tag snapshot Ns ...
2858 Removes a single reference, named with the
2860 argument, from the specified snapshot or snapshots. The tag must already exist
2862 .Bl -tag -width indent
2864 Recursively releases a hold with the given tag on the snapshots of all
2865 descendent file systems.
2872 .Op Ar snapshot Ns | Ns Ar filesystem
2875 Display the difference between a snapshot of a given filesystem and another
2876 snapshot of that filesystem from a later time or the current contents of the
2877 filesystem. The first column is a character indicating the type of change,
2878 the other columns indicate pathname, new pathname
2879 .Pq in case of rename ,
2880 change in link count, and optionally file type and/or change time.
2882 The types of change are:
2883 .Bl -column -offset 2n indent
2884 .It \&- Ta path was removed
2885 .It \&+ Ta path was added
2886 .It \&M Ta path was modified
2887 .It \&R Ta path was renamed
2889 .Bl -tag -width indent
2891 Display an indication of the type of file, in a manner similar to the
2895 .Bl -column -offset 2n indent
2896 .It \&B Ta block device
2897 .It \&C Ta character device
2898 .It \&F Ta regular file
2899 .It \&/ Ta directory
2900 .It \&@ Ta symbolic link
2902 .It \&> Ta door (not supported on Fx )
2903 .It \&| Ta named pipe (not supported on Fx )
2904 .It \&P Ta event port (not supported on Fx )
2907 Give more parsable tab-separated output, without header lines and without
2910 Display the path's inode change time as the first column of output.
2915 .Ar jailid filesystem
2918 Attaches the specified
2920 to the jail identified by JID
2922 From now on this file system tree can be managed from within a jail if the
2924 property has been set. To use this functionality, the jail needs the
2935 for more information on managing jails and configuring the parameters above.
2939 .Ar jailid filesystem
2942 Detaches the specified
2944 from the jail identified by JID
2948 The following exit values are returned:
2949 .Bl -tag -offset 2n -width 2n
2951 Successful completion.
2955 Invalid command line options were specified.
2959 .It Sy Example 1 No Creating a Tn ZFS No File System Hierarchy
2961 The following commands create a file system named
2963 and a file system named
2967 is set for the parent file system, and is automatically inherited by the child
2969 .Bd -literal -offset 2n
2970 .Li # Ic zfs create pool/home
2971 .Li # Ic zfs set mountpoint=/home pool/home
2972 .Li # Ic zfs create pool/home/bob
2974 .It Sy Example 2 No Creating a Tn ZFS No Snapshot
2976 The following command creates a snapshot named
2978 This snapshot is mounted on demand in the
2980 directory at the root of the
2983 .Bd -literal -offset 2n
2984 .Li # Ic zfs snapshot pool/home/bob@yesterday
2986 .It Sy Example 3 No Creating and Destroying Multiple Snapshots
2988 The following command creates snapshots named
2992 and all of its descendent file systems. Each snapshot is mounted on demand in
2995 directory at the root of its file system. The second command destroys the newly
2997 .Bd -literal -offset 2n
2998 .Li # Ic zfs snapshot -r pool/home@yesterday
2999 .Li # Ic zfs destroy -r pool/home@yesterday
3001 .It Sy Example 4 No Disabling and Enabling File System Compression
3003 The following command disables the
3005 property for all file systems under
3007 The next command explicitly enables
3010 .Em pool/home/anne .
3011 .Bd -literal -offset 2n
3012 .Li # Ic zfs set compression=off pool/home
3013 .Li # Ic zfs set compression=on pool/home/anne
3015 .It Sy Example 5 No Listing Tn ZFS No Datasets
3017 The following command lists all active file systems and volumes in the system.
3018 Snapshots are displayed if the
3026 for more information on pool properties.
3027 .Bd -literal -offset 2n
3029 NAME USED AVAIL REFER MOUNTPOINT
3030 pool 450K 457G 18K /pool
3031 pool/home 315K 457G 21K /home
3032 pool/home/anne 18K 457G 18K /home/anne
3033 pool/home/bob 276K 457G 276K /home/bob
3035 .It Sy Example 6 No Setting a Quota on a Tn ZFS No File System
3037 The following command sets a quota of 50 Gbytes for
3039 .Bd -literal -offset 2n
3040 .Li # Ic zfs set quota=50G pool/home/bob
3042 .It Sy Example 7 No Listing Tn ZFS No Properties
3044 The following command lists all properties for
3046 .Bd -literal -offset 2n
3047 .Li # Ic zfs get all pool/home/bob
3048 NAME PROPERTY VALUE SOURCE
3049 pool/home/bob type filesystem -
3050 pool/home/bob creation Tue Jul 21 15:53 2009 -
3051 pool/home/bob used 21K -
3052 pool/home/bob available 20.0G -
3053 pool/home/bob referenced 21K -
3054 pool/home/bob compressratio 1.00x -
3055 pool/home/bob mounted yes -
3056 pool/home/bob quota 20G local
3057 pool/home/bob reservation none default
3058 pool/home/bob recordsize 128K default
3059 pool/home/bob mountpoint /home/bob default
3060 pool/home/bob sharenfs off default
3061 pool/home/bob checksum on default
3062 pool/home/bob compression on local
3063 pool/home/bob atime on default
3064 pool/home/bob devices on default
3065 pool/home/bob exec on default
3066 pool/home/bob setuid on default
3067 pool/home/bob readonly off default
3068 pool/home/bob jailed off default
3069 pool/home/bob snapdir hidden default
3070 pool/home/bob aclmode discard default
3071 pool/home/bob aclinherit restricted default
3072 pool/home/bob canmount on default
3073 pool/home/bob xattr on default
3074 pool/home/bob copies 1 default
3075 pool/home/bob version 5 -
3076 pool/home/bob utf8only off -
3077 pool/home/bob normalization none -
3078 pool/home/bob casesensitivity sensitive -
3079 pool/home/bob vscan off default
3080 pool/home/bob nbmand off default
3081 pool/home/bob sharesmb off default
3082 pool/home/bob refquota none default
3083 pool/home/bob refreservation none default
3084 pool/home/bob primarycache all default
3085 pool/home/bob secondarycache all default
3086 pool/home/bob usedbysnapshots 0 -
3087 pool/home/bob usedbydataset 21K -
3088 pool/home/bob usedbychildren 0 -
3089 pool/home/bob usedbyrefreservation 0 -
3090 pool/home/bob logbias latency default
3091 pool/home/bob dedup off default
3092 pool/home/bob mlslabel -
3093 pool/home/bob sync standard default
3094 pool/home/bob refcompressratio 1.00x -
3097 The following command gets a single property value.
3098 .Bd -literal -offset 2n
3099 .Li # Ic zfs get -H -o value compression pool/home/bob
3103 The following command lists all properties with local settings for
3105 .Bd -literal -offset 2n
3106 .Li # Ic zfs get -s local -o name,property,value all pool/home/bob
3108 pool/home/bob quota 20G
3109 pool/home/bob compression on
3111 .It Sy Example 8 No Rolling Back a Tn ZFS No File System
3113 The following command reverts the contents of
3115 to the snapshot named
3117 deleting all intermediate snapshots.
3118 .Bd -literal -offset 2n
3119 .Li # Ic zfs rollback -r pool/home/anne@yesterday
3121 .It Sy Example 9 No Creating a Tn ZFS No Clone
3123 The following command creates a writable file system whose initial contents are
3125 .Em pool/home/bob@yesterday .
3126 .Bd -literal -offset 2n
3127 .Li # Ic zfs clone pool/home/bob@yesterday pool/clone
3129 .It Sy Example 10 No Promoting a Tn ZFS No Clone
3131 The following commands illustrate how to test out changes to a file system, and
3132 then replace the original file system with the changed one, using clones, clone
3133 promotion, and renaming:
3134 .Bd -literal -offset 2n
3135 .Li # Ic zfs create pool/project/production
3139 .Pa /pool/project/production
3140 with data and continue with the following commands:
3141 .Bd -literal -offset 2n
3142 .Li # Ic zfs snapshot pool/project/production@today
3143 .Li # Ic zfs clone pool/project/production@today pool/project/beta
3147 .Pa /pool/project/beta
3148 and continue with the following commands:
3149 .Bd -literal -offset 2n
3150 .Li # Ic zfs promote pool/project/beta
3151 .Li # Ic zfs rename pool/project/production pool/project/legacy
3152 .Li # Ic zfs rename pool/project/beta pool/project/production
3155 Once the legacy version is no longer needed, it can be destroyed.
3156 .Bd -literal -offset 2n
3157 .Li # Ic zfs destroy pool/project/legacy
3159 .It Sy Example 11 No Inheriting Tn ZFS No Properties
3161 The following command causes
3167 property from their parent.
3168 .Bd -literal -offset 2n
3169 .Li # Ic zfs inherit checksum pool/home/bob pool/home/anne
3171 .It Sy Example 12 No Remotely Replicating Tn ZFS No Data
3173 The following commands send a full stream and then an incremental stream to a
3174 remote machine, restoring them into
3175 .Sy poolB/received/fs@a
3177 .Sy poolB/received/fs@b ,
3180 must contain the file system
3181 .Sy poolB/received ,
3182 and must not initially contain
3183 .Sy poolB/received/fs .
3184 .Bd -literal -offset 2n
3185 .Li # Ic zfs send pool/fs@a | ssh host zfs receive poolB/received/fs@a
3186 .Li # Ic zfs send -i a pool/fs@b | ssh host zfs receive poolB/received/fs
3195 The following command sends a full stream of
3196 .Sy poolA/fsA/fsB@snap
3197 to a remote machine, receiving it into
3198 .Sy poolB/received/fsA/fsB@snap .
3201 portion of the received snapshot's name is determined from the name of the sent
3204 must contain the file system
3205 .Sy poolB/received .
3207 .Sy poolB/received/fsA
3208 does not exist, it is created as an empty file system.
3209 .Bd -literal -offset 2n
3210 .Li # Ic zfs send poolA/fsA/fsB@snap | ssh host zfs receive -d poolB/received
3212 .It Sy Example 14 No Setting User Properties
3214 The following example sets the user-defined
3215 .Sy com.example:department
3216 property for a dataset.
3217 .Bd -literal -offset 2n
3218 .Li # Ic zfs set com.example:department=12345 tank/accounting
3220 .It Sy Example 15 No Performing a Rolling Snapshot
3222 The following example shows how to maintain a history of snapshots with a
3223 consistent naming scheme. To keep a week's worth of snapshots, the user
3224 destroys the oldest snapshot, renames the remaining snapshots, and then creates
3225 a new snapshot, as follows:
3226 .Bd -literal -offset 2n
3227 .Li # Ic zfs destroy -r pool/users@7daysago
3228 .Li # Ic zfs rename -r pool/users@6daysago @7daysago
3229 .Li # Ic zfs rename -r pool/users@5daysago @6daysago
3230 .Li # Ic zfs rename -r pool/users@4daysago @5daysago
3231 .Li # Ic zfs rename -r pool/users@3daysago @4daysago
3232 .Li # Ic zfs rename -r pool/users@2daysago @3daysago
3233 .Li # Ic zfs rename -r pool/users@yesterday @2daysago
3234 .Li # Ic zfs rename -r pool/users@today @yesterday
3235 .Li # Ic zfs snapshot -r pool/users@today
3241 Property Options on a ZFS File System
3244 The following command shows how to set
3246 property options to enable root access for a specific network on the
3248 file system. The contents of the
3253 .Bd -literal -offset 2n
3254 .Li # Ic zfs set sharenfs="maproot=root,network 192.168.0.0/24" tank/home
3257 Another way to write this command with the same result is:
3258 .Bd -literal -offset 2n
3259 .Li # Ic set zfs sharenfs="-maproot=root -network 192.168.0.0/24" tank/home
3265 Administration Permissions on a
3270 The following example shows how to set permissions so that user
3272 can create, destroy, mount, and take snapshots on
3277 .Bd -literal -offset 2n
3278 .Li # Ic zfs allow cindys create,destroy,mount,snapshot tank/cindys
3279 .Li # Ic zfs allow tank/cindys
3280 -------------------------------------------------------------
3281 Local+Descendent permissions on (tank/cindys)
3282 user cindys create,destroy,mount,snapshot
3283 -------------------------------------------------------------
3285 .It Sy Example 18 No Delegating Create Time Permissions on a Tn ZFS No Dataset
3287 The following example shows how to grant anyone in the group
3289 to create file systems in
3291 This syntax also allows staff members to destroy their own file systems, but
3292 not destroy anyone else's file system. The permissions on
3295 .Bd -literal -offset 2n
3296 .Li # Ic zfs allow staff create,mount tank/users
3297 .Li # Ic zfs allow -c destroy tank/users
3298 .Li # Ic zfs allow tank/users
3299 -------------------------------------------------------------
3300 Create time permissions on (tank/users)
3302 Local+Descendent permissions on (tank/users)
3303 group staff create,mount
3304 -------------------------------------------------------------
3308 Defining and Granting a Permission Set on a
3313 The following example shows how to define and grant a permission set on the
3315 file system. The permissions on
3318 .Bd -literal -offset 2n
3319 .Li # Ic zfs allow -s @pset create,destroy,snapshot,mount tank/users
3320 .Li # Ic zfs allow staff @pset tank/users
3321 .Li # Ic zfs allow tank/users
3322 -------------------------------------------------------------
3323 Permission sets on (tank/users)
3324 @pset create,destroy,mount,snapshot
3325 Create time permissions on (tank/users)
3327 Local+Descendent permissions on (tank/users)
3328 group staff @pset,create,mount
3329 -------------------------------------------------------------
3331 .It Sy Example 20 No Delegating Property Permissions on a Tn ZFS No Dataset
3333 The following example shows to grant the ability to set quotas and reservations
3336 file system. The permissions on
3339 .Bd -literal -offset 2n
3340 .Li # Ic zfs allow cindys quota,reservation users/home
3341 .Li # Ic zfs allow cindys
3342 -------------------------------------------------------------
3343 Local+Descendent permissions on (users/home)
3344 user cindys quota,reservation
3345 -------------------------------------------------------------
3346 .Li # Ic su - cindys
3347 .Li cindys% Ic zfs set quota=10G users/home/marks
3348 .Li cindys% Ic zfs get quota users/home/marks
3349 NAME PROPERTY VALUE SOURCE
3350 users/home/marks quota 10G local
3352 .It Sy Example 21 No Removing ZFS Delegated Permissions on a Tn ZFS No Dataset
3354 The following example shows how to remove the snapshot permission from the
3358 file system. The permissions on
3361 .Bd -literal -offset 2n
3362 .Li # Ic zfs unallow staff snapshot tank/users
3363 .Li # Ic zfs allow tank/users
3364 -------------------------------------------------------------
3365 Permission sets on (tank/users)
3366 @pset create,destroy,mount,snapshot
3367 Create time permissions on (tank/users)
3369 Local+Descendent permissions on (tank/users)
3370 group staff @pset,create,mount
3371 -------------------------------------------------------------
3373 .It Sy Example 22 Showing the differences between a snapshot and a ZFS Dataset
3375 The following example shows how to see what has changed between a prior
3376 snapshot of a ZFS Dataset and its current state. The
3378 option is used to indicate type information for the files affected.
3379 .Bd -literal -offset 2n
3380 .Li # Ic zfs diff tank/test@before tank/test
3382 M F /tank/test/linked (+1)
3383 R F /tank/test/oldname -> /tank/test/newname
3384 - F /tank/test/deleted
3385 + F /tank/test/created
3386 M F /tank/test/modified
3400 This manual page is a
3402 reimplementation of the
3406 modified and customized for
3408 and licensed under the
3409 Common Development and Distribution License
3414 implementation of this manual page was initially written by
3415 .An Martin Matuska Aq mm@FreeBSD.org .