]> git.proxmox.com Git - mirror_zfs.git/blob - man/man8/zfsprops.8
OpenZFS 3254 - add support in zfs for aclmode=restricted
[mirror_zfs.git] / man / man8 / zfsprops.8
1 .\"
2 .\" CDDL HEADER START
3 .\"
4 .\" The contents of this file are subject to the terms of the
5 .\" Common Development and Distribution License (the "License").
6 .\" You may not use this file except in compliance with the License.
7 .\"
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 .\" or http://www.opensolaris.org/os/licensing.
10 .\" See the License for the specific language governing permissions
11 .\" and limitations under the License.
12 .\"
13 .\" When distributing Covered Code, include this CDDL HEADER in each
14 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 .\" If applicable, add the following below this CDDL HEADER, with the
16 .\" fields enclosed by brackets "[]" replaced with your own identifying
17 .\" information: Portions Copyright [yyyy] [name of copyright owner]
18 .\"
19 .\" CDDL HEADER END
20 .\"
21 .\"
22 .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
23 .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
24 .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
25 .\" Copyright (c) 2011, Pawel Jakub Dawidek <pjd@FreeBSD.org>
26 .\" Copyright (c) 2012, Glen Barber <gjb@FreeBSD.org>
27 .\" Copyright (c) 2012, Bryan Drewery <bdrewery@FreeBSD.org>
28 .\" Copyright (c) 2013, Steven Hartland <smh@FreeBSD.org>
29 .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
30 .\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
31 .\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
32 .\" Copyright (c) 2014 Integros [integros.com]
33 .\" Copyright (c) 2016 Nexenta Systems, Inc. All Rights Reserved.
34 .\" Copyright (c) 2014, Xin LI <delphij@FreeBSD.org>
35 .\" Copyright (c) 2014-2015, The FreeBSD Foundation, All Rights Reserved.
36 .\" Copyright 2019 Richard Laager. All rights reserved.
37 .\" Copyright 2018 Nexenta Systems, Inc.
38 .\" Copyright 2019 Joyent, Inc.
39 .\"
40 .Dd January 30, 2020
41 .Dt ZFSPROPS 8
42 .Os Linux
43 .Sh NAME
44 .Nm zfsprops
45 .Nd Native properties and user-defined of ZFS datasets.
46 .Sh DESCRIPTION
47 Properties are divided into two types, native properties and user-defined
48 .Po or
49 .Qq user
50 .Pc
51 properties.
52 Native properties either export internal statistics or control ZFS behavior.
53 In addition, native properties are either editable or read-only.
54 User properties have no effect on ZFS behavior, but you can use them to annotate
55 datasets in a way that is meaningful in your environment.
56 For more information about user properties, see the
57 .Sx User Properties
58 section, below.
59 .Ss Native Properties
60 Every dataset has a set of properties that export statistics about the dataset
61 as well as control various behaviors.
62 Properties are inherited from the parent unless overridden by the child.
63 Some properties apply only to certain types of datasets
64 .Pq file systems, volumes, or snapshots .
65 .Pp
66 The values of numeric properties can be specified using human-readable suffixes
67 .Po for example,
68 .Sy k ,
69 .Sy KB ,
70 .Sy M ,
71 .Sy Gb ,
72 and so forth, up to
73 .Sy Z
74 for zettabyte
75 .Pc .
76 The following are all valid
77 .Pq and equal
78 specifications:
79 .Li 1536M, 1.5g, 1.50GB .
80 .Pp
81 The values of non-numeric properties are case sensitive and must be lowercase,
82 except for
83 .Sy mountpoint ,
84 .Sy sharenfs ,
85 and
86 .Sy sharesmb .
87 .Pp
88 The following native properties consist of read-only statistics about the
89 dataset.
90 These properties can be neither set, nor inherited.
91 Native properties apply to all dataset types unless otherwise noted.
92 .Bl -tag -width "usedbyrefreservation"
93 .It Sy available
94 The amount of space available to the dataset and all its children, assuming that
95 there is no other activity in the pool.
96 Because space is shared within a pool, availability can be limited by any number
97 of factors, including physical pool size, quotas, reservations, or other
98 datasets within the pool.
99 .Pp
100 This property can also be referred to by its shortened column name,
101 .Sy avail .
102 .It Sy compressratio
103 For non-snapshots, the compression ratio achieved for the
104 .Sy used
105 space of this dataset, expressed as a multiplier.
106 The
107 .Sy used
108 property includes descendant datasets, and, for clones, does not include the
109 space shared with the origin snapshot.
110 For snapshots, the
111 .Sy compressratio
112 is the same as the
113 .Sy refcompressratio
114 property.
115 Compression can be turned on by running:
116 .Nm zfs Cm set Sy compression Ns = Ns Sy on Ar dataset .
117 The default value is
118 .Sy off .
119 .It Sy createtxg
120 The transaction group (txg) in which the dataset was created. Bookmarks have
121 the same
122 .Sy createtxg
123 as the snapshot they are initially tied to. This property is suitable for
124 ordering a list of snapshots, e.g. for incremental send and receive.
125 .It Sy creation
126 The time this dataset was created.
127 .It Sy clones
128 For snapshots, this property is a comma-separated list of filesystems or volumes
129 which are clones of this snapshot.
130 The clones'
131 .Sy origin
132 property is this snapshot.
133 If the
134 .Sy clones
135 property is not empty, then this snapshot can not be destroyed
136 .Po even with the
137 .Fl r
138 or
139 .Fl f
140 options
141 .Pc .
142 The roles of origin and clone can be swapped by promoting the clone with the
143 .Nm zfs Cm promote
144 command.
145 .It Sy defer_destroy
146 This property is
147 .Sy on
148 if the snapshot has been marked for deferred destroy by using the
149 .Nm zfs Cm destroy Fl d
150 command.
151 Otherwise, the property is
152 .Sy off .
153 .It Sy encryptionroot
154 For encrypted datasets, indicates where the dataset is currently inheriting its
155 encryption key from. Loading or unloading a key for the
156 .Sy encryptionroot
157 will implicitly load / unload the key for any inheriting datasets (see
158 .Nm zfs Cm load-key
159 and
160 .Nm zfs Cm unload-key
161 for details).
162 Clones will always share an
163 encryption key with their origin. See the
164 .Em Encryption
165 section of
166 .Xr zfs-load-key 8
167 for details.
168 .It Sy filesystem_count
169 The total number of filesystems and volumes that exist under this location in
170 the dataset tree.
171 This value is only available when a
172 .Sy filesystem_limit
173 has been set somewhere in the tree under which the dataset resides.
174 .It Sy keystatus
175 Indicates if an encryption key is currently loaded into ZFS. The possible
176 values are
177 .Sy none ,
178 .Sy available ,
179 and
180 .Sy unavailable .
181 See
182 .Nm zfs Cm load-key
183 and
184 .Nm zfs Cm unload-key .
185 .It Sy guid
186 The 64 bit GUID of this dataset or bookmark which does not change over its
187 entire lifetime. When a snapshot is sent to another pool, the received
188 snapshot has the same GUID. Thus, the
189 .Sy guid
190 is suitable to identify a snapshot across pools.
191 .It Sy logicalreferenced
192 The amount of space that is
193 .Qq logically
194 accessible by this dataset.
195 See the
196 .Sy referenced
197 property.
198 The logical space ignores the effect of the
199 .Sy compression
200 and
201 .Sy copies
202 properties, giving a quantity closer to the amount of data that applications
203 see.
204 However, it does include space consumed by metadata.
205 .Pp
206 This property can also be referred to by its shortened column name,
207 .Sy lrefer .
208 .It Sy logicalused
209 The amount of space that is
210 .Qq logically
211 consumed by this dataset and all its descendents.
212 See the
213 .Sy used
214 property.
215 The logical space ignores the effect of the
216 .Sy compression
217 and
218 .Sy copies
219 properties, giving a quantity closer to the amount of data that applications
220 see.
221 However, it does include space consumed by metadata.
222 .Pp
223 This property can also be referred to by its shortened column name,
224 .Sy lused .
225 .It Sy mounted
226 For file systems, indicates whether the file system is currently mounted.
227 This property can be either
228 .Sy yes
229 or
230 .Sy no .
231 .It Sy objsetid
232 A unique identifier for this dataset within the pool. Unlike the dataset's
233 .Sy guid
234 , the
235 .Sy objsetid
236 of a dataset is not transferred to other pools when the snapshot is copied
237 with a send/receive operation.
238 The
239 .Sy objsetid
240 can be reused (for a new dataset) after the dataset is deleted.
241 .It Sy origin
242 For cloned file systems or volumes, the snapshot from which the clone was
243 created.
244 See also the
245 .Sy clones
246 property.
247 .It Sy receive_resume_token
248 For filesystems or volumes which have saved partially-completed state from
249 .Sy zfs receive -s ,
250 this opaque token can be provided to
251 .Sy zfs send -t
252 to resume and complete the
253 .Sy zfs receive .
254 .It Sy redact_snaps
255 For bookmarks, this is the list of snapshot guids the bookmark contains a redaction
256 list for.
257 For snapshots, this is the list of snapshot guids the snapshot is redacted with
258 respect to.
259 .It Sy referenced
260 The amount of data that is accessible by this dataset, which may or may not be
261 shared with other datasets in the pool.
262 When a snapshot or clone is created, it initially references the same amount of
263 space as the file system or snapshot it was created from, since its contents are
264 identical.
265 .Pp
266 This property can also be referred to by its shortened column name,
267 .Sy refer .
268 .It Sy refcompressratio
269 The compression ratio achieved for the
270 .Sy referenced
271 space of this dataset, expressed as a multiplier.
272 See also the
273 .Sy compressratio
274 property.
275 .It Sy snapshot_count
276 The total number of snapshots that exist under this location in the dataset
277 tree.
278 This value is only available when a
279 .Sy snapshot_limit
280 has been set somewhere in the tree under which the dataset resides.
281 .It Sy type
282 The type of dataset:
283 .Sy filesystem ,
284 .Sy volume ,
285 or
286 .Sy snapshot .
287 .It Sy used
288 The amount of space consumed by this dataset and all its descendents.
289 This is the value that is checked against this dataset's quota and reservation.
290 The space used does not include this dataset's reservation, but does take into
291 account the reservations of any descendent datasets.
292 The amount of space that a dataset consumes from its parent, as well as the
293 amount of space that is freed if this dataset is recursively destroyed, is the
294 greater of its space used and its reservation.
295 .Pp
296 The used space of a snapshot
297 .Po see the
298 .Em Snapshots
299 section of
300 .Xr zfsconcepts 8
301 .Pc
302 is space that is referenced exclusively by this snapshot.
303 If this snapshot is destroyed, the amount of
304 .Sy used
305 space will be freed.
306 Space that is shared by multiple snapshots isn't accounted for in this metric.
307 When a snapshot is destroyed, space that was previously shared with this
308 snapshot can become unique to snapshots adjacent to it, thus changing the used
309 space of those snapshots.
310 The used space of the latest snapshot can also be affected by changes in the
311 file system.
312 Note that the
313 .Sy used
314 space of a snapshot is a subset of the
315 .Sy written
316 space of the snapshot.
317 .Pp
318 The amount of space used, available, or referenced does not take into account
319 pending changes.
320 Pending changes are generally accounted for within a few seconds.
321 Committing a change to a disk using
322 .Xr fsync 2
323 or
324 .Dv O_SYNC
325 does not necessarily guarantee that the space usage information is updated
326 immediately.
327 .It Sy usedby*
328 The
329 .Sy usedby*
330 properties decompose the
331 .Sy used
332 properties into the various reasons that space is used.
333 Specifically,
334 .Sy used No =
335 .Sy usedbychildren No +
336 .Sy usedbydataset No +
337 .Sy usedbyrefreservation No +
338 .Sy usedbysnapshots .
339 These properties are only available for datasets created on
340 .Nm zpool
341 .Qo version 13 Qc
342 pools.
343 .It Sy usedbychildren
344 The amount of space used by children of this dataset, which would be freed if
345 all the dataset's children were destroyed.
346 .It Sy usedbydataset
347 The amount of space used by this dataset itself, which would be freed if the
348 dataset were destroyed
349 .Po after first removing any
350 .Sy refreservation
351 and destroying any necessary snapshots or descendents
352 .Pc .
353 .It Sy usedbyrefreservation
354 The amount of space used by a
355 .Sy refreservation
356 set on this dataset, which would be freed if the
357 .Sy refreservation
358 was removed.
359 .It Sy usedbysnapshots
360 The amount of space consumed by snapshots of this dataset.
361 In particular, it is the amount of space that would be freed if all of this
362 dataset's snapshots were destroyed.
363 Note that this is not simply the sum of the snapshots'
364 .Sy used
365 properties because space can be shared by multiple snapshots.
366 .It Sy userused Ns @ Ns Em user
367 The amount of space consumed by the specified user in this dataset.
368 Space is charged to the owner of each file, as displayed by
369 .Nm ls Fl l .
370 The amount of space charged is displayed by
371 .Nm du
372 and
373 .Nm ls Fl s .
374 See the
375 .Nm zfs Cm userspace
376 subcommand for more information.
377 .Pp
378 Unprivileged users can access only their own space usage.
379 The root user, or a user who has been granted the
380 .Sy userused
381 privilege with
382 .Nm zfs Cm allow ,
383 can access everyone's usage.
384 .Pp
385 The
386 .Sy userused Ns @ Ns Em ...
387 properties are not displayed by
388 .Nm zfs Cm get Sy all .
389 The user's name must be appended after the @ symbol, using one of the following
390 forms:
391 .Bl -bullet -width ""
392 .It
393 .Em POSIX name
394 .Po for example,
395 .Sy joe
396 .Pc
397 .It
398 .Em POSIX numeric ID
399 .Po for example,
400 .Sy 789
401 .Pc
402 .It
403 .Em SID name
404 .Po for example,
405 .Sy joe.smith@mydomain
406 .Pc
407 .It
408 .Em SID numeric ID
409 .Po for example,
410 .Sy S-1-123-456-789
411 .Pc
412 .El
413 .Pp
414 Files created on Linux always have POSIX owners.
415 .It Sy userobjused Ns @ Ns Em user
416 The
417 .Sy userobjused
418 property is similar to
419 .Sy userused
420 but instead it counts the number of objects consumed by a user. This property
421 counts all objects allocated on behalf of the user, it may differ from the
422 results of system tools such as
423 .Nm df Fl i .
424 .Pp
425 When the property
426 .Sy xattr=on
427 is set on a file system additional objects will be created per-file to store
428 extended attributes. These additional objects are reflected in the
429 .Sy userobjused
430 value and are counted against the user's
431 .Sy userobjquota .
432 When a file system is configured to use
433 .Sy xattr=sa
434 no additional internal objects are normally required.
435 .It Sy userrefs
436 This property is set to the number of user holds on this snapshot.
437 User holds are set by using the
438 .Nm zfs Cm hold
439 command.
440 .It Sy groupused Ns @ Ns Em group
441 The amount of space consumed by the specified group in this dataset.
442 Space is charged to the group of each file, as displayed by
443 .Nm ls Fl l .
444 See the
445 .Sy userused Ns @ Ns Em user
446 property for more information.
447 .Pp
448 Unprivileged users can only access their own groups' space usage.
449 The root user, or a user who has been granted the
450 .Sy groupused
451 privilege with
452 .Nm zfs Cm allow ,
453 can access all groups' usage.
454 .It Sy groupobjused Ns @ Ns Em group
455 The number of objects consumed by the specified group in this dataset.
456 Multiple objects may be charged to the group for each file when extended
457 attributes are in use. See the
458 .Sy userobjused Ns @ Ns Em user
459 property for more information.
460 .Pp
461 Unprivileged users can only access their own groups' space usage.
462 The root user, or a user who has been granted the
463 .Sy groupobjused
464 privilege with
465 .Nm zfs Cm allow ,
466 can access all groups' usage.
467 .It Sy projectused Ns @ Ns Em project
468 The amount of space consumed by the specified project in this dataset. Project
469 is identified via the project identifier (ID) that is object-based numeral
470 attribute. An object can inherit the project ID from its parent object (if the
471 parent has the flag of inherit project ID that can be set and changed via
472 .Nm chattr Fl /+P
473 or
474 .Nm zfs project Fl s )
475 when being created. The privileged user can set and change object's project
476 ID via
477 .Nm chattr Fl p
478 or
479 .Nm zfs project Fl s
480 anytime. Space is charged to the project of each file, as displayed by
481 .Nm lsattr Fl p
482 or
483 .Nm zfs project .
484 See the
485 .Sy userused Ns @ Ns Em user
486 property for more information.
487 .Pp
488 The root user, or a user who has been granted the
489 .Sy projectused
490 privilege with
491 .Nm zfs allow ,
492 can access all projects' usage.
493 .It Sy projectobjused Ns @ Ns Em project
494 The
495 .Sy projectobjused
496 is similar to
497 .Sy projectused
498 but instead it counts the number of objects consumed by project. When the
499 property
500 .Sy xattr=on
501 is set on a fileset, ZFS will create additional objects per-file to store
502 extended attributes. These additional objects are reflected in the
503 .Sy projectobjused
504 value and are counted against the project's
505 .Sy projectobjquota .
506 When a filesystem is configured to use
507 .Sy xattr=sa
508 no additional internal objects are required. See the
509 .Sy userobjused Ns @ Ns Em user
510 property for more information.
511 .Pp
512 The root user, or a user who has been granted the
513 .Sy projectobjused
514 privilege with
515 .Nm zfs allow ,
516 can access all projects' objects usage.
517 .It Sy volblocksize
518 For volumes, specifies the block size of the volume.
519 The
520 .Sy blocksize
521 cannot be changed once the volume has been written, so it should be set at
522 volume creation time.
523 The default
524 .Sy blocksize
525 for volumes is 8 Kbytes.
526 Any power of 2 from 512 bytes to 128 Kbytes is valid.
527 .Pp
528 This property can also be referred to by its shortened column name,
529 .Sy volblock .
530 .It Sy written
531 The amount of space
532 .Sy referenced
533 by this dataset, that was written since the previous snapshot
534 .Pq i.e. that is not referenced by the previous snapshot .
535 .It Sy written Ns @ Ns Em snapshot
536 The amount of
537 .Sy referenced
538 space written to this dataset since the specified snapshot.
539 This is the space that is referenced by this dataset but was not referenced by
540 the specified snapshot.
541 .Pp
542 The
543 .Em snapshot
544 may be specified as a short snapshot name
545 .Po just the part after the
546 .Sy @
547 .Pc ,
548 in which case it will be interpreted as a snapshot in the same filesystem as
549 this dataset.
550 The
551 .Em snapshot
552 may be a full snapshot name
553 .Po Em filesystem Ns @ Ns Em snapshot Pc ,
554 which for clones may be a snapshot in the origin's filesystem
555 .Pq or the origin of the origin's filesystem, etc.
556 .El
557 .Pp
558 The following native properties can be used to change the behavior of a ZFS
559 dataset.
560 .Bl -tag -width ""
561 .It Xo
562 .Sy aclinherit Ns = Ns Sy discard Ns | Ns Sy noallow Ns | Ns
563 .Sy restricted Ns | Ns Sy passthrough Ns | Ns Sy passthrough-x
564 .Xc
565 Controls how ACEs are inherited when files and directories are created.
566 .Bl -tag -width "passthrough-x"
567 .It Sy discard
568 does not inherit any ACEs.
569 .It Sy noallow
570 only inherits inheritable ACEs that specify
571 .Qq deny
572 permissions.
573 .It Sy restricted
574 default, removes the
575 .Sy write_acl
576 and
577 .Sy write_owner
578 permissions when the ACE is inherited.
579 .It Sy passthrough
580 inherits all inheritable ACEs without any modifications.
581 .It Sy passthrough-x
582 same meaning as
583 .Sy passthrough ,
584 except that the
585 .Sy owner@ ,
586 .Sy group@ ,
587 and
588 .Sy everyone@
589 ACEs inherit the execute permission only if the file creation mode also requests
590 the execute bit.
591 .El
592 .Pp
593 When the property value is set to
594 .Sy passthrough ,
595 files are created with a mode determined by the inheritable ACEs.
596 If no inheritable ACEs exist that affect the mode, then the mode is set in
597 accordance to the requested mode from the application.
598 .Pp
599 The
600 .Sy aclinherit
601 property does not apply to POSIX ACLs.
602 .It Xo
603 .Sy aclmode Ns = Ns Sy discard Ns | Ns Sy groupmask Ns | Ns
604 .Sy passthrough Ns | Ns Sy restricted Ns
605 .Xc
606 Controls how an ACL is modified during chmod(2) and how inherited ACEs
607 are modified by the file creation mode.
608 .Bl -tag -width "passthrough"
609 .It Sy discard
610 default, deletes all
611 .Sy ACEs
612 except for those representing
613 the mode of the file or directory requested by
614 .Xr chmod 2 .
615 .It Sy groupmask
616 reduces permissions granted in all
617 .Sy ALLOW
618 entries found in the
619 .Sy ACL
620 such that they are no greater than the group permissions specified by
621 .Xr chmod 2 .
622 .It Sy passthrough
623 indicates that no changes are made to the
624 .Tn ACL
625 other than creating or updating the necessary
626 .Tn ACL
627 entries to represent the new mode of the file or directory.
628 .It Sy restricted
629 will cause the
630 .Xr chmod 2
631 operation to return an error when used on any file or directory which has
632 a non-trivial
633 .Tn ACL
634 whose entries can not be represented by a mode.
635 .Xr chmod 2
636 is required to change the set user ID, set group ID, or sticky bits on a file
637 or directory, as they do not have equivalent
638 .Tn ACL
639 entries.
640 In order to use
641 .Xr chmod 2
642 on a file or directory with a non-trivial
643 .Tn ACL
644 when
645 .Sy aclmode
646 is set to
647 .Sy restricted ,
648 you must first remove all
649 .Tn ACL
650 entries which do not represent the current mode.
651 .El
652 .It Sy acltype Ns = Ns Sy off Ns | Ns Sy noacl Ns | Ns Sy posixacl
653 Controls whether ACLs are enabled and if so what type of ACL to use.
654 This property is not visible on FreeBSD yet.
655 .Bl -tag -width "posixacl"
656 .It Sy off
657 default, when a file system has the
658 .Sy acltype
659 property set to off then ACLs are disabled.
660 .It Sy noacl
661 an alias for
662 .Sy off
663 .It Sy posixacl
664 indicates POSIX ACLs should be used. POSIX ACLs are specific to Linux and are
665 not functional on other platforms. POSIX ACLs are stored as an extended
666 attribute and therefore will not overwrite any existing NFSv4 ACLs which
667 may be set.
668 .El
669 .Pp
670 To obtain the best performance when setting
671 .Sy posixacl
672 users are strongly encouraged to set the
673 .Sy xattr=sa
674 property. This will result in the POSIX ACL being stored more efficiently on
675 disk. But as a consequence, all new extended attributes will only be
676 accessible from OpenZFS implementations which support the
677 .Sy xattr=sa
678 property. See the
679 .Sy xattr
680 property for more details.
681 .It Sy atime Ns = Ns Sy on Ns | Ns Sy off
682 Controls whether the access time for files is updated when they are read.
683 Turning this property off avoids producing write traffic when reading files and
684 can result in significant performance gains, though it might confuse mailers
685 and other similar utilities. The values
686 .Sy on
687 and
688 .Sy off
689 are equivalent to the
690 .Sy atime
691 and
692 .Sy noatime
693 mount options. The default value is
694 .Sy on .
695 See also
696 .Sy relatime
697 below.
698 .It Sy canmount Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy noauto
699 If this property is set to
700 .Sy off ,
701 the file system cannot be mounted, and is ignored by
702 .Nm zfs Cm mount Fl a .
703 Setting this property to
704 .Sy off
705 is similar to setting the
706 .Sy mountpoint
707 property to
708 .Sy none ,
709 except that the dataset still has a normal
710 .Sy mountpoint
711 property, which can be inherited.
712 Setting this property to
713 .Sy off
714 allows datasets to be used solely as a mechanism to inherit properties.
715 One example of setting
716 .Sy canmount Ns = Ns Sy off
717 is to have two datasets with the same
718 .Sy mountpoint ,
719 so that the children of both datasets appear in the same directory, but might
720 have different inherited characteristics.
721 .Pp
722 When set to
723 .Sy noauto ,
724 a dataset can only be mounted and unmounted explicitly.
725 The dataset is not mounted automatically when the dataset is created or
726 imported, nor is it mounted by the
727 .Nm zfs Cm mount Fl a
728 command or unmounted by the
729 .Nm zfs Cm unmount Fl a
730 command.
731 .Pp
732 This property is not inherited.
733 .It Xo
734 .Sy checksum Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy fletcher2 Ns | Ns
735 .Sy fletcher4 Ns | Ns Sy sha256 Ns | Ns Sy noparity Ns | Ns
736 .Sy sha512 Ns | Ns Sy skein Ns | Ns Sy edonr
737 .Xc
738 Controls the checksum used to verify data integrity.
739 The default value is
740 .Sy on ,
741 which automatically selects an appropriate algorithm
742 .Po currently,
743 .Sy fletcher4 ,
744 but this may change in future releases
745 .Pc .
746 The value
747 .Sy off
748 disables integrity checking on user data.
749 The value
750 .Sy noparity
751 not only disables integrity but also disables maintaining parity for user data.
752 This setting is used internally by a dump device residing on a RAID-Z pool and
753 should not be used by any other dataset.
754 Disabling checksums is
755 .Sy NOT
756 a recommended practice.
757 .Pp
758 The
759 .Sy sha512 ,
760 .Sy skein ,
761 and
762 .Sy edonr
763 checksum algorithms require enabling the appropriate features on the pool.
764 These pool features are not supported by GRUB and must not be used on the
765 pool if GRUB needs to access the pool (e.g. for /boot).
766 FreeBSD does not support the
767 .Sy edonr
768 algorithm.
769 .Pp
770 Please see
771 .Xr zpool-features 5
772 for more information on these algorithms.
773 .Pp
774 Changing this property affects only newly-written data.
775 .It Xo
776 .Sy compression Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy gzip Ns | Ns
777 .Sy gzip- Ns Em N Ns | Ns Sy lz4 Ns | Ns Sy lzjb Ns | Ns Sy zle
778 .Xc
779 Controls the compression algorithm used for this dataset.
780 .Pp
781 Setting compression to
782 .Sy on
783 indicates that the current default compression algorithm should be used.
784 The default balances compression and decompression speed, with compression ratio
785 and is expected to work well on a wide variety of workloads.
786 Unlike all other settings for this property,
787 .Sy on
788 does not select a fixed compression type.
789 As new compression algorithms are added to ZFS and enabled on a pool, the
790 default compression algorithm may change.
791 The current default compression algorithm is either
792 .Sy lzjb
793 or, if the
794 .Sy lz4_compress
795 feature is enabled,
796 .Sy lz4 .
797 .Pp
798 The
799 .Sy lz4
800 compression algorithm is a high-performance replacement for the
801 .Sy lzjb
802 algorithm.
803 It features significantly faster compression and decompression, as well as a
804 moderately higher compression ratio than
805 .Sy lzjb ,
806 but can only be used on pools with the
807 .Sy lz4_compress
808 feature set to
809 .Sy enabled .
810 See
811 .Xr zpool-features 5
812 for details on ZFS feature flags and the
813 .Sy lz4_compress
814 feature.
815 .Pp
816 The
817 .Sy lzjb
818 compression algorithm is optimized for performance while providing decent data
819 compression.
820 .Pp
821 The
822 .Sy gzip
823 compression algorithm uses the same compression as the
824 .Xr gzip 1
825 command.
826 You can specify the
827 .Sy gzip
828 level by using the value
829 .Sy gzip- Ns Em N ,
830 where
831 .Em N
832 is an integer from 1
833 .Pq fastest
834 to 9
835 .Pq best compression ratio .
836 Currently,
837 .Sy gzip
838 is equivalent to
839 .Sy gzip-6
840 .Po which is also the default for
841 .Xr gzip 1
842 .Pc .
843 .Pp
844 The
845 .Sy zle
846 compression algorithm compresses runs of zeros.
847 .Pp
848 This property can also be referred to by its shortened column name
849 .Sy compress .
850 Changing this property affects only newly-written data.
851 .Pp
852 When any setting except
853 .Sy off
854 is selected, compression will explicitly check for blocks consisting of only
855 zeroes (the NUL byte). When a zero-filled block is detected, it is stored as
856 a hole and not compressed using the indicated compression algorithm.
857 .Pp
858 Any block being compressed must be no larger than 7/8 of its original size
859 after compression, otherwise the compression will not be considered worthwhile
860 and the block saved uncompressed. Note that when the logical block is less than
861 8 times the disk sector size this effectively reduces the necessary compression
862 ratio; for example 8k blocks on disks with 4k disk sectors must compress to 1/2
863 or less of their original size.
864 .It Xo
865 .Sy context Ns = Ns Sy none Ns | Ns
866 .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level
867 .Xc
868 This flag sets the SELinux context for all files in the file system under
869 a mount point for that file system. See
870 .Xr selinux 8
871 for more information.
872 .It Xo
873 .Sy fscontext Ns = Ns Sy none Ns | Ns
874 .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level
875 .Xc
876 This flag sets the SELinux context for the file system file system being
877 mounted. See
878 .Xr selinux 8
879 for more information.
880 .It Xo
881 .Sy defcontext Ns = Ns Sy none Ns | Ns
882 .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level
883 .Xc
884 This flag sets the SELinux default context for unlabeled files. See
885 .Xr selinux 8
886 for more information.
887 .It Xo
888 .Sy rootcontext Ns = Ns Sy none Ns | Ns
889 .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level
890 .Xc
891 This flag sets the SELinux context for the root inode of the file system. See
892 .Xr selinux 8
893 for more information.
894 .It Sy copies Ns = Ns Sy 1 Ns | Ns Sy 2 Ns | Ns Sy 3
895 Controls the number of copies of data stored for this dataset.
896 These copies are in addition to any redundancy provided by the pool, for
897 example, mirroring or RAID-Z.
898 The copies are stored on different disks, if possible.
899 The space used by multiple copies is charged to the associated file and dataset,
900 changing the
901 .Sy used
902 property and counting against quotas and reservations.
903 .Pp
904 Changing this property only affects newly-written data.
905 Therefore, set this property at file system creation time by using the
906 .Fl o Sy copies Ns = Ns Ar N
907 option.
908 .Pp
909 Remember that ZFS will not import a pool with a missing top-level vdev. Do
910 .Sy NOT
911 create, for example a two-disk striped pool and set
912 .Sy copies=2
913 on some datasets thinking you have setup redundancy for them. When a disk
914 fails you will not be able to import the pool and will have lost all of your
915 data.
916 .Pp
917 Encrypted datasets may not have
918 .Sy copies Ns = Ns Em 3
919 since the implementation stores some encryption metadata where the third copy
920 would normally be.
921 .It Sy devices Ns = Ns Sy on Ns | Ns Sy off
922 Controls whether device nodes can be opened on this file system.
923 The default value is
924 .Sy on .
925 The values
926 .Sy on
927 and
928 .Sy off
929 are equivalent to the
930 .Sy dev
931 and
932 .Sy nodev
933 mount options.
934 .It Xo
935 .Sy dedup Ns = Ns Sy off Ns | Ns Sy on Ns | Ns Sy verify Ns | Ns
936 .Sy sha256[,verify] Ns | Ns Sy sha512[,verify] Ns | Ns Sy skein[,verify] Ns | Ns
937 .Sy edonr,verify
938 .Xc
939 Configures deduplication for a dataset. The default value is
940 .Sy off .
941 The default deduplication checksum is
942 .Sy sha256
943 (this may change in the future). When
944 .Sy dedup
945 is enabled, the checksum defined here overrides the
946 .Sy checksum
947 property. Setting the value to
948 .Sy verify
949 has the same effect as the setting
950 .Sy sha256,verify.
951 .Pp
952 If set to
953 .Sy verify ,
954 ZFS will do a byte-to-byte comparison in case of two blocks having the same
955 signature to make sure the block contents are identical. Specifying
956 .Sy verify
957 is mandatory for the
958 .Sy edonr
959 algorithm.
960 .Pp
961 Unless necessary, deduplication should NOT be enabled on a system. See the
962 .Em Deduplication
963 section of
964 .Xr zfsconcepts 8 .
965 .It Xo
966 .Sy dnodesize Ns = Ns Sy legacy Ns | Ns Sy auto Ns | Ns Sy 1k Ns | Ns
967 .Sy 2k Ns | Ns Sy 4k Ns | Ns Sy 8k Ns | Ns Sy 16k
968 .Xc
969 Specifies a compatibility mode or literal value for the size of dnodes in the
970 file system. The default value is
971 .Sy legacy .
972 Setting this property to a value other than
973 .Sy legacy
974 requires the large_dnode pool feature to be enabled.
975 .Pp
976 Consider setting
977 .Sy dnodesize
978 to
979 .Sy auto
980 if the dataset uses the
981 .Sy xattr=sa
982 property setting and the workload makes heavy use of extended attributes. This
983 may be applicable to SELinux-enabled systems, Lustre servers, and Samba
984 servers, for example. Literal values are supported for cases where the optimal
985 size is known in advance and for performance testing.
986 .Pp
987 Leave
988 .Sy dnodesize
989 set to
990 .Sy legacy
991 if you need to receive a send stream of this dataset on a pool that doesn't
992 enable the large_dnode feature, or if you need to import this pool on a system
993 that doesn't support the large_dnode feature.
994 .Pp
995 This property can also be referred to by its shortened column name,
996 .Sy dnsize .
997 .It Xo
998 .Sy encryption Ns = Ns Sy off Ns | Ns Sy on Ns | Ns Sy aes-128-ccm Ns | Ns
999 .Sy aes-192-ccm Ns | Ns Sy aes-256-ccm Ns | Ns Sy aes-128-gcm Ns | Ns
1000 .Sy aes-192-gcm Ns | Ns Sy aes-256-gcm
1001 .Xc
1002 Controls the encryption cipher suite (block cipher, key length, and mode) used
1003 for this dataset. Requires the
1004 .Sy encryption
1005 feature to be enabled on the pool.
1006 Requires a
1007 .Sy keyformat
1008 to be set at dataset creation time.
1009 .Pp
1010 Selecting
1011 .Sy encryption Ns = Ns Sy on
1012 when creating a dataset indicates that the default encryption suite will be
1013 selected, which is currently
1014 .Sy aes-256-gcm .
1015 In order to provide consistent data protection, encryption must be specified at
1016 dataset creation time and it cannot be changed afterwards.
1017 .Pp
1018 For more details and caveats about encryption see the
1019 .Sy Encryption
1020 section.
1021 .It Sy keyformat Ns = Ns Sy raw Ns | Ns Sy hex Ns | Ns Sy passphrase
1022 Controls what format the user's encryption key will be provided as. This
1023 property is only set when the dataset is encrypted.
1024 .Pp
1025 Raw keys and hex keys must be 32 bytes long (regardless of the chosen
1026 encryption suite) and must be randomly generated. A raw key can be generated
1027 with the following command:
1028 .Bd -literal
1029 # dd if=/dev/urandom of=/path/to/output/key bs=32 count=1
1030 .Ed
1031 .Pp
1032 Passphrases must be between 8 and 512 bytes long and will be processed through
1033 PBKDF2 before being used (see the
1034 .Sy pbkdf2iters
1035 property). Even though the
1036 encryption suite cannot be changed after dataset creation, the keyformat can be
1037 with
1038 .Nm zfs Cm change-key .
1039 .It Xo
1040 .Sy keylocation Ns = Ns Sy prompt Ns | Ns Sy file:// Ns Em </absolute/file/path>
1041 .Xc
1042 Controls where the user's encryption key will be loaded from by default for
1043 commands such as
1044 .Nm zfs Cm load-key
1045 and
1046 .Nm zfs Cm mount Cm -l .
1047 This property is only set for encrypted datasets which are encryption roots. If
1048 unspecified, the default is
1049 .Sy prompt.
1050 .Pp
1051 Even though the encryption suite cannot be changed after dataset creation, the
1052 keylocation can be with either
1053 .Nm zfs Cm set
1054 or
1055 .Nm zfs Cm change-key .
1056 If
1057 .Sy prompt
1058 is selected ZFS will ask for the key at the command prompt when it is required
1059 to access the encrypted data (see
1060 .Nm zfs Cm load-key
1061 for details). This setting will also allow the key to be passed in via STDIN,
1062 but users should be careful not to place keys which should be kept secret on
1063 the command line. If a file URI is selected, the key will be loaded from the
1064 specified absolute file path.
1065 .It Sy pbkdf2iters Ns = Ns Ar iterations
1066 Controls the number of PBKDF2 iterations that a
1067 .Sy passphrase
1068 encryption key should be run through when processing it into an encryption key.
1069 This property is only defined when encryption is enabled and a keyformat of
1070 .Sy passphrase
1071 is selected. The goal of PBKDF2 is to significantly increase the
1072 computational difficulty needed to brute force a user's passphrase. This is
1073 accomplished by forcing the attacker to run each passphrase through a
1074 computationally expensive hashing function many times before they arrive at the
1075 resulting key. A user who actually knows the passphrase will only have to pay
1076 this cost once. As CPUs become better at processing, this number should be
1077 raised to ensure that a brute force attack is still not possible. The current
1078 default is
1079 .Sy 350000
1080 and the minimum is
1081 .Sy 100000 .
1082 This property may be changed with
1083 .Nm zfs Cm change-key .
1084 .It Sy exec Ns = Ns Sy on Ns | Ns Sy off
1085 Controls whether processes can be executed from within this file system.
1086 The default value is
1087 .Sy on .
1088 The values
1089 .Sy on
1090 and
1091 .Sy off
1092 are equivalent to the
1093 .Sy exec
1094 and
1095 .Sy noexec
1096 mount options.
1097 .It Sy filesystem_limit Ns = Ns Em count Ns | Ns Sy none
1098 Limits the number of filesystems and volumes that can exist under this point in
1099 the dataset tree.
1100 The limit is not enforced if the user is allowed to change the limit.
1101 Setting a
1102 .Sy filesystem_limit
1103 to
1104 .Sy on
1105 a descendent of a filesystem that already has a
1106 .Sy filesystem_limit
1107 does not override the ancestor's
1108 .Sy filesystem_limit ,
1109 but rather imposes an additional limit.
1110 This feature must be enabled to be used
1111 .Po see
1112 .Xr zpool-features 5
1113 .Pc .
1114 .It Sy special_small_blocks Ns = Ns Em size
1115 This value represents the threshold block size for including small file
1116 blocks into the special allocation class. Blocks smaller than or equal to this
1117 value will be assigned to the special allocation class while greater blocks
1118 will be assigned to the regular class. Valid values are zero or a power of two
1119 from 512B up to 1M. The default size is 0 which means no small file blocks
1120 will be allocated in the special class.
1121 .Pp
1122 Before setting this property, a special class vdev must be added to the
1123 pool. See
1124 .Xr zpool 8
1125 for more details on the special allocation class.
1126 .It Sy mountpoint Ns = Ns Pa path Ns | Ns Sy none Ns | Ns Sy legacy
1127 Controls the mount point used for this file system.
1128 See the
1129 .Em Mount Points
1130 section of
1131 .Xr zfsconcepts 8
1132 for more information on how this property is used.
1133 .Pp
1134 When the
1135 .Sy mountpoint
1136 property is changed for a file system, the file system and any children that
1137 inherit the mount point are unmounted.
1138 If the new value is
1139 .Sy legacy ,
1140 then they remain unmounted.
1141 Otherwise, they are automatically remounted in the new location if the property
1142 was previously
1143 .Sy legacy
1144 or
1145 .Sy none ,
1146 or if they were mounted before the property was changed.
1147 In addition, any shared file systems are unshared and shared in the new
1148 location.
1149 .It Sy nbmand Ns = Ns Sy on Ns | Ns Sy off
1150 Controls whether the file system should be mounted with
1151 .Sy nbmand
1152 .Pq Non Blocking mandatory locks .
1153 This is used for SMB clients.
1154 Changes to this property only take effect when the file system is umounted and
1155 remounted.
1156 See
1157 .Xr mount 8
1158 for more information on
1159 .Sy nbmand
1160 mounts. This property is not used on Linux.
1161 .It Sy overlay Ns = Ns Sy on Ns | Ns Sy off
1162 Allow mounting on a busy directory or a directory which already contains
1163 files or directories.
1164 This is the default mount behavior for Linux and FreeBSD file systems.
1165 On these platforms the property is
1166 .Sy on
1167 by default.
1168 Set to
1169 .Sy off
1170 to disable overlay mounts for consistency with OpenZFS on other platforms.
1171 .It Sy primarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1172 Controls what is cached in the primary cache
1173 .Pq ARC .
1174 If this property is set to
1175 .Sy all ,
1176 then both user data and metadata is cached.
1177 If this property is set to
1178 .Sy none ,
1179 then neither user data nor metadata is cached.
1180 If this property is set to
1181 .Sy metadata ,
1182 then only metadata is cached.
1183 The default value is
1184 .Sy all .
1185 .It Sy quota Ns = Ns Em size Ns | Ns Sy none
1186 Limits the amount of space a dataset and its descendents can consume.
1187 This property enforces a hard limit on the amount of space used.
1188 This includes all space consumed by descendents, including file systems and
1189 snapshots.
1190 Setting a quota on a descendent of a dataset that already has a quota does not
1191 override the ancestor's quota, but rather imposes an additional limit.
1192 .Pp
1193 Quotas cannot be set on volumes, as the
1194 .Sy volsize
1195 property acts as an implicit quota.
1196 .It Sy snapshot_limit Ns = Ns Em count Ns | Ns Sy none
1197 Limits the number of snapshots that can be created on a dataset and its
1198 descendents.
1199 Setting a
1200 .Sy snapshot_limit
1201 on a descendent of a dataset that already has a
1202 .Sy snapshot_limit
1203 does not override the ancestor's
1204 .Sy snapshot_limit ,
1205 but rather imposes an additional limit.
1206 The limit is not enforced if the user is allowed to change the limit.
1207 For example, this means that recursive snapshots taken from the global zone are
1208 counted against each delegated dataset within a zone.
1209 This feature must be enabled to be used
1210 .Po see
1211 .Xr zpool-features 5
1212 .Pc .
1213 .It Sy userquota@ Ns Em user Ns = Ns Em size Ns | Ns Sy none
1214 Limits the amount of space consumed by the specified user.
1215 User space consumption is identified by the
1216 .Sy userspace@ Ns Em user
1217 property.
1218 .Pp
1219 Enforcement of user quotas may be delayed by several seconds.
1220 This delay means that a user might exceed their quota before the system notices
1221 that they are over quota and begins to refuse additional writes with the
1222 .Er EDQUOT
1223 error message.
1224 See the
1225 .Nm zfs Cm userspace
1226 subcommand for more information.
1227 .Pp
1228 Unprivileged users can only access their own groups' space usage.
1229 The root user, or a user who has been granted the
1230 .Sy userquota
1231 privilege with
1232 .Nm zfs Cm allow ,
1233 can get and set everyone's quota.
1234 .Pp
1235 This property is not available on volumes, on file systems before version 4, or
1236 on pools before version 15.
1237 The
1238 .Sy userquota@ Ns Em ...
1239 properties are not displayed by
1240 .Nm zfs Cm get Sy all .
1241 The user's name must be appended after the
1242 .Sy @
1243 symbol, using one of the following forms:
1244 .Bl -bullet
1245 .It
1246 .Em POSIX name
1247 .Po for example,
1248 .Sy joe
1249 .Pc
1250 .It
1251 .Em POSIX numeric ID
1252 .Po for example,
1253 .Sy 789
1254 .Pc
1255 .It
1256 .Em SID name
1257 .Po for example,
1258 .Sy joe.smith@mydomain
1259 .Pc
1260 .It
1261 .Em SID numeric ID
1262 .Po for example,
1263 .Sy S-1-123-456-789
1264 .Pc
1265 .El
1266 .Pp
1267 Files created on Linux always have POSIX owners.
1268 .It Sy userobjquota@ Ns Em user Ns = Ns Em size Ns | Ns Sy none
1269 The
1270 .Sy userobjquota
1271 is similar to
1272 .Sy userquota
1273 but it limits the number of objects a user can create. Please refer to
1274 .Sy userobjused
1275 for more information about how objects are counted.
1276 .It Sy groupquota@ Ns Em group Ns = Ns Em size Ns | Ns Sy none
1277 Limits the amount of space consumed by the specified group.
1278 Group space consumption is identified by the
1279 .Sy groupused@ Ns Em group
1280 property.
1281 .Pp
1282 Unprivileged users can access only their own groups' space usage.
1283 The root user, or a user who has been granted the
1284 .Sy groupquota
1285 privilege with
1286 .Nm zfs Cm allow ,
1287 can get and set all groups' quotas.
1288 .It Sy groupobjquota@ Ns Em group Ns = Ns Em size Ns | Ns Sy none
1289 The
1290 .Sy groupobjquota
1291 is similar to
1292 .Sy groupquota
1293 but it limits number of objects a group can consume. Please refer to
1294 .Sy userobjused
1295 for more information about how objects are counted.
1296 .It Sy projectquota@ Ns Em project Ns = Ns Em size Ns | Ns Sy none
1297 Limits the amount of space consumed by the specified project. Project
1298 space consumption is identified by the
1299 .Sy projectused@ Ns Em project
1300 property. Please refer to
1301 .Sy projectused
1302 for more information about how project is identified and set/changed.
1303 .Pp
1304 The root user, or a user who has been granted the
1305 .Sy projectquota
1306 privilege with
1307 .Nm zfs allow ,
1308 can access all projects' quota.
1309 .It Sy projectobjquota@ Ns Em project Ns = Ns Em size Ns | Ns Sy none
1310 The
1311 .Sy projectobjquota
1312 is similar to
1313 .Sy projectquota
1314 but it limits number of objects a project can consume. Please refer to
1315 .Sy userobjused
1316 for more information about how objects are counted.
1317 .It Sy readonly Ns = Ns Sy on Ns | Ns Sy off
1318 Controls whether this dataset can be modified.
1319 The default value is
1320 .Sy off .
1321 The values
1322 .Sy on
1323 and
1324 .Sy off
1325 are equivalent to the
1326 .Sy ro
1327 and
1328 .Sy rw
1329 mount options.
1330 .Pp
1331 This property can also be referred to by its shortened column name,
1332 .Sy rdonly .
1333 .It Sy recordsize Ns = Ns Em size
1334 Specifies a suggested block size for files in the file system.
1335 This property is designed solely for use with database workloads that access
1336 files in fixed-size records.
1337 ZFS automatically tunes block sizes according to internal algorithms optimized
1338 for typical access patterns.
1339 .Pp
1340 For databases that create very large files but access them in small random
1341 chunks, these algorithms may be suboptimal.
1342 Specifying a
1343 .Sy recordsize
1344 greater than or equal to the record size of the database can result in
1345 significant performance gains.
1346 Use of this property for general purpose file systems is strongly discouraged,
1347 and may adversely affect performance.
1348 .Pp
1349 The size specified must be a power of two greater than or equal to 512 and less
1350 than or equal to 128 Kbytes.
1351 If the
1352 .Sy large_blocks
1353 feature is enabled on the pool, the size may be up to 1 Mbyte.
1354 See
1355 .Xr zpool-features 5
1356 for details on ZFS feature flags.
1357 .Pp
1358 Changing the file system's
1359 .Sy recordsize
1360 affects only files created afterward; existing files are unaffected.
1361 .Pp
1362 This property can also be referred to by its shortened column name,
1363 .Sy recsize .
1364 .It Sy redundant_metadata Ns = Ns Sy all Ns | Ns Sy most
1365 Controls what types of metadata are stored redundantly.
1366 ZFS stores an extra copy of metadata, so that if a single block is corrupted,
1367 the amount of user data lost is limited.
1368 This extra copy is in addition to any redundancy provided at the pool level
1369 .Pq e.g. by mirroring or RAID-Z ,
1370 and is in addition to an extra copy specified by the
1371 .Sy copies
1372 property
1373 .Pq up to a total of 3 copies .
1374 For example if the pool is mirrored,
1375 .Sy copies Ns = Ns 2 ,
1376 and
1377 .Sy redundant_metadata Ns = Ns Sy most ,
1378 then ZFS stores 6 copies of most metadata, and 4 copies of data and some
1379 metadata.
1380 .Pp
1381 When set to
1382 .Sy all ,
1383 ZFS stores an extra copy of all metadata.
1384 If a single on-disk block is corrupt, at worst a single block of user data
1385 .Po which is
1386 .Sy recordsize
1387 bytes long
1388 .Pc
1389 can be lost.
1390 .Pp
1391 When set to
1392 .Sy most ,
1393 ZFS stores an extra copy of most types of metadata.
1394 This can improve performance of random writes, because less metadata must be
1395 written.
1396 In practice, at worst about 100 blocks
1397 .Po of
1398 .Sy recordsize
1399 bytes each
1400 .Pc
1401 of user data can be lost if a single on-disk block is corrupt.
1402 The exact behavior of which metadata blocks are stored redundantly may change in
1403 future releases.
1404 .Pp
1405 The default value is
1406 .Sy all .
1407 .It Sy refquota Ns = Ns Em size Ns | Ns Sy none
1408 Limits the amount of space a dataset can consume.
1409 This property enforces a hard limit on the amount of space used.
1410 This hard limit does not include space used by descendents, including file
1411 systems and snapshots.
1412 .It Sy refreservation Ns = Ns Em size Ns | Ns Sy none Ns | Ns Sy auto
1413 The minimum amount of space guaranteed to a dataset, not including its
1414 descendents.
1415 When the amount of space used is below this value, the dataset is treated as if
1416 it were taking up the amount of space specified by
1417 .Sy refreservation .
1418 The
1419 .Sy refreservation
1420 reservation is accounted for in the parent datasets' space used, and counts
1421 against the parent datasets' quotas and reservations.
1422 .Pp
1423 If
1424 .Sy refreservation
1425 is set, a snapshot is only allowed if there is enough free pool space outside of
1426 this reservation to accommodate the current number of
1427 .Qq referenced
1428 bytes in the dataset.
1429 .Pp
1430 If
1431 .Sy refreservation
1432 is set to
1433 .Sy auto ,
1434 a volume is thick provisioned
1435 .Po or
1436 .Qq not sparse
1437 .Pc .
1438 .Sy refreservation Ns = Ns Sy auto
1439 is only supported on volumes.
1440 See
1441 .Sy volsize
1442 in the
1443 .Sx Native Properties
1444 section for more information about sparse volumes.
1445 .Pp
1446 This property can also be referred to by its shortened column name,
1447 .Sy refreserv .
1448 .It Sy relatime Ns = Ns Sy on Ns | Ns Sy off
1449 Controls the manner in which the access time is updated when
1450 .Sy atime=on
1451 is set. Turning this property on causes the access time to be updated relative
1452 to the modify or change time. Access time is only updated if the previous
1453 access time was earlier than the current modify or change time or if the
1454 existing access time hasn't been updated within the past 24 hours. The default
1455 value is
1456 .Sy off .
1457 The values
1458 .Sy on
1459 and
1460 .Sy off
1461 are equivalent to the
1462 .Sy relatime
1463 and
1464 .Sy norelatime
1465 mount options.
1466 .It Sy reservation Ns = Ns Em size Ns | Ns Sy none
1467 The minimum amount of space guaranteed to a dataset and its descendants.
1468 When the amount of space used is below this value, the dataset is treated as if
1469 it were taking up the amount of space specified by its reservation.
1470 Reservations are accounted for in the parent datasets' space used, and count
1471 against the parent datasets' quotas and reservations.
1472 .Pp
1473 This property can also be referred to by its shortened column name,
1474 .Sy reserv .
1475 .It Sy secondarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1476 Controls what is cached in the secondary cache
1477 .Pq L2ARC .
1478 If this property is set to
1479 .Sy all ,
1480 then both user data and metadata is cached.
1481 If this property is set to
1482 .Sy none ,
1483 then neither user data nor metadata is cached.
1484 If this property is set to
1485 .Sy metadata ,
1486 then only metadata is cached.
1487 The default value is
1488 .Sy all .
1489 .It Sy setuid Ns = Ns Sy on Ns | Ns Sy off
1490 Controls whether the setuid bit is respected for the file system.
1491 The default value is
1492 .Sy on .
1493 The values
1494 .Sy on
1495 and
1496 .Sy off
1497 are equivalent to the
1498 .Sy suid
1499 and
1500 .Sy nosuid
1501 mount options.
1502 .It Sy sharesmb Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1503 Controls whether the file system is shared by using
1504 .Sy Samba USERSHARES
1505 and what options are to be used. Otherwise, the file system is automatically
1506 shared and unshared with the
1507 .Nm zfs Cm share
1508 and
1509 .Nm zfs Cm unshare
1510 commands. If the property is set to on, the
1511 .Xr net 8
1512 command is invoked to create a
1513 .Sy USERSHARE .
1514 .Pp
1515 Because SMB shares requires a resource name, a unique resource name is
1516 constructed from the dataset name. The constructed name is a copy of the
1517 dataset name except that the characters in the dataset name, which would be
1518 invalid in the resource name, are replaced with underscore (_) characters.
1519 Linux does not currently support additional options which might be available
1520 on Solaris.
1521 .Pp
1522 If the
1523 .Sy sharesmb
1524 property is set to
1525 .Sy off ,
1526 the file systems are unshared.
1527 .Pp
1528 The share is created with the ACL (Access Control List) "Everyone:F" ("F"
1529 stands for "full permissions", ie. read and write permissions) and no guest
1530 access (which means Samba must be able to authenticate a real user, system
1531 passwd/shadow, LDAP or smbpasswd based) by default. This means that any
1532 additional access control (disallow specific user specific access etc) must
1533 be done on the underlying file system.
1534 .It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1535 Controls whether the file system is shared via NFS, and what options are to be
1536 used.
1537 A file system with a
1538 .Sy sharenfs
1539 property of
1540 .Sy off
1541 is managed with the
1542 .Xr exportfs 8
1543 command and entries in the
1544 .Em /etc/exports
1545 file.
1546 Otherwise, the file system is automatically shared and unshared with the
1547 .Nm zfs Cm share
1548 and
1549 .Nm zfs Cm unshare
1550 commands.
1551 If the property is set to
1552 .Sy on ,
1553 the dataset is shared using the default options:
1554 .Pp
1555 .Em sec=sys,rw,crossmnt,no_subtree_check
1556 .Pp
1557 See
1558 .Xr exports 5
1559 for the meaning of the default options. Otherwise, the
1560 .Xr exportfs 8
1561 command is invoked with options equivalent to the contents of this property.
1562 .Pp
1563 When the
1564 .Sy sharenfs
1565 property is changed for a dataset, the dataset and any children inheriting the
1566 property are re-shared with the new options, only if the property was previously
1567 .Sy off ,
1568 or if they were shared before the property was changed.
1569 If the new property is
1570 .Sy off ,
1571 the file systems are unshared.
1572 .It Sy logbias Ns = Ns Sy latency Ns | Ns Sy throughput
1573 Provide a hint to ZFS about handling of synchronous requests in this dataset.
1574 If
1575 .Sy logbias
1576 is set to
1577 .Sy latency
1578 .Pq the default ,
1579 ZFS will use pool log devices
1580 .Pq if configured
1581 to handle the requests at low latency.
1582 If
1583 .Sy logbias
1584 is set to
1585 .Sy throughput ,
1586 ZFS will not use configured pool log devices.
1587 ZFS will instead optimize synchronous operations for global pool throughput and
1588 efficient use of resources.
1589 .It Sy snapdev Ns = Ns Sy hidden Ns | Ns Sy visible
1590 Controls whether the volume snapshot devices under
1591 .Em /dev/zvol/<pool>
1592 are hidden or visible. The default value is
1593 .Sy hidden .
1594 .It Sy snapdir Ns = Ns Sy hidden Ns | Ns Sy visible
1595 Controls whether the
1596 .Pa .zfs
1597 directory is hidden or visible in the root of the file system as discussed in
1598 the
1599 .Em Snapshots
1600 section of
1601 .Xr zfsconcepts 8 .
1602 The default value is
1603 .Sy hidden .
1604 .It Sy sync Ns = Ns Sy standard Ns | Ns Sy always Ns | Ns Sy disabled
1605 Controls the behavior of synchronous requests
1606 .Pq e.g. fsync, O_DSYNC .
1607 .Sy standard
1608 is the
1609 .Tn POSIX
1610 specified behavior of ensuring all synchronous requests are written to stable
1611 storage and all devices are flushed to ensure data is not cached by device
1612 controllers
1613 .Pq this is the default .
1614 .Sy always
1615 causes every file system transaction to be written and flushed before its
1616 system call returns.
1617 This has a large performance penalty.
1618 .Sy disabled
1619 disables synchronous requests.
1620 File system transactions are only committed to stable storage periodically.
1621 This option will give the highest performance.
1622 However, it is very dangerous as ZFS would be ignoring the synchronous
1623 transaction demands of applications such as databases or NFS.
1624 Administrators should only use this option when the risks are understood.
1625 .It Sy version Ns = Ns Em N Ns | Ns Sy current
1626 The on-disk version of this file system, which is independent of the pool
1627 version.
1628 This property can only be set to later supported versions.
1629 See the
1630 .Nm zfs Cm upgrade
1631 command.
1632 .It Sy volsize Ns = Ns Em size
1633 For volumes, specifies the logical size of the volume.
1634 By default, creating a volume establishes a reservation of equal size.
1635 For storage pools with a version number of 9 or higher, a
1636 .Sy refreservation
1637 is set instead.
1638 Any changes to
1639 .Sy volsize
1640 are reflected in an equivalent change to the reservation
1641 .Po or
1642 .Sy refreservation
1643 .Pc .
1644 The
1645 .Sy volsize
1646 can only be set to a multiple of
1647 .Sy volblocksize ,
1648 and cannot be zero.
1649 .Pp
1650 The reservation is kept equal to the volume's logical size to prevent unexpected
1651 behavior for consumers.
1652 Without the reservation, the volume could run out of space, resulting in
1653 undefined behavior or data corruption, depending on how the volume is used.
1654 These effects can also occur when the volume size is changed while it is in use
1655 .Pq particularly when shrinking the size .
1656 Extreme care should be used when adjusting the volume size.
1657 .Pp
1658 Though not recommended, a
1659 .Qq sparse volume
1660 .Po also known as
1661 .Qq thin provisioned
1662 .Pc
1663 can be created by specifying the
1664 .Fl s
1665 option to the
1666 .Nm zfs Cm create Fl V
1667 command, or by changing the value of the
1668 .Sy refreservation
1669 property
1670 .Po or
1671 .Sy reservation
1672 property on pool version 8 or earlier
1673 .Pc
1674 after the volume has been created.
1675 A
1676 .Qq sparse volume
1677 is a volume where the value of
1678 .Sy refreservation
1679 is less than the size of the volume plus the space required to store its
1680 metadata.
1681 Consequently, writes to a sparse volume can fail with
1682 .Er ENOSPC
1683 when the pool is low on space.
1684 For a sparse volume, changes to
1685 .Sy volsize
1686 are not reflected in the
1687 .Sy refreservation.
1688 A volume that is not sparse is said to be
1689 .Qq thick provisioned .
1690 A sparse volume can become thick provisioned by setting
1691 .Sy refreservation
1692 to
1693 .Sy auto .
1694 .It Sy volmode Ns = Ns Cm default | full | geom | dev | none
1695 This property specifies how volumes should be exposed to the OS.
1696 Setting it to
1697 .Sy full
1698 exposes volumes as fully fledged block devices, providing maximal
1699 functionality. The value
1700 .Sy geom
1701 is just an alias for
1702 .Sy full
1703 and is kept for compatibility.
1704 Setting it to
1705 .Sy dev
1706 hides its partitions.
1707 Volumes with property set to
1708 .Sy none
1709 are not exposed outside ZFS, but can be snapshotted, cloned, replicated, etc,
1710 that can be suitable for backup purposes.
1711 Value
1712 .Sy default
1713 means that volumes exposition is controlled by system-wide tunable
1714 .Va zvol_volmode ,
1715 where
1716 .Sy full ,
1717 .Sy dev
1718 and
1719 .Sy none
1720 are encoded as 1, 2 and 3 respectively.
1721 The default values is
1722 .Sy full .
1723 .It Sy vscan Ns = Ns Sy on Ns | Ns Sy off
1724 Controls whether regular files should be scanned for viruses when a file is
1725 opened and closed.
1726 In addition to enabling this property, the virus scan service must also be
1727 enabled for virus scanning to occur.
1728 The default value is
1729 .Sy off .
1730 This property is not used on Linux.
1731 .It Sy xattr Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy sa
1732 Controls whether extended attributes are enabled for this file system. Two
1733 styles of extended attributes are supported either directory based or system
1734 attribute based.
1735 .Pp
1736 The default value of
1737 .Sy on
1738 enables directory based extended attributes. This style of extended attribute
1739 imposes no practical limit on either the size or number of attributes which
1740 can be set on a file. Although under Linux the
1741 .Xr getxattr 2
1742 and
1743 .Xr setxattr 2
1744 system calls limit the maximum size to 64K. This is the most compatible
1745 style of extended attribute and is supported by all OpenZFS implementations.
1746 .Pp
1747 System attribute based xattrs can be enabled by setting the value to
1748 .Sy sa .
1749 The key advantage of this type of xattr is improved performance. Storing
1750 extended attributes as system attributes significantly decreases the amount of
1751 disk IO required. Up to 64K of data may be stored per-file in the space
1752 reserved for system attributes. If there is not enough space available for
1753 an extended attribute then it will be automatically written as a directory
1754 based xattr. System attribute based extended attributes are not accessible
1755 on platforms which do not support the
1756 .Sy xattr=sa
1757 feature.
1758 .Pp
1759 The use of system attribute based xattrs is strongly encouraged for users of
1760 SELinux or POSIX ACLs. Both of these features heavily rely of extended
1761 attributes and benefit significantly from the reduced access time.
1762 .Pp
1763 The values
1764 .Sy on
1765 and
1766 .Sy off
1767 are equivalent to the
1768 .Sy xattr
1769 and
1770 .Sy noxattr
1771 mount options.
1772 .It Sy jailed Ns = Ns Cm off | on
1773 Controls whether the dataset is managed from a jail. See the
1774 .Qq Sx Jails
1775 section in
1776 .Xr zfs 8
1777 for more information. Jails are a FreeBSD feature and are not relevant on
1778 other platforms. The default value is
1779 .Cm off .
1780 .It Sy zoned Ns = Ns Sy on Ns | Ns Sy off
1781 Controls whether the dataset is managed from a non-global zone. Zones are a
1782 Solaris feature and are not relevant on other platforms. The default value is
1783 .Sy off .
1784 .El
1785 .Pp
1786 The following three properties cannot be changed after the file system is
1787 created, and therefore, should be set when the file system is created.
1788 If the properties are not set with the
1789 .Nm zfs Cm create
1790 or
1791 .Nm zpool Cm create
1792 commands, these properties are inherited from the parent dataset.
1793 If the parent dataset lacks these properties due to having been created prior to
1794 these features being supported, the new file system will have the default values
1795 for these properties.
1796 .Bl -tag -width ""
1797 .It Xo
1798 .Sy casesensitivity Ns = Ns Sy sensitive Ns | Ns
1799 .Sy insensitive Ns | Ns Sy mixed
1800 .Xc
1801 Indicates whether the file name matching algorithm used by the file system
1802 should be case-sensitive, case-insensitive, or allow a combination of both
1803 styles of matching.
1804 The default value for the
1805 .Sy casesensitivity
1806 property is
1807 .Sy sensitive .
1808 Traditionally,
1809 .Ux
1810 and
1811 .Tn POSIX
1812 file systems have case-sensitive file names.
1813 .Pp
1814 The
1815 .Sy mixed
1816 value for the
1817 .Sy casesensitivity
1818 property indicates that the file system can support requests for both
1819 case-sensitive and case-insensitive matching behavior.
1820 Currently, case-insensitive matching behavior on a file system that supports
1821 mixed behavior is limited to the SMB server product.
1822 For more information about the
1823 .Sy mixed
1824 value behavior, see the "ZFS Administration Guide".
1825 .It Xo
1826 .Sy normalization Ns = Ns Sy none Ns | Ns Sy formC Ns | Ns
1827 .Sy formD Ns | Ns Sy formKC Ns | Ns Sy formKD
1828 .Xc
1829 Indicates whether the file system should perform a
1830 .Sy unicode
1831 normalization of file names whenever two file names are compared, and which
1832 normalization algorithm should be used.
1833 File names are always stored unmodified, names are normalized as part of any
1834 comparison process.
1835 If this property is set to a legal value other than
1836 .Sy none ,
1837 and the
1838 .Sy utf8only
1839 property was left unspecified, the
1840 .Sy utf8only
1841 property is automatically set to
1842 .Sy on .
1843 The default value of the
1844 .Sy normalization
1845 property is
1846 .Sy none .
1847 This property cannot be changed after the file system is created.
1848 .It Sy utf8only Ns = Ns Sy on Ns | Ns Sy off
1849 Indicates whether the file system should reject file names that include
1850 characters that are not present in the
1851 .Sy UTF-8
1852 character code set.
1853 If this property is explicitly set to
1854 .Sy off ,
1855 the normalization property must either not be explicitly set or be set to
1856 .Sy none .
1857 The default value for the
1858 .Sy utf8only
1859 property is
1860 .Sy off .
1861 This property cannot be changed after the file system is created.
1862 .El
1863 .Pp
1864 The
1865 .Sy casesensitivity ,
1866 .Sy normalization ,
1867 and
1868 .Sy utf8only
1869 properties are also new permissions that can be assigned to non-privileged users
1870 by using the ZFS delegated administration feature.
1871 .Ss "Temporary Mount Point Properties"
1872 When a file system is mounted, either through
1873 .Xr mount 8
1874 for legacy mounts or the
1875 .Nm zfs Cm mount
1876 command for normal file systems, its mount options are set according to its
1877 properties.
1878 The correlation between properties and mount options is as follows:
1879 .Bd -literal
1880 PROPERTY MOUNT OPTION
1881 atime atime/noatime
1882 canmount auto/noauto
1883 devices dev/nodev
1884 exec exec/noexec
1885 readonly ro/rw
1886 relatime relatime/norelatime
1887 setuid suid/nosuid
1888 xattr xattr/noxattr
1889 .Ed
1890 .Pp
1891 In addition, these options can be set on a per-mount basis using the
1892 .Fl o
1893 option, without affecting the property that is stored on disk.
1894 The values specified on the command line override the values stored in the
1895 dataset.
1896 The
1897 .Sy nosuid
1898 option is an alias for
1899 .Sy nodevices Ns \&, Ns Sy nosetuid .
1900 These properties are reported as
1901 .Qq temporary
1902 by the
1903 .Nm zfs Cm get
1904 command.
1905 If the properties are changed while the dataset is mounted, the new setting
1906 overrides any temporary settings.
1907 .Ss "User Properties"
1908 In addition to the standard native properties, ZFS supports arbitrary user
1909 properties.
1910 User properties have no effect on ZFS behavior, but applications or
1911 administrators can use them to annotate datasets
1912 .Pq file systems, volumes, and snapshots .
1913 .Pp
1914 User property names must contain a colon
1915 .Pq Qq Sy \&:
1916 character to distinguish them from native properties.
1917 They may contain lowercase letters, numbers, and the following punctuation
1918 characters: colon
1919 .Pq Qq Sy \&: ,
1920 dash
1921 .Pq Qq Sy - ,
1922 period
1923 .Pq Qq Sy \&. ,
1924 and underscore
1925 .Pq Qq Sy _ .
1926 The expected convention is that the property name is divided into two portions
1927 such as
1928 .Em module Ns \&: Ns Em property ,
1929 but this namespace is not enforced by ZFS.
1930 User property names can be at most 256 characters, and cannot begin with a dash
1931 .Pq Qq Sy - .
1932 .Pp
1933 When making programmatic use of user properties, it is strongly suggested to use
1934 a reversed
1935 .Sy DNS
1936 domain name for the
1937 .Em module
1938 component of property names to reduce the chance that two
1939 independently-developed packages use the same property name for different
1940 purposes.
1941 .Pp
1942 The values of user properties are arbitrary strings, are always inherited, and
1943 are never validated.
1944 All of the commands that operate on properties
1945 .Po Nm zfs Cm list ,
1946 .Nm zfs Cm get ,
1947 .Nm zfs Cm set ,
1948 and so forth
1949 .Pc
1950 can be used to manipulate both native properties and user properties.
1951 Use the
1952 .Nm zfs Cm inherit
1953 command to clear a user property.
1954 If the property is not defined in any parent dataset, it is removed entirely.
1955 Property values are limited to 8192 bytes.