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