]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/contrib/openzfs/man/man8/zfsprops.8
MFV 2.0-rc2
[FreeBSD/FreeBSD.git] / sys / contrib / openzfs / 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 posix
655 Controls whether ACLs are enabled and if so what type of ACL to use.
656 This property is not visible on FreeBSD yet.
657 .Bl -tag -width "posixacl"
658 .It Sy off
659 default, when a file system has the
660 .Sy acltype
661 property set to off then ACLs are disabled.
662 .It Sy noacl
663 an alias for
664 .Sy off
665 .It Sy posix
666 indicates POSIX ACLs should be used. POSIX ACLs are specific to Linux and are
667 not functional on other platforms. POSIX ACLs are stored as an extended
668 attribute and therefore will not overwrite any existing NFSv4 ACLs which
669 may be set.
670 .It Sy posixacl
671 an alias for
672 .Sy posix
673 .El
674 .Pp
675 To obtain the best performance when setting
676 .Sy posix
677 users are strongly encouraged to set the
678 .Sy xattr=sa
679 property. This will result in the POSIX ACL being stored more efficiently on
680 disk. But as a consequence, all new extended attributes will only be
681 accessible from OpenZFS implementations which support the
682 .Sy xattr=sa
683 property. See the
684 .Sy xattr
685 property for more details.
686 .It Sy atime Ns = Ns Sy on Ns | Ns Sy off
687 Controls whether the access time for files is updated when they are read.
688 Turning this property off avoids producing write traffic when reading files and
689 can result in significant performance gains, though it might confuse mailers
690 and other similar utilities. The values
691 .Sy on
692 and
693 .Sy off
694 are equivalent to the
695 .Sy atime
696 and
697 .Sy noatime
698 mount options. The default value is
699 .Sy on .
700 See also
701 .Sy relatime
702 below.
703 .It Sy canmount Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy noauto
704 If this property is set to
705 .Sy off ,
706 the file system cannot be mounted, and is ignored by
707 .Nm zfs Cm mount Fl a .
708 Setting this property to
709 .Sy off
710 is similar to setting the
711 .Sy mountpoint
712 property to
713 .Sy none ,
714 except that the dataset still has a normal
715 .Sy mountpoint
716 property, which can be inherited.
717 Setting this property to
718 .Sy off
719 allows datasets to be used solely as a mechanism to inherit properties.
720 One example of setting
721 .Sy canmount Ns = Ns Sy off
722 is to have two datasets with the same
723 .Sy mountpoint ,
724 so that the children of both datasets appear in the same directory, but might
725 have different inherited characteristics.
726 .Pp
727 When set to
728 .Sy noauto ,
729 a dataset can only be mounted and unmounted explicitly.
730 The dataset is not mounted automatically when the dataset is created or
731 imported, nor is it mounted by the
732 .Nm zfs Cm mount Fl a
733 command or unmounted by the
734 .Nm zfs Cm unmount Fl a
735 command.
736 .Pp
737 This property is not inherited.
738 .It Xo
739 .Sy checksum Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy fletcher2 Ns | Ns
740 .Sy fletcher4 Ns | Ns Sy sha256 Ns | Ns Sy noparity Ns | Ns
741 .Sy sha512 Ns | Ns Sy skein Ns | Ns Sy edonr
742 .Xc
743 Controls the checksum used to verify data integrity.
744 The default value is
745 .Sy on ,
746 which automatically selects an appropriate algorithm
747 .Po currently,
748 .Sy fletcher4 ,
749 but this may change in future releases
750 .Pc .
751 The value
752 .Sy off
753 disables integrity checking on user data.
754 The value
755 .Sy noparity
756 not only disables integrity but also disables maintaining parity for user data.
757 This setting is used internally by a dump device residing on a RAID-Z pool and
758 should not be used by any other dataset.
759 Disabling checksums is
760 .Sy NOT
761 a recommended practice.
762 .Pp
763 The
764 .Sy sha512 ,
765 .Sy skein ,
766 and
767 .Sy edonr
768 checksum algorithms require enabling the appropriate features on the pool.
769 FreeBSD does not support the
770 .Sy edonr
771 algorithm.
772 .Pp
773 Please see
774 .Xr zpool-features 5
775 for more information on these algorithms.
776 .Pp
777 Changing this property affects only newly-written data.
778 .It Xo
779 .Sy compression Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy gzip Ns | Ns
780 .Sy gzip- Ns Em N Ns | Ns Sy lz4 Ns | Ns Sy lzjb Ns | Ns Sy zle Ns | Ns Sy zstd Ns | Ns
781 .Sy zstd- Ns Em N Ns | Ns Sy zstd-fast Ns | Ns Sy zstd-fast- Ns Em N
782 .Xc
783 Controls the compression algorithm used for this dataset.
784 .Pp
785 Setting compression to
786 .Sy on
787 indicates that the current default compression algorithm should be used.
788 The default balances compression and decompression speed, with compression ratio
789 and is expected to work well on a wide variety of workloads.
790 Unlike all other settings for this property,
791 .Sy on
792 does not select a fixed compression type.
793 As new compression algorithms are added to ZFS and enabled on a pool, the
794 default compression algorithm may change.
795 The current default compression algorithm is either
796 .Sy lzjb
797 or, if the
798 .Sy lz4_compress
799 feature is enabled,
800 .Sy lz4 .
801 .Pp
802 The
803 .Sy lz4
804 compression algorithm is a high-performance replacement for the
805 .Sy lzjb
806 algorithm.
807 It features significantly faster compression and decompression, as well as a
808 moderately higher compression ratio than
809 .Sy lzjb ,
810 but can only be used on pools with the
811 .Sy lz4_compress
812 feature set to
813 .Sy enabled .
814 See
815 .Xr zpool-features 5
816 for details on ZFS feature flags and the
817 .Sy lz4_compress
818 feature.
819 .Pp
820 The
821 .Sy lzjb
822 compression algorithm is optimized for performance while providing decent data
823 compression.
824 .Pp
825 The
826 .Sy gzip
827 compression algorithm uses the same compression as the
828 .Xr gzip 1
829 command.
830 You can specify the
831 .Sy gzip
832 level by using the value
833 .Sy gzip- Ns Em N ,
834 where
835 .Em N
836 is an integer from 1
837 .Pq fastest
838 to 9
839 .Pq best compression ratio .
840 Currently,
841 .Sy gzip
842 is equivalent to
843 .Sy gzip-6
844 .Po which is also the default for
845 .Xr gzip 1
846 .Pc .
847 .Pp
848 The
849 .Sy zstd
850 compression algorithm provides both high compression ratios and good
851 performance. You can specify the
852 .Sy zstd
853 level by using the value
854 .Sy zstd- Ns Em N ,
855 where
856 .Em N
857 is an integer from 1
858 .Pq fastest
859 to 19
860 .Pq best compression ratio .
861 .Sy zstd
862 is equivalent to
863 .Sy zstd-3 .
864 .Pp
865 Faster speeds at the cost of the compression ratio can be requested by
866 setting a negative
867 .Sy zstd
868 level.  This is done using
869 .Sy zstd-fast- Ns Em N ,
870 where
871 .Em N
872 is an integer in [1-9,10,20,30,...,100,500,1000] which maps to a negative
873 .Sy zstd
874 level. The lower the level the faster the compression - 1000 provides
875 the fastest compression and lowest compression ratio.
876 .Sy zstd-fast
877 is equivalent to
878 .Sy zstd-fast-1 .
879 .Pp
880 The
881 .Sy zle
882 compression algorithm compresses runs of zeros.
883 .Pp
884 This property can also be referred to by its shortened column name
885 .Sy compress .
886 Changing this property affects only newly-written data.
887 .Pp
888 When any setting except
889 .Sy off
890 is selected, compression will explicitly check for blocks consisting of only
891 zeroes (the NUL byte).  When a zero-filled block is detected, it is stored as
892 a hole and not compressed using the indicated compression algorithm.
893 .Pp
894 Any block being compressed must be no larger than 7/8 of its original size
895 after compression, otherwise the compression will not be considered worthwhile
896 and the block saved uncompressed. Note that when the logical block is less than
897 8 times the disk sector size this effectively reduces the necessary compression
898 ratio; for example 8k blocks on disks with 4k disk sectors must compress to 1/2
899 or less of their original size.
900 .It Xo
901 .Sy context Ns = Ns Sy none Ns | Ns
902 .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level
903 .Xc
904 This flag sets the SELinux context for all files in the file system under
905 a mount point for that file system. See
906 .Xr selinux 8
907 for more information.
908 .It Xo
909 .Sy fscontext Ns = Ns Sy none Ns | Ns
910 .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level
911 .Xc
912 This flag sets the SELinux context for the file system file system being
913 mounted. See
914 .Xr selinux 8
915 for more information.
916 .It Xo
917 .Sy defcontext Ns = Ns Sy none Ns | Ns
918 .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level
919 .Xc
920 This flag sets the SELinux default context for unlabeled files. See
921 .Xr selinux 8
922 for more information.
923 .It Xo
924 .Sy rootcontext Ns = Ns Sy none Ns | Ns
925 .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level
926 .Xc
927 This flag sets the SELinux context for the root inode of the file system. See
928 .Xr selinux 8
929 for more information.
930 .It Sy copies Ns = Ns Sy 1 Ns | Ns Sy 2 Ns | Ns Sy 3
931 Controls the number of copies of data stored for this dataset.
932 These copies are in addition to any redundancy provided by the pool, for
933 example, mirroring or RAID-Z.
934 The copies are stored on different disks, if possible.
935 The space used by multiple copies is charged to the associated file and dataset,
936 changing the
937 .Sy used
938 property and counting against quotas and reservations.
939 .Pp
940 Changing this property only affects newly-written data.
941 Therefore, set this property at file system creation time by using the
942 .Fl o Sy copies Ns = Ns Ar N
943 option.
944 .Pp
945 Remember that ZFS will not import a pool with a missing top-level vdev. Do
946 .Sy NOT
947 create, for example a two-disk striped pool and set
948 .Sy copies=2
949 on some datasets thinking you have setup redundancy for them. When a disk
950 fails you will not be able to import the pool and will have lost all of your
951 data.
952 .Pp
953 Encrypted datasets may not have
954 .Sy copies Ns = Ns Em 3
955 since the implementation stores some encryption metadata where the third copy
956 would normally be.
957 .It Sy devices Ns = Ns Sy on Ns | Ns Sy off
958 Controls whether device nodes can be opened on this file system.
959 The default value is
960 .Sy on .
961 The values
962 .Sy on
963 and
964 .Sy off
965 are equivalent to the
966 .Sy dev
967 and
968 .Sy nodev
969 mount options.
970 .It Xo
971 .Sy dedup Ns = Ns Sy off Ns | Ns Sy on Ns | Ns Sy verify Ns | Ns
972 .Sy sha256[,verify] Ns | Ns Sy sha512[,verify] Ns | Ns Sy skein[,verify] Ns | Ns
973 .Sy edonr,verify
974 .Xc
975 Configures deduplication for a dataset. The default value is
976 .Sy off .
977 The default deduplication checksum is
978 .Sy sha256
979 (this may change in the future). When
980 .Sy dedup
981 is enabled, the checksum defined here overrides the
982 .Sy checksum
983 property. Setting the value to
984 .Sy verify
985 has the same effect as the setting
986 .Sy sha256,verify.
987 .Pp
988 If set to
989 .Sy verify ,
990 ZFS will do a byte-to-byte comparison in case of two blocks having the same
991 signature to make sure the block contents are identical. Specifying
992 .Sy verify
993 is mandatory for the
994 .Sy edonr
995 algorithm.
996 .Pp
997 Unless necessary, deduplication should NOT be enabled on a system. See the
998 .Em Deduplication
999 section of
1000 .Xr zfsconcepts 8 .
1001 .It Xo
1002 .Sy dnodesize Ns = Ns Sy legacy Ns | Ns Sy auto Ns | Ns Sy 1k Ns | Ns
1003 .Sy 2k Ns | Ns Sy 4k Ns | Ns Sy 8k Ns | Ns Sy 16k
1004 .Xc
1005 Specifies a compatibility mode or literal value for the size of dnodes in the
1006 file system. The default value is
1007 .Sy legacy .
1008 Setting this property to a value other than
1009 .Sy legacy
1010 requires the large_dnode pool feature to be enabled.
1011 .Pp
1012 Consider setting
1013 .Sy dnodesize
1014 to
1015 .Sy auto
1016 if the dataset uses the
1017 .Sy xattr=sa
1018 property setting and the workload makes heavy use of extended attributes. This
1019 may be applicable to SELinux-enabled systems, Lustre servers, and Samba
1020 servers, for example. Literal values are supported for cases where the optimal
1021 size is known in advance and for performance testing.
1022 .Pp
1023 Leave
1024 .Sy dnodesize
1025 set to
1026 .Sy legacy
1027 if you need to receive a send stream of this dataset on a pool that doesn't
1028 enable the large_dnode feature, or if you need to import this pool on a system
1029 that doesn't support the large_dnode feature.
1030 .Pp
1031 This property can also be referred to by its shortened column name,
1032 .Sy dnsize .
1033 .It Xo
1034 .Sy encryption Ns = Ns Sy off Ns | Ns Sy on Ns | Ns Sy aes-128-ccm Ns | Ns
1035 .Sy aes-192-ccm Ns | Ns Sy aes-256-ccm Ns | Ns Sy aes-128-gcm Ns | Ns
1036 .Sy aes-192-gcm Ns | Ns Sy aes-256-gcm
1037 .Xc
1038 Controls the encryption cipher suite (block cipher, key length, and mode) used
1039 for this dataset. Requires the
1040 .Sy encryption
1041 feature to be enabled on the pool.
1042 Requires a
1043 .Sy keyformat
1044 to be set at dataset creation time.
1045 .Pp
1046 Selecting
1047 .Sy encryption Ns = Ns Sy on
1048 when creating a dataset indicates that the default encryption suite will be
1049 selected, which is currently
1050 .Sy aes-256-gcm .
1051 In order to provide consistent data protection, encryption must be specified at
1052 dataset creation time and it cannot be changed afterwards.
1053 .Pp
1054 For more details and caveats about encryption see the
1055 .Em Encryption
1056 section of
1057 .Xr zfs-load-key 8 .
1058 .It Sy keyformat Ns = Ns Sy raw Ns | Ns Sy hex Ns | Ns Sy passphrase
1059 Controls what format the user's encryption key will be provided as. This
1060 property is only set when the dataset is encrypted.
1061 .Pp
1062 Raw keys and hex keys must be 32 bytes long (regardless of the chosen
1063 encryption suite) and must be randomly generated. A raw key can be generated
1064 with the following command:
1065 .Bd -literal
1066 # dd if=/dev/urandom of=/path/to/output/key bs=32 count=1
1067 .Ed
1068 .Pp
1069 Passphrases must be between 8 and 512 bytes long and will be processed through
1070 PBKDF2 before being used (see the
1071 .Sy pbkdf2iters
1072 property). Even though the
1073 encryption suite cannot be changed after dataset creation, the keyformat can be
1074 with
1075 .Nm zfs Cm change-key .
1076 .It Xo
1077 .Sy keylocation Ns = Ns Sy prompt Ns | Ns Sy file:// Ns Em </absolute/file/path>
1078 .Xc
1079 Controls where the user's encryption key will be loaded from by default for
1080 commands such as
1081 .Nm zfs Cm load-key
1082 and
1083 .Nm zfs Cm mount Cm -l .
1084 This property is only set for encrypted datasets which are encryption roots. If
1085 unspecified, the default is
1086 .Sy prompt.
1087 .Pp
1088 Even though the encryption suite cannot be changed after dataset creation, the
1089 keylocation can be with either
1090 .Nm zfs Cm set
1091 or
1092 .Nm zfs Cm change-key .
1093 If
1094 .Sy prompt
1095 is selected ZFS will ask for the key at the command prompt when it is required
1096 to access the encrypted data (see
1097 .Nm zfs Cm load-key
1098 for details). This setting will also allow the key to be passed in via STDIN,
1099 but users should be careful not to place keys which should be kept secret on
1100 the command line. If a file URI is selected, the key will be loaded from the
1101 specified absolute file path.
1102 .It Sy pbkdf2iters Ns = Ns Ar iterations
1103 Controls the number of PBKDF2 iterations that a
1104 .Sy passphrase
1105 encryption key should be run through when processing it into an encryption key.
1106 This property is only defined when encryption is enabled and a keyformat of
1107 .Sy passphrase
1108 is selected. The goal of PBKDF2 is to significantly increase the
1109 computational difficulty needed to brute force a user's passphrase. This is
1110 accomplished by forcing the attacker to run each passphrase through a
1111 computationally expensive hashing function many times before they arrive at the
1112 resulting key. A user who actually knows the passphrase will only have to pay
1113 this cost once. As CPUs become better at processing, this number should be
1114 raised to ensure that a brute force attack is still not possible. The current
1115 default is
1116 .Sy 350000
1117 and the minimum is
1118 .Sy 100000 .
1119 This property may be changed with
1120 .Nm zfs Cm change-key .
1121 .It Sy exec Ns = Ns Sy on Ns | Ns Sy off
1122 Controls whether processes can be executed from within this file system.
1123 The default value is
1124 .Sy on .
1125 The values
1126 .Sy on
1127 and
1128 .Sy off
1129 are equivalent to the
1130 .Sy exec
1131 and
1132 .Sy noexec
1133 mount options.
1134 .It Sy filesystem_limit Ns = Ns Em count Ns | Ns Sy none
1135 Limits the number of filesystems and volumes that can exist under this point in
1136 the dataset tree.
1137 The limit is not enforced if the user is allowed to change the limit.
1138 Setting a
1139 .Sy filesystem_limit
1140 to
1141 .Sy on
1142 a descendent of a filesystem that already has a
1143 .Sy filesystem_limit
1144 does not override the ancestor's
1145 .Sy filesystem_limit ,
1146 but rather imposes an additional limit.
1147 This feature must be enabled to be used
1148 .Po see
1149 .Xr zpool-features 5
1150 .Pc .
1151 .It Sy special_small_blocks Ns = Ns Em size
1152 This value represents the threshold block size for including small file
1153 blocks into the special allocation class. Blocks smaller than or equal to this
1154 value will be assigned to the special allocation class while greater blocks
1155 will be assigned to the regular class. Valid values are zero or a power of two
1156 from 512B up to 1M. The default size is 0 which means no small file blocks
1157 will be allocated in the special class.
1158 .Pp
1159 Before setting this property, a special class vdev must be added to the
1160 pool. See
1161 .Xr zpool 8
1162 for more details on the special allocation class.
1163 .It Sy mountpoint Ns = Ns Pa path Ns | Ns Sy none Ns | Ns Sy legacy
1164 Controls the mount point used for this file system.
1165 See the
1166 .Em Mount Points
1167 section of
1168 .Xr zfsconcepts 8
1169 for more information on how this property is used.
1170 .Pp
1171 When the
1172 .Sy mountpoint
1173 property is changed for a file system, the file system and any children that
1174 inherit the mount point are unmounted.
1175 If the new value is
1176 .Sy legacy ,
1177 then they remain unmounted.
1178 Otherwise, they are automatically remounted in the new location if the property
1179 was previously
1180 .Sy legacy
1181 or
1182 .Sy none ,
1183 or if they were mounted before the property was changed.
1184 In addition, any shared file systems are unshared and shared in the new
1185 location.
1186 .It Sy nbmand Ns = Ns Sy on Ns | Ns Sy off
1187 Controls whether the file system should be mounted with
1188 .Sy nbmand
1189 .Pq Non Blocking mandatory locks .
1190 This is used for SMB clients.
1191 Changes to this property only take effect when the file system is umounted and
1192 remounted.
1193 See
1194 .Xr mount 8
1195 for more information on
1196 .Sy nbmand
1197 mounts. This property is not used on Linux.
1198 .It Sy overlay Ns = Ns Sy on Ns | Ns Sy off
1199 Allow mounting on a busy directory or a directory which already contains
1200 files or directories.
1201 This is the default mount behavior for Linux and FreeBSD file systems.
1202 On these platforms the property is
1203 .Sy on
1204 by default.
1205 Set to
1206 .Sy off
1207 to disable overlay mounts for consistency with OpenZFS on other platforms.
1208 .It Sy primarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1209 Controls what is cached in the primary cache
1210 .Pq ARC .
1211 If this property is set to
1212 .Sy all ,
1213 then both user data and metadata is cached.
1214 If this property is set to
1215 .Sy none ,
1216 then neither user data nor metadata is cached.
1217 If this property is set to
1218 .Sy metadata ,
1219 then only metadata is cached.
1220 The default value is
1221 .Sy all .
1222 .It Sy quota Ns = Ns Em size Ns | Ns Sy none
1223 Limits the amount of space a dataset and its descendents can consume.
1224 This property enforces a hard limit on the amount of space used.
1225 This includes all space consumed by descendents, including file systems and
1226 snapshots.
1227 Setting a quota on a descendent of a dataset that already has a quota does not
1228 override the ancestor's quota, but rather imposes an additional limit.
1229 .Pp
1230 Quotas cannot be set on volumes, as the
1231 .Sy volsize
1232 property acts as an implicit quota.
1233 .It Sy snapshot_limit Ns = Ns Em count Ns | Ns Sy none
1234 Limits the number of snapshots that can be created on a dataset and its
1235 descendents.
1236 Setting a
1237 .Sy snapshot_limit
1238 on a descendent of a dataset that already has a
1239 .Sy snapshot_limit
1240 does not override the ancestor's
1241 .Sy snapshot_limit ,
1242 but rather imposes an additional limit.
1243 The limit is not enforced if the user is allowed to change the limit.
1244 For example, this means that recursive snapshots taken from the global zone are
1245 counted against each delegated dataset within a zone.
1246 This feature must be enabled to be used
1247 .Po see
1248 .Xr zpool-features 5
1249 .Pc .
1250 .It Sy userquota@ Ns Em user Ns = Ns Em size Ns | Ns Sy none
1251 Limits the amount of space consumed by the specified user.
1252 User space consumption is identified by the
1253 .Sy userspace@ Ns Em user
1254 property.
1255 .Pp
1256 Enforcement of user quotas may be delayed by several seconds.
1257 This delay means that a user might exceed their quota before the system notices
1258 that they are over quota and begins to refuse additional writes with the
1259 .Er EDQUOT
1260 error message.
1261 See the
1262 .Nm zfs Cm userspace
1263 subcommand for more information.
1264 .Pp
1265 Unprivileged users can only access their own groups' space usage.
1266 The root user, or a user who has been granted the
1267 .Sy userquota
1268 privilege with
1269 .Nm zfs Cm allow ,
1270 can get and set everyone's quota.
1271 .Pp
1272 This property is not available on volumes, on file systems before version 4, or
1273 on pools before version 15.
1274 The
1275 .Sy userquota@ Ns Em ...
1276 properties are not displayed by
1277 .Nm zfs Cm get Sy all .
1278 The user's name must be appended after the
1279 .Sy @
1280 symbol, using one of the following forms:
1281 .Bl -bullet
1282 .It
1283 .Em POSIX name
1284 .Po for example,
1285 .Sy joe
1286 .Pc
1287 .It
1288 .Em POSIX numeric ID
1289 .Po for example,
1290 .Sy 789
1291 .Pc
1292 .It
1293 .Em SID name
1294 .Po for example,
1295 .Sy joe.smith@mydomain
1296 .Pc
1297 .It
1298 .Em SID numeric ID
1299 .Po for example,
1300 .Sy S-1-123-456-789
1301 .Pc
1302 .El
1303 .Pp
1304 Files created on Linux always have POSIX owners.
1305 .It Sy userobjquota@ Ns Em user Ns = Ns Em size Ns | Ns Sy none
1306 The
1307 .Sy userobjquota
1308 is similar to
1309 .Sy userquota
1310 but it limits the number of objects a user can create. Please refer to
1311 .Sy userobjused
1312 for more information about how objects are counted.
1313 .It Sy groupquota@ Ns Em group Ns = Ns Em size Ns | Ns Sy none
1314 Limits the amount of space consumed by the specified group.
1315 Group space consumption is identified by the
1316 .Sy groupused@ Ns Em group
1317 property.
1318 .Pp
1319 Unprivileged users can access only their own groups' space usage.
1320 The root user, or a user who has been granted the
1321 .Sy groupquota
1322 privilege with
1323 .Nm zfs Cm allow ,
1324 can get and set all groups' quotas.
1325 .It Sy groupobjquota@ Ns Em group Ns = Ns Em size Ns | Ns Sy none
1326 The
1327 .Sy groupobjquota
1328 is similar to
1329 .Sy groupquota
1330 but it limits number of objects a group can consume. Please refer to
1331 .Sy userobjused
1332 for more information about how objects are counted.
1333 .It Sy projectquota@ Ns Em project Ns = Ns Em size Ns | Ns Sy none
1334 Limits the amount of space consumed by the specified project. Project
1335 space consumption is identified by the
1336 .Sy projectused@ Ns Em project
1337 property. Please refer to
1338 .Sy projectused
1339 for more information about how project is identified and set/changed.
1340 .Pp
1341 The root user, or a user who has been granted the
1342 .Sy projectquota
1343 privilege with
1344 .Nm zfs allow ,
1345 can access all projects' quota.
1346 .It Sy projectobjquota@ Ns Em project Ns = Ns Em size Ns | Ns Sy none
1347 The
1348 .Sy projectobjquota
1349 is similar to
1350 .Sy projectquota
1351 but it limits number of objects a project can consume. Please refer to
1352 .Sy userobjused
1353 for more information about how objects are counted.
1354 .It Sy readonly Ns = Ns Sy on Ns | Ns Sy off
1355 Controls whether this dataset can be modified.
1356 The default value is
1357 .Sy off .
1358 The values
1359 .Sy on
1360 and
1361 .Sy off
1362 are equivalent to the
1363 .Sy ro
1364 and
1365 .Sy rw
1366 mount options.
1367 .Pp
1368 This property can also be referred to by its shortened column name,
1369 .Sy rdonly .
1370 .It Sy recordsize Ns = Ns Em size
1371 Specifies a suggested block size for files in the file system.
1372 This property is designed solely for use with database workloads that access
1373 files in fixed-size records.
1374 ZFS automatically tunes block sizes according to internal algorithms optimized
1375 for typical access patterns.
1376 .Pp
1377 For databases that create very large files but access them in small random
1378 chunks, these algorithms may be suboptimal.
1379 Specifying a
1380 .Sy recordsize
1381 greater than or equal to the record size of the database can result in
1382 significant performance gains.
1383 Use of this property for general purpose file systems is strongly discouraged,
1384 and may adversely affect performance.
1385 .Pp
1386 The size specified must be a power of two greater than or equal to 512 and less
1387 than or equal to 128 Kbytes.
1388 If the
1389 .Sy large_blocks
1390 feature is enabled on the pool, the size may be up to 1 Mbyte.
1391 See
1392 .Xr zpool-features 5
1393 for details on ZFS feature flags.
1394 .Pp
1395 Changing the file system's
1396 .Sy recordsize
1397 affects only files created afterward; existing files are unaffected.
1398 .Pp
1399 This property can also be referred to by its shortened column name,
1400 .Sy recsize .
1401 .It Sy redundant_metadata Ns = Ns Sy all Ns | Ns Sy most
1402 Controls what types of metadata are stored redundantly.
1403 ZFS stores an extra copy of metadata, so that if a single block is corrupted,
1404 the amount of user data lost is limited.
1405 This extra copy is in addition to any redundancy provided at the pool level
1406 .Pq e.g. by mirroring or RAID-Z ,
1407 and is in addition to an extra copy specified by the
1408 .Sy copies
1409 property
1410 .Pq up to a total of 3 copies .
1411 For example if the pool is mirrored,
1412 .Sy copies Ns = Ns 2 ,
1413 and
1414 .Sy redundant_metadata Ns = Ns Sy most ,
1415 then ZFS stores 6 copies of most metadata, and 4 copies of data and some
1416 metadata.
1417 .Pp
1418 When set to
1419 .Sy all ,
1420 ZFS stores an extra copy of all metadata.
1421 If a single on-disk block is corrupt, at worst a single block of user data
1422 .Po which is
1423 .Sy recordsize
1424 bytes long
1425 .Pc
1426 can be lost.
1427 .Pp
1428 When set to
1429 .Sy most ,
1430 ZFS stores an extra copy of most types of metadata.
1431 This can improve performance of random writes, because less metadata must be
1432 written.
1433 In practice, at worst about 100 blocks
1434 .Po of
1435 .Sy recordsize
1436 bytes each
1437 .Pc
1438 of user data can be lost if a single on-disk block is corrupt.
1439 The exact behavior of which metadata blocks are stored redundantly may change in
1440 future releases.
1441 .Pp
1442 The default value is
1443 .Sy all .
1444 .It Sy refquota Ns = Ns Em size Ns | Ns Sy none
1445 Limits the amount of space a dataset can consume.
1446 This property enforces a hard limit on the amount of space used.
1447 This hard limit does not include space used by descendents, including file
1448 systems and snapshots.
1449 .It Sy refreservation Ns = Ns Em size Ns | Ns Sy none Ns | Ns Sy auto
1450 The minimum amount of space guaranteed to a dataset, not including its
1451 descendents.
1452 When the amount of space used is below this value, the dataset is treated as if
1453 it were taking up the amount of space specified by
1454 .Sy refreservation .
1455 The
1456 .Sy refreservation
1457 reservation is accounted for in the parent datasets' space used, and counts
1458 against the parent datasets' quotas and reservations.
1459 .Pp
1460 If
1461 .Sy refreservation
1462 is set, a snapshot is only allowed if there is enough free pool space outside of
1463 this reservation to accommodate the current number of
1464 .Qq referenced
1465 bytes in the dataset.
1466 .Pp
1467 If
1468 .Sy refreservation
1469 is set to
1470 .Sy auto ,
1471 a volume is thick provisioned
1472 .Po or
1473 .Qq not sparse
1474 .Pc .
1475 .Sy refreservation Ns = Ns Sy auto
1476 is only supported on volumes.
1477 See
1478 .Sy volsize
1479 in the
1480 .Sx Native Properties
1481 section for more information about sparse volumes.
1482 .Pp
1483 This property can also be referred to by its shortened column name,
1484 .Sy refreserv .
1485 .It Sy relatime Ns = Ns Sy on Ns | Ns Sy off
1486 Controls the manner in which the access time is updated when
1487 .Sy atime=on
1488 is set. Turning this property on causes the access time to be updated relative
1489 to the modify or change time. Access time is only updated if the previous
1490 access time was earlier than the current modify or change time or if the
1491 existing access time hasn't been updated within the past 24 hours. The default
1492 value is
1493 .Sy off .
1494 The values
1495 .Sy on
1496 and
1497 .Sy off
1498 are equivalent to the
1499 .Sy relatime
1500 and
1501 .Sy norelatime
1502 mount options.
1503 .It Sy reservation Ns = Ns Em size Ns | Ns Sy none
1504 The minimum amount of space guaranteed to a dataset and its descendants.
1505 When the amount of space used is below this value, the dataset is treated as if
1506 it were taking up the amount of space specified by its reservation.
1507 Reservations are accounted for in the parent datasets' space used, and count
1508 against the parent datasets' quotas and reservations.
1509 .Pp
1510 This property can also be referred to by its shortened column name,
1511 .Sy reserv .
1512 .It Sy secondarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1513 Controls what is cached in the secondary cache
1514 .Pq L2ARC .
1515 If this property is set to
1516 .Sy all ,
1517 then both user data and metadata is cached.
1518 If this property is set to
1519 .Sy none ,
1520 then neither user data nor metadata is cached.
1521 If this property is set to
1522 .Sy metadata ,
1523 then only metadata is cached.
1524 The default value is
1525 .Sy all .
1526 .It Sy setuid Ns = Ns Sy on Ns | Ns Sy off
1527 Controls whether the setuid bit is respected for the file system.
1528 The default value is
1529 .Sy on .
1530 The values
1531 .Sy on
1532 and
1533 .Sy off
1534 are equivalent to the
1535 .Sy suid
1536 and
1537 .Sy nosuid
1538 mount options.
1539 .It Sy sharesmb Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1540 Controls whether the file system is shared by using
1541 .Sy Samba USERSHARES
1542 and what options are to be used. Otherwise, the file system is automatically
1543 shared and unshared with the
1544 .Nm zfs Cm share
1545 and
1546 .Nm zfs Cm unshare
1547 commands. If the property is set to on, the
1548 .Xr net 8
1549 command is invoked to create a
1550 .Sy USERSHARE .
1551 .Pp
1552 Because SMB shares requires a resource name, a unique resource name is
1553 constructed from the dataset name. The constructed name is a copy of the
1554 dataset name except that the characters in the dataset name, which would be
1555 invalid in the resource name, are replaced with underscore (_) characters.
1556 Linux does not currently support additional options which might be available
1557 on Solaris.
1558 .Pp
1559 If the
1560 .Sy sharesmb
1561 property is set to
1562 .Sy off ,
1563 the file systems are unshared.
1564 .Pp
1565 The share is created with the ACL (Access Control List) "Everyone:F" ("F"
1566 stands for "full permissions", ie. read and write permissions) and no guest
1567 access (which means Samba must be able to authenticate a real user, system
1568 passwd/shadow, LDAP or smbpasswd based) by default. This means that any
1569 additional access control (disallow specific user specific access etc) must
1570 be done on the underlying file system.
1571 .It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1572 Controls whether the file system is shared via NFS, and what options are to be
1573 used.
1574 A file system with a
1575 .Sy sharenfs
1576 property of
1577 .Sy off
1578 is managed with the
1579 .Xr exportfs 8
1580 command and entries in the
1581 .Em /etc/exports
1582 file.
1583 Otherwise, the file system is automatically shared and unshared with the
1584 .Nm zfs Cm share
1585 and
1586 .Nm zfs Cm unshare
1587 commands.
1588 If the property is set to
1589 .Sy on ,
1590 the dataset is shared using the default options:
1591 .Pp
1592 .Em sec=sys,rw,crossmnt,no_subtree_check
1593 .Pp
1594 See
1595 .Xr exports 5
1596 for the meaning of the default options. Otherwise, the
1597 .Xr exportfs 8
1598 command is invoked with options equivalent to the contents of this property.
1599 .Pp
1600 When the
1601 .Sy sharenfs
1602 property is changed for a dataset, the dataset and any children inheriting the
1603 property are re-shared with the new options, only if the property was previously
1604 .Sy off ,
1605 or if they were shared before the property was changed.
1606 If the new property is
1607 .Sy off ,
1608 the file systems are unshared.
1609 .It Sy logbias Ns = Ns Sy latency Ns | Ns Sy throughput
1610 Provide a hint to ZFS about handling of synchronous requests in this dataset.
1611 If
1612 .Sy logbias
1613 is set to
1614 .Sy latency
1615 .Pq the default ,
1616 ZFS will use pool log devices
1617 .Pq if configured
1618 to handle the requests at low latency.
1619 If
1620 .Sy logbias
1621 is set to
1622 .Sy throughput ,
1623 ZFS will not use configured pool log devices.
1624 ZFS will instead optimize synchronous operations for global pool throughput and
1625 efficient use of resources.
1626 .It Sy snapdev Ns = Ns Sy hidden Ns | Ns Sy visible
1627 Controls whether the volume snapshot devices under
1628 .Em /dev/zvol/<pool>
1629 are hidden or visible. The default value is
1630 .Sy hidden .
1631 .It Sy snapdir Ns = Ns Sy hidden Ns | Ns Sy visible
1632 Controls whether the
1633 .Pa .zfs
1634 directory is hidden or visible in the root of the file system as discussed in
1635 the
1636 .Em Snapshots
1637 section of
1638 .Xr zfsconcepts 8 .
1639 The default value is
1640 .Sy hidden .
1641 .It Sy sync Ns = Ns Sy standard Ns | Ns Sy always Ns | Ns Sy disabled
1642 Controls the behavior of synchronous requests
1643 .Pq e.g. fsync, O_DSYNC .
1644 .Sy standard
1645 is the
1646 .Tn POSIX
1647 specified behavior of ensuring all synchronous requests are written to stable
1648 storage and all devices are flushed to ensure data is not cached by device
1649 controllers
1650 .Pq this is the default .
1651 .Sy always
1652 causes every file system transaction to be written and flushed before its
1653 system call returns.
1654 This has a large performance penalty.
1655 .Sy disabled
1656 disables synchronous requests.
1657 File system transactions are only committed to stable storage periodically.
1658 This option will give the highest performance.
1659 However, it is very dangerous as ZFS would be ignoring the synchronous
1660 transaction demands of applications such as databases or NFS.
1661 Administrators should only use this option when the risks are understood.
1662 .It Sy version Ns = Ns Em N Ns | Ns Sy current
1663 The on-disk version of this file system, which is independent of the pool
1664 version.
1665 This property can only be set to later supported versions.
1666 See the
1667 .Nm zfs Cm upgrade
1668 command.
1669 .It Sy volsize Ns = Ns Em size
1670 For volumes, specifies the logical size of the volume.
1671 By default, creating a volume establishes a reservation of equal size.
1672 For storage pools with a version number of 9 or higher, a
1673 .Sy refreservation
1674 is set instead.
1675 Any changes to
1676 .Sy volsize
1677 are reflected in an equivalent change to the reservation
1678 .Po or
1679 .Sy refreservation
1680 .Pc .
1681 The
1682 .Sy volsize
1683 can only be set to a multiple of
1684 .Sy volblocksize ,
1685 and cannot be zero.
1686 .Pp
1687 The reservation is kept equal to the volume's logical size to prevent unexpected
1688 behavior for consumers.
1689 Without the reservation, the volume could run out of space, resulting in
1690 undefined behavior or data corruption, depending on how the volume is used.
1691 These effects can also occur when the volume size is changed while it is in use
1692 .Pq particularly when shrinking the size .
1693 Extreme care should be used when adjusting the volume size.
1694 .Pp
1695 Though not recommended, a
1696 .Qq sparse volume
1697 .Po also known as
1698 .Qq thin provisioned
1699 .Pc
1700 can be created by specifying the
1701 .Fl s
1702 option to the
1703 .Nm zfs Cm create Fl V
1704 command, or by changing the value of the
1705 .Sy refreservation
1706 property
1707 .Po or
1708 .Sy reservation
1709 property on pool version 8 or earlier
1710 .Pc
1711 after the volume has been created.
1712 A
1713 .Qq sparse volume
1714 is a volume where the value of
1715 .Sy refreservation
1716 is less than the size of the volume plus the space required to store its
1717 metadata.
1718 Consequently, writes to a sparse volume can fail with
1719 .Er ENOSPC
1720 when the pool is low on space.
1721 For a sparse volume, changes to
1722 .Sy volsize
1723 are not reflected in the
1724 .Sy refreservation.
1725 A volume that is not sparse is said to be
1726 .Qq thick provisioned .
1727 A sparse volume can become thick provisioned by setting
1728 .Sy refreservation
1729 to
1730 .Sy auto .
1731 .It Sy volmode Ns = Ns Cm default | full | geom | dev | none
1732 This property specifies how volumes should be exposed to the OS.
1733 Setting it to
1734 .Sy full
1735 exposes volumes as fully fledged block devices, providing maximal
1736 functionality. The value
1737 .Sy geom
1738 is just an alias for
1739 .Sy full
1740 and is kept for compatibility.
1741 Setting it to
1742 .Sy dev
1743 hides its partitions.
1744 Volumes with property set to
1745 .Sy none
1746 are not exposed outside ZFS, but can be snapshotted, cloned, replicated, etc,
1747 that can be suitable for backup purposes.
1748 Value
1749 .Sy default
1750 means that volumes exposition is controlled by system-wide tunable
1751 .Va zvol_volmode ,
1752 where
1753 .Sy full ,
1754 .Sy dev
1755 and
1756 .Sy none
1757 are encoded as 1, 2 and 3 respectively.
1758 The default values is
1759 .Sy full .
1760 .It Sy vscan Ns = Ns Sy on Ns | Ns Sy off
1761 Controls whether regular files should be scanned for viruses when a file is
1762 opened and closed.
1763 In addition to enabling this property, the virus scan service must also be
1764 enabled for virus scanning to occur.
1765 The default value is
1766 .Sy off .
1767 This property is not used on Linux.
1768 .It Sy xattr Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy sa
1769 Controls whether extended attributes are enabled for this file system. Two
1770 styles of extended attributes are supported either directory based or system
1771 attribute based.
1772 .Pp
1773 The default value of
1774 .Sy on
1775 enables directory based extended attributes. This style of extended attribute
1776 imposes no practical limit on either the size or number of attributes which
1777 can be set on a file. Although under Linux the
1778 .Xr getxattr 2
1779 and
1780 .Xr setxattr 2
1781 system calls limit the maximum size to 64K. This is the most compatible
1782 style of extended attribute and is supported by all OpenZFS implementations.
1783 .Pp
1784 System attribute based xattrs can be enabled by setting the value to
1785 .Sy sa .
1786 The key advantage of this type of xattr is improved performance. Storing
1787 extended attributes as system attributes significantly decreases the amount of
1788 disk IO required. Up to 64K of data may be stored per-file in the space
1789 reserved for system attributes. If there is not enough space available for
1790 an extended attribute then it will be automatically written as a directory
1791 based xattr. System attribute based extended attributes are not accessible
1792 on platforms which do not support the
1793 .Sy xattr=sa
1794 feature.
1795 .Pp
1796 The use of system attribute based xattrs is strongly encouraged for users of
1797 SELinux or POSIX ACLs. Both of these features heavily rely of extended
1798 attributes and benefit significantly from the reduced access time.
1799 .Pp
1800 The values
1801 .Sy on
1802 and
1803 .Sy off
1804 are equivalent to the
1805 .Sy xattr
1806 and
1807 .Sy noxattr
1808 mount options.
1809 .It Sy jailed Ns = Ns Cm off | on
1810 Controls whether the dataset is managed from a jail. See the
1811 .Qq Sx Jails
1812 section in
1813 .Xr zfs 8
1814 for more information. Jails are a FreeBSD feature and are not relevant on
1815 other platforms. The default value is
1816 .Cm off .
1817 .It Sy zoned Ns = Ns Sy on Ns | Ns Sy off
1818 Controls whether the dataset is managed from a non-global zone. Zones are a
1819 Solaris feature and are not relevant on other platforms. The default value is
1820 .Sy off .
1821 .El
1822 .Pp
1823 The following three properties cannot be changed after the file system is
1824 created, and therefore, should be set when the file system is created.
1825 If the properties are not set with the
1826 .Nm zfs Cm create
1827 or
1828 .Nm zpool Cm create
1829 commands, these properties are inherited from the parent dataset.
1830 If the parent dataset lacks these properties due to having been created prior to
1831 these features being supported, the new file system will have the default values
1832 for these properties.
1833 .Bl -tag -width ""
1834 .It Xo
1835 .Sy casesensitivity Ns = Ns Sy sensitive Ns | Ns
1836 .Sy insensitive Ns | Ns Sy mixed
1837 .Xc
1838 Indicates whether the file name matching algorithm used by the file system
1839 should be case-sensitive, case-insensitive, or allow a combination of both
1840 styles of matching.
1841 The default value for the
1842 .Sy casesensitivity
1843 property is
1844 .Sy sensitive .
1845 Traditionally,
1846 .Ux
1847 and
1848 .Tn POSIX
1849 file systems have case-sensitive file names.
1850 .Pp
1851 The
1852 .Sy mixed
1853 value for the
1854 .Sy casesensitivity
1855 property indicates that the file system can support requests for both
1856 case-sensitive and case-insensitive matching behavior.
1857 Currently, case-insensitive matching behavior on a file system that supports
1858 mixed behavior is limited to the SMB server product.
1859 For more information about the
1860 .Sy mixed
1861 value behavior, see the "ZFS Administration Guide".
1862 .It Xo
1863 .Sy normalization Ns = Ns Sy none Ns | Ns Sy formC Ns | Ns
1864 .Sy formD Ns | Ns Sy formKC Ns | Ns Sy formKD
1865 .Xc
1866 Indicates whether the file system should perform a
1867 .Sy unicode
1868 normalization of file names whenever two file names are compared, and which
1869 normalization algorithm should be used.
1870 File names are always stored unmodified, names are normalized as part of any
1871 comparison process.
1872 If this property is set to a legal value other than
1873 .Sy none ,
1874 and the
1875 .Sy utf8only
1876 property was left unspecified, the
1877 .Sy utf8only
1878 property is automatically set to
1879 .Sy on .
1880 The default value of the
1881 .Sy normalization
1882 property is
1883 .Sy none .
1884 This property cannot be changed after the file system is created.
1885 .It Sy utf8only Ns = Ns Sy on Ns | Ns Sy off
1886 Indicates whether the file system should reject file names that include
1887 characters that are not present in the
1888 .Sy UTF-8
1889 character code set.
1890 If this property is explicitly set to
1891 .Sy off ,
1892 the normalization property must either not be explicitly set or be set to
1893 .Sy none .
1894 The default value for the
1895 .Sy utf8only
1896 property is
1897 .Sy off .
1898 This property cannot be changed after the file system is created.
1899 .El
1900 .Pp
1901 The
1902 .Sy casesensitivity ,
1903 .Sy normalization ,
1904 and
1905 .Sy utf8only
1906 properties are also new permissions that can be assigned to non-privileged users
1907 by using the ZFS delegated administration feature.
1908 .Ss "Temporary Mount Point Properties"
1909 When a file system is mounted, either through
1910 .Xr mount 8
1911 for legacy mounts or the
1912 .Nm zfs Cm mount
1913 command for normal file systems, its mount options are set according to its
1914 properties.
1915 The correlation between properties and mount options is as follows:
1916 .Bd -literal
1917     PROPERTY                MOUNT OPTION
1918     atime                   atime/noatime
1919     canmount                auto/noauto
1920     devices                 dev/nodev
1921     exec                    exec/noexec
1922     readonly                ro/rw
1923     relatime                relatime/norelatime
1924     setuid                  suid/nosuid
1925     xattr                   xattr/noxattr
1926 .Ed
1927 .Pp
1928 In addition, these options can be set on a per-mount basis using the
1929 .Fl o
1930 option, without affecting the property that is stored on disk.
1931 The values specified on the command line override the values stored in the
1932 dataset.
1933 The
1934 .Sy nosuid
1935 option is an alias for
1936 .Sy nodevices Ns \&, Ns Sy nosetuid .
1937 These properties are reported as
1938 .Qq temporary
1939 by the
1940 .Nm zfs Cm get
1941 command.
1942 If the properties are changed while the dataset is mounted, the new setting
1943 overrides any temporary settings.
1944 .Ss "User Properties"
1945 In addition to the standard native properties, ZFS supports arbitrary user
1946 properties.
1947 User properties have no effect on ZFS behavior, but applications or
1948 administrators can use them to annotate datasets
1949 .Pq file systems, volumes, and snapshots .
1950 .Pp
1951 User property names must contain a colon
1952 .Pq Qq Sy \&:
1953 character to distinguish them from native properties.
1954 They may contain lowercase letters, numbers, and the following punctuation
1955 characters: colon
1956 .Pq Qq Sy \&: ,
1957 dash
1958 .Pq Qq Sy - ,
1959 period
1960 .Pq Qq Sy \&. ,
1961 and underscore
1962 .Pq Qq Sy _ .
1963 The expected convention is that the property name is divided into two portions
1964 such as
1965 .Em module Ns \&: Ns Em property ,
1966 but this namespace is not enforced by ZFS.
1967 User property names can be at most 256 characters, and cannot begin with a dash
1968 .Pq Qq Sy - .
1969 .Pp
1970 When making programmatic use of user properties, it is strongly suggested to use
1971 a reversed
1972 .Sy DNS
1973 domain name for the
1974 .Em module
1975 component of property names to reduce the chance that two
1976 independently-developed packages use the same property name for different
1977 purposes.
1978 .Pp
1979 The values of user properties are arbitrary strings, are always inherited, and
1980 are never validated.
1981 All of the commands that operate on properties
1982 .Po Nm zfs Cm list ,
1983 .Nm zfs Cm get ,
1984 .Nm zfs Cm set ,
1985 and so forth
1986 .Pc
1987 can be used to manipulate both native properties and user properties.
1988 Use the
1989 .Nm zfs Cm inherit
1990 command to clear a user property.
1991 If the property is not defined in any parent dataset, it is removed entirely.
1992 Property values are limited to 8192 bytes.