2 .\" Copyright (c) 2011, 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 2011 Nexenta Systems, Inc. All rights reserved.
22 .\" Copyright (c) 2011 by Delphix. All rights reserved.
23 .\" Copyright (c) 2011, Pawel Jakub Dawidek <pjd@FreeBSD.org>
32 .Nd configures ZFS file systems
39 .Op Fl o Ar property Ns = Ns Ar value
45 .Op Fl o Ar property Ns = Ns Ar value
52 .Ar filesystem Ns | Ns Ar volume
60 .Op Fl o Ar property Ns = Ns Ar value
61 .Ar ... filesystem@snapname Ns | Ns Ar volume@snapname
69 .Op Fl o Ar property Ns = Ns Ar value
70 .Ar ... snapshot filesystem Ns | Ns Ar volume
76 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
77 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
81 .Ar filesystem Ns | Ns Ar volume
82 .Ar filesystem Ns | Ns Ar volume
91 .Ar filesystem filesystem
94 .Op Fl r Ns | Ns Fl d Ar depth
96 .Op Fl o Ar property Ns Op , Ns Ar ...
97 .Op Fl t Ar type Ns Op , Ns Ar ...
102 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
105 .Ar property Ns = Ns Ar value
106 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
109 .Op Fl r Ns | Ns Fl d Ar depth
111 .Op Fl o Ar all | field Ns Op , Ns Ar ...
112 .Op Fl s Ar source Ns Op , Ns Ar ...
113 .Ar all | property Ns Op , Ns Ar ...
114 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
119 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
127 .Fl a | Ar filesystem
131 .Op Fl o Ar field Ns Op , Ns Ar ...
134 .Op Fl t Ar type Ns Op , Ns Ar ...
135 .Ar filesystem Ns | Ns Ar snapshot
139 .Op Fl o Ar field Ns Op , Ns Ar ...
142 .Op Fl t Ar type Ns Op , Ns Ar ...
143 .Ar filesystem Ns | Ns Ar snapshot
149 .Op Fl o Ar property Ns Op , Ns Ar ...
150 .Fl a | Ar filesystem
154 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
157 .Fl a | Ar filesystem
160 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
164 .Op Fl i Ar snapshot | Fl I Ar snapshot
169 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
177 .Ar filesystem Ns | Ns Ar volume
181 .Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ...
182 .Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
183 .Ar filesystem Ns | Ns Ar volume
188 .Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
189 .Ar filesystem Ns | Ns Ar volume
193 .Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
194 .Ar filesystem Ns | Ns Ar volume
199 .Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
200 .Ar filesystem Ns | Ns Ar volume
204 .Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ...
205 .Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
206 .Ar filesystem Ns | Ns Ar volume
211 .Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
212 .Ar filesystem Ns | Ns Ar volume
217 .Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
218 .Ar filesystem Ns | Ns Ar volume
224 .Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
225 .Ar filesystem Ns | Ns Ar volume
242 .Op Ar snapshot Ns | Ns Ar filesystem
245 .Ar jailid filesystem
248 .Ar jailid filesystem
256 storage pool, as described in
258 A dataset is identified by a unique path within the
260 namespace. For example:
261 .Bd -ragged -offset 4n
262 .No pool/ Ns Brq filesystem,volume,snapshot
265 where the maximum length of a dataset name is
269 A dataset can be one of the following:
276 can be mounted within the standard system namespace and behaves like other file
279 file systems are designed to be
281 compliant, known issues exist that prevent compliance in some cases.
282 Applications that depend on standards conformance might fail due to nonstandard
283 behavior when checking file system free space.
285 A logical volume exported as a raw or block device. This type of dataset should
286 only be used under special circumstances. File systems are typically used in
289 A read-only version of a file system or volume at a given point in time. It is
295 .Ss ZFS File System Hierarchy
298 storage pool is a logical collection of devices that provide space for
299 datasets. A storage pool is also the root of the
301 file system hierarchy.
303 The root of the pool can be accessed as a file system, such as mounting and
304 unmounting, taking snapshots, and setting properties. The physical storage
305 characteristics, however, are managed by the
311 for more information on creating and administering pools.
313 A snapshot is a read-only copy of a file system or volume. Snapshots can be
314 created extremely quickly, and initially consume no additional space within the
315 pool. As data within the active dataset changes, the snapshot consumes more
316 data than would otherwise be shared with the active dataset.
318 Snapshots can have arbitrary names. Snapshots of volumes can be cloned or
319 rolled back, but cannot be accessed independently.
321 File system snapshots can be accessed under the
323 directory in the root of the file system. Snapshots are automatically mounted
324 on demand and may be unmounted at regular intervals. The visibility of the
326 directory can be controlled by the
330 A clone is a writable volume or file system whose initial contents are the same
331 as another dataset. As with snapshots, creating a clone is nearly
332 instantaneous, and initially consumes no additional space.
334 Clones can only be created from a snapshot. When a snapshot is cloned, it
335 creates an implicit dependency between the parent and child. Even though the
336 clone is created somewhere else in the dataset hierarchy, the original snapshot
337 cannot be destroyed as long as a clone exists. The
339 property exposes this dependency, and the
341 command lists any such dependencies, if they exist.
343 The clone parent-child dependency relationship can be reversed by using the
345 subcommand. This causes the "origin" file system to become a clone of the
346 specified file system, which makes it possible to destroy the file system that
347 the clone was created from.
351 file system is a simple operation, so the number of file systems per system is
352 likely to be numerous. To cope with this,
354 automatically manages mounting and unmounting file systems without the need to
357 file. All automatically managed file systems are mounted by
361 By default, file systems are mounted under
365 is the name of the file system in the
367 namespace. Directories are created and destroyed as needed.
369 A file system can also have a mount point set in the
371 property. This directory is created as needed, and
373 automatically mounts the file system when the
375 command is invoked (without editing
379 property can be inherited, so if
385 automatically inherits a mount point of
392 prevents the file system from being mounted.
396 file systems can also be managed with traditional tools
397 .Pq Xr mount 8 , Xr umount 8 , Xr fstab 5 .
398 If a file system's mount point is set to
401 makes no attempt to manage the file system, and the administrator is
402 responsible for mounting and unmounting the file system.
405 dataset can be attached to a jail by using the
407 subcommand. You cannot attach a dataset to one jail and the children of the
408 same dataset to another jails. To allow managment of the dataset from within
411 property has to be set. The
413 property cannot be changed from within a jail.
416 dataset can be detached from a jail using the
420 After a dataset is attached to a jail and the jailed property is set, a jailed
421 file system cannot be mounted outside the jail, since the jail administrator
422 might have set the mount point to an unacceptable value.
424 Deduplication is the process for removing redundant data at the block-level,
425 reducing the total amount of data stored. If a file system has the
427 property enabled, duplicate data blocks are removed synchronously. The result
428 is that only unique data is stored and common components are shared among
430 .Ss Native Properties
431 Properties are divided into two types, native properties and user-defined (or
432 "user") properties. Native properties either export internal statistics or
435 behavior. In addition, native properties are either editable or read-only. User
436 properties have no effect on
438 behavior, but you can use them to annotate datasets in a way that is meaningful
439 in your environment. For more information about user properties, see the
440 .Qq Sx User Properties
443 Every dataset has a set of properties that export statistics about the dataset
444 as well as control various behaviors. Properties are inherited from the parent
445 unless overridden by the child. Some properties apply only to certain types of
446 datasets (file systems, volumes, or snapshots).
448 The values of numeric properties can be specified using human-readable suffixes
450 .Sy k , KB , M , Gb ,
453 for zettabyte). The following are all valid (and equal) specifications:
454 .Bd -ragged -offset 4n
458 The values of non-numeric properties are case sensitive and must be lowercase,
460 .Sy mountpoint , sharenfs , No and Sy sharesmb .
462 The following native properties consist of read-only statistics about the
463 dataset. These properties can be neither set, nor inherited. Native properties
464 apply to all dataset types unless otherwise noted.
467 The amount of space available to the dataset and all its children, assuming
468 that there is no other activity in the pool. Because space is shared within a
469 pool, availability can be limited by any number of factors, including physical
470 pool size, quotas, reservations, or other datasets within the pool.
472 This property can also be referred to by its shortened column name,
475 For non-snapshots, the compression ratio achieved for the
477 space of this dataset, expressed as a multiplier. The
479 property includes descendant datasets, and, for clones, does not include
480 the space shared with the origin snapshot. For snapshots, the
484 property. Compression can be turned on by running:
485 .Qq Nm Cm set compression=on Ar dataset
489 The time this dataset was created.
493 if the snapshot has been marked for deferred destroy by using the
495 command. Otherwise, the property is
498 For file systems, indicates whether the file system is currently mounted. This
499 property can be either
504 For cloned file systems or volumes, the snapshot from which the clone was
505 created. See also the
509 The amount of data that is accessible by this dataset, which may or may not be
510 shared with other datasets in the pool. When a snapshot or clone is created, it
511 initially references the same amount of space as the file system or snapshot it
512 was created from, since its contents are identical.
514 This property can also be referred to by its shortened column name,
516 .It Sy refcompressratio
517 The compression ratio achieved for the
519 space of this dataset, expressed as a multiplier. See also the
524 .Sy filesystem , volume , No or Sy snapshot .
526 The amount of space consumed by this dataset and all its descendents. This is
527 the value that is checked against this dataset's quota and reservation. The
528 space used does not include this dataset's reservation, but does take into
529 account the reservations of any descendent datasets. The amount of space that a
530 dataset consumes from its parent, as well as the amount of space that are freed
531 if this dataset is recursively destroyed, is the greater of its space used and
534 When snapshots (see the
536 section) are created, their space is
537 initially shared between the snapshot and the file system, and possibly with
538 previous snapshots. As the file system changes, space that was previously
539 shared becomes unique to the snapshot, and counted in the snapshot's space
540 used. Additionally, deleting snapshots can increase the amount of space unique
541 to (and used by) other snapshots.
543 The amount of space used, available, or referenced does not take into account
544 pending changes. Pending changes are generally accounted for within a few
545 seconds. Committing a change to a disk using
549 does not necessarily guarantee that the space usage information is updated
554 properties decompose the
556 properties into the various reasons that space is used. Specifically,
558 .Sy usedbysnapshots + usedbydataset + usedbychildren + usedbyrefreservation .
559 These properties are only available for datasets created
562 pool version 13 pools and higher.
563 .It Sy usedbysnapshots
564 The amount of space consumed by snapshots of this dataset. In particular, it is
565 the amount of space that would be freed if all of this dataset's snapshots were
566 destroyed. Note that this is not simply the sum of the snapshots'
568 properties because space can be shared by multiple snapshots.
570 The amount of space used by this dataset itself, which would be freed if the
571 dataset were destroyed (after first removing any
573 and destroying any necessary snapshots or descendents).
574 .It Sy usedbychildren
575 The amount of space used by children of this dataset, which would be freed if
576 all the dataset's children were destroyed.
577 .It Sy usedbyrefreservation
578 The amount of space used by a
580 set on this dataset, which would be freed if the
583 .It Sy userused@ Ns Ar user
584 The amount of space consumed by the specified user in this dataset. Space is
585 charged to the owner of each file, as displayed by
587 The amount of space charged is displayed by
593 subcommand for more information.
595 Unprivileged users can access only their own space usage. The root user, or a
596 user who has been granted the
600 can access everyone's usage.
604 properties are not displayed by
606 The user's name must be appended after the
608 symbol, using one of the following forms:
609 .Bl -bullet -offset 2n
611 POSIX name (for example,
614 POSIX numeric ID (for example,
618 This property is set to the number of user holds on this snapshot. User holds
622 .It Sy groupused@ Ns Ar group
623 The amount of space consumed by the specified group in this dataset. Space is
624 charged to the group of each file, as displayed by
627 .Sy userused@ Ns Ar user
628 property for more information.
630 Unprivileged users can only access their own groups' space usage. The root
631 user, or a user who has been granted the
635 can access all groups' usage.
636 .It Sy volblocksize Ns = Ns Ar blocksize
637 For volumes, specifies the block size of the volume. The
639 cannot be changed once the volume has been written, so it should be set at
640 volume creation time. The default
642 for volumes is 8 Kbytes. Any
643 power of 2 from 512 bytes to 128 Kbytes is valid.
645 This property can also be referred to by its shortened column name,
649 The following native properties can be used to change the behavior of a
654 .Sy aclinherit Ns = Ns Cm discard |
662 entries are inherited when files and directories are created. A file system
669 entries. A file system with an
673 only inherits inheritable
675 entries that specify "deny" permissions. The property value
677 (the default) removes the
683 entry is inherited. A file system with an
687 inherits all inheritable
689 entries without any modifications made to the
691 entries when they are inherited. A file system with an
695 has the same meaning as
698 .Em owner@ , group@ , No and Em everyone@ Tn ACE Ns s
699 inherit the execute permission only if the file creation mode also requests the
702 When the property value is set to
704 files are created with a mode determined by the inheritable
708 exist that affect the mode, then the mode is set in accordance to the requested
709 mode from the application.
710 .It Sy aclmode Ns = Ns Cm discard | groupmask | passthrough
715 A file system with an
719 (the default) deletes all
721 entries that do not represent the mode of the file. An
725 reduces permissions granted in all
729 such that they are no greater than the group permissions specified by
731 A file system with an
735 indicates that no changes are made to the
737 other than creating or updating the necessary
739 entries to represent the new mode of the file or directory.
740 .It Sy atime Ns = Ns Cm on | off
741 Controls whether the access time for files is updated when they are read.
742 Turning this property off avoids producing write traffic when reading files and
743 can result in significant performance gains, though it might confuse mailers
744 and other similar utilities. The default value is
746 .It Sy canmount Ns = Ns Cm on | off | noauto
747 If this property is set to
749 the file system cannot be mounted, and is ignored by
750 .Qq Nm Cm mount Fl a .
751 Setting this property to
753 is similar to setting the
757 except that the dataset still has a normal
759 property, which can be inherited. Setting this property to
761 allows datasets to be used solely as a mechanism to inherit properties. One
763 .Sy canmount Ns = Ns Cm off
764 is to have two datasets with the same
766 so that the children of both datasets appear in the same directory, but might
767 have different inherited characteristics.
771 value is set, a dataset can only be mounted and unmounted explicitly. The
772 dataset is not mounted automatically when the dataset is created or imported,
773 nor is it mounted by the
775 command or unmounted by the
776 .Qq Nm Cm umount Fl a
779 This property is not inherited.
780 .It Sy checksum Ns = Ns Cm on | off | fletcher2 | fletcher4
781 Controls the checksum used to verify data integrity. The default value is
783 which automatically selects an appropriate algorithm (currently,
785 but this may change in future releases). The value
787 disables integrity checking on user data. Disabling checksums is
789 a recommended practice.
790 .It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | Cm zle
791 Controls the compression algorithm used for this dataset. The
793 compression algorithm is optimized for performance while providing decent data
794 compression. Setting compression to
798 compression algorithm. The
800 compression algorithm uses the same compression as the
802 command. You can specify the
804 level by using the value
808 is an integer from 1 (fastest) to 9 (best compression ratio). Currently,
812 (which is also the default for
816 compression algorithm compresses runs of zeros.
818 This property can also be referred to by its shortened column name
820 Changing this property affects only newly-written data.
821 .It Sy copies Ns = Ns Cm 1 | 2 | 3
822 Controls the number of copies of data stored for this dataset. These copies are
823 in addition to any redundancy provided by the pool, for example, mirroring or
824 RAID-Z. The copies are stored on different disks, if possible. The space used
825 by multiple copies is charged to the associated file and dataset, changing the
827 property and counting against quotas and reservations.
829 Changing this property only affects newly-written data. Therefore, set this
830 property at file system creation time by using the
831 .Fl o Cm copies= Ns Ar N
833 .It Sy dedup Ns = Ns Cm on | off | verify | sha256 Ns Op Cm ,verify
834 Configures deduplication for a dataset. The default value is
836 The default deduplication checksum is
838 (this may change in the future).
841 is enabled, the checksum defined here overrides the
843 property. Setting the value to
845 has the same effect as the setting
851 will do a byte-to-byte comparsion in case of two blocks having the same
852 signature to make sure the block contents are identical.
853 .It Sy devices Ns = Ns Cm on | off
856 property is currently not supported on
858 .It Sy exec Ns = Ns Cm on | off
859 Controls whether processes can be executed from within this file system. The
862 .It Sy mlslabel Ns = Ns Ar label | Cm none
865 property is currently not supported on
867 .It Sy mountpoint Ns = Ns Ar path | Cm none | legacy
868 Controls the mount point used for this file system. See the
870 section for more information on how this property is used.
874 property is changed for a file system, the file system and any children that
875 inherit the mount point are unmounted. If the new value is
877 then they remain unmounted. Otherwise, they are automatically remounted in the
878 new location if the property was previously
882 or if they were mounted before the property was changed. In addition, any
883 shared file systems are unshared and shared in the new location.
884 .It Sy nbmand Ns = Ns Cm on | off
887 property is currently not supported on
889 .It Sy primarycache Ns = Ns Cm all | none | metadata
890 Controls what is cached in the primary cache (ARC). If this property is set to
892 then both user data and metadata is cached. If this property is set to
894 then neither user data nor metadata is cached. If this property is set to
896 then only metadata is cached. The default value is
898 .It Sy quota Ns = Ns Ar size | Cm none
899 Limits the amount of space a dataset and its descendents can consume. This
900 property enforces a hard limit on the amount of space used. This includes all
901 space consumed by descendents, including file systems and snapshots. Setting a
902 quota on a descendent of a dataset that already has a quota does not override
903 the ancestor's quota, but rather imposes an additional limit.
905 Quotas cannot be set on volumes, as the
907 property acts as an implicit quota.
908 .It Sy userquota@ Ns Ar user Ns = Ns Ar size | Cm none
909 Limits the amount of space consumed by the specified user.
914 space calculation does not include space that is used by descendent datasets,
915 such as snapshots and clones. User space consumption is identified by the
916 .Sy userspace@ Ns Ar user
919 Enforcement of user quotas may be delayed by several seconds. This delay means
920 that a user might exceed their quota before the system notices that they are
921 over quota and begins to refuse additional writes with the
923 error message. See the
925 subcommand for more information.
927 Unprivileged users can only access their own groups' space usage. The root
928 user, or a user who has been granted the
932 can get and set everyone's quota.
934 This property is not available on volumes, on file systems before version 4, or
935 on pools before version 15. The
936 .Sy userquota@ Ns ...
937 properties are not displayed by
939 The user's name must be appended after the
941 symbol, using one of the following forms:
942 .Bl -bullet -offset 2n
944 POSIX name (for example,
947 POSIX numeric ID (for example,
950 .It Sy groupquota@ Ns Ar group Ns = Ns Ar size | Cm none
951 Limits the amount of space consumed by the specified group. Group space
952 consumption is identified by the
953 .Sy userquota@ Ns Ar user
956 Unprivileged users can access only their own groups' space usage. The root
957 user, or a user who has been granted the
961 can get and set all groups' quotas.
962 .It Sy readonly Ns = Ns Cm on | off
963 Controls whether this dataset can be modified. The default value is
965 .It Sy recordsize Ns = Ns Ar size
966 Specifies a suggested block size for files in the file system. This property is
967 designed solely for use with database workloads that access files in fixed-size
970 automatically tunes block sizes according to internal algorithms optimized for
971 typical access patterns.
973 For databases that create very large files but access them in small random
974 chunks, these algorithms may be suboptimal. Specifying a
976 greater than or equal to the record size of the database can result in
977 significant performance gains. Use of this property for general purpose file
978 systems is strongly discouraged, and may adversely affect performance.
980 The size specified must be a power of two greater than or equal to 512 and less
981 than or equal to 128 Kbytes.
983 Changing the file system's
985 affects only files created afterward; existing files are unaffected.
987 This property can also be referred to by its shortened column name,
989 .It Sy refquota Ns = Ns Ar size | Cm none
990 Limits the amount of space a dataset can consume. This property enforces a hard
991 limit on the amount of space used. This hard limit does not include space used
992 by descendents, including file systems and snapshots.
993 .It Sy refreservation Ns = Ns Ar size | Cm none
994 The minimum amount of space guaranteed to a dataset, not including its
995 descendents. When the amount of space used is below this value, the dataset is
996 treated as if it were taking up the amount of space specified by
1000 reservation is accounted for in the parent datasets' space used, and counts
1001 against the parent datasets' quotas and reservations.
1005 is set, a snapshot is only allowed if there is enough free pool space outside
1006 of this reservation to accommodate the current number of "referenced" bytes in
1009 This property can also be referred to by its shortened column name,
1011 .It Sy reservation Ns = Ns Ar size | Cm none
1012 The minimum amount of space guaranteed to a dataset and its descendents. When
1013 the amount of space used is below this value, the dataset is treated as if it
1014 were taking up the amount of space specified by its reservation. Reservations
1015 are accounted for in the parent datasets' space used, and count against the
1016 parent datasets' quotas and reservations.
1018 This property can also be referred to by its shortened column name,
1020 .It Sy secondarycache Ns = Ns Cm all | none | metadata
1021 Controls what is cached in the secondary cache (L2ARC). If this property is set
1024 then both user data and metadata is cached. If this property is set to
1026 then neither user data nor metadata is cached. If this property is set to
1028 then only metadata is cached. The default value is
1030 .It Sy setuid Ns = Ns Cm on | off
1031 Controls whether the
1033 bit is respected for the file system. The default value is
1035 .It Sy sharesmb Ns = Ns Cm on | off | Ar opts
1038 property has currently no effect o
1040 .It Sy sharenfs Ns = Ns Cm on | off | Ar opts
1041 Controls whether the file system is shared via
1043 and what options are used. A file system with a
1047 is managed the traditional way via
1049 Otherwise, the file system is automatically shared and unshared with the
1053 commands. If the property is set to
1057 export options are used. Otherwise,
1059 export options are equivalent to the contents of this property. The export
1060 options may be comma-separated. See
1062 for a list of valid options.
1066 property is changed for a dataset, the
1069 .It Sy logbias Ns = Ns Cm latency | throughput
1072 about handling of synchronous requests in this dataset.
1079 will use pool log devices (if configured) to handle the requests at low
1085 will not use configured pool log devices.
1087 will instead optimize synchronous operations for global pool throughput and
1088 efficient use of resources.
1089 .It Sy snapdir Ns = Ns Cm hidden | visible
1090 Controls whether the
1092 directory is hidden or visible in the root of the file system as discussed in
1095 section. The default value is
1097 .It Sy sync Ns = Ns Cm standard | always | disabled
1098 Controls the behavior of synchronous requests (e.g.
1100 O_DSYNC). This property accepts the following values:
1101 .Bl -tag -offset 4n -width 8n
1103 This is the POSIX specified behavior of ensuring all synchronous requests are
1104 written to stable storage and all devices are flushed to ensure data is not
1105 cached by device controllers (this is the default).
1107 All file system transactions are written and flushed before their system calls
1108 return. This has a large performance penalty.
1110 Disables synchronous requests. File system transactions are only committed to
1111 stable storage periodically. This option will give the highest performance.
1112 However, it is very dangerous as
1114 would be ignoring the synchronous transaction demands of applications such as
1117 Administrators should only use this option when the risks are understood.
1119 .It Sy volsize Ns = Ns Ar size
1120 For volumes, specifies the logical size of the volume. By default, creating a
1121 volume establishes a reservation of equal size. For storage pools with a
1122 version number of 9 or higher, a
1124 is set instead. Any changes to
1126 are reflected in an equivalent change to the reservation (or
1127 .Sy refreservation Ns ).
1130 can only be set to a multiple of
1134 The reservation is kept equal to the volume's logical size to prevent
1135 unexpected behavior for consumers. Without the reservation, the volume could
1136 run out of space, resulting in undefined behavior or data corruption, depending
1137 on how the volume is used. These effects can also occur when the volume size is
1138 changed while it is in use (particularly when shrinking the size). Extreme care
1139 should be used when adjusting the volume size.
1141 Though not recommended, a "sparse volume" (also known as "thin provisioning")
1142 can be created by specifying the
1145 .Qq Nm Cm create Fl V
1146 command, or by changing the reservation after the volume has been created. A
1147 "sparse volume" is a volume where the reservation is less then the volume size.
1148 Consequently, writes to a sparse volume can fail with
1150 when the pool is low on space. For a sparse volume, changes to
1152 are not reflected in the reservation.
1153 .It Sy vscan Ns = Ns Cm off | on
1156 property is currently not supported on
1158 .It Sy xattr Ns = Ns Cm off | on
1161 property is currently not supported on
1163 .It Sy jailed Ns = Ns Cm off | on
1164 Controls whether the dataset is managed from a jail. See the
1166 section for more information. The default value is
1170 The following three properties cannot be changed after the file system is
1171 created, and therefore, should be set when the file system is created. If the
1172 properties are not set with the
1176 commands, these properties are inherited from the parent dataset. If the parent
1177 dataset lacks these properties due to having been created prior to these
1178 features being supported, the new file system will have the default values for
1181 .It Sy casesensitivity Ns = Ns Cm sensitive | insensitive | mixed
1184 property is currently not supported on
1186 .It Sy normalization Ns = Ns Cm none | formC | formD | formKC | formKD
1187 Indicates whether the file system should perform a
1189 normalization of file names whenever two file names are compared, and which
1190 normalization algorithm should be used. File names are always stored
1191 unmodified, names are normalized as part of any comparison process. If this
1192 property is set to a legal value other than
1196 property was left unspecified, the
1198 property is automatically set to
1200 The default value of the
1204 This property cannot be changed after the file system is created.
1205 .It Sy utf8only Ns = Ns Cm on | off
1206 Indicates whether the file system should reject file names that include
1207 characters that are not present in the
1209 character code set. If this property is explicitly set to
1211 the normalization property must either not be explicitly set or be set to
1213 The default value for the
1217 This property cannot be changed after the file system is created.
1221 .Sy casesensitivity , normalization , No and Sy utf8only
1222 properties are also new permissions that can be assigned to non-privileged
1225 delegated administration feature.
1226 .Ss Temporary Mount Point Properties
1227 When a file system is mounted, either through
1229 for legacy mounts or the
1231 command for normal file systems, its mount options are set according to its
1232 properties. The correlation between properties and mount options is as follows:
1233 .Bl -column -offset 4n "PROPERTY" "MOUNT OPTION"
1234 .It PROPERTY MOUNT OPTION
1235 .It atime atime/noatime
1236 .It exec exec/noexec
1238 .It setuid suid/nosuid
1241 In addition, these options can be set on a per-mount basis using the
1243 option, without affecting the property that is stored on disk. The values
1244 specified on the command line override the values stored in the dataset. These
1245 properties are reported as "temporary" by the
1247 command. If the properties are changed while the dataset is mounted, the new
1248 setting overrides any temporary settings.
1250 In addition to the standard native properties,
1252 supports arbitrary user properties. User properties have no effect on
1254 behavior, but applications or administrators can use them to annotate datasets
1255 (file systems, volumes, and snapshots).
1257 User property names must contain a colon
1259 character to distinguish them from native properties. They may contain
1260 lowercase letters, numbers, and the following punctuation characters: colon
1268 The expected convention is that the property name is divided into two portions
1270 .Em module Ns Sy \&: Ns Em property ,
1271 but this namespace is not enforced by
1273 User property names can be at most 256 characters, and cannot begin with a dash
1276 When making programmatic use of user properties, it is strongly suggested to
1281 component of property names to reduce the chance that two
1282 independently-developed packages use the same property name for different
1283 purposes. Property names beginning with
1285 are reserved for use by Sun Microsystems.
1287 The values of user properties are arbitrary strings, are always inherited, and
1288 are never validated. All of the commands that operate on properties
1295 can be used to manipulate both native properties and user properties. Use the
1297 command to clear a user property. If the property is not defined in any parent
1298 dataset, it is removed entirely. Property values are limited to 1024
1301 All subcommands that modify state are logged persistently to the pool in their
1309 Displays a help message.
1314 .Op Fl o Ar property Ns = Ns Ar value
1320 file system. The file system is automatically mounted according to the
1322 property inherited from the parent.
1323 .Bl -tag -width indent
1325 Creates all the non-existing parent datasets. Datasets created in this manner
1326 are automatically mounted according to the
1328 property inherited from their parent. Any property specified on the command
1331 option is ignored. If the target filesystem already exists, the operation
1332 completes successfully.
1333 .It Fl o Ar property Ns = Ns Ar value
1334 Sets the specified property as if the command
1335 .Qq Nm Cm set Ar property Ns = Ns Ar value
1336 was invoked at the same time the dataset was created. Any editable
1338 property can also be set at creation time. Multiple
1340 options can be specified. An error results if the same property is specified in
1349 .Op Fl b Ar blocksize
1350 .Op Fl o Ar property Ns = Ns Ar value
1356 Creates a volume of the given size. The volume is exported as a block device in
1357 .Pa /dev/zvol/path ,
1360 is the name of the volume in the
1362 namespace. The size represents the logical size as exported by the device. By
1363 default, a reservation of equal size is created.
1366 is automatically rounded up to the nearest 128 Kbytes to ensure that
1367 the volume has an integral number of blocks regardless of
1369 .Bl -tag -width indent
1371 Creates all the non-existing parent datasets. Datasets created in this manner
1372 are automatically mounted according to the
1374 property inherited from their parent. Any property specified on the command
1377 option is ignored. If the target filesystem already exists, the operation
1378 completes successfully.
1380 Creates a sparse volume with no reservation. See
1383 .Qq Sx Native Properties
1384 section for more information about sparse volumes.
1385 .It Fl b Ar blocksize
1387 .Fl o Cm volblocksize Ns = Ns Ar blocksize .
1388 If this option is specified in conjunction with
1389 .Fl o Cm volblocksize ,
1390 the resulting behavior is undefined.
1391 .It Fl o Ar property Ns = Ns Ar value
1392 Sets the specified property as if the
1393 .Qq Nm Cm set Ar property Ns = Ns Ar value
1394 command was invoked at the same time the dataset was created. Any editable
1396 property can also be set at creation time. Multiple
1398 options can be specified. An error results if the same property is specified in
1407 .Ar filesystem Ns | Ns Ar volume
1410 Destroys the given dataset. By default, the command unshares any file systems
1411 that are currently shared, unmounts any file systems that are currently
1412 mounted, and refuses to destroy a dataset that has active dependents (children
1414 .Bl -tag -width indent
1416 Recursively destroy all children.
1418 Recursively destroy all dependents, including cloned file systems outside the
1421 Force an unmount of any file systems using the
1422 .Qq Nm Cm unmount Fl f
1423 command. This option has no effect on non-file systems or unmounted file
1427 Extreme care should be taken when applying either the
1431 options, as they can destroy large portions of a pool and cause unexpected
1432 behavior for mounted file systems in use.
1440 The given snapshot is destroyed immediately if and only if the
1444 option would have destroyed it. Such immediate destruction would occur, for
1445 example, if the snapshot had no clones and the user-initiated reference count
1448 If the snapshot does not qualify for immediate destruction, it is marked for
1449 deferred deletion. In this state, it exists as a usable, visible snapshot until
1450 both of the preconditions listed above are met, at which point it is destroyed.
1451 .Bl -tag -width indent
1453 Destroy (or mark for deferred deletion) all snapshots with this name in
1454 descendent file systems.
1456 Recursively destroy all dependents.
1458 Defer snapshot deletion.
1461 Extreme care should be taken when applying either the
1465 options, as they can destroy large portions of a pool and cause unexpected
1466 behavior for mounted file systems in use.
1471 .Op Fl o Ar property Ns = Ns Ar value
1473 .Ar filesystem@snapname Ns | Ns volume@snapname
1476 Creates a snapshot with the given name. All previous modifications by
1477 successful system calls to the file system are part of the snapshot. See the
1479 section for details.
1480 .Bl -tag -width indent
1482 Recursively create snapshots of all descendent datasets. Snapshots are taken
1483 atomically, so that all recursive snapshots correspond to the same moment in
1485 .It Fl o Ar property Ns = Ns Ar value
1486 Sets the specified property; see
1497 Roll back the given dataset to a previous snapshot. When a dataset is rolled
1498 back, all data that has changed since the snapshot is discarded, and the
1499 dataset reverts to the state at the time of the snapshot. By default, the
1500 command refuses to roll back to a snapshot other than the most recent one. In
1501 order to do so, all intermediate snapshots must be destroyed by specifying the
1504 .Bl -tag -width indent
1506 Recursively destroy any snapshots more recent than the one specified.
1508 Recursively destroy any more recent snapshots, as well as any clones of those
1513 option to force an unmount of any clone file systems that are to be destroyed.
1519 .Op Fl o Ar property Ns = Ns Ar value
1520 .Ar ... snapshot filesystem Ns | Ns Ar volume
1523 Creates a clone of the given snapshot. See the
1525 section for details. The target dataset can be located anywhere in the
1527 hierarchy, and is created as the same type as the original.
1528 .Bl -tag -width indent
1530 Creates all the non-existing parent datasets. Datasets created in this manner
1531 are automatically mounted according to the
1533 property inherited from their parent. If the target filesystem or volume
1534 already exists, the operation completes successfully.
1535 .It Fl o Ar property Ns = Ns Ar value
1536 Sets the specified property; see
1543 .Ar clone-filesystem
1546 Promotes a clone file system to no longer be dependent on its "origin"
1547 snapshot. This makes it possible to destroy the file system that the clone was
1548 created from. The clone parent-child dependency relationship is reversed, so
1549 that the origin file system becomes a clone of the specified file system.
1551 The snapshot that was cloned, and any snapshots previous to this snapshot, are
1552 now owned by the promoted clone. The space they use moves from the origin file
1553 system to the promoted clone, so enough space must be available to accommodate
1554 these snapshots. No new space is consumed by this operation, but the space
1555 accounting is adjusted. The promoted clone must not have any conflicting
1556 snapshot names of its own. The
1558 subcommand can be used to rename any conflicting snapshots.
1562 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1563 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1569 .Ar filesystem Ns | Ns Ar volume
1570 .Ar filesystem Ns | Ns Ar volume
1577 .Ar filesystem filesystem
1580 Renames the given dataset. The new target can be located anywhere in the
1582 hierarchy, with the exception of snapshots. Snapshots can only be renamed
1583 within the parent file system or volume. When renaming a snapshot, the parent
1584 file system of the snapshot does not need to be specified as part of the second
1585 argument. Renamed file systems can inherit new mount points, in which case they
1586 are unmounted and remounted at the new mount point.
1587 .Bl -tag -width indent
1589 Creates all the nonexistent parent datasets. Datasets created in this manner
1590 are automatically mounted according to the
1592 property inherited from their parent.
1594 Do not remount file systems during rename. If a file system's
1600 file system is not unmounted even if this option is not given.
1606 .Ar snapshot snapshot
1609 Recursively rename the snapshots of all descendent datasets. Snapshots are the
1610 only dataset that can be renamed recursively.
1614 .Op Fl r Ns | Ns Fl d Ar depth
1616 .Op Fl o Ar property Ns Op , Ns Ar ...
1617 .Op Fl t Ar type Ns Op , Ns Ar ...
1618 .Op Fl s Ar property
1620 .Op Fl S Ar property
1622 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1625 Lists the property information for the given datasets in tabular form. If
1626 specified, you can list property information by the absolute pathname or the
1627 relative pathname. By default, all file systems and volumes are displayed.
1628 Snapshots are displayed if the
1634 The following fields are displayed,
1635 .Sy name , used , available , referenced , mountpoint .
1636 .Bl -tag -width indent
1638 Recursively display any children of the dataset on the command line.
1640 Recursively display any children of the dataset, limiting the recursion to
1644 will display only the dataset and its direct children.
1646 Used for scripting mode. Do not print headers and separate fields by a single
1647 tab instead of arbitrary white space.
1648 .It Fl o Ar property Ns Op , Ns Ar ...
1649 A comma-separated list of properties to display. The property must be:
1650 .Bl -bullet -offset 2n
1652 One of the properties described in the
1653 .Qq Sx Native Properties
1660 to display the dataset name
1664 to display space usage properties on file systems and volumes. This is a
1665 shortcut for specifying
1667 .Sy name,avail,used,usedsnap,usedds,usedrefreserv,usedchild
1669 .Sy filesystem,volume
1672 .It Fl t Ar type Ns Op , Ns Ar ...
1673 A comma-separated list of types to display, where
1676 .Sy filesystem , snapshot , volume , No or Sy all .
1677 For example, specifying
1679 displays only snapshots.
1680 .It Fl s Ar property
1681 A property for sorting the output by column in ascending order based on the
1682 value of the property. The property must be one of the properties described in
1685 section, or the special value
1687 to sort by the dataset name. Multiple properties can be specified at one time
1690 property options. Multiple
1692 options are evaluated from left to right in decreasing order of importance.
1694 The following is a list of sorting criteria:
1695 .Bl -bullet -offset 2n
1697 Numeric types sort in numeric order.
1699 String types sort in alphabetical order.
1701 Types inappropriate for a row sort that row to the literal bottom, regardless
1702 of the specified ordering.
1704 If no sorting options are specified the existing behavior of
1708 .It Fl S Ar property
1711 option, but sorts by property in descending order.
1716 .Ar property Ns = Ns Ar value
1717 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1720 Sets the property to the given value for each dataset. Only some properties can
1721 be edited. See the "Properties" section for more information on what properties
1722 can be set and acceptable values. Numeric values can be specified as exact
1723 values, or in a human-readable form with a suffix of
1724 .Sy B , K , M , G , T , P , E , Z
1725 (for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes, or
1726 zettabytes, respectively). User properties can be set on snapshots. For more
1727 information, see the
1728 .Qq Sx User Properties
1733 .Op Fl r Ns | Ns Fl d Ar depth
1735 .Op Fl o Ar all | field Ns Op , Ns Ar ...
1736 .Op Fl s Ar source Ns Op , Ns Ar ...
1737 .Ar all | property Ns Op , Ns Ar ...
1738 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1741 Displays properties for the given datasets. If no datasets are specified, then
1742 the command displays properties for all datasets on the system. For each
1743 property, the following columns are displayed:
1745 .Bl -hang -width "property" -offset indent -compact
1753 Property source. Can either be local, default, temporary, inherited, or none
1757 All columns except the
1759 column are displayed by default. The columns to display can be specified
1762 option. This command takes a comma-separated list of properties as described in
1764 .Qq Sx Native Properties
1766 .Qq Sx User Properties
1771 can be used to display all properties that apply to the given dataset's type
1772 (filesystem, volume, or snapshot).
1773 .Bl -tag -width indent
1775 Recursively display properties for any children.
1777 Recursively display any children of the dataset, limiting the recursion to
1781 will display only the dataset and its direct children.
1783 Display output in a form more easily parsed by scripts. Any headers are
1784 omitted, and fields are explicitly separated by a single tab instead of an
1785 arbitrary amount of space.
1787 Display numbers in parseable (exact) values.
1788 .It Fl o Cm all | Ar field Ns Op , Ns Ar ...
1789 A comma-separated list of columns to display. Supported values are
1790 .Sy name,property,value,received,source .
1792 .Sy name,property,value,source .
1795 specifies all columns.
1796 .It Fl s Ar source Ns Op , Ns Ar ...
1797 A comma-separated list of sources to display. Those properties coming from a
1798 source other than those in this list are ignored. Each source must be one of
1800 .Sy local,default,inherited,temporary,received,none .
1801 The default value is all sources.
1808 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1811 Clears the specified property, causing it to be inherited from an ancestor. If
1812 no ancestor has the property set, then the default value is used. See the
1814 section for a listing of default values, and details on which properties can be
1816 .Bl -tag -width indent
1818 Recursively inherit the given property for all children.
1820 For properties with a received value, revert to this value. This flag has no
1821 effect on properties that do not have a received value.
1829 Displays a list of file systems that are not the most recent version.
1830 .Bl -tag -width indent
1834 filesystem versions supported by the current software. The current
1836 filesystem version and all previous supported versions are displayed, along
1837 with an explanation of the features provided with each version.
1844 .Fl a | Ar filesystem
1847 Upgrades file systems to a new on-disk version. Once this is done, the file
1848 systems will no longer be accessible on systems running older versions of the
1851 streams generated from new snapshots of these file systems cannot be accessed
1852 on systems running older versions of the software.
1854 In general, the file system version is independent of the pool version. See
1856 for information on the
1857 .Nm zpool Cm upgrade
1860 In some cases, the file system version and the pool version are interrelated
1861 and the pool version must be upgraded before the file system version can be
1863 .Bl -tag -width indent
1865 Upgrade the specified file system and all descendent file systems.
1867 Upgrade to the specified
1871 flag is not specified, this command upgrades to the most recent version. This
1872 option can only be used to increase the version number, and only up to the most
1873 recent version supported by this software.
1875 Upgrade all file systems on all imported pools.
1877 Upgrade the specified file system.
1883 .Op Fl o Ar field Ns Op , Ns Ar ...
1886 .Op Fl t Ar type Ns Op , Ns Ar ...
1887 .Ar filesystem Ns | Ns Ar snapshot
1890 Displays space consumed by, and quotas on, each user in the specified
1891 filesystem or snapshot. This corresponds to the
1892 .Sy userused@ Ns Ar user
1894 .Sy userquota@ Ns Ar user
1896 .Bl -tag -width indent
1898 Print numeric ID instead of user/group name.
1900 Do not print headers, use tab-delimited output.
1902 Use exact (parseable) numeric output.
1903 .It Fl o Ar field Ns Op , Ns Ar ...
1904 Display only the specified fields from the following set,
1905 .Sy type,name,used,quota .
1906 The default is to display all fields.
1908 Sort output by this field. The
1912 flags may be specified multiple times to sort first by one field, then by
1913 another. The default is
1914 .Fl s Cm type Fl s Cm name .
1916 Sort by this field in reverse order. See
1918 .It Fl t Ar type Ns Op , Ns Ar ...
1919 Print only the specified types from the following set,
1920 .Sy all,posixuser,smbuser,posixgroup,smbgroup .
1923 .Fl t Cm posixuser,smbuser .
1925 The default can be changed to include group types.
1927 Translate SID to POSIX ID. This flag has currently no effect on
1934 .Op Fl o Ar field Ns Op , Ns Ar ...
1937 .Op Fl t Ar type Ns Op , Ns Ar ...
1938 .Ar filesystem Ns | Ns Ar snapshot
1941 Displays space consumed by, and quotas on, each group in the specified
1942 filesystem or snapshot. This subcommand is identical to
1943 .Qq Nm Cm userspace ,
1944 except that the default types to display are
1945 .Fl t Sy posixgroup,smbgroup .
1953 file systems currently mounted.
1954 .Bl -tag -width indent
1961 .Op Fl o Ar property Ns Op , Ns Ar ...
1962 .Fl a | Ar filesystem
1968 .Bl -tag -width indent
1970 Report mount progress.
1972 Perform an overlay mount. Overlay mounts are not supported on
1974 .It Fl o Ar property Ns Op , Ns Ar ...
1975 An optional, comma-separated list of mount options to use temporarily for the
1976 duration of the mount. See the
1977 .Qq Sx Temporary Mount Point Properties
1978 section for details.
1983 This command may be executed on
1987 For more information, see variable
1992 Mount the specified filesystem.
1998 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2001 Unmounts currently mounted
2004 .Bl -tag -width indent
2006 Forcefully unmount the file system, even if it is currently in use.
2008 Unmount all available
2011 .It Ar filesystem | mountpoint
2012 Unmount the specified filesystem. The command can also be given a path to a
2014 file system mount point on the system.
2019 .Fl a | Ar filesystem
2024 file systems that have the
2027 .Bl -tag -width indent
2031 file systems that have the
2034 This command may be executed on
2038 For more information, see variable
2043 Share the specified filesystem according to the
2045 property. File systems are shared when the
2052 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2057 file systems that have the
2060 .Bl -tag -width indent
2064 file systems that have the
2067 This command may be executed on
2071 For more information, see variable
2075 .It Ar filesystem | mountpoint
2076 Unshare the specified filesystem. The command can also be given a path to a
2078 file system shared on the system.
2084 .Op Fl i Ar snapshot | Fl I Ar snapshot
2088 Creates a stream representation of the last
2090 argument (not part of
2094 which is written to standard output. The output can be redirected to
2095 a file or to a different system (for example, using
2097 By default, a full stream is generated.
2098 .Bl -tag -width indent
2099 .It Fl i Ar snapshot
2100 Generate an incremental stream from the
2104 The incremental source (the
2105 .Fl i Ar snapshot Ns )
2106 can be specified as the last component of the snapshot name (for example, the
2109 and it is assumed to be from the same file system as the last
2112 If the destination is a clone, the source may be the origin snapshot, which
2113 must be fully specified (for example,
2114 .Cm pool/fs@origin ,
2117 .It Fl I Ar snapshot
2118 Generate a stream package that sends all intermediary snapshots from the
2119 .Fl I Ar snapshot to the last
2120 .Ar snapshot . For example,
2123 .Ic -i @a fs@b; -i @b fs@c; -i @c fs@d Ns .
2124 The incremental source snapshot may be specified as with the
2128 Generate a replication stream package, which will replicate the specified
2129 filesystem, and all descendent file systems, up to the named snapshot. When
2130 received, all properties, snapshots, descendent file systems, and clones are
2137 flags are used in conjunction with the
2139 flag, an incremental replication stream is generated. The current values of
2140 properties, and current snapshot and file system names are set when the stream
2143 flag is specified when this stream is received, snapshots and file systems that
2144 do not exist on the sending side are destroyed.
2146 Generate a deduplicated stream. Blocks which would have been sent multiple
2147 times in the send stream will only be sent once. The receiving system must
2148 also support this feature to recieve a deduplicated stream. This flag can
2149 be used regardless of the dataset's
2151 property, but performance will be much better if the filesystem uses a
2152 dedup-capable checksum (eg.
2155 Include the dataset's properties in the stream. This flag is implicit when
2157 is specified. The receiving system must also support this feature.
2159 Print verbose information about the stream package generated.
2162 The format of the stream is committed. You will be able to receive your streams
2163 on future versions of
2169 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2179 Creates a snapshot whose contents are as specified in the stream provided on
2180 standard input. If a full stream is received, then a new file system is created
2181 as well. Streams are created using the
2183 subcommand, which by default creates a full stream.
2185 can be used as an alias for
2188 If an incremental stream is received, then the destination file system must
2189 already exist, and its most recent snapshot must match the incremental stream's
2192 the destination device link is destroyed and recreated, which means the
2194 cannot be accessed during the
2198 When a snapshot replication package stream that is generated by using the
2200 command is received, any snapshots that do not exist on the sending location
2201 are destroyed by using the
2202 .Qq Nm Cm destroy Fl d
2205 The name of the snapshot (and file system, if a full stream is received) that
2206 this subcommand creates depends on the argument type and the
2212 If the argument is a snapshot name, the specified
2214 is created. If the argument is a file system or volume name, a snapshot with
2215 the same name as the sent snapshot is created within the specified
2223 option is specified, the snapshot name is determined by appending the sent
2224 snapshot's name to the specified
2228 option is specified, all but the pool name of the sent snapshot path is
2229 appended (for example,
2231 appended from sent snapshot
2235 option is specified, only the tail of the sent snapshot path is appended (for
2238 appended from sent snapshot
2242 any file systems needed to replicate the path of the sent snapshot are created
2243 within the specified file system.
2244 .Bl -tag -width indent
2246 Use the full sent snapshot path without the first element (without pool name)
2247 to determine the name of the new snapshot as described in the paragraph above.
2249 Use only the last element of the sent snapshot path to determine the name of
2250 the new snapshot as described in the paragraph above.
2252 File system that is associated with the received stream is not mounted.
2254 Print verbose information about the stream and the time required to perform the
2257 Do not actually receive the stream. This can be useful in conjunction with the
2259 option to verify the name the receive operation would use.
2261 Force a rollback of the file system to the most recent snapshot before
2262 performing the receive operation. If receiving an incremental replication
2263 stream (for example, one generated by
2264 .Qq Nm Cm send Fl R Fi iI Ns ) ,
2265 destroy snapshots and file systems that do not exist on the sending side.
2270 .Ar filesystem Ns | Ns Ar volume
2273 Displays permissions that have been delegated on the specified filesystem or
2274 volume. See the other forms of
2276 for more information.
2281 .Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ...
2282 .Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
2283 .Ar filesystem Ns | Ns Ar volume
2290 .Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
2291 .Ar filesystem Ns | Ns Ar volume
2296 administration permission for the file systems to non-privileged users.
2297 .Bl -tag -width indent
2300 .Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ...
2302 Specifies to whom the permissions are delegated. Multiple entities can be
2303 specified as a comma-separated list. If neither of the
2305 options are specified, then the argument is interpreted preferentially as the
2306 keyword "everyone", then as a user name, and lastly as a group name. To specify
2307 a user or group named "everyone", use the
2311 options. To specify a group with the same name as a user, use the
2316 .Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
2318 Specifies that the permissions be delegated to "everyone." Multiple permissions
2319 may be specified as a comma-separated list. Permission names are the same as
2321 subcommand and property names. See the property list below. Property set names,
2322 which begin with an at sign
2324 may be specified. See the
2326 form below for details.
2329 .Ar filesystem Ns | Ns Ar volume
2331 Specifies where the permissions are delegated. If neither of the
2333 options are specified, or both are, then the permissions are allowed for the
2334 file system or volume, and all of its descendents. If only the
2336 option is used, then is allowed "locally" only for the specified file system.
2339 option is used, then is allowed only for the descendent file systems.
2342 Permissions are generally the ability to use a
2344 subcommand or change a
2346 property. The following permissions are available:
2347 .Bl -column -offset 4n "secondarycache" "subcommand"
2348 .It NAME Ta TYPE Ta NOTES
2349 .It Xo allow Ta subcommand Ta Must
2350 also have the permission that is being allowed
2352 .It Xo clone Ta subcommand Ta Must
2353 also have the 'create' ability and 'mount' ability in the origin file system
2355 .It create Ta subcommand Ta Must also have the 'mount' ability
2356 .It destroy Ta subcommand Ta Must also have the 'mount' ability
2357 .It hold Ta subcommand Ta Allows adding a user hold to a snapshot
2358 .It mount Ta subcommand Ta Allows mount/umount of Tn ZFS No datasets
2359 .It Xo promote Ta subcommand Ta Must
2360 also have the 'mount' and 'promote' ability in the origin file system
2362 .It receive Ta subcommand Ta Must also have the 'mount' and 'create' ability
2363 .It Xo release Ta subcommand Ta Allows
2364 releasing a user hold which might destroy the snapshot
2366 .It Xo rename Ta subcommand Ta Must
2367 also have the 'mount' and 'create' ability in the new parent
2369 .It rollback Ta subcommand Ta Must also have the 'mount' ability
2370 .It send Ta subcommand
2371 .It share Ta subcommand Ta Allows Xo
2372 sharing file systems over the
2376 .It snapshot Ta subcommand Ta Must also have the 'mount' ability
2377 .It groupquota Ta other Ta Allows accessing any groupquota@... property
2378 .It groupused Ta other Ta Allows reading any groupused@... property
2379 .It userprop Ta other Ta Allows changing any user property
2380 .It userquota Ta other Ta Allows accessing any userquota@... property
2381 .It userused Ta other Ta Allows reading any userused@... property
2383 .It aclinherit Ta property
2384 .It aclmode Ta property
2385 .It atime Ta property
2386 .It canmount Ta property
2387 .It casesensitivity Ta property
2388 .It checksum Ta property
2389 .It compression Ta property
2390 .It copies Ta property
2391 .It dedup Ta property
2392 .It devices Ta property
2393 .It exec Ta property
2394 .It logbias Ta property
2395 .It jailed Ta property
2396 .It mlslabel Ta property
2397 .It mountpoint Ta property
2398 .It nbmand Ta property
2399 .It normalization Ta property
2400 .It primarycache Ta property
2401 .It quota Ta property
2402 .It readonly Ta property
2403 .It recordsize Ta property
2404 .It refquota Ta property
2405 .It refreservation Ta property
2406 .It reservation Ta property
2407 .It secondarycache Ta property
2408 .It setuid Ta property
2409 .It sharenfs Ta property
2410 .It sharesmb Ta property
2411 .It snapdir Ta property
2412 .It sync Ta property
2413 .It utf8only Ta property
2414 .It version Ta property
2415 .It volblocksize Ta property
2416 .It volsize Ta property
2417 .It vscan Ta property
2418 .It xattr Ta property
2424 .Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
2425 .Ar filesystem Ns | Ns Ar volume
2428 Sets "create time" permissions. These permissions are granted (locally) to the
2429 creator of any newly-created descendent file system.
2435 .Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
2436 .Ar filesystem Ns | Ns Ar volume
2439 Defines or adds permissions to a permission set. The set can be used by other
2441 commands for the specified file system and its descendents. Sets are evaluated
2442 dynamically, so changes to a set are immediately reflected. Permission sets
2443 follow the same naming restrictions as ZFS file systems, but the name must
2444 begin with an "at sign"
2446 and can be no more than 64 characters long.
2451 .Cm everyone Ns | Ns Ar user Ns | Ns Ar group Ns Op , Ns Ar ...
2452 .Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
2453 .Ar filesystem Ns | Ns Ar volume
2460 .Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
2461 .Ar filesystem Ns | Ns Ar volume
2468 .Op Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
2469 .Ar filesystem Ns | Ns Ar volume
2472 Removes permissions that were granted with the
2474 command. No permissions are explicitly denied, so other permissions granted are
2475 still in effect. For example, if the permission is granted by an ancestor. If
2476 no permissions are specified, then all permissions for the specified
2477 .Ar user , group , No or Ar everyone
2478 are removed. Specifying "everyone" (or using the
2480 option) only removes the permissions that were granted to "everyone",
2481 not all permissions for every user and group. See the
2483 command for a description of the
2486 .Bl -tag -width indent
2488 Recursively remove the permissions from this file system and all descendents.
2496 .Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar ...
2497 .Ar filesystem Ns | Ns Ar volume
2500 Removes permissions from a permission set. If no permissions are specified,
2501 then all permissions are removed, thus removing the set entirely.
2506 .Ar tag snapshot ...
2509 Adds a single reference, named with the
2511 argument, to the specified snapshot or snapshots. Each snapshot has its own tag
2512 namespace, and tags must be unique within that space.
2514 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
2518 .Bl -tag -width indent
2520 Specifies that a hold with the given tag is applied recursively to the
2521 snapshots of all descendent file systems.
2530 Lists all existing user references for the given snapshot or snapshots.
2531 .Bl -tag -width indent
2533 Lists the holds that are set on the named descendent snapshots, in addition to
2534 listing the holds on the named snapshot.
2540 .Ar tag snapshot ...
2543 Removes a single reference, named with the
2545 argument, from the specified snapshot or snapshots. The tag must already exist
2547 .Bl -tag -width indent
2549 Recursively releases a hold with the given tag on the snapshots of all
2550 descendent file systems.
2557 .Op Ar snapshot Ns | Ns Ar filesystem
2560 Describes differences between a snapshot and a successor dataset. The
2561 successor dataset can be a later snapshot or the current filesystem.
2563 The changed files are displayed including the change type. The change type
2564 is displayed ussing a single character. If a file or directory was renamed,
2565 the old and the new names are displayed.
2567 The following change types can be displayed:
2569 .Bl -column -offset indent "CHARACTER" "CHANGE TYPE"
2570 .It CHARACTER Ta CHANGE TYPE
2571 .It \&+ Ta file was added
2572 .It \&- Ta file was removed
2573 .It \&M Ta file was modified
2574 .It \&R Ta file was renamed
2576 .Bl -tag -width indent
2578 Display a single letter for the file type in second to last column.
2580 The following file types can be displayed:
2582 .Bl -column -offset indent "CHARACTER" "FILE TYPE"
2583 .It CHARACTER Ta FILE TYPE
2585 .It \&/ Ta directory
2586 .It \&B Ta block device
2587 .It \&@ Ta symbolic link
2589 .It \&> Ta door (not supported on Fx Ns )
2590 .It \&| Ta FIFO (not supported on Fx Ns )
2591 .It \&P Ta event portal (not supported on Fx Ns )
2594 Machine-parseable output, fields separated a tab character.
2596 Display a change timestamp in the first column.
2601 .Ar jailid filesystem
2604 Attaches the specified
2606 to the jail identified by JID
2608 From now on this file system tree can be managed from within a jail if the
2610 property has been set. To use this functionality, the jail needs the
2621 for more information on managing jails and configuring the parameters above.
2625 .Ar jailid filesystem
2628 Detaches the specified
2630 from the jail identified by JID
2635 .It Sy Example 1 No Creating a Tn ZFS No File System Hierarchy
2637 The following commands create a file system named
2639 and a file system named
2643 is set for the parent file system, and is automatically inherited by the child
2645 .Bd -literal -offset 2n
2646 .Li # Ic zfs create pool/home
2647 .Li # Ic zfs set mountpoint=/home pool/home
2648 .Li # Ic zfs create pool/home/bob
2650 .It Sy Example 2 No Creating a Tn ZFS No Snapshot
2652 The following command creates a snapshot named
2654 This snapshot is mounted on demand in the
2656 directory at the root of the
2659 .Bd -literal -offset 2n
2660 .Li # Ic zfs snapshot pool/home/bob@yesterday
2662 .It Sy Example 3 No Creating and Destroying Multiple Snapshots
2664 The following command creates snapshots named
2668 and all of its descendent file systems. Each snapshot is mounted on demand in
2671 directory at the root of its file system. The second command destroys the newly
2673 .Bd -literal -offset 2n
2674 .Li # Ic zfs snapshot -r pool/home@yesterday
2675 .Li # Ic zfs destroy -r pool/home@yesterday
2677 .It Sy Example 4 No Disabling and Enabling File System Compression
2679 The following command disables the
2681 property for all file systems under
2683 The next command explicitly enables
2686 .Em pool/home/anne .
2687 .Bd -literal -offset 2n
2688 .Li # Ic zfs set compression=off pool/home
2689 .Li # Ic zfs set compression=on pool/home/anne
2691 .It Sy Example 5 No Listing Tn ZFS No Datasets
2693 The following command lists all active file systems and volumes in the system.
2694 Snapshots are displayed if the
2702 for more information on pool properties.
2703 .Bd -literal -offset 2n
2705 NAME USED AVAIL REFER MOUNTPOINT
2706 pool 450K 457G 18K /pool
2707 pool/home 315K 457G 21K /home
2708 pool/home/anne 18K 457G 18K /home/anne
2709 pool/home/bob 276K 457G 276K /home/bob
2711 .It Sy Example 6 No Setting a Quota on a Tn ZFS No File System
2713 The following command sets a quota of 50 Gbytes for
2715 .Bd -literal -offset 2n
2716 .Li # Ic zfs set quota=50G pool/home/bob
2718 .It Sy Example 7 No Listing Tn ZFS No Properties
2720 The following command lists all properties for
2722 .Bd -literal -offset 2n
2723 .Li # Ic zfs get all pool/home/bob
2724 NAME PROPERTY VALUE SOURCE
2725 pool/home/bob type filesystem -
2726 pool/home/bob creation Tue Jul 21 15:53 2009 -
2727 pool/home/bob used 21K -
2728 pool/home/bob available 20.0G -
2729 pool/home/bob referenced 21K -
2730 pool/home/bob compressratio 1.00x -
2731 pool/home/bob mounted yes -
2732 pool/home/bob quota 20G local
2733 pool/home/bob reservation none default
2734 pool/home/bob recordsize 128K default
2735 pool/home/bob mountpoint /home/bob default
2736 pool/home/bob sharenfs off default
2737 pool/home/bob checksum on default
2738 pool/home/bob compression on local
2739 pool/home/bob atime on default
2740 pool/home/bob devices on default
2741 pool/home/bob exec on default
2742 pool/home/bob setuid on default
2743 pool/home/bob readonly off default
2744 pool/home/bob jailed off default
2745 pool/home/bob snapdir hidden default
2746 pool/home/bob aclmode discard default
2747 pool/home/bob aclinherit restricted default
2748 pool/home/bob canmount on default
2749 pool/home/bob xattr on default
2750 pool/home/bob copies 1 default
2751 pool/home/bob version 5 -
2752 pool/home/bob utf8only off -
2753 pool/home/bob normalization none -
2754 pool/home/bob casesensitivity sensitive -
2755 pool/home/bob vscan off default
2756 pool/home/bob nbmand off default
2757 pool/home/bob sharesmb off default
2758 pool/home/bob refquota none default
2759 pool/home/bob refreservation none default
2760 pool/home/bob primarycache all default
2761 pool/home/bob secondarycache all default
2762 pool/home/bob usedbysnapshots 0 -
2763 pool/home/bob usedbydataset 21K -
2764 pool/home/bob usedbychildren 0 -
2765 pool/home/bob usedbyrefreservation 0 -
2766 pool/home/bob logbias latency default
2767 pool/home/bob dedup off default
2768 pool/home/bob mlslabel -
2769 pool/home/bob sync standard default
2770 pool/home/bob refcompressratio 1.00x -
2773 The following command gets a single property value.
2774 .Bd -literal -offset 2n
2775 .Li # Ic zfs get -H -o value compression pool/home/bob
2779 The following command lists all properties with local settings for
2781 .Bd -literal -offset 2n
2782 .Li # Ic zfs get -s local -o name,property,value all pool/home/bob
2784 pool/home/bob quota 20G
2785 pool/home/bob compression on
2787 .It Sy Example 8 No Rolling Back a Tn ZFS No File System
2789 The following command reverts the contents of
2791 to the snapshot named
2793 deleting all intermediate snapshots.
2794 .Bd -literal -offset 2n
2795 .Li # Ic zfs rollback -r pool/home/anne@yesterday
2797 .It Sy Example 9 No Creating a Tn ZFS No Clone
2799 The following command creates a writable file system whose initial contents are
2801 .Em pool/home/bob@yesterday .
2802 .Bd -literal -offset 2n
2803 .Li # Ic zfs clone pool/home/bob@yesterday pool/clone
2805 .It Sy Example 10 No Promoting a Tn ZFS No Clone
2807 The following commands illustrate how to test out changes to a file system, and
2808 then replace the original file system with the changed one, using clones, clone
2809 promotion, and renaming:
2810 .Bd -literal -offset 2n
2811 .Li # Ic zfs create pool/project/production
2815 .Pa /pool/project/production
2816 with data and continue with the following commands:
2817 .Bd -literal -offset 2n
2818 .Li # Ic zfs snapshot pool/project/production@today
2819 .Li # Ic zfs clone pool/project/production@today pool/project/beta
2823 .Pa /pool/project/beta
2824 and continue with the following commands:
2825 .Bd -literal -offset 2n
2826 .Li # Ic zfs promote pool/project/beta
2827 .Li # Ic zfs rename pool/project/production pool/project/legacy
2828 .Li # Ic zfs rename pool/project/beta pool/project/production
2831 Once the legacy version is no longer needed, it can be destroyed.
2832 .Bd -literal -offset 2n
2833 .Li # Ic zfs destroy pool/project/legacy
2835 .It Sy Example 11 No Inheriting Tn ZFS No Properties
2837 The following command causes
2843 property from their parent.
2844 .Bd -literal -offset 2n
2845 .Li # Ic zfs inherit checksum pool/home/bob pool/home/anne
2847 .It Sy Example 12 No Remotely Replicating Tn ZFS No Data
2849 The following commands send a full stream and then an incremental stream to a
2850 remote machine, restoring them into
2851 .Sy poolB/received/fs@a
2853 .Sy poolB/received/fs@b ,
2856 must contain the file system
2857 .Sy poolB/received ,
2858 and must not initially contain
2859 .Sy poolB/received/fs .
2860 .Bd -literal -offset 2n
2861 .Li # Ic zfs send pool/fs@a | ssh host zfs receive poolB/received/fs@a
2862 .Li # Ic zfs send -i a pool/fs@b | ssh host zfs receive poolB/received/fs
2871 The following command sends a full stream of
2872 .Sy poolA/fsA/fsB@snap
2873 to a remote machine, receiving it into
2874 .Sy poolB/received/fsA/fsB@snap .
2877 portion of the received snapshot's name is determined from the name of the sent
2880 must contain the file system
2881 .Sy poolB/received .
2883 .Sy poolB/received/fsA
2884 does not exist, it is created as an empty file system.
2885 .Bd -literal -offset 2n
2886 .Li # Ic zfs send poolA/fsA/fsB@snap | ssh host zfs receive -d poolB/received
2888 .It Sy Example 14 No Setting User Properties
2890 The following example sets the user-defined
2891 .Sy com.example:department
2892 property for a dataset.
2893 .Bd -literal -offset 2n
2894 .Li # Ic zfs set com.example:department=12345 tank/accounting
2896 .It Sy Example 15 No Performing a Rolling Snapshot
2898 The following example shows how to maintain a history of snapshots with a
2899 consistent naming scheme. To keep a week's worth of snapshots, the user
2900 destroys the oldest snapshot, renames the remaining snapshots, and then creates
2901 a new snapshot, as follows:
2902 .Bd -literal -offset 2n
2903 .Li # Ic zfs destroy -r pool/users@7daysago
2904 .Li # Ic zfs rename -r pool/users@6daysago @7daysago
2905 .Li # Ic zfs rename -r pool/users@5daysago @6daysago
2906 .Li # Ic zfs rename -r pool/users@yesterday @5daysago
2907 .Li # Ic zfs rename -r pool/users@yesterday @4daysago
2908 .Li # Ic zfs rename -r pool/users@yesterday @3daysago
2909 .Li # Ic zfs rename -r pool/users@yesterday @2daysago
2910 .Li # Ic zfs rename -r pool/users@today @yesterday
2911 .Li # Ic zfs snapshot -r pool/users@today
2917 Property Options on a ZFS File System
2920 The following command shows how to set
2922 property options to enable root access for a specific network on the
2924 file system. The contents of the
2929 .Bd -literal -offset 2n
2930 .Li # Ic zfs set sharenfs="maproot=root,network 192.168.0.0/24" tank/home
2933 Another way to write this command with the same result is:
2934 .Bd -literal -offset 2n
2935 .Li # Ic set zfs sharenfs="-maproot=root -network 192.168.0.0/24" tank/home
2941 Administration Permissions on a
2946 The following example shows how to set permissions so that user
2948 can create, destroy, mount, and take snapshots on
2953 .Bd -literal -offset 2n
2954 .Li # Ic zfs allow cindys create,destroy,mount,snapshot tank/cindys
2955 .Li # Ic zfs allow tank/cindys
2956 -------------------------------------------------------------
2957 Local+Descendent permissions on (tank/cindys)
2958 user cindys create,destroy,mount,snapshot
2959 -------------------------------------------------------------
2961 .It Sy Example 18 No Delegating Create Time Permissions on a Tn ZFS No Dataset
2963 The following example shows how to grant anyone in the group
2965 to create file systems in
2967 This syntax also allows staff members to destroy their own file systems, but
2968 not destroy anyone else's file system. The permissions on
2971 .Bd -literal -offset 2n
2972 .Li # Ic zfs allow staff create,mount tank/users
2973 .Li # Ic zfs allow -c destroy tank/users
2974 .Li # Ic zfs allow tank/users
2975 -------------------------------------------------------------
2976 Create time permissions on (tank/users)
2978 Local+Descendent permissions on (tank/users)
2979 group staff create,mount
2980 -------------------------------------------------------------
2984 Defining and Granting a Permission Set on a
2989 The following example shows how to define and grant a permission set on the
2991 file system. The permissions on
2994 .Bd -literal -offset 2n
2995 .Li # Ic zfs allow -s @pset create,destroy,snapshot,mount tank/users
2996 .Li # Ic zfs allow staff @pset tank/users
2997 .Li # Ic zfs allow tank/users
2998 -------------------------------------------------------------
2999 Permission sets on (tank/users)
3000 @pset create,destroy,mount,snapshot
3001 Create time permissions on (tank/users)
3003 Local+Descendent permissions on (tank/users)
3004 group staff @pset,create,mount
3005 -------------------------------------------------------------
3007 .It Sy Example 20 No Delegating Property Permissions on a Tn ZFS No Dataset
3009 The following example shows to grant the ability to set quotas and reservations
3012 file system. The permissions on
3015 .Bd -literal -offset 2n
3016 .Li # Ic zfs allow cindys quota,reservation users/home
3017 .Li # Ic zfs allow cindys
3018 -------------------------------------------------------------
3019 Local+Descendent permissions on (users/home)
3020 user cindys quota,reservation
3021 -------------------------------------------------------------
3022 .Li # Ic su - cindys
3023 .Li cindys% Ic zfs set quota=10G users/home/marks
3024 .Li cindys% Ic zfs get quota users/home/marks
3025 NAME PROPERTY VALUE SOURCE
3026 users/home/marks quota 10G local
3028 .It Sy Example 21 No Removing ZFS Delegated Permissions on a Tn ZFS No Dataset
3030 The following example shows how to remove the snapshot permission from the
3034 file system. The permissions on
3037 .Bd -literal -offset 2n
3038 .Li # Ic zfs unallow staff snapshot tank/users
3039 .Li # Ic zfs allow tank/users
3040 -------------------------------------------------------------
3041 Permission sets on (tank/users)
3042 @pset create,destroy,mount,snapshot
3043 Create time permissions on (tank/users)
3045 Local+Descendent permissions on (tank/users)
3046 group staff @pset,create,mount
3047 -------------------------------------------------------------
3051 The following exit values are returned:
3052 .Bl -tag -offset 2n -width 2n
3054 Successful completion.
3058 Invalid command line options were specified.
3071 This manual page is a
3073 reimplementation of the
3077 modified and customized for
3079 and licensed under the
3080 Common Development and Distribution License
3085 implementation of this manual page was initially written by
3086 .An Martin Matuska Aq mm@FreeBSD.org .