]> granicus.if.org Git - zfs/blob - man/man8/zfs.8
Add mdoc style checker
[zfs] / man / man8 / zfs.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, 2016 by Delphix. All rights reserved.
25 .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
26 .\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
27 .\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
28 .\" Copyright (c) 2014 Integros [integros.com]
29 .\" Copyright 2016 Richard Laager. All rights reserved.
30 .\" Copyright 2017 Nexenta Systems, Inc.
31 .\"
32 .Dd June 28, 2017
33 .Dt ZFS 8 SMM
34 .Os Linux
35 .Sh NAME
36 .Nm zfs
37 .Nd configures ZFS file systems
38 .Sh SYNOPSIS
39 .Nm
40 .Fl ?
41 .Nm
42 .Cm create
43 .Op Fl p
44 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
45 .Ar filesystem
46 .Nm
47 .Cm create
48 .Op Fl ps
49 .Op Fl b Ar blocksize
50 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
51 .Fl V Ar size Ar volume
52 .Nm
53 .Cm destroy
54 .Op Fl Rfnprv
55 .Ar filesystem Ns | Ns Ar volume
56 .Nm
57 .Cm destroy
58 .Op Fl Rdnprv
59 .Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns
60 .Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ...
61 .Nm
62 .Cm destroy
63 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
64 .Nm
65 .Cm snapshot
66 .Op Fl r
67 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
68 .Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ...
69 .Nm
70 .Cm rollback
71 .Op Fl Rfr
72 .Ar snapshot
73 .Nm
74 .Cm clone
75 .Op Fl p
76 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
77 .Ar snapshot Ar filesystem Ns | Ns Ar volume
78 .Nm
79 .Cm promote
80 .Ar clone-filesystem
81 .Nm
82 .Cm rename
83 .Op Fl f
84 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
85 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
86 .Nm
87 .Cm rename
88 .Op Fl fp
89 .Ar filesystem Ns | Ns Ar volume
90 .Ar filesystem Ns | Ns Ar volume
91 .Nm
92 .Cm rename
93 .Fl r
94 .Ar snapshot Ar snapshot
95 .Nm
96 .Cm list
97 .Op Fl r Ns | Ns Fl d Ar depth
98 .Op Fl Hp
99 .Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc
100 .Oo Fl s Ar property Oc Ns ...
101 .Oo Fl S Ar property Oc Ns ...
102 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
103 .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ...
104 .Nm
105 .Cm set
106 .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ...
107 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
108 .Nm
109 .Cm get
110 .Op Fl r Ns | Ns Fl d Ar depth
111 .Op Fl Hp
112 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
113 .Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc
114 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
115 .Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ...
116 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Ns ...
117 .Nm
118 .Cm inherit
119 .Op Fl rS
120 .Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
121 .Nm
122 .Cm upgrade
123 .Nm
124 .Cm upgrade
125 .Fl v
126 .Nm
127 .Cm upgrade
128 .Op Fl r
129 .Op Fl V Ar version
130 .Fl a | Ar filesystem
131 .Nm
132 .Cm userspace
133 .Op Fl Hinp
134 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
135 .Oo Fl s Ar field Oc Ns ...
136 .Oo Fl S Ar field Oc Ns ...
137 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
138 .Ar filesystem Ns | Ns Ar snapshot
139 .Nm
140 .Cm groupspace
141 .Op Fl Hinp
142 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
143 .Oo Fl s Ar field Oc Ns ...
144 .Oo Fl S Ar field Oc Ns ...
145 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
146 .Ar filesystem Ns | Ns Ar snapshot
147 .Nm
148 .Cm mount
149 .Nm
150 .Cm mount
151 .Op Fl Olv
152 .Op Fl o Ar options
153 .Fl a | Ar filesystem
154 .Nm
155 .Cm unmount
156 .Op Fl f
157 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
158 .Nm
159 .Cm share
160 .Fl a | Ar filesystem
161 .Nm
162 .Cm unshare
163 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
164 .Nm
165 .Cm bookmark
166 .Ar snapshot bookmark
167 .Nm
168 .Cm send
169 .Op Fl DLPRcenpvw
170 .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
171 .Ar snapshot
172 .Nm
173 .Cm send
174 .Op Fl LPcenvw
175 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
176 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
177 .Nm
178 .Cm send
179 .Op Fl Penv
180 .Fl t Ar receive_resume_token
181 .Nm
182 .Cm receive
183 .Op Fl Fnsuv
184 .Op Fl o Sy origin Ns = Ns Ar snapshot
185 .Op Fl o Ar property Ns = Ns Ar value
186 .Op Fl x Ar property
187 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
188 .Nm
189 .Cm receive
190 .Op Fl Fnsuv
191 .Op Fl d Ns | Ns Fl e
192 .Op Fl o Sy origin Ns = Ns Ar snapshot
193 .Op Fl o Ar property Ns = Ns Ar value
194 .Op Fl x Ar property
195 .Ar filesystem
196 .Nm
197 .Cm receive
198 .Fl A
199 .Ar filesystem Ns | Ns Ar volume
200 .Nm
201 .Cm allow
202 .Ar filesystem Ns | Ns Ar volume
203 .Nm
204 .Cm allow
205 .Op Fl dglu
206 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
207 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
208 .Ar setname Oc Ns ...
209 .Ar filesystem Ns | Ns Ar volume
210 .Nm
211 .Cm allow
212 .Op Fl dl
213 .Fl e Ns | Ns Sy everyone
214 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
215 .Ar setname Oc Ns ...
216 .Ar filesystem Ns | Ns Ar volume
217 .Nm
218 .Cm allow
219 .Fl c
220 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
221 .Ar setname Oc Ns ...
222 .Ar filesystem Ns | Ns Ar volume
223 .Nm
224 .Cm allow
225 .Fl s No @ Ns Ar setname
226 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
227 .Ar setname Oc Ns ...
228 .Ar filesystem Ns | Ns Ar volume
229 .Nm
230 .Cm unallow
231 .Op Fl dglru
232 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
233 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
234 .Ar setname Oc Ns ... Oc
235 .Ar filesystem Ns | Ns Ar volume
236 .Nm
237 .Cm unallow
238 .Op Fl dlr
239 .Fl e Ns | Ns Sy everyone
240 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
241 .Ar setname Oc Ns ... Oc
242 .Ar filesystem Ns | Ns Ar volume
243 .Nm
244 .Cm unallow
245 .Op Fl r
246 .Fl c
247 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
248 .Ar setname Oc Ns ... Oc
249 .Ar filesystem Ns | Ns Ar volume
250 .Nm
251 .Cm unallow
252 .Op Fl r
253 .Fl s @ Ns Ar setname
254 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
255 .Ar setname Oc Ns ... Oc
256 .Ar filesystem Ns | Ns Ar volume
257 .Nm
258 .Cm hold
259 .Op Fl r
260 .Ar tag Ar snapshot Ns ...
261 .Nm
262 .Cm holds
263 .Op Fl r
264 .Ar snapshot Ns ...
265 .Nm
266 .Cm release
267 .Op Fl r
268 .Ar tag Ar snapshot Ns ...
269 .Nm
270 .Cm diff
271 .Op Fl FHt
272 .Ar snapshot Ar snapshot Ns | Ns Ar filesystem
273 .Nm
274 .Cm load-key
275 .Op Fl nr
276 .Op Fl L Ar keylocation
277 .Fl a | Ar filesystem
278 .Nm
279 .Cm unload-key
280 .Op Fl r
281 .Fl a | Ar filesystem
282 .Nm
283 .Cm change-key
284 .Op Fl l
285 .Op Fl o Ar keylocation Ns = Ns Ar value
286 .Op Fl o Ar keyformat Ns = Ns Ar value
287 .Op Fl o Ar pbkdf2iters Ns = Ns Ar value
288 .Ar filesystem
289 .Nm
290 .Cm change-key
291 .Fl i
292 .Op Fl l
293 .Ar filesystem
294 .Sh DESCRIPTION
295 The
296 .Nm
297 command configures ZFS datasets within a ZFS storage pool, as described in
298 .Xr zpool 8 .
299 A dataset is identified by a unique path within the ZFS namespace.
300 For example:
301 .Bd -literal
302 pool/{filesystem,volume,snapshot}
303 .Ed
304 .Pp
305 where the maximum length of a dataset name is
306 .Dv MAXNAMELEN
307 .Pq 256 bytes .
308 .Pp
309 A dataset can be one of the following:
310 .Bl -tag -width "file system"
311 .It Sy file system
312 A ZFS dataset of type
313 .Sy filesystem
314 can be mounted within the standard system namespace and behaves like other file
315 systems.
316 While ZFS file systems are designed to be POSIX compliant, known issues exist
317 that prevent compliance in some cases.
318 Applications that depend on standards conformance might fail due to non-standard
319 behavior when checking file system free space.
320 .It Sy volume
321 A logical volume exported as a raw or block device.
322 This type of dataset should only be used under special circumstances.
323 File systems are typically used in most environments.
324 .It Sy snapshot
325 A read-only version of a file system or volume at a given point in time.
326 It is specified as
327 .Ar filesystem Ns @ Ns Ar name
328 or
329 .Ar volume Ns @ Ns Ar name .
330 .It Sy bookmark
331 Much like a
332 .Sy snapshot ,
333 but without the hold on on-disk data. It can be used as the source of a send
334 (but not for a receive). It is specified as
335 .Ar filesystem Ns # Ns Ar name
336 or
337 .Ar volume Ns # Ns Ar name .
338 .El
339 .Ss ZFS File System Hierarchy
340 A ZFS storage pool is a logical collection of devices that provide space for
341 datasets.
342 A storage pool is also the root of the ZFS file system hierarchy.
343 .Pp
344 The root of the pool can be accessed as a file system, such as mounting and
345 unmounting, taking snapshots, and setting properties.
346 The physical storage characteristics, however, are managed by the
347 .Xr zpool 8
348 command.
349 .Pp
350 See
351 .Xr zpool 8
352 for more information on creating and administering pools.
353 .Ss Snapshots
354 A snapshot is a read-only copy of a file system or volume.
355 Snapshots can be created extremely quickly, and initially consume no additional
356 space within the pool.
357 As data within the active dataset changes, the snapshot consumes more data than
358 would otherwise be shared with the active dataset.
359 .Pp
360 Snapshots can have arbitrary names.
361 Snapshots of volumes can be cloned or rolled back, visibility is determined
362 by the
363 .Sy snapdev
364 property of the parent volume.
365 .Pp
366 File system snapshots can be accessed under the
367 .Pa .zfs/snapshot
368 directory in the root of the file system.
369 Snapshots are automatically mounted on demand and may be unmounted at regular
370 intervals.
371 The visibility of the
372 .Pa .zfs
373 directory can be controlled by the
374 .Sy snapdir
375 property.
376 .Ss Bookmarks
377 A bookmark is like a snapshot, a read-only copy of a file system or volume.
378 Bookmarks can be created extremely quickly, compared to snapshots, and they
379 consume no additional space within the pool. Bookmarks can also have arbitrary
380 names, much like snapshots.
381 .Pp
382 Unlike snapshots, bookmarks can not be accessed through the filesystem in any
383 way. From a storage standpoint a bookmark just provides a way to reference
384 when a snapshot was created as a distinct object. Bookmarks are initially
385 tied to a snapshot, not the filesystem or volume, and they will survive if the
386 snapshot itself is destroyed. Since they are very light weight there's little
387 incentive to destroy them.
388 .Ss Clones
389 A clone is a writable volume or file system whose initial contents are the same
390 as another dataset.
391 As with snapshots, creating a clone is nearly instantaneous, and initially
392 consumes no additional space.
393 .Pp
394 Clones can only be created from a snapshot.
395 When a snapshot is cloned, it creates an implicit dependency between the parent
396 and child.
397 Even though the clone is created somewhere else in the dataset hierarchy, the
398 original snapshot cannot be destroyed as long as a clone exists.
399 The
400 .Sy origin
401 property exposes this dependency, and the
402 .Cm destroy
403 command lists any such dependencies, if they exist.
404 .Pp
405 The clone parent-child dependency relationship can be reversed by using the
406 .Cm promote
407 subcommand.
408 This causes the
409 .Qq origin
410 file system to become a clone of the specified file system, which makes it
411 possible to destroy the file system that the clone was created from.
412 .Ss "Mount Points"
413 Creating a ZFS file system is a simple operation, so the number of file systems
414 per system is likely to be numerous.
415 To cope with this, ZFS automatically manages mounting and unmounting file
416 systems without the need to edit the
417 .Pa /etc/fstab
418 file.
419 All automatically managed file systems are mounted by ZFS at boot time.
420 .Pp
421 By default, file systems are mounted under
422 .Pa /path ,
423 where
424 .Ar path
425 is the name of the file system in the ZFS namespace.
426 Directories are created and destroyed as needed.
427 .Pp
428 A file system can also have a mount point set in the
429 .Sy mountpoint
430 property.
431 This directory is created as needed, and ZFS automatically mounts the file
432 system when the
433 .Nm zfs Cm mount Fl a
434 command is invoked
435 .Po without editing
436 .Pa /etc/fstab
437 .Pc .
438 The
439 .Sy mountpoint
440 property can be inherited, so if
441 .Em pool/home
442 has a mount point of
443 .Pa /export/stuff ,
444 then
445 .Em pool/home/user
446 automatically inherits a mount point of
447 .Pa /export/stuff/user .
448 .Pp
449 A file system
450 .Sy mountpoint
451 property of
452 .Sy none
453 prevents the file system from being mounted.
454 .Pp
455 If needed, ZFS file systems can also be managed with traditional tools
456 .Po
457 .Nm mount ,
458 .Nm umount ,
459 .Pa /etc/fstab
460 .Pc .
461 If a file system's mount point is set to
462 .Sy legacy ,
463 ZFS makes no attempt to manage the file system, and the administrator is
464 responsible for mounting and unmounting the file system.
465 .Ss Deduplication
466 Deduplication is the process for removing redundant data at the block level,
467 reducing the total amount of data stored. If a file system has the
468 .Sy dedup
469 property enabled, duplicate data blocks are removed synchronously. The result
470 is that only unique data is stored and common components are shared among files.
471 .Pp
472 Deduplicating data is a very resource-intensive operation. It is generally
473 recommended that you have at least 1.25 GiB of RAM per 1 TiB of storage when
474 you enable deduplication. Calculating the exact requirement depends heavily
475 on the type of data stored in the pool.
476 .Pp
477 Enabling deduplication on an improperly-designed system can result in
478 performance issues (slow IO and administrative operations). It can potentially
479 lead to problems importing a pool due to memory exhaustion. Deduplication
480 can consume significant processing power (CPU) and memory as well as generate
481 additional disk IO.
482 .Pp
483 Before creating a pool with deduplication enabled, ensure that you have planned
484 your hardware requirements appropriately and implemented appropriate recovery
485 practices, such as regular backups. As an alternative to deduplication
486 consider using
487 .Sy compression=on ,
488 as a less resource-intensive alternative.
489 .Ss Native Properties
490 Properties are divided into two types, native properties and user-defined
491 .Po or
492 .Qq user
493 .Pc
494 properties.
495 Native properties either export internal statistics or control ZFS behavior.
496 In addition, native properties are either editable or read-only.
497 User properties have no effect on ZFS behavior, but you can use them to annotate
498 datasets in a way that is meaningful in your environment.
499 For more information about user properties, see the
500 .Sx User Properties
501 section, below.
502 .Pp
503 Every dataset has a set of properties that export statistics about the dataset
504 as well as control various behaviors.
505 Properties are inherited from the parent unless overridden by the child.
506 Some properties apply only to certain types of datasets
507 .Pq file systems, volumes, or snapshots .
508 .Pp
509 The values of numeric properties can be specified using human-readable suffixes
510 .Po for example,
511 .Sy k ,
512 .Sy KB ,
513 .Sy M ,
514 .Sy Gb ,
515 and so forth, up to
516 .Sy Z
517 for zettabyte
518 .Pc .
519 The following are all valid
520 .Pq and equal
521 specifications:
522 .Li 1536M, 1.5g, 1.50GB .
523 .Pp
524 The values of non-numeric properties are case sensitive and must be lowercase,
525 except for
526 .Sy mountpoint ,
527 .Sy sharenfs ,
528 and
529 .Sy sharesmb .
530 .Pp
531 The following native properties consist of read-only statistics about the
532 dataset.
533 These properties can be neither set, nor inherited.
534 Native properties apply to all dataset types unless otherwise noted.
535 .Bl -tag -width "usedbyrefreservation"
536 .It Sy available
537 The amount of space available to the dataset and all its children, assuming that
538 there is no other activity in the pool.
539 Because space is shared within a pool, availability can be limited by any number
540 of factors, including physical pool size, quotas, reservations, or other
541 datasets within the pool.
542 .Pp
543 This property can also be referred to by its shortened column name,
544 .Sy avail .
545 .It Sy compressratio
546 For non-snapshots, the compression ratio achieved for the
547 .Sy used
548 space of this dataset, expressed as a multiplier.
549 The
550 .Sy used
551 property includes descendant datasets, and, for clones, does not include the
552 space shared with the origin snapshot.
553 For snapshots, the
554 .Sy compressratio
555 is the same as the
556 .Sy refcompressratio
557 property.
558 Compression can be turned on by running:
559 .Nm zfs Cm set Sy compression Ns = Ns Sy on Ar dataset .
560 The default value is
561 .Sy off .
562 .It Sy createtxg
563 The transaction group (txg) in which the dataset was created. Bookmarks have
564 the same
565 .Sy createtxg
566 as the snapshot they are initially tied to. This property is suitable for
567 ordering a list of snapshots, e.g. for incremental send and receive.
568 .It Sy creation
569 The time this dataset was created.
570 .It Sy clones
571 For snapshots, this property is a comma-separated list of filesystems or volumes
572 which are clones of this snapshot.
573 The clones'
574 .Sy origin
575 property is this snapshot.
576 If the
577 .Sy clones
578 property is not empty, then this snapshot can not be destroyed
579 .Po even with the
580 .Fl r
581 or
582 .Fl f
583 options
584 .Pc .
585 The roles of origin and clone can be swapped by promoting the clone with the
586 .Nm zfs Cm promote
587 command.
588 .It Sy defer_destroy
589 This property is
590 .Sy on
591 if the snapshot has been marked for deferred destroy by using the
592 .Nm zfs Cm destroy Fl d
593 command.
594 Otherwise, the property is
595 .Sy off .
596 .It Sy encryptionroot
597 For encrypted datasets, indicates where the dataset is currently inheriting its
598 encryption key from. Loading or unloading a key for the
599 .Sy encryptionroot
600 will implicitly load / unload the key for any inheriting datasets (see
601 .Nm zfs Cm load-key
602 and
603 .Nm zfs Cm unload-key
604 for details).
605 Clones will always share an
606 encryption key with their origin. See the
607 .Sx Encryption
608 section for details.
609 .It Sy filesystem_count
610 The total number of filesystems and volumes that exist under this location in
611 the dataset tree.
612 This value is only available when a
613 .Sy filesystem_limit
614 has been set somewhere in the tree under which the dataset resides.
615 .It Sy keystatus
616 Indicates if an encryption key is currently loaded into ZFS. The possible
617 values are
618 .Sy none ,
619 .Sy available ,
620 and
621 .Sy unavailable .
622 See
623 .Nm zfs Cm load-key
624 and
625 .Nm zfs Cm unload-key .
626 .It Sy guid
627 The 64 bit GUID of this dataset or bookmark which does not change over its
628 entire lifetime. When a snapshot is sent to another pool, the received
629 snapshot has the same GUID. Thus, the
630 .Sy guid
631 is suitable to identify a snapshot across pools.
632 .It Sy logicalreferenced
633 The amount of space that is
634 .Qq logically
635 accessible by this dataset.
636 See the
637 .Sy referenced
638 property.
639 The logical space ignores the effect of the
640 .Sy compression
641 and
642 .Sy copies
643 properties, giving a quantity closer to the amount of data that applications
644 see.
645 However, it does include space consumed by metadata.
646 .Pp
647 This property can also be referred to by its shortened column name,
648 .Sy lrefer .
649 .It Sy logicalused
650 The amount of space that is
651 .Qq logically
652 consumed by this dataset and all its descendents.
653 See the
654 .Sy used
655 property.
656 The logical space ignores the effect of the
657 .Sy compression
658 and
659 .Sy copies
660 properties, giving a quantity closer to the amount of data that applications
661 see.
662 However, it does include space consumed by metadata.
663 .Pp
664 This property can also be referred to by its shortened column name,
665 .Sy lused .
666 .It Sy mounted
667 For file systems, indicates whether the file system is currently mounted.
668 This property can be either
669 .Sy yes
670 or
671 .Sy no .
672 .It Sy origin
673 For cloned file systems or volumes, the snapshot from which the clone was
674 created.
675 See also the
676 .Sy clones
677 property.
678 .It Sy receive_resume_token
679 For filesystems or volumes which have saved partially-completed state from
680 .Sy zfs receive -s ,
681 this opaque token can be provided to
682 .Sy zfs send -t
683 to resume and complete the
684 .Sy zfs receive .
685 .It Sy referenced
686 The amount of data that is accessible by this dataset, which may or may not be
687 shared with other datasets in the pool.
688 When a snapshot or clone is created, it initially references the same amount of
689 space as the file system or snapshot it was created from, since its contents are
690 identical.
691 .Pp
692 This property can also be referred to by its shortened column name,
693 .Sy refer .
694 .It Sy refcompressratio
695 The compression ratio achieved for the
696 .Sy referenced
697 space of this dataset, expressed as a multiplier.
698 See also the
699 .Sy compressratio
700 property.
701 .It Sy snapshot_count
702 The total number of snapshots that exist under this location in the dataset
703 tree.
704 This value is only available when a
705 .Sy snapshot_limit
706 has been set somewhere in the tree under which the dataset resides.
707 .It Sy type
708 The type of dataset:
709 .Sy filesystem ,
710 .Sy volume ,
711 or
712 .Sy snapshot .
713 .It Sy used
714 The amount of space consumed by this dataset and all its descendents.
715 This is the value that is checked against this dataset's quota and reservation.
716 The space used does not include this dataset's reservation, but does take into
717 account the reservations of any descendent datasets.
718 The amount of space that a dataset consumes from its parent, as well as the
719 amount of space that is freed if this dataset is recursively destroyed, is the
720 greater of its space used and its reservation.
721 .Pp
722 The used space of a snapshot
723 .Po see the
724 .Sx Snapshots
725 section
726 .Pc
727 is space that is referenced exclusively by this snapshot.
728 If this snapshot is destroyed, the amount of
729 .Sy used
730 space will be freed.
731 Space that is shared by multiple snapshots isn't accounted for in this metric.
732 When a snapshot is destroyed, space that was previously shared with this
733 snapshot can become unique to snapshots adjacent to it, thus changing the used
734 space of those snapshots.
735 The used space of the latest snapshot can also be affected by changes in the
736 file system.
737 Note that the
738 .Sy used
739 space of a snapshot is a subset of the
740 .Sy written
741 space of the snapshot.
742 .Pp
743 The amount of space used, available, or referenced does not take into account
744 pending changes.
745 Pending changes are generally accounted for within a few seconds.
746 Committing a change to a disk using
747 .Xr fsync 2
748 or
749 .Dv O_SYNC
750 does not necessarily guarantee that the space usage information is updated
751 immediately.
752 .It Sy usedby*
753 The
754 .Sy usedby*
755 properties decompose the
756 .Sy used
757 properties into the various reasons that space is used.
758 Specifically,
759 .Sy used No =
760 .Sy usedbychildren No +
761 .Sy usedbydataset No +
762 .Sy usedbyrefreservation No +
763 .Sy usedbysnapshots .
764 These properties are only available for datasets created on
765 .Nm zpool
766 .Qo version 13 Qc
767 pools.
768 .It Sy usedbychildren
769 The amount of space used by children of this dataset, which would be freed if
770 all the dataset's children were destroyed.
771 .It Sy usedbydataset
772 The amount of space used by this dataset itself, which would be freed if the
773 dataset were destroyed
774 .Po after first removing any
775 .Sy refreservation
776 and destroying any necessary snapshots or descendents
777 .Pc .
778 .It Sy usedbyrefreservation
779 The amount of space used by a
780 .Sy refreservation
781 set on this dataset, which would be freed if the
782 .Sy refreservation
783 was removed.
784 .It Sy usedbysnapshots
785 The amount of space consumed by snapshots of this dataset.
786 In particular, it is the amount of space that would be freed if all of this
787 dataset's snapshots were destroyed.
788 Note that this is not simply the sum of the snapshots'
789 .Sy used
790 properties because space can be shared by multiple snapshots.
791 .It Sy userused Ns @ Ns Em user
792 The amount of space consumed by the specified user in this dataset.
793 Space is charged to the owner of each file, as displayed by
794 .Nm ls Fl l .
795 The amount of space charged is displayed by
796 .Nm du
797 and
798 .Nm ls Fl s .
799 See the
800 .Nm zfs Cm userspace
801 subcommand for more information.
802 .Pp
803 Unprivileged users can access only their own space usage.
804 The root user, or a user who has been granted the
805 .Sy userused
806 privilege with
807 .Nm zfs Cm allow ,
808 can access everyone's usage.
809 .Pp
810 The
811 .Sy userused Ns @ Ns Em ...
812 properties are not displayed by
813 .Nm zfs Cm get Sy all .
814 The user's name must be appended after the @ symbol, using one of the following
815 forms:
816 .Bl -bullet -width ""
817 .It
818 .Em POSIX name
819 .Po for example,
820 .Sy joe
821 .Pc
822 .It
823 .Em POSIX numeric ID
824 .Po for example,
825 .Sy 789
826 .Pc
827 .It
828 .Em SID name
829 .Po for example,
830 .Sy joe.smith@mydomain
831 .Pc
832 .It
833 .Em SID numeric ID
834 .Po for example,
835 .Sy S-1-123-456-789
836 .Pc
837 .El
838 .Pp
839 Files created on Linux always have POSIX owners.
840 .It Sy userobjused Ns @ Ns Em user
841 The
842 .Sy userobjused
843 property is similar to
844 .Sy userused
845 but instead it counts the number of objects consumed by a user. This property
846 counts all objects allocated on behalf of the user, it may differ from the
847 results of system tools such as
848 .Nm df Fl i .
849 .Pp
850 When the property
851 .Sy xattr=on
852 is set on a file system additional objects will be created per-file to store
853 extended attributes. These additional objects are reflected in the
854 .Sy userobjused
855 value and are counted against the user's
856 .Sy userobjquota .
857 When a file system is configured to use
858 .Sy xattr=sa
859 no additional internal objects are normally required.
860 .It Sy userrefs
861 This property is set to the number of user holds on this snapshot.
862 User holds are set by using the
863 .Nm zfs Cm hold
864 command.
865 .It Sy groupused Ns @ Ns Em group
866 The amount of space consumed by the specified group in this dataset.
867 Space is charged to the group of each file, as displayed by
868 .Nm ls Fl l .
869 See the
870 .Sy userused Ns @ Ns Em user
871 property for more information.
872 .Pp
873 Unprivileged users can only access their own groups' space usage.
874 The root user, or a user who has been granted the
875 .Sy groupused
876 privilege with
877 .Nm zfs Cm allow ,
878 can access all groups' usage.
879 .It Sy groupobjused Ns @ Ns Em group
880 The number of objects consumed by the specified group in this dataset.
881 Multiple objects may be charged to the group for each file when extended
882 attributes are in use. See the
883 .Sy userobjused Ns @ Ns Em user
884 property for more information.
885 .Pp
886 Unprivileged users can only access their own groups' space usage.
887 The root user, or a user who has been granted the
888 .Sy groupobjused
889 privilege with
890 .Nm zfs Cm allow ,
891 can access all groups' usage.
892 .It Sy volblocksize
893 For volumes, specifies the block size of the volume.
894 The
895 .Sy blocksize
896 cannot be changed once the volume has been written, so it should be set at
897 volume creation time.
898 The default
899 .Sy blocksize
900 for volumes is 8 Kbytes.
901 Any power of 2 from 512 bytes to 128 Kbytes is valid.
902 .Pp
903 This property can also be referred to by its shortened column name,
904 .Sy volblock .
905 .It Sy written
906 The amount of space
907 .Sy referenced
908 by this dataset, that was written since the previous snapshot
909 .Pq i.e. that is not referenced by the previous snapshot .
910 .It Sy written Ns @ Ns Em snapshot
911 The amount of
912 .Sy referenced
913 space written to this dataset since the specified snapshot.
914 This is the space that is referenced by this dataset but was not referenced by
915 the specified snapshot.
916 .Pp
917 The
918 .Em snapshot
919 may be specified as a short snapshot name
920 .Po just the part after the
921 .Sy @
922 .Pc ,
923 in which case it will be interpreted as a snapshot in the same filesystem as
924 this dataset.
925 The
926 .Em snapshot
927 may be a full snapshot name
928 .Po Em filesystem Ns @ Ns Em snapshot Pc ,
929 which for clones may be a snapshot in the origin's filesystem
930 .Pq or the origin of the origin's filesystem, etc.
931 .El
932 .Pp
933 The following native properties can be used to change the behavior of a ZFS
934 dataset.
935 .Bl -tag -width ""
936 .It Xo
937 .Sy aclinherit Ns = Ns Sy discard Ns | Ns Sy noallow Ns | Ns
938 .Sy restricted Ns | Ns Sy passthrough Ns | Ns Sy passthrough-x
939 .Xc
940 Controls how ACEs are inherited when files and directories are created.
941 .Bl -tag -width "passthrough-x"
942 .It Sy discard
943 does not inherit any ACEs.
944 .It Sy noallow
945 only inherits inheritable ACEs that specify
946 .Qq deny
947 permissions.
948 .It Sy restricted
949 default, removes the
950 .Sy write_acl
951 and
952 .Sy write_owner
953 permissions when the ACE is inherited.
954 .It Sy passthrough
955 inherits all inheritable ACEs without any modifications.
956 .It Sy passthrough-x
957 same meaning as
958 .Sy passthrough ,
959 except that the
960 .Sy owner@ ,
961 .Sy group@ ,
962 and
963 .Sy everyone@
964 ACEs inherit the execute permission only if the file creation mode also requests
965 the execute bit.
966 .El
967 .Pp
968 When the property value is set to
969 .Sy passthrough ,
970 files are created with a mode determined by the inheritable ACEs.
971 If no inheritable ACEs exist that affect the mode, then the mode is set in
972 accordance to the requested mode from the application.
973 .Pp
974 The
975 .Sy aclinherit
976 property does not apply to posix ACLs.
977 .It Sy acltype Ns = Ns Sy off Ns | Ns Sy noacl Ns | Ns Sy posixacl
978 Controls whether ACLs are enabled and if so what type of ACL to use.
979 .Bl -tag -width "posixacl"
980 .It Sy off
981 default, when a file system has the
982 .Sy acltype
983 property set to off then ACLs are disabled.
984 .It Sy noacl
985 an alias for
986 .Sy off
987 .It Sy posixacl
988 indicates posix ACLs should be used. Posix ACLs are specific to Linux and are
989 not functional on other platforms. Posix ACLs are stored as an extended
990 attribute and therefore will not overwrite any existing NFSv4 ACLs which
991 may be set.
992 .El
993 .Pp
994 To obtain the best performance when setting
995 .Sy posixacl
996 users are strongly encouraged to set the
997 .Sy xattr=sa
998 property. This will result in the posix ACL being stored more efficiently on
999 disk. But as a consequence of this all new extended attributes will only be
1000 accessible from OpenZFS implementations which support the
1001 .Sy xattr=sa
1002 property. See the
1003 .Sy xattr
1004 property for more details.
1005 .It Sy atime Ns = Ns Sy on Ns | Ns Sy off
1006 Controls whether the access time for files is updated when they are read.
1007 Turning this property off avoids producing write traffic when reading files and
1008 can result in significant performance gains, though it might confuse mailers
1009 and other similar utilities. The values
1010 .Sy on
1011 and
1012 .Sy off
1013 are equivalent to the
1014 .Sy atime
1015 and
1016 .Sy noatime
1017 mount options. The default value is
1018 .Sy on .
1019 See also
1020 .Sy relatime
1021 below.
1022 .It Sy canmount Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy noauto
1023 If this property is set to
1024 .Sy off ,
1025 the file system cannot be mounted, and is ignored by
1026 .Nm zfs Cm mount Fl a .
1027 Setting this property to
1028 .Sy off
1029 is similar to setting the
1030 .Sy mountpoint
1031 property to
1032 .Sy none ,
1033 except that the dataset still has a normal
1034 .Sy mountpoint
1035 property, which can be inherited.
1036 Setting this property to
1037 .Sy off
1038 allows datasets to be used solely as a mechanism to inherit properties.
1039 One example of setting
1040 .Sy canmount Ns = Ns Sy off
1041 is to have two datasets with the same
1042 .Sy mountpoint ,
1043 so that the children of both datasets appear in the same directory, but might
1044 have different inherited characteristics.
1045 .Pp
1046 When set to
1047 .Sy noauto ,
1048 a dataset can only be mounted and unmounted explicitly.
1049 The dataset is not mounted automatically when the dataset is created or
1050 imported, nor is it mounted by the
1051 .Nm zfs Cm mount Fl a
1052 command or unmounted by the
1053 .Nm zfs Cm unmount Fl a
1054 command.
1055 .Pp
1056 This property is not inherited.
1057 .It Xo
1058 .Sy checksum Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy fletcher2 Ns | Ns
1059 .Sy fletcher4 Ns | Ns Sy sha256 Ns | Ns Sy noparity Ns | Ns
1060 .Sy sha512 Ns | Ns Sy skein Ns | Ns Sy edonr
1061 .Xc
1062 Controls the checksum used to verify data integrity.
1063 The default value is
1064 .Sy on ,
1065 which automatically selects an appropriate algorithm
1066 .Po currently,
1067 .Sy fletcher4 ,
1068 but this may change in future releases
1069 .Pc .
1070 The value
1071 .Sy off
1072 disables integrity checking on user data.
1073 The value
1074 .Sy noparity
1075 not only disables integrity but also disables maintaining parity for user data.
1076 This setting is used internally by a dump device residing on a RAID-Z pool and
1077 should not be used by any other dataset.
1078 Disabling checksums is
1079 .Sy NOT
1080 a recommended practice.
1081 .Pp
1082 The
1083 .Sy sha512 ,
1084 .Sy skein ,
1085 and
1086 .Sy edonr
1087 checksum algorithms require enabling the appropriate features on the pool.
1088 Please see
1089 .Xr zpool-features 5
1090 for more information on these algorithms.
1091 .Pp
1092 Changing this property affects only newly-written data.
1093 .It Xo
1094 .Sy compression Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy gzip Ns | Ns
1095 .Sy gzip- Ns Em N Ns | Ns Sy lz4 Ns | Ns Sy lzjb Ns | Ns Sy zle
1096 .Xc
1097 Controls the compression algorithm used for this dataset.
1098 .Pp
1099 Setting compression to
1100 .Sy on
1101 indicates that the current default compression algorithm should be used.
1102 The default balances compression and decompression speed, with compression ratio
1103 and is expected to work well on a wide variety of workloads.
1104 Unlike all other settings for this property,
1105 .Sy on
1106 does not select a fixed compression type.
1107 As new compression algorithms are added to ZFS and enabled on a pool, the
1108 default compression algorithm may change.
1109 The current default compression algorithm is either
1110 .Sy lzjb
1111 or, if the
1112 .Sy lz4_compress
1113 feature is enabled,
1114 .Sy lz4 .
1115 .Pp
1116 The
1117 .Sy lz4
1118 compression algorithm is a high-performance replacement for the
1119 .Sy lzjb
1120 algorithm.
1121 It features significantly faster compression and decompression, as well as a
1122 moderately higher compression ratio than
1123 .Sy lzjb ,
1124 but can only be used on pools with the
1125 .Sy lz4_compress
1126 feature set to
1127 .Sy enabled .
1128 See
1129 .Xr zpool-features 5
1130 for details on ZFS feature flags and the
1131 .Sy lz4_compress
1132 feature.
1133 .Pp
1134 The
1135 .Sy lzjb
1136 compression algorithm is optimized for performance while providing decent data
1137 compression.
1138 .Pp
1139 The
1140 .Sy gzip
1141 compression algorithm uses the same compression as the
1142 .Xr gzip 1
1143 command.
1144 You can specify the
1145 .Sy gzip
1146 level by using the value
1147 .Sy gzip- Ns Em N ,
1148 where
1149 .Em N
1150 is an integer from 1
1151 .Pq fastest
1152 to 9
1153 .Pq best compression ratio .
1154 Currently,
1155 .Sy gzip
1156 is equivalent to
1157 .Sy gzip-6
1158 .Po which is also the default for
1159 .Xr gzip 1
1160 .Pc .
1161 .Pp
1162 The
1163 .Sy zle
1164 compression algorithm compresses runs of zeros.
1165 .Pp
1166 This property can also be referred to by its shortened column name
1167 .Sy compress .
1168 Changing this property affects only newly-written data.
1169 .It Xo
1170 .Sy context Ns = Ns Sy none Ns | Ns
1171 .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level
1172 .Xc
1173 This flag sets the SELinux context for all files in the file system under
1174 a mount point for that file system. See
1175 .Xr selinux 8
1176 for more information.
1177 .It Xo
1178 .Sy fscontext Ns = Ns Sy none Ns | Ns
1179 .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level
1180 .Xc
1181 This flag sets the SELinux context for the file system file system being
1182 mounted. See
1183 .Xr selinux 8
1184 for more information.
1185 .It Xo
1186 .Sy defcontext Ns = Ns Sy none Ns | Ns
1187 .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level
1188 .Xc
1189 This flag sets the SELinux default context for unlabeled files. See
1190 .Xr selinux 8
1191 for more information.
1192 .It Xo
1193 .Sy rootcontext Ns = Ns Sy none Ns | Ns
1194 .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level
1195 .Xc
1196 This flag sets the SELinux context for the root inode of the file system. See
1197 .Xr selinux 8
1198 for more information.
1199 .It Sy copies Ns = Ns Sy 1 Ns | Ns Sy 2 Ns | Ns Sy 3
1200 Controls the number of copies of data stored for this dataset.
1201 These copies are in addition to any redundancy provided by the pool, for
1202 example, mirroring or RAID-Z.
1203 The copies are stored on different disks, if possible.
1204 The space used by multiple copies is charged to the associated file and dataset,
1205 changing the
1206 .Sy used
1207 property and counting against quotas and reservations.
1208 .Pp
1209 Changing this property only affects newly-written data.
1210 Therefore, set this property at file system creation time by using the
1211 .Fl o Sy copies Ns = Ns Ar N
1212 option.
1213 .Pp
1214 Remember that ZFS will not import a pool with a missing top-level vdev. Do
1215 .Sy NOT
1216 create, for example a two-disk striped pool and set
1217 .Sy copies=2
1218 on some datasets thinking you have setup redundancy for them. When a disk
1219 fails you will not be able to import the pool and will have lost all of your
1220 data.
1221 .It Sy devices Ns = Ns Sy on Ns | Ns Sy off
1222 Controls whether device nodes can be opened on this file system.
1223 The default value is
1224 .Sy on .
1225 The values
1226 .Sy on
1227 and
1228 .Sy off
1229 are equivalent to the
1230 .Sy dev
1231 and
1232 .Sy nodev
1233 mount options.
1234 .It Xo
1235 .Sy dnodesize Ns = Ns Sy legacy Ns | Ns Sy auto Ns | Ns Sy 1k Ns | Ns
1236 .Sy 2k Ns | Ns Sy 4k Ns | Ns Sy 8k Ns | Ns Sy 16k
1237 .Xc
1238 Specifies a compatibility mode or literal value for the size of dnodes in the
1239 file system. The default value is
1240 .Sy legacy .
1241 Setting this property to a value other than
1242 .Sy legacy
1243 requires the large_dnode pool feature to be enabled.
1244 .Pp
1245 Consider setting
1246 .Sy dnodesize
1247 to
1248 .Sy auto
1249 if the dataset uses the
1250 .Sy xattr=sa
1251 property setting and the workload makes heavy use of extended attributes. This
1252 may be applicable to SELinux-enabled systems, Lustre servers, and Samba
1253 servers, for example. Literal values are supported for cases where the optimal
1254 size is known in advance and for performance testing.
1255 .Pp
1256 Leave
1257 .Sy dnodesize
1258 set to
1259 .Sy legacy
1260 if you need to receive a send stream of this dataset on a pool that doesn't
1261 enable the large_dnode feature, or if you need to import this pool on a system
1262 that doesn't support the large_dnode feature.
1263 .Pp
1264 This property can also be referred to by its shortened column name,
1265 .Sy dnsize .
1266 .It Xo
1267 .Sy encryption Ns = Ns Sy off Ns | Ns Sy on Ns | Ns Sy aes-128-ccm Ns | Ns
1268 .Sy aes-192-ccm Ns | Ns Sy aes-256-ccm Ns | Ns Sy aes-128-gcm Ns | Ns
1269 .Sy aes-192-gcm Ns | Ns Sy aes-256-gcm
1270 .Xc
1271 Controls the encryption cipher suite (block cipher, key length, and mode) used
1272 for this dataset. Requires the
1273 .Sy encryption
1274 feature to be enabled on the pool.
1275 Requires a
1276 .Sy keyformat
1277 to be set at dataset creation time.
1278 .Pp
1279 Selecting
1280 .Sy encryption Ns = Ns Sy on
1281 when creating a dataset indicates that the default encryption suite will be
1282 selected, which is currently
1283 .Sy aes-256-ccm .
1284 In order to provide consistent data protection, encryption must be specified at
1285 dataset creation time and it cannot be changed afterwards.
1286 .Pp
1287 For more details and caveats about encryption see the
1288 .Sy Encryption
1289 section.
1290 .It Sy keyformat Ns = Ns Sy raw Ns | Ns Sy hex Ns | Ns Sy passphrase
1291 Controls what format the user's encryption key will be provided as. This
1292 property is only set when the dataset is encrypted.
1293 .Pp
1294 Raw keys and hex keys must be 32 bytes long (regardless of the chosen
1295 encryption suite) and must be randomly generated. A raw key can be generated
1296 with the following command:
1297 .Bd -literal
1298 # dd if=/dev/urandom of=/path/to/output/key bs=32 count=1
1299 .Ed
1300 .Pp
1301 Passphrases must be between 8 and 512 bytes long and will be processed through
1302 PBKDF2 before being used (see the
1303 .Sy pbkdf2iters
1304 property). Even though the
1305 encryption suite cannot be changed after dataset creation, the keyformat can be
1306 with
1307 .Nm zfs Cm change-key .
1308 .It Xo
1309 .Sy keylocation Ns = Ns Sy prompt Ns | Ns Sy file:// Ns Em </absolute/file/path>
1310 .Xc
1311 Controls where the user's encryption key will be loaded from by default for
1312 commands such as
1313 .Nm zfs Cm load-key
1314 and
1315 .Nm zfs Cm mount Cm -l . This property is
1316 only set for encrypted datasets which are encryption roots. If unspecified, the
1317 default is
1318 .Sy prompt.
1319 .Pp
1320 Even though the encryption suite cannot be changed after dataset creation, the
1321 keylocation can be with either
1322 .Nm zfs Cm set
1323 or
1324 .Nm zfs Cm change-key .
1325 If
1326 .Sy prompt
1327 is selected ZFS will ask for the key at the command prompt when it is required
1328 to access the encrypted data (see
1329 .Nm zfs Cm load-key
1330 for details). This setting will also allow the key to be passed in via STDIN,
1331 but users should be careful not to place keys which should be kept secret on
1332 the command line. If a file URI is selected, the key will be loaded from the
1333 specified absolute file path.
1334 .It Sy pbkdf2iters Ns = Ns Ar iterations
1335 Controls the number of PBKDF2 iterations that a
1336 .Sy passphrase
1337 encryption key should be run through when processing it into an encryption key.
1338 This property is only defined when encryption is enabled and a keyformat of
1339 .Sy passphrase
1340 is selected. The goal of PBKDF2 is to significantly increase the
1341 computational difficulty needed to brute force a user's passphrase. This is
1342 accomplished by forcing the attacker to run each passphrase through a
1343 computationally expensive hashing function many times before they arrive at the
1344 resulting key. A user who actually knows the passphrase will only have to pay
1345 this cost once. As CPUs become better at processing, this number should be
1346 raised to ensure that a brute force attack is still not possible. The current
1347 default is
1348 .Sy 350000
1349 and the minimum is
1350 .Sy 100000 .
1351 This property may be changed with
1352 .Nm zfs Cm change-key .
1353 .It Sy exec Ns = Ns Sy on Ns | Ns Sy off
1354 Controls whether processes can be executed from within this file system.
1355 The default value is
1356 .Sy on .
1357 The values
1358 .Sy on
1359 and
1360 .Sy off
1361 are equivalent to the
1362 .Sy exec
1363 and
1364 .Sy noexec
1365 mount options.
1366 .It Sy filesystem_limit Ns = Ns Em count Ns | Ns Sy none
1367 Limits the number of filesystems and volumes that can exist under this point in
1368 the dataset tree.
1369 The limit is not enforced if the user is allowed to change the limit.
1370 Setting a
1371 .Sy filesystem_limit
1372 to
1373 .Sy on
1374 a descendent of a filesystem that already has a
1375 .Sy filesystem_limit
1376 does not override the ancestor's
1377 .Sy filesystem_limit ,
1378 but rather imposes an additional limit.
1379 This feature must be enabled to be used
1380 .Po see
1381 .Xr zpool-features 5
1382 .Pc .
1383 .It Sy mountpoint Ns = Ns Pa path Ns | Ns Sy none Ns | Ns Sy legacy
1384 Controls the mount point used for this file system.
1385 See the
1386 .Sx Mount Points
1387 section for more information on how this property is used.
1388 .Pp
1389 When the
1390 .Sy mountpoint
1391 property is changed for a file system, the file system and any children that
1392 inherit the mount point are unmounted.
1393 If the new value is
1394 .Sy legacy ,
1395 then they remain unmounted.
1396 Otherwise, they are automatically remounted in the new location if the property
1397 was previously
1398 .Sy legacy
1399 or
1400 .Sy none ,
1401 or if they were mounted before the property was changed.
1402 In addition, any shared file systems are unshared and shared in the new
1403 location.
1404 .It Sy nbmand Ns = Ns Sy on Ns | Ns Sy off
1405 Controls whether the file system should be mounted with
1406 .Sy nbmand
1407 .Pq Non Blocking mandatory locks .
1408 This is used for SMB clients.
1409 Changes to this property only take effect when the file system is umounted and
1410 remounted.
1411 See
1412 .Xr mount 8
1413 for more information on
1414 .Sy nbmand
1415 mounts. This property is not used on Linux.
1416 .It Sy overlay Ns = Ns Sy off Ns | Ns Sy on
1417 Allow mounting on a busy directory or a directory which already contains
1418 files or directories. This is the default mount behavior for Linux file systems.
1419 For consistency with OpenZFS on other platforms overlay mounts are
1420 .Sy off
1421 by default. Set to
1422 .Sy on
1423 to enable overlay mounts.
1424 .It Sy primarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1425 Controls what is cached in the primary cache
1426 .Pq ARC .
1427 If this property is set to
1428 .Sy all ,
1429 then both user data and metadata is cached.
1430 If this property is set to
1431 .Sy none ,
1432 then neither user data nor metadata is cached.
1433 If this property is set to
1434 .Sy metadata ,
1435 then only metadata is cached.
1436 The default value is
1437 .Sy all .
1438 .It Sy quota Ns = Ns Em size Ns | Ns Sy none
1439 Limits the amount of space a dataset and its descendents can consume.
1440 This property enforces a hard limit on the amount of space used.
1441 This includes all space consumed by descendents, including file systems and
1442 snapshots.
1443 Setting a quota on a descendent of a dataset that already has a quota does not
1444 override the ancestor's quota, but rather imposes an additional limit.
1445 .Pp
1446 Quotas cannot be set on volumes, as the
1447 .Sy volsize
1448 property acts as an implicit quota.
1449 .It Sy snapshot_limit Ns = Ns Em count Ns | Ns Sy none
1450 Limits the number of snapshots that can be created on a dataset and its
1451 descendents.
1452 Setting a
1453 .Sy snapshot_limit
1454 on a descendent of a dataset that already has a
1455 .Sy snapshot_limit
1456 does not override the ancestor's
1457 .Sy snapshot_limit ,
1458 but rather imposes an additional limit.
1459 The limit is not enforced if the user is allowed to change the limit.
1460 For example, this means that recursive snapshots taken from the global zone are
1461 counted against each delegated dataset within a zone.
1462 This feature must be enabled to be used
1463 .Po see
1464 .Xr zpool-features 5
1465 .Pc .
1466 .It Sy userquota@ Ns Em user Ns = Ns Em size Ns | Ns Sy none
1467 Limits the amount of space consumed by the specified user.
1468 User space consumption is identified by the
1469 .Sy userspace@ Ns Em user
1470 property.
1471 .Pp
1472 Enforcement of user quotas may be delayed by several seconds.
1473 This delay means that a user might exceed their quota before the system notices
1474 that they are over quota and begins to refuse additional writes with the
1475 .Er EDQUOT
1476 error message.
1477 See the
1478 .Nm zfs Cm userspace
1479 subcommand for more information.
1480 .Pp
1481 Unprivileged users can only access their own groups' space usage.
1482 The root user, or a user who has been granted the
1483 .Sy userquota
1484 privilege with
1485 .Nm zfs Cm allow ,
1486 can get and set everyone's quota.
1487 .Pp
1488 This property is not available on volumes, on file systems before version 4, or
1489 on pools before version 15.
1490 The
1491 .Sy userquota@ Ns Em ...
1492 properties are not displayed by
1493 .Nm zfs Cm get Sy all .
1494 The user's name must be appended after the
1495 .Sy @
1496 symbol, using one of the following forms:
1497 .Bl -bullet
1498 .It
1499 .Em POSIX name
1500 .Po for example,
1501 .Sy joe
1502 .Pc
1503 .It
1504 .Em POSIX numeric ID
1505 .Po for example,
1506 .Sy 789
1507 .Pc
1508 .It
1509 .Em SID name
1510 .Po for example,
1511 .Sy joe.smith@mydomain
1512 .Pc
1513 .It
1514 .Em SID numeric ID
1515 .Po for example,
1516 .Sy S-1-123-456-789
1517 .Pc
1518 .El
1519 .Pp
1520 Files created on Linux always have POSIX owners.
1521 .It Sy userobjquota@ Ns Em user Ns = Ns Em size Ns | Ns Sy none
1522 The
1523 .Sy userobjquota
1524 is similar to
1525 .Sy userquota
1526 but it limits the number of objects a user can create. Please refer to
1527 .Sy userobjused
1528 for more information about how objects are counted.
1529 .It Sy groupquota@ Ns Em group Ns = Ns Em size Ns | Ns Sy none
1530 Limits the amount of space consumed by the specified group.
1531 Group space consumption is identified by the
1532 .Sy groupused@ Ns Em group
1533 property.
1534 .Pp
1535 Unprivileged users can access only their own groups' space usage.
1536 The root user, or a user who has been granted the
1537 .Sy groupquota
1538 privilege with
1539 .Nm zfs Cm allow ,
1540 can get and set all groups' quotas.
1541 .It Sy groupobjquota@ Ns Em group Ns = Ns Em size Ns | Ns Sy none
1542 The
1543 .Sy groupobjquota
1544 is similar to
1545 .Sy groupquota
1546 but it limits number of objects a group can consume. Please refer to
1547 .Sy userobjused
1548 for more information about how objects are counted.
1549 .It Sy readonly Ns = Ns Sy on Ns | Ns Sy off
1550 Controls whether this dataset can be modified.
1551 The default value is
1552 .Sy off .
1553 The values
1554 .Sy on
1555 and
1556 .Sy off
1557 are equivalent to the
1558 .Sy ro
1559 and
1560 .Sy rw
1561 mount options.
1562 .Pp
1563 This property can also be referred to by its shortened column name,
1564 .Sy rdonly .
1565 .It Sy recordsize Ns = Ns Em size
1566 Specifies a suggested block size for files in the file system.
1567 This property is designed solely for use with database workloads that access
1568 files in fixed-size records.
1569 ZFS automatically tunes block sizes according to internal algorithms optimized
1570 for typical access patterns.
1571 .Pp
1572 For databases that create very large files but access them in small random
1573 chunks, these algorithms may be suboptimal.
1574 Specifying a
1575 .Sy recordsize
1576 greater than or equal to the record size of the database can result in
1577 significant performance gains.
1578 Use of this property for general purpose file systems is strongly discouraged,
1579 and may adversely affect performance.
1580 .Pp
1581 The size specified must be a power of two greater than or equal to 512 and less
1582 than or equal to 128 Kbytes.
1583 If the
1584 .Sy large_blocks
1585 feature is enabled on the pool, the size may be up to 1 Mbyte.
1586 See
1587 .Xr zpool-features 5
1588 for details on ZFS feature flags.
1589 .Pp
1590 Changing the file system's
1591 .Sy recordsize
1592 affects only files created afterward; existing files are unaffected.
1593 .Pp
1594 This property can also be referred to by its shortened column name,
1595 .Sy recsize .
1596 .It Sy redundant_metadata Ns = Ns Sy all Ns | Ns Sy most
1597 Controls what types of metadata are stored redundantly.
1598 ZFS stores an extra copy of metadata, so that if a single block is corrupted,
1599 the amount of user data lost is limited.
1600 This extra copy is in addition to any redundancy provided at the pool level
1601 .Pq e.g. by mirroring or RAID-Z ,
1602 and is in addition to an extra copy specified by the
1603 .Sy copies
1604 property
1605 .Pq up to a total of 3 copies .
1606 For example if the pool is mirrored,
1607 .Sy copies Ns = Ns 2 ,
1608 and
1609 .Sy redundant_metadata Ns = Ns Sy most ,
1610 then ZFS stores 6 copies of most metadata, and 4 copies of data and some
1611 metadata.
1612 .Pp
1613 When set to
1614 .Sy all ,
1615 ZFS stores an extra copy of all metadata.
1616 If a single on-disk block is corrupt, at worst a single block of user data
1617 .Po which is
1618 .Sy recordsize
1619 bytes long
1620 .Pc
1621 can be lost.
1622 .Pp
1623 When set to
1624 .Sy most ,
1625 ZFS stores an extra copy of most types of metadata.
1626 This can improve performance of random writes, because less metadata must be
1627 written.
1628 In practice, at worst about 100 blocks
1629 .Po of
1630 .Sy recordsize
1631 bytes each
1632 .Pc
1633 of user data can be lost if a single on-disk block is corrupt.
1634 The exact behavior of which metadata blocks are stored redundantly may change in
1635 future releases.
1636 .Pp
1637 The default value is
1638 .Sy all .
1639 .It Sy refquota Ns = Ns Em size Ns | Ns Sy none
1640 Limits the amount of space a dataset can consume.
1641 This property enforces a hard limit on the amount of space used.
1642 This hard limit does not include space used by descendents, including file
1643 systems and snapshots.
1644 .It Sy refreservation Ns = Ns Em size Ns | Ns Sy none
1645 The minimum amount of space guaranteed to a dataset, not including its
1646 descendents.
1647 When the amount of space used is below this value, the dataset is treated as if
1648 it were taking up the amount of space specified by
1649 .Sy refreservation .
1650 The
1651 .Sy refreservation
1652 reservation is accounted for in the parent datasets' space used, and counts
1653 against the parent datasets' quotas and reservations.
1654 .Pp
1655 If
1656 .Sy refreservation
1657 is set, a snapshot is only allowed if there is enough free pool space outside of
1658 this reservation to accommodate the current number of
1659 .Qq referenced
1660 bytes in the dataset.
1661 .Pp
1662 This property can also be referred to by its shortened column name,
1663 .Sy refreserv .
1664 .It Sy relatime Ns = Ns Sy on Ns | Ns Sy off
1665 Controls the manner in which the access time is updated when
1666 .Sy atime=on
1667 is set. Turning this property on causes the access time to be updated relative
1668 to the modify or change time. Access time is only updated if the previous
1669 access time was earlier than the current modify or change time or if the
1670 existing access time hasn't been updated within the past 24 hours. The default
1671 value is
1672 .Sy off .
1673 The values
1674 .Sy on
1675 and
1676 .Sy off
1677 are equivalent to the
1678 .Sy relatime
1679 and
1680 .Sy norelatime
1681 mount options.
1682 .It Sy reservation Ns = Ns Em size Ns | Ns Sy none
1683 The minimum amount of space guaranteed to a dataset and its descendants.
1684 When the amount of space used is below this value, the dataset is treated as if
1685 it were taking up the amount of space specified by its reservation.
1686 Reservations are accounted for in the parent datasets' space used, and count
1687 against the parent datasets' quotas and reservations.
1688 .Pp
1689 This property can also be referred to by its shortened column name,
1690 .Sy reserv .
1691 .It Sy secondarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1692 Controls what is cached in the secondary cache
1693 .Pq L2ARC .
1694 If this property is set to
1695 .Sy all ,
1696 then both user data and metadata is cached.
1697 If this property is set to
1698 .Sy none ,
1699 then neither user data nor metadata is cached.
1700 If this property is set to
1701 .Sy metadata ,
1702 then only metadata is cached.
1703 The default value is
1704 .Sy all .
1705 .It Sy setuid Ns = Ns Sy on Ns | Ns Sy off
1706 Controls whether the setuid bit is respected for the file system.
1707 The default value is
1708 .Sy on .
1709 The values
1710 .Sy on
1711 and
1712 .Sy off
1713 are equivalent to the
1714 .Sy suid
1715 and
1716 .Sy nosuid
1717 mount options.
1718 .It Sy sharesmb Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1719 Controls whether the file system is shared by using
1720 .Sy Samba USERSHARES
1721 and what options are to be used. Otherwise, the file system is automatically
1722 shared and unshared with the
1723 .Nm zfs Cm share
1724 and
1725 .Nm zfs Cm unshare
1726 commands. If the property is set to on, the
1727 .Xr net 8
1728 command is invoked to create a
1729 .Sy USERSHARE .
1730 .Pp
1731 Because SMB shares requires a resource name, a unique resource name is
1732 constructed from the dataset name. The constructed name is a copy of the
1733 dataset name except that the characters in the dataset name, which would be
1734 invalid in the resource name, are replaced with underscore (_) characters.
1735 Linux does not currently support additional options which might be available
1736 on Solaris.
1737 .Pp
1738 If the
1739 .Sy sharesmb
1740 property is set to
1741 .Sy off ,
1742 the file systems are unshared.
1743 .Pp
1744 The share is created with the ACL (Access Control List) "Everyone:F" ("F"
1745 stands for "full permissions", ie. read and write permissions) and no guest
1746 access (which means Samba must be able to authenticate a real user, system
1747 passwd/shadow, LDAP or smbpasswd based) by default. This means that any
1748 additional access control (disallow specific user specific access etc) must
1749 be done on the underlying file system.
1750 .It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1751 Controls whether the file system is shared via NFS, and what options are to be
1752 used.
1753 A file system with a
1754 .Sy sharenfs
1755 property of
1756 .Sy off
1757 is managed with the
1758 .Xr exportfs 8
1759 command and entries in the
1760 .Em /etc/exports
1761 file.
1762 Otherwise, the file system is automatically shared and unshared with the
1763 .Nm zfs Cm share
1764 and
1765 .Nm zfs Cm unshare
1766 commands.
1767 If the property is set to
1768 .Sy on ,
1769 the dataset is shared using the default options:
1770 .Pp
1771 .Em sec=sys,rw,crossmnt,no_subtree_check,no_root_squash
1772 .Pp
1773 See
1774 .Xr exports 5
1775 for the meaning of the default options. Otherwise, the
1776 .Xr exportfs 8
1777 command is invoked with options equivalent to the contents of this property.
1778 .Pp
1779 When the
1780 .Sy sharenfs
1781 property is changed for a dataset, the dataset and any children inheriting the
1782 property are re-shared with the new options, only if the property was previously
1783 .Sy off ,
1784 or if they were shared before the property was changed.
1785 If the new property is
1786 .Sy off ,
1787 the file systems are unshared.
1788 .It Sy logbias Ns = Ns Sy latency Ns | Ns Sy throughput
1789 Provide a hint to ZFS about handling of synchronous requests in this dataset.
1790 If
1791 .Sy logbias
1792 is set to
1793 .Sy latency
1794 .Pq the default ,
1795 ZFS will use pool log devices
1796 .Pq if configured
1797 to handle the requests at low latency.
1798 If
1799 .Sy logbias
1800 is set to
1801 .Sy throughput ,
1802 ZFS will not use configured pool log devices.
1803 ZFS will instead optimize synchronous operations for global pool throughput and
1804 efficient use of resources.
1805 .It Sy snapdev Ns = Ns Sy hidden Ns | Ns Sy visible
1806 Controls whether the volume snapshot devices under
1807 .Em /dev/zvol/<pool>
1808 are hidden or visible. The default value is
1809 .Sy hidden .
1810 .It Sy snapdir Ns = Ns Sy hidden Ns | Ns Sy visible
1811 Controls whether the
1812 .Pa .zfs
1813 directory is hidden or visible in the root of the file system as discussed in
1814 the
1815 .Sx Snapshots
1816 section.
1817 The default value is
1818 .Sy hidden .
1819 .It Sy sync Ns = Ns Sy standard Ns | Ns Sy always Ns | Ns Sy disabled
1820 Controls the behavior of synchronous requests
1821 .Pq e.g. fsync, O_DSYNC .
1822 .Sy standard
1823 is the
1824 .Tn POSIX
1825 specified behavior of ensuring all synchronous requests are written to stable
1826 storage and all devices are flushed to ensure data is not cached by device
1827 controllers
1828 .Pq this is the default .
1829 .Sy always
1830 causes every file system transaction to be written and flushed before its
1831 system call returns.
1832 This has a large performance penalty.
1833 .Sy disabled
1834 disables synchronous requests.
1835 File system transactions are only committed to stable storage periodically.
1836 This option will give the highest performance.
1837 However, it is very dangerous as ZFS would be ignoring the synchronous
1838 transaction demands of applications such as databases or NFS.
1839 Administrators should only use this option when the risks are understood.
1840 .It Sy version Ns = Ns Em N Ns | Ns Sy current
1841 The on-disk version of this file system, which is independent of the pool
1842 version.
1843 This property can only be set to later supported versions.
1844 See the
1845 .Nm zfs Cm upgrade
1846 command.
1847 .It Sy volsize Ns = Ns Em size
1848 For volumes, specifies the logical size of the volume.
1849 By default, creating a volume establishes a reservation of equal size.
1850 For storage pools with a version number of 9 or higher, a
1851 .Sy refreservation
1852 is set instead.
1853 Any changes to
1854 .Sy volsize
1855 are reflected in an equivalent change to the reservation
1856 .Po or
1857 .Sy refreservation
1858 .Pc .
1859 The
1860 .Sy volsize
1861 can only be set to a multiple of
1862 .Sy volblocksize ,
1863 and cannot be zero.
1864 .Pp
1865 The reservation is kept equal to the volume's logical size to prevent unexpected
1866 behavior for consumers.
1867 Without the reservation, the volume could run out of space, resulting in
1868 undefined behavior or data corruption, depending on how the volume is used.
1869 These effects can also occur when the volume size is changed while it is in use
1870 .Pq particularly when shrinking the size .
1871 Extreme care should be used when adjusting the volume size.
1872 .Pp
1873 Though not recommended, a
1874 .Qq sparse volume
1875 .Po also known as
1876 .Qq thin provisioning
1877 .Pc
1878 can be created by specifying the
1879 .Fl s
1880 option to the
1881 .Nm zfs Cm create Fl V
1882 command, or by changing the reservation after the volume has been created.
1883 A
1884 .Qq sparse volume
1885 is a volume where the reservation is less then the volume size.
1886 Consequently, writes to a sparse volume can fail with
1887 .Er ENOSPC
1888 when the pool is low on space.
1889 For a sparse volume, changes to
1890 .Sy volsize
1891 are not reflected in the reservation.
1892 .It Sy volmode Ns = Ns Cm default | full | geom | dev | none
1893 This property specifies how volumes should be exposed to the OS.
1894 Setting it to
1895 .Sy full
1896 exposes volumes as fully fledged block devices, providing maximal
1897 functionality. The value
1898 .Sy geom
1899 is just an alias for
1900 .Sy full
1901 and is kept for compatibility.
1902 Setting it to
1903 .Sy dev
1904 hides its partitions.
1905 Volumes with property set to
1906 .Sy none
1907 are not exposed outside ZFS, but can be snapshoted, cloned, replicated, etc,
1908 that can be suitable for backup purposes.
1909 Value
1910 .Sy default
1911 means that volumes exposition is controlled by system-wide tunable
1912 .Va zvol_volmode ,
1913 where
1914 .Sy full ,
1915 .Sy dev
1916 and
1917 .Sy none
1918 are encoded as 1, 2 and 3 respectively.
1919 The default values is
1920 .Sy full .
1921 .It Sy vscan Ns = Ns Sy on Ns | Ns Sy off
1922 Controls whether regular files should be scanned for viruses when a file is
1923 opened and closed.
1924 In addition to enabling this property, the virus scan service must also be
1925 enabled for virus scanning to occur.
1926 The default value is
1927 .Sy off .
1928 This property is not used on Linux.
1929 .It Sy xattr Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy sa
1930 Controls whether extended attributes are enabled for this file system. Two
1931 styles of extended attributes are supported either directory based or system
1932 attribute based.
1933 .Pp
1934 The default value of
1935 .Sy on
1936 enables directory based extended attributes. This style of extended attribute
1937 imposes no practical limit on either the size or number of attributes which
1938 can be set on a file. Although under Linux the
1939 .Xr getxattr 2
1940 and
1941 .Xr setxattr 2
1942 system calls limit the maximum size to 64K. This is the most compatible
1943 style of extended attribute and is supported by all OpenZFS implementations.
1944 .Pp
1945 System attribute based xattrs can be enabled by setting the value to
1946 .Sy sa .
1947 The key advantage of this type of xattr is improved performance. Storing
1948 extended attributes as system attributes significantly decreases the amount of
1949 disk IO required. Up to 64K of data may be stored per-file in the space
1950 reserved for system attributes. If there is not enough space available for
1951 an extended attribute then it will be automatically written as a directory
1952 based xattr. System attribute based extended attributes are not accessible
1953 on platforms which do not support the
1954 .Sy xattr=sa
1955 feature.
1956 .Pp
1957 The use of system attribute based xattrs is strongly encouraged for users of
1958 SELinux or posix ACLs. Both of these features heavily rely of extended
1959 attributes and benefit significantly from the reduced access time.
1960 .Pp
1961 The values
1962 .Sy on
1963 and
1964 .Sy off
1965 are equivalent to the
1966 .Sy xattr
1967 and
1968 .Sy noxattr
1969 mount options.
1970 .It Sy zoned Ns = Ns Sy on Ns | Ns Sy off
1971 Controls whether the dataset is managed from a non-global zone. Zones are a
1972 Solaris feature and are not relevant on Linux. The default value is
1973 .Sy off .
1974 .El
1975 .Pp
1976 The following three properties cannot be changed after the file system is
1977 created, and therefore, should be set when the file system is created.
1978 If the properties are not set with the
1979 .Nm zfs Cm create
1980 or
1981 .Nm zpool Cm create
1982 commands, these properties are inherited from the parent dataset.
1983 If the parent dataset lacks these properties due to having been created prior to
1984 these features being supported, the new file system will have the default values
1985 for these properties.
1986 .Bl -tag -width ""
1987 .It Xo
1988 .Sy casesensitivity Ns = Ns Sy sensitive Ns | Ns
1989 .Sy insensitive Ns | Ns Sy mixed
1990 .Xc
1991 Indicates whether the file name matching algorithm used by the file system
1992 should be case-sensitive, case-insensitive, or allow a combination of both
1993 styles of matching.
1994 The default value for the
1995 .Sy casesensitivity
1996 property is
1997 .Sy sensitive .
1998 Traditionally,
1999 .Ux
2000 and
2001 .Tn POSIX
2002 file systems have case-sensitive file names.
2003 .Pp
2004 The
2005 .Sy mixed
2006 value for the
2007 .Sy casesensitivity
2008 property indicates that the file system can support requests for both
2009 case-sensitive and case-insensitive matching behavior.
2010 Currently, case-insensitive matching behavior on a file system that supports
2011 mixed behavior is limited to the SMB server product.
2012 For more information about the
2013 .Sy mixed
2014 value behavior, see the "ZFS Administration Guide".
2015 .It Xo
2016 .Sy normalization Ns = Ns Sy none Ns | Ns Sy formC Ns | Ns
2017 .Sy formD Ns | Ns Sy formKC Ns | Ns Sy formKD
2018 .Xc
2019 Indicates whether the file system should perform a
2020 .Sy unicode
2021 normalization of file names whenever two file names are compared, and which
2022 normalization algorithm should be used.
2023 File names are always stored unmodified, names are normalized as part of any
2024 comparison process.
2025 If this property is set to a legal value other than
2026 .Sy none ,
2027 and the
2028 .Sy utf8only
2029 property was left unspecified, the
2030 .Sy utf8only
2031 property is automatically set to
2032 .Sy on .
2033 The default value of the
2034 .Sy normalization
2035 property is
2036 .Sy none .
2037 This property cannot be changed after the file system is created.
2038 .It Sy utf8only Ns = Ns Sy on Ns | Ns Sy off
2039 Indicates whether the file system should reject file names that include
2040 characters that are not present in the
2041 .Sy UTF-8
2042 character code set.
2043 If this property is explicitly set to
2044 .Sy off ,
2045 the normalization property must either not be explicitly set or be set to
2046 .Sy none .
2047 The default value for the
2048 .Sy utf8only
2049 property is
2050 .Sy off .
2051 This property cannot be changed after the file system is created.
2052 .El
2053 .Pp
2054 The
2055 .Sy casesensitivity ,
2056 .Sy normalization ,
2057 and
2058 .Sy utf8only
2059 properties are also new permissions that can be assigned to non-privileged users
2060 by using the ZFS delegated administration feature.
2061 .Ss "Temporary Mount Point Properties"
2062 When a file system is mounted, either through
2063 .Xr mount 8
2064 for legacy mounts or the
2065 .Nm zfs Cm mount
2066 command for normal file systems, its mount options are set according to its
2067 properties.
2068 The correlation between properties and mount options is as follows:
2069 .Bd -literal
2070     PROPERTY                MOUNT OPTION
2071     atime                   atime/noatime
2072     canmount                auto/noauto
2073     devices                 dev/nodev
2074     exec                    exec/noexec
2075     readonly                ro/rw
2076     relatime                relatime/norelatime
2077     setuid                  suid/nosuid
2078     xattr                   xattr/noxattr
2079 .Ed
2080 .Pp
2081 In addition, these options can be set on a per-mount basis using the
2082 .Fl o
2083 option, without affecting the property that is stored on disk.
2084 The values specified on the command line override the values stored in the
2085 dataset.
2086 The
2087 .Sy nosuid
2088 option is an alias for
2089 .Sy nodevices Ns \&, Ns Sy nosetuid .
2090 These properties are reported as
2091 .Qq temporary
2092 by the
2093 .Nm zfs Cm get
2094 command.
2095 If the properties are changed while the dataset is mounted, the new setting
2096 overrides any temporary settings.
2097 .Ss "User Properties"
2098 In addition to the standard native properties, ZFS supports arbitrary user
2099 properties.
2100 User properties have no effect on ZFS behavior, but applications or
2101 administrators can use them to annotate datasets
2102 .Pq file systems, volumes, and snapshots .
2103 .Pp
2104 User property names must contain a colon
2105 .Pq Qq Sy \&:
2106 character to distinguish them from native properties.
2107 They may contain lowercase letters, numbers, and the following punctuation
2108 characters: colon
2109 .Pq Qq Sy \&: ,
2110 dash
2111 .Pq Qq Sy - ,
2112 period
2113 .Pq Qq Sy \&. ,
2114 and underscore
2115 .Pq Qq Sy _ .
2116 The expected convention is that the property name is divided into two portions
2117 such as
2118 .Em module Ns \&: Ns Em property ,
2119 but this namespace is not enforced by ZFS.
2120 User property names can be at most 256 characters, and cannot begin with a dash
2121 .Pq Qq Sy - .
2122 .Pp
2123 When making programmatic use of user properties, it is strongly suggested to use
2124 a reversed
2125 .Sy DNS
2126 domain name for the
2127 .Em module
2128 component of property names to reduce the chance that two
2129 independently-developed packages use the same property name for different
2130 purposes.
2131 .Pp
2132 The values of user properties are arbitrary strings, are always inherited, and
2133 are never validated.
2134 All of the commands that operate on properties
2135 .Po Nm zfs Cm list ,
2136 .Nm zfs Cm get ,
2137 .Nm zfs Cm set ,
2138 and so forth
2139 .Pc
2140 can be used to manipulate both native properties and user properties.
2141 Use the
2142 .Nm zfs Cm inherit
2143 command to clear a user property.
2144 If the property is not defined in any parent dataset, it is removed entirely.
2145 Property values are limited to 8192 bytes.
2146 .Ss ZFS Volumes as Swap
2147 ZFS volumes may be used as swap devices. After creating the volume with the
2148 .Nm zfs Cm create Fl V
2149 command set up and enable the swap area using the
2150 .Xr mkswap 8
2151 and
2152 .Xr swapon 8
2153 commands. Do not swap to a file on a ZFS file system. A ZFS swap file
2154 configuration is not supported.
2155 .Ss Encryption
2156 Enabling the
2157 .Sy encryption
2158 feature allows for the creation of encrypted filesystems and volumes.
2159 .Nm
2160 will encrypt all user data including file and zvol data, file attributes,
2161 ACLs, permission bits, directory listings, FUID mappings, and userused /
2162 groupused data.
2163 .Nm
2164 will not encrypt metadata related to the pool structure, including dataset
2165 names, dataset hierarchy, file size, file holes, and dedup tables. Key rotation
2166 is managed internally by the  kernel module and changing the user's key does not
2167 require re-encrypting the entire dataset. Datasets can be scrubbed, resilvered,
2168 renamed, and deleted without the encryption keys being loaded (see the
2169 .Nm zfs Cm load-key
2170 subcommand for more info on key loading).
2171 .Pp
2172 Creating an encrypted dataset requires specifying the
2173 .Sy encryption
2174 and
2175 .Sy keyformat
2176 properties at creation time, along with an optional
2177 .Sy keylocation
2178 and
2179 .Sy pbkdf2iters .
2180 After entering an encryption key, the
2181 created dataset will become an encryption root. Any descendant datasets will
2182 inherit their encryption key from the encryption root, meaning that loading,
2183 unloading, or changing the key for the encryption root will implicitly do the
2184 same for all inheriting datasets. If this inheritence is not desired, simply
2185 supply a new
2186 .Sy encryption
2187 and
2188 .Sy keyformat
2189 when creating the child dataset or use
2190 .Nm zfs Cm change-key
2191 to break the relationship. The one exception is that clones will always use
2192 their origin's encryption key. Encryption root inheritence can be tracked via
2193 the read-only
2194 .Sy encryptionroot
2195 property.
2196 .Pp
2197 Encryption changes the behavior of a few
2198 .Nm
2199 operations. Encryption is applied after compression so compression ratios are
2200 preserved. Normally checksums in ZFS are 256 bits long, but for encrypted data
2201 the checksum is 128 bits of the user-chosen checksum and 128 bits of MAC from
2202 the encryption suite, which provides additional protection against maliciously
2203 altered data. Deduplication is still possible with encryption enabled but for
2204 security, datasets will only dedup against themselves, their snapshots, and
2205 their clones.
2206 .Pp
2207 There are a few limitations on encrypted datasets. Encrypted data cannot be
2208 embedded via the
2209 .Sy embedded_data
2210 feature. Encrypted datasets may not have
2211 .Sy copies Ns = Ns Em 3
2212 since the implementation stores some encryption metadata where the third copy
2213 would normally be. Since compression is applied before encryption datasets may
2214 be vulnerable to a CRIME-like attack if applications accessing the data allow
2215 for it. Deduplication with encryption will leak information about which blocks
2216 are equivalent in a dataset and will incur an extra CPU cost per block written.
2217 .Sh SUBCOMMANDS
2218 All subcommands that modify state are logged persistently to the pool in their
2219 original form.
2220 .Bl -tag -width ""
2221 .It Nm Fl ?
2222 Displays a help message.
2223 .It Xo
2224 .Nm
2225 .Cm create
2226 .Op Fl p
2227 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
2228 .Ar filesystem
2229 .Xc
2230 Creates a new ZFS file system.
2231 The file system is automatically mounted according to the
2232 .Sy mountpoint
2233 property inherited from the parent.
2234 .Bl -tag -width "-o"
2235 .It Fl o Ar property Ns = Ns Ar value
2236 Sets the specified property as if the command
2237 .Nm zfs Cm set Ar property Ns = Ns Ar value
2238 was invoked at the same time the dataset was created.
2239 Any editable ZFS property can also be set at creation time.
2240 Multiple
2241 .Fl o
2242 options can be specified.
2243 An error results if the same property is specified in multiple
2244 .Fl o
2245 options.
2246 .It Fl p
2247 Creates all the non-existing parent datasets.
2248 Datasets created in this manner are automatically mounted according to the
2249 .Sy mountpoint
2250 property inherited from their parent.
2251 Any property specified on the command line using the
2252 .Fl o
2253 option is ignored.
2254 If the target filesystem already exists, the operation completes successfully.
2255 .El
2256 .It Xo
2257 .Nm
2258 .Cm create
2259 .Op Fl ps
2260 .Op Fl b Ar blocksize
2261 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
2262 .Fl V Ar size Ar volume
2263 .Xc
2264 Creates a volume of the given size.
2265 The volume is exported as a block device in
2266 .Pa /dev/zvol/path ,
2267 where
2268 .Em path
2269 is the name of the volume in the ZFS namespace.
2270 The size represents the logical size as exported by the device.
2271 By default, a reservation of equal size is created.
2272 .Pp
2273 .Ar size
2274 is automatically rounded up to the nearest 128 Kbytes to ensure that the volume
2275 has an integral number of blocks regardless of
2276 .Sy blocksize .
2277 .Bl -tag -width "-b"
2278 .It Fl b Ar blocksize
2279 Equivalent to
2280 .Fl o Sy volblocksize Ns = Ns Ar blocksize .
2281 If this option is specified in conjunction with
2282 .Fl o Sy volblocksize ,
2283 the resulting behavior is undefined.
2284 .It Fl o Ar property Ns = Ns Ar value
2285 Sets the specified property as if the
2286 .Nm zfs Cm set Ar property Ns = Ns Ar value
2287 command was invoked at the same time the dataset was created.
2288 Any editable ZFS property can also be set at creation time.
2289 Multiple
2290 .Fl o
2291 options can be specified.
2292 An error results if the same property is specified in multiple
2293 .Fl o
2294 options.
2295 .It Fl p
2296 Creates all the non-existing parent datasets.
2297 Datasets created in this manner are automatically mounted according to the
2298 .Sy mountpoint
2299 property inherited from their parent.
2300 Any property specified on the command line using the
2301 .Fl o
2302 option is ignored.
2303 If the target filesystem already exists, the operation completes successfully.
2304 .It Fl s
2305 Creates a sparse volume with no reservation.
2306 See
2307 .Sy volsize
2308 in the
2309 .Sx Native Properties
2310 section for more information about sparse volumes.
2311 .El
2312 .It Xo
2313 .Nm
2314 .Cm destroy
2315 .Op Fl Rfnprv
2316 .Ar filesystem Ns | Ns Ar volume
2317 .Xc
2318 Destroys the given dataset.
2319 By default, the command unshares any file systems that are currently shared,
2320 unmounts any file systems that are currently mounted, and refuses to destroy a
2321 dataset that has active dependents
2322 .Pq children or clones .
2323 .Bl -tag -width "-R"
2324 .It Fl R
2325 Recursively destroy all dependents, including cloned file systems outside the
2326 target hierarchy.
2327 .It Fl f
2328 Force an unmount of any file systems using the
2329 .Nm unmount Fl f
2330 command.
2331 This option has no effect on non-file systems or unmounted file systems.
2332 .It Fl n
2333 Do a dry-run
2334 .Pq Qq No-op
2335 deletion.
2336 No data will be deleted.
2337 This is useful in conjunction with the
2338 .Fl v
2339 or
2340 .Fl p
2341 flags to determine what data would be deleted.
2342 .It Fl p
2343 Print machine-parsable verbose information about the deleted data.
2344 .It Fl r
2345 Recursively destroy all children.
2346 .It Fl v
2347 Print verbose information about the deleted data.
2348 .El
2349 .Pp
2350 Extreme care should be taken when applying either the
2351 .Fl r
2352 or the
2353 .Fl R
2354 options, as they can destroy large portions of a pool and cause unexpected
2355 behavior for mounted file systems in use.
2356 .It Xo
2357 .Nm
2358 .Cm destroy
2359 .Op Fl Rdnprv
2360 .Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns
2361 .Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ...
2362 .Xc
2363 The given snapshots are destroyed immediately if and only if the
2364 .Nm zfs Cm destroy
2365 command without the
2366 .Fl d
2367 option would have destroyed it.
2368 Such immediate destruction would occur, for example, if the snapshot had no
2369 clones and the user-initiated reference count were zero.
2370 .Pp
2371 If a snapshot does not qualify for immediate destruction, it is marked for
2372 deferred deletion.
2373 In this state, it exists as a usable, visible snapshot until both of the
2374 preconditions listed above are met, at which point it is destroyed.
2375 .Pp
2376 An inclusive range of snapshots may be specified by separating the first and
2377 last snapshots with a percent sign.
2378 The first and/or last snapshots may be left blank, in which case the
2379 filesystem's oldest or newest snapshot will be implied.
2380 .Pp
2381 Multiple snapshots
2382 .Pq or ranges of snapshots
2383 of the same filesystem or volume may be specified in a comma-separated list of
2384 snapshots.
2385 Only the snapshot's short name
2386 .Po the part after the
2387 .Sy @
2388 .Pc
2389 should be specified when using a range or comma-separated list to identify
2390 multiple snapshots.
2391 .Bl -tag -width "-R"
2392 .It Fl R
2393 Recursively destroy all clones of these snapshots, including the clones,
2394 snapshots, and children.
2395 If this flag is specified, the
2396 .Fl d
2397 flag will have no effect.
2398 .It Fl d
2399 Defer snapshot deletion.
2400 .It Fl n
2401 Do a dry-run
2402 .Pq Qq No-op
2403 deletion.
2404 No data will be deleted.
2405 This is useful in conjunction with the
2406 .Fl p
2407 or
2408 .Fl v
2409 flags to determine what data would be deleted.
2410 .It Fl p
2411 Print machine-parsable verbose information about the deleted data.
2412 .It Fl r
2413 Destroy
2414 .Pq or mark for deferred deletion
2415 all snapshots with this name in descendent file systems.
2416 .It Fl v
2417 Print verbose information about the deleted data.
2418 .Pp
2419 Extreme care should be taken when applying either the
2420 .Fl r
2421 or the
2422 .Fl R
2423 options, as they can destroy large portions of a pool and cause unexpected
2424 behavior for mounted file systems in use.
2425 .El
2426 .It Xo
2427 .Nm
2428 .Cm destroy
2429 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
2430 .Xc
2431 The given bookmark is destroyed.
2432 .It Xo
2433 .Nm
2434 .Cm snapshot
2435 .Op Fl r
2436 .Oo Fl o Ar property Ns = Ns value Oc Ns ...
2437 .Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ...
2438 .Xc
2439 Creates snapshots with the given names.
2440 All previous modifications by successful system calls to the file system are
2441 part of the snapshots.
2442 Snapshots are taken atomically, so that all snapshots correspond to the same
2443 moment in time.
2444 See the
2445 .Sx Snapshots
2446 section for details.
2447 .Bl -tag -width "-o"
2448 .It Fl o Ar property Ns = Ns Ar value
2449 Sets the specified property; see
2450 .Nm zfs Cm create
2451 for details.
2452 .It Fl r
2453 Recursively create snapshots of all descendent datasets
2454 .El
2455 .It Xo
2456 .Nm
2457 .Cm rollback
2458 .Op Fl Rfr
2459 .Ar snapshot
2460 .Xc
2461 Roll back the given dataset to a previous snapshot.
2462 When a dataset is rolled back, all data that has changed since the snapshot is
2463 discarded, and the dataset reverts to the state at the time of the snapshot.
2464 By default, the command refuses to roll back to a snapshot other than the most
2465 recent one.
2466 In order to do so, all intermediate snapshots and bookmarks must be destroyed by
2467 specifying the
2468 .Fl r
2469 option.
2470 .Pp
2471 The
2472 .Fl rR
2473 options do not recursively destroy the child snapshots of a recursive snapshot.
2474 Only direct snapshots of the specified filesystem are destroyed by either of
2475 these options.
2476 To completely roll back a recursive snapshot, you must rollback the individual
2477 child snapshots.
2478 .Bl -tag -width "-R"
2479 .It Fl R
2480 Destroy any more recent snapshots and bookmarks, as well as any clones of those
2481 snapshots.
2482 .It Fl f
2483 Used with the
2484 .Fl R
2485 option to force an unmount of any clone file systems that are to be destroyed.
2486 .It Fl r
2487 Destroy any snapshots and bookmarks more recent than the one specified.
2488 .El
2489 .It Xo
2490 .Nm
2491 .Cm clone
2492 .Op Fl p
2493 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
2494 .Ar snapshot Ar filesystem Ns | Ns Ar volume
2495 .Xc
2496 Creates a clone of the given snapshot.
2497 See the
2498 .Sx Clones
2499 section for details.
2500 The target dataset can be located anywhere in the ZFS hierarchy, and is created
2501 as the same type as the original.
2502 .Bl -tag -width "-o"
2503 .It Fl o Ar property Ns = Ns Ar value
2504 Sets the specified property; see
2505 .Nm zfs Cm create
2506 for details.
2507 .It Fl p
2508 Creates all the non-existing parent datasets.
2509 Datasets created in this manner are automatically mounted according to the
2510 .Sy mountpoint
2511 property inherited from their parent.
2512 If the target filesystem or volume already exists, the operation completes
2513 successfully.
2514 .El
2515 .It Xo
2516 .Nm
2517 .Cm promote
2518 .Ar clone-filesystem
2519 .Xc
2520 Promotes a clone file system to no longer be dependent on its
2521 .Qq origin
2522 snapshot.
2523 This makes it possible to destroy the file system that the clone was created
2524 from.
2525 The clone parent-child dependency relationship is reversed, so that the origin
2526 file system becomes a clone of the specified file system.
2527 .Pp
2528 The snapshot that was cloned, and any snapshots previous to this snapshot, are
2529 now owned by the promoted clone.
2530 The space they use moves from the origin file system to the promoted clone, so
2531 enough space must be available to accommodate these snapshots.
2532 No new space is consumed by this operation, but the space accounting is
2533 adjusted.
2534 The promoted clone must not have any conflicting snapshot names of its own.
2535 The
2536 .Cm rename
2537 subcommand can be used to rename any conflicting snapshots.
2538 .It Xo
2539 .Nm
2540 .Cm rename
2541 .Op Fl f
2542 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2543 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2544 .Xc
2545 .It Xo
2546 .Nm
2547 .Cm rename
2548 .Op Fl fp
2549 .Ar filesystem Ns | Ns Ar volume
2550 .Ar filesystem Ns | Ns Ar volume
2551 .Xc
2552 Renames the given dataset.
2553 The new target can be located anywhere in the ZFS hierarchy, with the exception
2554 of snapshots.
2555 Snapshots can only be renamed within the parent file system or volume.
2556 When renaming a snapshot, the parent file system of the snapshot does not need
2557 to be specified as part of the second argument.
2558 Renamed file systems can inherit new mount points, in which case they are
2559 unmounted and remounted at the new mount point.
2560 .Bl -tag -width "-a"
2561 .It Fl f
2562 Force unmount any filesystems that need to be unmounted in the process.
2563 .It Fl p
2564 Creates all the nonexistent parent datasets.
2565 Datasets created in this manner are automatically mounted according to the
2566 .Sy mountpoint
2567 property inherited from their parent.
2568 .El
2569 .It Xo
2570 .Nm
2571 .Cm rename
2572 .Fl r
2573 .Ar snapshot Ar snapshot
2574 .Xc
2575 Recursively rename the snapshots of all descendent datasets.
2576 Snapshots are the only dataset that can be renamed recursively.
2577 .It Xo
2578 .Nm
2579 .Cm list
2580 .Op Fl r Ns | Ns Fl d Ar depth
2581 .Op Fl Hp
2582 .Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc
2583 .Oo Fl s Ar property Oc Ns ...
2584 .Oo Fl S Ar property Oc Ns ...
2585 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2586 .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ...
2587 .Xc
2588 Lists the property information for the given datasets in tabular form.
2589 If specified, you can list property information by the absolute pathname or the
2590 relative pathname.
2591 By default, all file systems and volumes are displayed.
2592 Snapshots are displayed if the
2593 .Sy listsnaps
2594 property is
2595 .Sy on
2596 .Po the default is
2597 .Sy off
2598 .Pc .
2599 The following fields are displayed,
2600 .Sy name Ns \&, Ns Sy used Ns \&, Ns Sy available Ns \&, Ns Sy referenced Ns \&, Ns
2601 .Sy mountpoint .
2602 .Bl -tag -width "-H"
2603 .It Fl H
2604 Used for scripting mode.
2605 Do not print headers and separate fields by a single tab instead of arbitrary
2606 white space.
2607 .It Fl S Ar property
2608 Same as the
2609 .Fl s
2610 option, but sorts by property in descending order.
2611 .It Fl d Ar depth
2612 Recursively display any children of the dataset, limiting the recursion to
2613 .Ar depth .
2614 A
2615 .Ar depth
2616 of
2617 .Sy 1
2618 will display only the dataset and its direct children.
2619 .It Fl o Ar property
2620 A comma-separated list of properties to display.
2621 The property must be:
2622 .Bl -bullet
2623 .It
2624 One of the properties described in the
2625 .Sx Native Properties
2626 section
2627 .It
2628 A user property
2629 .It
2630 The value
2631 .Sy name
2632 to display the dataset name
2633 .It
2634 The value
2635 .Sy space
2636 to display space usage properties on file systems and volumes.
2637 This is a shortcut for specifying
2638 .Fl o Sy name Ns \&, Ns Sy avail Ns \&, Ns Sy used Ns \&, Ns Sy usedsnap Ns \&, Ns
2639 .Sy usedds Ns \&, Ns Sy usedrefreserv Ns \&, Ns Sy usedchild Fl t
2640 .Sy filesystem Ns \&, Ns Sy volume
2641 syntax.
2642 .El
2643 .It Fl p
2644 Display numbers in parsable
2645 .Pq exact
2646 values.
2647 .It Fl r
2648 Recursively display any children of the dataset on the command line.
2649 .It Fl s Ar property
2650 A property for sorting the output by column in ascending order based on the
2651 value of the property.
2652 The property must be one of the properties described in the
2653 .Sx Properties
2654 section, or the special value
2655 .Sy name
2656 to sort by the dataset name.
2657 Multiple properties can be specified at one time using multiple
2658 .Fl s
2659 property options.
2660 Multiple
2661 .Fl s
2662 options are evaluated from left to right in decreasing order of importance.
2663 The following is a list of sorting criteria:
2664 .Bl -bullet
2665 .It
2666 Numeric types sort in numeric order.
2667 .It
2668 String types sort in alphabetical order.
2669 .It
2670 Types inappropriate for a row sort that row to the literal bottom, regardless of
2671 the specified ordering.
2672 .El
2673 .Pp
2674 If no sorting options are specified the existing behavior of
2675 .Nm zfs Cm list
2676 is preserved.
2677 .It Fl t Ar type
2678 A comma-separated list of types to display, where
2679 .Ar type
2680 is one of
2681 .Sy filesystem ,
2682 .Sy snapshot ,
2683 .Sy volume ,
2684 .Sy bookmark ,
2685 or
2686 .Sy all .
2687 For example, specifying
2688 .Fl t Sy snapshot
2689 displays only snapshots.
2690 .El
2691 .It Xo
2692 .Nm
2693 .Cm set
2694 .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ...
2695 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2696 .Xc
2697 Sets the property or list of properties to the given value(s) for each dataset.
2698 Only some properties can be edited.
2699 See the
2700 .Sx Properties
2701 section for more information on what properties can be set and acceptable
2702 values.
2703 Numeric values can be specified as exact values, or in a human-readable form
2704 with a suffix of
2705 .Sy B , K , M , G , T , P , E , Z
2706 .Po for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes,
2707 or zettabytes, respectively
2708 .Pc .
2709 User properties can be set on snapshots.
2710 For more information, see the
2711 .Sx User Properties
2712 section.
2713 .It Xo
2714 .Nm
2715 .Cm get
2716 .Op Fl r Ns | Ns Fl d Ar depth
2717 .Op Fl Hp
2718 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2719 .Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc
2720 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2721 .Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ...
2722 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Ns ...
2723 .Xc
2724 Displays properties for the given datasets.
2725 If no datasets are specified, then the command displays properties for all
2726 datasets on the system.
2727 For each property, the following columns are displayed:
2728 .Bd -literal
2729     name      Dataset name
2730     property  Property name
2731     value     Property value
2732     source    Property source.  Can either be local, default,
2733               temporary, inherited, or none (-).
2734 .Ed
2735 .Pp
2736 All columns are displayed by default, though this can be controlled by using the
2737 .Fl o
2738 option.
2739 This command takes a comma-separated list of properties as described in the
2740 .Sx Native Properties
2741 and
2742 .Sx User Properties
2743 sections.
2744 .Pp
2745 The special value
2746 .Sy all
2747 can be used to display all properties that apply to the given dataset's type
2748 .Pq filesystem, volume, snapshot, or bookmark .
2749 .Bl -tag -width "-H"
2750 .It Fl H
2751 Display output in a form more easily parsed by scripts.
2752 Any headers are omitted, and fields are explicitly separated by a single tab
2753 instead of an arbitrary amount of space.
2754 .It Fl d Ar depth
2755 Recursively display any children of the dataset, limiting the recursion to
2756 .Ar depth .
2757 A depth of
2758 .Sy 1
2759 will display only the dataset and its direct children.
2760 .It Fl o Ar field
2761 A comma-separated list of columns to display.
2762 .Sy name Ns \&, Ns Sy property Ns \&, Ns Sy value Ns \&, Ns Sy source
2763 is the default value.
2764 .It Fl p
2765 Display numbers in parsable
2766 .Pq exact
2767 values.
2768 .It Fl r
2769 Recursively display properties for any children.
2770 .It Fl s Ar source
2771 A comma-separated list of sources to display.
2772 Those properties coming from a source other than those in this list are ignored.
2773 Each source must be one of the following:
2774 .Sy local ,
2775 .Sy default ,
2776 .Sy inherited ,
2777 .Sy temporary ,
2778 and
2779 .Sy none .
2780 The default value is all sources.
2781 .It Fl t Ar type
2782 A comma-separated list of types to display, where
2783 .Ar type
2784 is one of
2785 .Sy filesystem ,
2786 .Sy snapshot ,
2787 .Sy volume ,
2788 .Sy bookmark ,
2789 or
2790 .Sy all .
2791 .El
2792 .It Xo
2793 .Nm
2794 .Cm inherit
2795 .Op Fl rS
2796 .Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2797 .Xc
2798 Clears the specified property, causing it to be inherited from an ancestor,
2799 restored to default if no ancestor has the property set, or with the
2800 .Fl S
2801 option reverted to the received value if one exists.
2802 See the
2803 .Sx Properties
2804 section for a listing of default values, and details on which properties can be
2805 inherited.
2806 .Bl -tag -width "-r"
2807 .It Fl r
2808 Recursively inherit the given property for all children.
2809 .It Fl S
2810 Revert the property to the received value if one exists; otherwise operate as
2811 if the
2812 .Fl S
2813 option was not specified.
2814 .El
2815 .It Xo
2816 .Nm
2817 .Cm upgrade
2818 .Xc
2819 Displays a list of file systems that are not the most recent version.
2820 .It Xo
2821 .Nm
2822 .Cm upgrade
2823 .Fl v
2824 .Xc
2825 Displays a list of currently supported file system versions.
2826 .It Xo
2827 .Nm
2828 .Cm upgrade
2829 .Op Fl r
2830 .Op Fl V Ar version
2831 .Fl a | Ar filesystem
2832 .Xc
2833 Upgrades file systems to a new on-disk version.
2834 Once this is done, the file systems will no longer be accessible on systems
2835 running older versions of the software.
2836 .Nm zfs Cm send
2837 streams generated from new snapshots of these file systems cannot be accessed on
2838 systems running older versions of the software.
2839 .Pp
2840 In general, the file system version is independent of the pool version.
2841 See
2842 .Xr zpool 8
2843 for information on the
2844 .Nm zpool Cm upgrade
2845 command.
2846 .Pp
2847 In some cases, the file system version and the pool version are interrelated and
2848 the pool version must be upgraded before the file system version can be
2849 upgraded.
2850 .Bl -tag -width "-V"
2851 .It Fl V Ar version
2852 Upgrade to the specified
2853 .Ar version .
2854 If the
2855 .Fl V
2856 flag is not specified, this command upgrades to the most recent version.
2857 This
2858 option can only be used to increase the version number, and only up to the most
2859 recent version supported by this software.
2860 .It Fl a
2861 Upgrade all file systems on all imported pools.
2862 .It Ar filesystem
2863 Upgrade the specified file system.
2864 .It Fl r
2865 Upgrade the specified file system and all descendent file systems.
2866 .El
2867 .It Xo
2868 .Nm
2869 .Cm userspace
2870 .Op Fl Hinp
2871 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2872 .Oo Fl s Ar field Oc Ns ...
2873 .Oo Fl S Ar field Oc Ns ...
2874 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2875 .Ar filesystem Ns | Ns Ar snapshot
2876 .Xc
2877 Displays space consumed by, and quotas on, each user in the specified filesystem
2878 or snapshot.
2879 This corresponds to the
2880 .Sy userused@ Ns Em user ,
2881 .Sy userobjused@ Ns Em user ,
2882 .Sy userquota@ Ns Em user,
2883 and
2884 .Sy userobjquota@ Ns Em user
2885 properties.
2886 .Bl -tag -width "-H"
2887 .It Fl H
2888 Do not print headers, use tab-delimited output.
2889 .It Fl S Ar field
2890 Sort by this field in reverse order.
2891 See
2892 .Fl s .
2893 .It Fl i
2894 Translate SID to POSIX ID.
2895 The POSIX ID may be ephemeral if no mapping exists.
2896 Normal POSIX interfaces
2897 .Po for example,
2898 .Xr stat 2 ,
2899 .Nm ls Fl l
2900 .Pc
2901 perform this translation, so the
2902 .Fl i
2903 option allows the output from
2904 .Nm zfs Cm userspace
2905 to be compared directly with those utilities.
2906 However,
2907 .Fl i
2908 may lead to confusion if some files were created by an SMB user before a
2909 SMB-to-POSIX name mapping was established.
2910 In such a case, some files will be owned by the SMB entity and some by the POSIX
2911 entity.
2912 However, the
2913 .Fl i
2914 option will report that the POSIX entity has the total usage and quota for both.
2915 .It Fl n
2916 Print numeric ID instead of user/group name.
2917 .It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2918 Display only the specified fields from the following set:
2919 .Sy type ,
2920 .Sy name ,
2921 .Sy used ,
2922 .Sy quota .
2923 The default is to display all fields.
2924 .It Fl p
2925 Use exact
2926 .Pq parsable
2927 numeric output.
2928 .It Fl s Ar field
2929 Sort output by this field.
2930 The
2931 .Fl s
2932 and
2933 .Fl S
2934 flags may be specified multiple times to sort first by one field, then by
2935 another.
2936 The default is
2937 .Fl s Sy type Fl s Sy name .
2938 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2939 Print only the specified types from the following set:
2940 .Sy all ,
2941 .Sy posixuser ,
2942 .Sy smbuser ,
2943 .Sy posixgroup ,
2944 .Sy smbgroup .
2945 The default is
2946 .Fl t Sy posixuser Ns \&, Ns Sy smbuser .
2947 The default can be changed to include group types.
2948 .El
2949 .It Xo
2950 .Nm
2951 .Cm groupspace
2952 .Op Fl Hinp
2953 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2954 .Oo Fl s Ar field Oc Ns ...
2955 .Oo Fl S Ar field Oc Ns ...
2956 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2957 .Ar filesystem Ns | Ns Ar snapshot
2958 .Xc
2959 Displays space consumed by, and quotas on, each group in the specified
2960 filesystem or snapshot.
2961 This subcommand is identical to
2962 .Nm zfs Cm userspace ,
2963 except that the default types to display are
2964 .Fl t Sy posixgroup Ns \&, Ns Sy smbgroup .
2965 .It Xo
2966 .Nm
2967 .Cm mount
2968 .Xc
2969 Displays all ZFS file systems currently mounted.
2970 .It Xo
2971 .Nm
2972 .Cm mount
2973 .Op Fl Olv
2974 .Op Fl o Ar options
2975 .Fl a | Ar filesystem
2976 .Xc
2977 Mounts ZFS file systems.
2978 .Bl -tag -width "-O"
2979 .It Fl O
2980 Perform an overlay mount.
2981 See
2982 .Xr mount 8
2983 for more information.
2984 .It Fl a
2985 Mount all available ZFS file systems.
2986 Invoked automatically as part of the boot process.
2987 .It Ar filesystem
2988 Mount the specified filesystem.
2989 .It Fl o Ar options
2990 An optional, comma-separated list of mount options to use temporarily for the
2991 duration of the mount.
2992 See the
2993 .Sx Temporary Mount Point Properties
2994 section for details.
2995 .It Fl l
2996 Load keys for encrypted filesystems as they are being mounted. This is
2997 equivalent to executing
2998 .Nm zfs Cm load-key
2999 on each encryption root before mounting it. Note that if a filesystem has a
3000 .Sy keylocation
3001 of
3002 .Sy prompt
3003 this will cause the terminal to interactively block after asking for the key.
3004 .It Fl v
3005 Report mount progress.
3006 .El
3007 .It Xo
3008 .Nm
3009 .Cm unmount
3010 .Op Fl f
3011 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
3012 .Xc
3013 Unmounts currently mounted ZFS file systems.
3014 .Bl -tag -width "-a"
3015 .It Fl a
3016 Unmount all available ZFS file systems.
3017 Invoked automatically as part of the shutdown process.
3018 .It Ar filesystem Ns | Ns Ar mountpoint
3019 Unmount the specified filesystem.
3020 The command can also be given a path to a ZFS file system mount point on the
3021 system.
3022 .It Fl f
3023 Forcefully unmount the file system, even if it is currently in use.
3024 .El
3025 .It Xo
3026 .Nm
3027 .Cm share
3028 .Fl a | Ar filesystem
3029 .Xc
3030 Shares available ZFS file systems.
3031 .Bl -tag -width "-a"
3032 .It Fl a
3033 Share all available ZFS file systems.
3034 Invoked automatically as part of the boot process.
3035 .It Ar filesystem
3036 Share the specified filesystem according to the
3037 .Sy sharenfs
3038 and
3039 .Sy sharesmb
3040 properties.
3041 File systems are shared when the
3042 .Sy sharenfs
3043 or
3044 .Sy sharesmb
3045 property is set.
3046 .El
3047 .It Xo
3048 .Nm
3049 .Cm unshare
3050 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
3051 .Xc
3052 Unshares currently shared ZFS file systems.
3053 .Bl -tag -width "-a"
3054 .It Fl a
3055 Unshare all available ZFS file systems.
3056 Invoked automatically as part of the shutdown process.
3057 .It Ar filesystem Ns | Ns Ar mountpoint
3058 Unshare the specified filesystem.
3059 The command can also be given a path to a ZFS file system shared on the system.
3060 .El
3061 .It Xo
3062 .Nm
3063 .Cm bookmark
3064 .Ar snapshot bookmark
3065 .Xc
3066 Creates a bookmark of the given snapshot.
3067 Bookmarks mark the point in time when the snapshot was created, and can be used
3068 as the incremental source for a
3069 .Nm zfs Cm send
3070 command.
3071 .Pp
3072 This feature must be enabled to be used.
3073 See
3074 .Xr zpool-features 5
3075 for details on ZFS feature flags and the
3076 .Sy bookmarks
3077 feature.
3078 .It Xo
3079 .Nm
3080 .Cm send
3081 .Op Fl DLPRcenpvw
3082 .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
3083 .Ar snapshot
3084 .Xc
3085 Creates a stream representation of the second
3086 .Ar snapshot ,
3087 which is written to standard output.
3088 The output can be redirected to a file or to a different system
3089 .Po for example, using
3090 .Xr ssh 1
3091 .Pc .
3092 By default, a full stream is generated.
3093 .Bl -tag -width "-D"
3094 .It Fl D, -dedup
3095 Generate a deduplicated stream.
3096 Blocks which would have been sent multiple times in the send stream will only be
3097 sent once.
3098 The receiving system must also support this feature to receive a deduplicated
3099 stream.
3100 This flag can be used regardless of the dataset's
3101 .Sy dedup
3102 property, but performance will be much better if the filesystem uses a
3103 dedup-capable checksum
3104 .Po for example,
3105 .Sy sha256
3106 .Pc .
3107 .It Fl I Ar snapshot
3108 Generate a stream package that sends all intermediary snapshots from the first
3109 snapshot to the second snapshot.
3110 For example,
3111 .Fl I Em @a Em fs@d
3112 is similar to
3113 .Fl i Em @a Em fs@b Ns \&; Fl i Em @b Em fs@c Ns \&; Fl i Em @c Em fs@d .
3114 The incremental source may be specified as with the
3115 .Fl i
3116 option.
3117 .It Fl L, -large-block
3118 Generate a stream which may contain blocks larger than 128KB.
3119 This flag has no effect if the
3120 .Sy large_blocks
3121 pool feature is disabled, or if the
3122 .Sy recordsize
3123 property of this filesystem has never been set above 128KB.
3124 The receiving system must have the
3125 .Sy large_blocks
3126 pool feature enabled as well.
3127 See
3128 .Xr zpool-features 5
3129 for details on ZFS feature flags and the
3130 .Sy large_blocks
3131 feature.
3132 .It Fl P, -parsable
3133 Print machine-parsable verbose information about the stream package generated.
3134 .It Fl R, -replicate
3135 Generate a replication stream package, which will replicate the specified
3136 file system, and all descendent file systems, up to the named snapshot.
3137 When received, all properties, snapshots, descendent file systems, and clones
3138 are preserved.
3139 .Pp
3140 If the
3141 .Fl i
3142 or
3143 .Fl I
3144 flags are used in conjunction with the
3145 .Fl R
3146 flag, an incremental replication stream is generated.
3147 The current values of properties, and current snapshot and file system names are
3148 set when the stream is received.
3149 If the
3150 .Fl F
3151 flag is specified when this stream is received, snapshots and file systems that
3152 do not exist on the sending side are destroyed.
3153 .It Fl e, -embed
3154 Generate a more compact stream by using
3155 .Sy WRITE_EMBEDDED
3156 records for blocks which are stored more compactly on disk by the
3157 .Sy embedded_data
3158 pool feature.
3159 This flag has no effect if the
3160 .Sy embedded_data
3161 feature is disabled.
3162 The receiving system must have the
3163 .Sy embedded_data
3164 feature enabled.
3165 If the
3166 .Sy lz4_compress
3167 feature is active on the sending system, then the receiving system must have
3168 that feature enabled as well.
3169 See
3170 .Xr zpool-features 5
3171 for details on ZFS feature flags and the
3172 .Sy embedded_data
3173 feature.
3174 .It Fl c, -compressed
3175 Generate a more compact stream by using compressed WRITE records for blocks
3176 which are compressed on disk and in memory
3177 .Po see the
3178 .Sy compression
3179 property for details
3180 .Pc .
3181 If the
3182 .Sy lz4_compress
3183 feature is active on the sending system, then the receiving system must have
3184 that feature enabled as well.
3185 If the
3186 .Sy large_blocks
3187 feature is enabled on the sending system but the
3188 .Fl L
3189 option is not supplied in conjunction with
3190 .Fl c ,
3191 then the data will be decompressed before sending so it can be split into
3192 smaller block sizes.
3193 .It Fl w, -raw
3194 For encrypted datasets, send data exactly as it exists on disk. This allows
3195 backups to be taken even if encryption keys are not currently loaded. The
3196 backup may then be received on an untrusted machine since that machine will
3197 not have the encryption keys to read the protected data or alter it without
3198 being detected. Upon being received, the dataset will have the same encryption
3199 keys as it did on the send side, although the
3200 .Sy keylocation
3201 property will be defaulted to
3202 .Sy prompt
3203 if not otherwise provided. For unencrypted datasets, this flag will be
3204 equivalent to
3205 .Fl Lec .
3206 Note that if you do not use this flag for sending encrypted datasets, data will
3207 be sent unencrypted and may be re-encrypted with a different encryption key on
3208 the receiving system, which will disable the ability to do a raw send to that
3209 system for incrementals.
3210 .It Fl i Ar snapshot
3211 Generate an incremental stream from the first
3212 .Ar snapshot
3213 .Pq the incremental source
3214 to the second
3215 .Ar snapshot
3216 .Pq the incremental target .
3217 The incremental source can be specified as the last component of the snapshot
3218 name
3219 .Po the
3220 .Sy @
3221 character and following
3222 .Pc
3223 and it is assumed to be from the same file system as the incremental target.
3224 .Pp
3225 If the destination is a clone, the source may be the origin snapshot, which must
3226 be fully specified
3227 .Po for example,
3228 .Em pool/fs@origin ,
3229 not just
3230 .Em @origin
3231 .Pc .
3232 .It Fl n, -dryrun
3233 Do a dry-run
3234 .Pq Qq No-op
3235 send.
3236 Do not generate any actual send data.
3237 This is useful in conjunction with the
3238 .Fl v
3239 or
3240 .Fl P
3241 flags to determine what data will be sent.
3242 In this case, the verbose output will be written to standard output
3243 .Po contrast with a non-dry-run, where the stream is written to standard output
3244 and the verbose output goes to standard error
3245 .Pc .
3246 .It Fl p, -props
3247 Include the dataset's properties in the stream.
3248 This flag is implicit when
3249 .Fl R
3250 is specified.
3251 The receiving system must also support this feature.
3252 .It Fl v, -verbose
3253 Print verbose information about the stream package generated.
3254 This information includes a per-second report of how much data has been sent.
3255 .Pp
3256 The format of the stream is committed.
3257 You will be able to receive your streams on future versions of ZFS.
3258 .El
3259 .It Xo
3260 .Nm
3261 .Cm send
3262 .Op Fl LPcenvw
3263 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
3264 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
3265 .Xc
3266 Generate a send stream, which may be of a filesystem, and may be incremental
3267 from a bookmark.
3268 If the destination is a filesystem or volume, the pool must be read-only, or the
3269 filesystem must not be mounted.
3270 When the stream generated from a filesystem or volume is received, the default
3271 snapshot name will be
3272 .Qq --head-- .
3273 .Bl -tag -width "-L"
3274 .It Fl L, -large-block
3275 Generate a stream which may contain blocks larger than 128KB.
3276 This flag has no effect if the
3277 .Sy large_blocks
3278 pool feature is disabled, or if the
3279 .Sy recordsize
3280 property of this filesystem has never been set above 128KB.
3281 The receiving system must have the
3282 .Sy large_blocks
3283 pool feature enabled as well.
3284 See
3285 .Xr zpool-features 5
3286 for details on ZFS feature flags and the
3287 .Sy large_blocks
3288 feature.
3289 .It Fl P, -parsable
3290 Print machine-parsable verbose information about the stream package generated.
3291 .It Fl c, -compressed
3292 Generate a more compact stream by using compressed WRITE records for blocks
3293 which are compressed on disk and in memory
3294 .Po see the
3295 .Sy compression
3296 property for details
3297 .Pc .
3298 If the
3299 .Sy lz4_compress
3300 feature is active on the sending system, then the receiving system must have
3301 that feature enabled as well.
3302 If the
3303 .Sy large_blocks
3304 feature is enabled on the sending system but the
3305 .Fl L
3306 option is not supplied in conjunction with
3307 .Fl c ,
3308 then the data will be decompressed before sending so it can be split into
3309 smaller block sizes.
3310 .It Fl w, -raw
3311 For encrypted datasets, send data exactly as it exists on disk. This allows
3312 backups to be taken even if encryption keys are not currently loaded. The
3313 backup may then be received on an untrusted machine since that machine will
3314 not have the encryption keys to read the protected data or alter it without
3315 being detected. Upon being received, the dataset will have the same encryption
3316 keys as it did on the send side, although the
3317 .Sy keylocation
3318 property will be defaulted to
3319 .Sy prompt
3320 if not otherwise provided. For unencrypted datasets, this flag will be
3321 equivalent to
3322 .Fl Lec .
3323 Note that if you do not use this flag for sending encrypted datasets, data will
3324 be sent unencrypted and may be re-encrypted with a different encryption key on
3325 the receiving system, which will disable the ability to do a raw send to that
3326 system for incrementals.
3327 .It Fl e, -embed
3328 Generate a more compact stream by using
3329 .Sy WRITE_EMBEDDED
3330 records for blocks which are stored more compactly on disk by the
3331 .Sy embedded_data
3332 pool feature.
3333 This flag has no effect if the
3334 .Sy embedded_data
3335 feature is disabled.
3336 The receiving system must have the
3337 .Sy embedded_data
3338 feature enabled.
3339 If the
3340 .Sy lz4_compress
3341 feature is active on the sending system, then the receiving system must have
3342 that feature enabled as well. Note that streams generated using this flag are
3343 unable to be received into an encrypted dataset.
3344 See
3345 .Xr zpool-features 5
3346 for details on ZFS feature flags and the
3347 .Sy embedded_data
3348 feature.
3349 .It Fl i Ar snapshot Ns | Ns Ar bookmark
3350 Generate an incremental send stream.
3351 The incremental source must be an earlier snapshot in the destination's history.
3352 It will commonly be an earlier snapshot in the destination's file system, in
3353 which case it can be specified as the last component of the name
3354 .Po the
3355 .Sy #
3356 or
3357 .Sy @
3358 character and following
3359 .Pc .
3360 .Pp
3361 If the incremental target is a clone, the incremental source can be the origin
3362 snapshot, or an earlier snapshot in the origin's filesystem, or the origin's
3363 origin, etc.
3364 .It Fl n, -dryrun
3365 Do a dry-run
3366 .Pq Qq No-op
3367 send.
3368 Do not generate any actual send data.
3369 This is useful in conjunction with the
3370 .Fl v
3371 or
3372 .Fl P
3373 flags to determine what data will be sent.
3374 In this case, the verbose output will be written to standard output
3375 .Po contrast with a non-dry-run, where the stream is written to standard output
3376 and the verbose output goes to standard error
3377 .Pc .
3378 .It Fl v, -verbose
3379 Print verbose information about the stream package generated.
3380 This information includes a per-second report of how much data has been sent.
3381 .El
3382 .It Xo
3383 .Nm
3384 .Cm send
3385 .Op Fl Penv
3386 .Fl t
3387 .Ar receive_resume_token
3388 .Xc
3389 Creates a send stream which resumes an interrupted receive.
3390 The
3391 .Ar receive_resume_token
3392 is the value of this property on the filesystem or volume that was being
3393 received into.
3394 See the documentation for
3395 .Sy zfs receive -s
3396 for more details.
3397 .It Xo
3398 .Nm
3399 .Cm receive
3400 .Op Fl Fnsuv
3401 .Op Fl o Sy origin Ns = Ns Ar snapshot
3402 .Op Fl o Ar property Ns = Ns Ar value
3403 .Op Fl x Ar property
3404 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
3405 .Xc
3406 .It Xo
3407 .Nm
3408 .Cm receive
3409 .Op Fl Fnsuv
3410 .Op Fl d Ns | Ns Fl e
3411 .Op Fl o Sy origin Ns = Ns Ar snapshot
3412 .Op Fl o Ar property Ns = Ns Ar value
3413 .Op Fl x Ar property
3414 .Ar filesystem
3415 .Xc
3416 Creates a snapshot whose contents are as specified in the stream provided on
3417 standard input.
3418 If a full stream is received, then a new file system is created as well.
3419 Streams are created using the
3420 .Nm zfs Cm send
3421 subcommand, which by default creates a full stream.
3422 .Nm zfs Cm recv
3423 can be used as an alias for
3424 .Nm zfs Cm receive.
3425 .Pp
3426 If an incremental stream is received, then the destination file system must
3427 already exist, and its most recent snapshot must match the incremental stream's
3428 source.
3429 For
3430 .Sy zvols ,
3431 the destination device link is destroyed and recreated, which means the
3432 .Sy zvol
3433 cannot be accessed during the
3434 .Cm receive
3435 operation.
3436 .Pp
3437 When a snapshot replication package stream that is generated by using the
3438 .Nm zfs Cm send Fl R
3439 command is received, any snapshots that do not exist on the sending location are
3440 destroyed by using the
3441 .Nm zfs Cm destroy Fl d
3442 command.
3443 .Pp
3444 If
3445 .Fl o Em property Ns = Ns Ar value
3446 or
3447 .Fl x Em property
3448 is specified, it applies to the effective value of the property throughout
3449 the entire subtree of replicated datasets. Effective property values will be
3450 set (
3451 .Fl o
3452 ) or inherited (
3453 .Fl x
3454 ) on the topmost in the replicated subtree. In descendant datasets, if the
3455 property is set by the send stream, it will be overridden by forcing the
3456 property to be inherited from the top‐most file system. Received properties
3457 are retained in spite of being overridden and may be restored with
3458 .Nm zfs Cm inherit Fl S .
3459 Specifying
3460 .Fl o Sy origin Ns = Ns Em snapshot
3461 is a special case because, even if
3462 .Sy origin
3463 is a read-only property and cannot be set, it's allowed to receive the send
3464 stream as a clone of the given snapshot.
3465 .Pp
3466 The name of the snapshot
3467 .Pq and file system, if a full stream is received
3468 that this subcommand creates depends on the argument type and the use of the
3469 .Fl d
3470 or
3471 .Fl e
3472 options.
3473 .Pp
3474 If the argument is a snapshot name, the specified
3475 .Ar snapshot
3476 is created.
3477 If the argument is a file system or volume name, a snapshot with the same name
3478 as the sent snapshot is created within the specified
3479 .Ar filesystem
3480 or
3481 .Ar volume .
3482 If neither of the
3483 .Fl d
3484 or
3485 .Fl e
3486 options are specified, the provided target snapshot name is used exactly as
3487 provided.
3488 .Pp
3489 The
3490 .Fl d
3491 and
3492 .Fl e
3493 options cause the file system name of the target snapshot to be determined by
3494 appending a portion of the sent snapshot's name to the specified target
3495 .Ar filesystem .
3496 If the
3497 .Fl d
3498 option is specified, all but the first element of the sent snapshot's file
3499 system path
3500 .Pq usually the pool name
3501 is used and any required intermediate file systems within the specified one are
3502 created.
3503 If the
3504 .Fl e
3505 option is specified, then only the last element of the sent snapshot's file
3506 system name
3507 .Pq i.e. the name of the source file system itself
3508 is used as the target file system name.
3509 .Bl -tag -width "-F"
3510 .It Fl F
3511 Force a rollback of the file system to the most recent snapshot before
3512 performing the receive operation.
3513 If receiving an incremental replication stream
3514 .Po for example, one generated by
3515 .Nm zfs Cm send Fl R Op Fl i Ns | Ns Fl I
3516 .Pc ,
3517 destroy snapshots and file systems that do not exist on the sending side.
3518 .It Fl d
3519 Discard the first element of the sent snapshot's file system name, using the
3520 remaining elements to determine the name of the target file system for the new
3521 snapshot as described in the paragraph above.
3522 .It Fl e
3523 Discard all but the last element of the sent snapshot's file system name, using
3524 that element to determine the name of the target file system for the new
3525 snapshot as described in the paragraph above.
3526 .It Fl n
3527 Do not actually receive the stream.
3528 This can be useful in conjunction with the
3529 .Fl v
3530 option to verify the name the receive operation would use.
3531 .It Fl o Sy origin Ns = Ns Ar snapshot
3532 Forces the stream to be received as a clone of the given snapshot.
3533 If the stream is a full send stream, this will create the filesystem
3534 described by the stream as a clone of the specified snapshot.
3535 Which snapshot was specified will not affect the success or failure of the
3536 receive, as long as the snapshot does exist.
3537 If the stream is an incremental send stream, all the normal verification will be
3538 performed.
3539 .It Fl o Em property Ns = Ns Ar value
3540 Sets the specified property as if the command
3541 .Nm zfs Cm set Em property Ns = Ns Ar value
3542 was invoked immediately before the receive. When receiving a stream from
3543 .Nm zfs Cm send Fl R ,
3544 causes the property to be inherited by all descendant datasets, as through
3545 .Nm zfs Cm inherit Em property
3546 was run on any descendant datasets that have this property set on the
3547 sending system.
3548 .Pp
3549 Any editable property can be set at receive time. Set-once properties bound
3550 to the received data, such as
3551 .Sy normalization
3552 and
3553 .Sy casesensitivity ,
3554 cannot be set at receive time even when the datasets are newly created by
3555 .Nm zfs Cm receive .
3556 Additionally both settable properties
3557 .Sy version
3558 and
3559 .Sy volsize
3560 cannot be set at receive time.
3561 .Pp
3562 The
3563 .Fl o
3564 option may be specified multiple times, for different properties. An error
3565 results if the same property is specified in multiple
3566 .Fl o
3567 or
3568 .Fl x
3569 options.
3570 .It Fl s
3571 If the receive is interrupted, save the partially received state, rather
3572 than deleting it.
3573 Interruption may be due to premature termination of the stream
3574 .Po e.g. due to network failure or failure of the remote system
3575 if the stream is being read over a network connection
3576 .Pc ,
3577 a checksum error in the stream, termination of the
3578 .Nm zfs Cm receive
3579 process, or unclean shutdown of the system.
3580 .Pp
3581 The receive can be resumed with a stream generated by
3582 .Nm zfs Cm send Fl t Ar token ,
3583 where the
3584 .Ar token
3585 is the value of the
3586 .Sy receive_resume_token
3587 property of the filesystem or volume which is received into.
3588 .Pp
3589 To use this flag, the storage pool must have the
3590 .Sy extensible_dataset
3591 feature enabled.
3592 See
3593 .Xr zpool-features 5
3594 for details on ZFS feature flags.
3595 .It Fl u
3596 File system that is associated with the received stream is not mounted.
3597 .It Fl v
3598 Print verbose information about the stream and the time required to perform the
3599 receive operation.
3600 .It Fl x Em property
3601 Ensures that the effective value of the specified property after the
3602 receive is unaffected by the value of that property in the send stream (if any),
3603 as if the property had been excluded from the send stream.
3604 .Pp
3605 If the specified property is not present in the send stream, this option does
3606 nothing.
3607 .Pp
3608 If a received property needs to be overridden, the effective value will be
3609 set or inherited, depending on whether the property is inheritable or not.
3610 .Pp
3611 In the case of an incremental update,
3612 .Fl x
3613 leaves any existing local setting or explicit inheritance unchanged.
3614 .Pp
3615 All
3616 .Fl o
3617 restrictions on set-once and special properties apply equally to
3618 .Fl x .
3619 .El
3620 .It Xo
3621 .Nm
3622 .Cm receive
3623 .Fl A
3624 .Ar filesystem Ns | Ns Ar volume
3625 .Xc
3626 Abort an interrupted
3627 .Nm zfs Cm receive Fl s ,
3628 deleting its saved partially received state.
3629 .It Xo
3630 .Nm
3631 .Cm allow
3632 .Ar filesystem Ns | Ns Ar volume
3633 .Xc
3634 Displays permissions that have been delegated on the specified filesystem or
3635 volume.
3636 See the other forms of
3637 .Nm zfs Cm allow
3638 for more information.
3639 .Pp
3640 Delegations are supported under Linux with the exception of
3641 .Sy mount ,
3642 .Sy unmount ,
3643 .Sy mountpoint ,
3644 .Sy canmount ,
3645 .Sy rename ,
3646 and
3647 .Sy share .
3648 These permissions cannot be delegated because the Linux
3649 .Xr mount 8
3650 command restricts modifications of the global namespace to the root user.
3651 .It Xo
3652 .Nm
3653 .Cm allow
3654 .Op Fl dglu
3655 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3656 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3657 .Ar setname Oc Ns ...
3658 .Ar filesystem Ns | Ns Ar volume
3659 .br
3660 .Nm
3661 .Cm allow
3662 .Op Fl dl
3663 .Fl e Ns | Ns Sy everyone
3664 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3665 .Ar setname Oc Ns ...
3666 .Ar filesystem Ns | Ns Ar volume
3667 .Xc
3668 Delegates ZFS administration permission for the file systems to non-privileged
3669 users.
3670 .Bl -tag -width "-d"
3671 .It Fl d
3672 Allow only for the descendent file systems.
3673 .It Fl e Ns | Ns Sy everyone
3674 Specifies that the permissions be delegated to everyone.
3675 .It Fl g Ar group Ns Oo , Ns Ar group Oc Ns ...
3676 Explicitly specify that permissions are delegated to the group.
3677 .It Fl l
3678 Allow
3679 .Qq locally
3680 only for the specified file system.
3681 .It Fl u Ar user Ns Oo , Ns Ar user Oc Ns ...
3682 Explicitly specify that permissions are delegated to the user.
3683 .It Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3684 Specifies to whom the permissions are delegated.
3685 Multiple entities can be specified as a comma-separated list.
3686 If neither of the
3687 .Fl gu
3688 options are specified, then the argument is interpreted preferentially as the
3689 keyword
3690 .Sy everyone ,
3691 then as a user name, and lastly as a group name.
3692 To specify a user or group named
3693 .Qq everyone ,
3694 use the
3695 .Fl g
3696 or
3697 .Fl u
3698 options.
3699 To specify a group with the same name as a user, use the
3700 .Fl g
3701 options.
3702 .It Xo
3703 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3704 .Ar setname Oc Ns ...
3705 .Xc
3706 The permissions to delegate.
3707 Multiple permissions may be specified as a comma-separated list.
3708 Permission names are the same as ZFS subcommand and property names.
3709 See the property list below.
3710 Property set names, which begin with
3711 .Sy @ ,
3712 may be specified.
3713 See the
3714 .Fl s
3715 form below for details.
3716 .El
3717 .Pp
3718 If neither of the
3719 .Fl dl
3720 options are specified, or both are, then the permissions are allowed for the
3721 file system or volume, and all of its descendents.
3722 .Pp
3723 Permissions are generally the ability to use a ZFS subcommand or change a ZFS
3724 property.
3725 The following permissions are available:
3726 .Bd -literal
3727 NAME             TYPE           NOTES
3728 allow            subcommand     Must also have the permission that is
3729                                 being allowed
3730 clone            subcommand     Must also have the 'create' ability and
3731                                 'mount' ability in the origin file system
3732 create           subcommand     Must also have the 'mount' ability
3733 destroy          subcommand     Must also have the 'mount' ability
3734 diff             subcommand     Allows lookup of paths within a dataset
3735                                 given an object number, and the ability
3736                                 to create snapshots necessary to
3737                                 'zfs diff'.
3738 load-key         subcommand     Allows loading and unloading of encryption key
3739                                 (see 'zfs load-key' and 'zfs unload-key').
3740 change-key       subcommand     Allows changing an encryption key via
3741                                 'zfs change-key'.
3742 mount            subcommand     Allows mount/umount of ZFS datasets
3743 promote          subcommand     Must also have the 'mount' and 'promote'
3744                                 ability in the origin file system
3745 receive          subcommand     Must also have the 'mount' and 'create'
3746                                 ability
3747 rename           subcommand     Must also have the 'mount' and 'create'
3748                                 ability in the new parent
3749 rollback         subcommand     Must also have the 'mount' ability
3750 send             subcommand
3751 share            subcommand     Allows sharing file systems over NFS
3752                                 or SMB protocols
3753 snapshot         subcommand     Must also have the 'mount' ability
3754
3755 groupquota       other          Allows accessing any groupquota@...
3756                                 property
3757 groupused        other          Allows reading any groupused@... property
3758 userprop         other          Allows changing any user property
3759 userquota        other          Allows accessing any userquota@...
3760                                 property
3761 userused         other          Allows reading any userused@... property
3762
3763 aclinherit       property
3764 acltype          property
3765 atime            property
3766 canmount         property
3767 casesensitivity  property
3768 checksum         property
3769 compression      property
3770 copies           property
3771 devices          property
3772 exec             property
3773 filesystem_limit property
3774 mountpoint       property
3775 nbmand           property
3776 normalization    property
3777 primarycache     property
3778 quota            property
3779 readonly         property
3780 recordsize       property
3781 refquota         property
3782 refreservation   property
3783 reservation      property
3784 secondarycache   property
3785 setuid           property
3786 sharenfs         property
3787 sharesmb         property
3788 snapdir          property
3789 snapshot_limit   property
3790 utf8only         property
3791 version          property
3792 volblocksize     property
3793 volsize          property
3794 vscan            property
3795 xattr            property
3796 zoned            property
3797 .Ed
3798 .It Xo
3799 .Nm
3800 .Cm allow
3801 .Fl c
3802 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3803 .Ar setname Oc Ns ...
3804 .Ar filesystem Ns | Ns Ar volume
3805 .Xc
3806 Sets
3807 .Qq create time
3808 permissions.
3809 These permissions are granted
3810 .Pq locally
3811 to the creator of any newly-created descendent file system.
3812 .It Xo
3813 .Nm
3814 .Cm allow
3815 .Fl s No @ Ns Ar setname
3816 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3817 .Ar setname Oc Ns ...
3818 .Ar filesystem Ns | Ns Ar volume
3819 .Xc
3820 Defines or adds permissions to a permission set.
3821 The set can be used by other
3822 .Nm zfs Cm allow
3823 commands for the specified file system and its descendents.
3824 Sets are evaluated dynamically, so changes to a set are immediately reflected.
3825 Permission sets follow the same naming restrictions as ZFS file systems, but the
3826 name must begin with
3827 .Sy @ ,
3828 and can be no more than 64 characters long.
3829 .It Xo
3830 .Nm
3831 .Cm unallow
3832 .Op Fl dglru
3833 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3834 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3835 .Ar setname Oc Ns ... Oc
3836 .Ar filesystem Ns | Ns Ar volume
3837 .br
3838 .Nm
3839 .Cm unallow
3840 .Op Fl dlr
3841 .Fl e Ns | Ns Sy everyone
3842 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3843 .Ar setname Oc Ns ... Oc
3844 .Ar filesystem Ns | Ns Ar volume
3845 .br
3846 .Nm
3847 .Cm unallow
3848 .Op Fl r
3849 .Fl c
3850 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3851 .Ar setname Oc Ns ... Oc
3852 .Ar filesystem Ns | Ns Ar volume
3853 .Xc
3854 Removes permissions that were granted with the
3855 .Nm zfs Cm allow
3856 command.
3857 No permissions are explicitly denied, so other permissions granted are still in
3858 effect.
3859 For example, if the permission is granted by an ancestor.
3860 If no permissions are specified, then all permissions for the specified
3861 .Ar user ,
3862 .Ar group ,
3863 or
3864 .Sy everyone
3865 are removed.
3866 Specifying
3867 .Sy everyone
3868 .Po or using the
3869 .Fl e
3870 option
3871 .Pc
3872 only removes the permissions that were granted to everyone, not all permissions
3873 for every user and group.
3874 See the
3875 .Nm zfs Cm allow
3876 command for a description of the
3877 .Fl ldugec
3878 options.
3879 .Bl -tag -width "-r"
3880 .It Fl r
3881 Recursively remove the permissions from this file system and all descendents.
3882 .El
3883 .It Xo
3884 .Nm
3885 .Cm unallow
3886 .Op Fl r
3887 .Fl s No @ Ns Ar setname
3888 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3889 .Ar setname Oc Ns ... Oc
3890 .Ar filesystem Ns | Ns Ar volume
3891 .Xc
3892 Removes permissions from a permission set.
3893 If no permissions are specified, then all permissions are removed, thus removing
3894 the set entirely.
3895 .It Xo
3896 .Nm
3897 .Cm hold
3898 .Op Fl r
3899 .Ar tag Ar snapshot Ns ...
3900 .Xc
3901 Adds a single reference, named with the
3902 .Ar tag
3903 argument, to the specified snapshot or snapshots.
3904 Each snapshot has its own tag namespace, and tags must be unique within that
3905 space.
3906 .Pp
3907 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3908 .Nm zfs Cm destroy
3909 command return
3910 .Er EBUSY .
3911 .Bl -tag -width "-r"
3912 .It Fl r
3913 Specifies that a hold with the given tag is applied recursively to the snapshots
3914 of all descendent file systems.
3915 .El
3916 .It Xo
3917 .Nm
3918 .Cm holds
3919 .Op Fl r
3920 .Ar snapshot Ns ...
3921 .Xc
3922 Lists all existing user references for the given snapshot or snapshots.
3923 .Bl -tag -width "-r"
3924 .It Fl r
3925 Lists the holds that are set on the named descendent snapshots, in addition to
3926 listing the holds on the named snapshot.
3927 .El
3928 .It Xo
3929 .Nm
3930 .Cm release
3931 .Op Fl r
3932 .Ar tag Ar snapshot Ns ...
3933 .Xc
3934 Removes a single reference, named with the
3935 .Ar tag
3936 argument, from the specified snapshot or snapshots.
3937 The tag must already exist for each snapshot.
3938 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3939 .Nm zfs Cm destroy
3940 command return
3941 .Er EBUSY .
3942 .Bl -tag -width "-r"
3943 .It Fl r
3944 Recursively releases a hold with the given tag on the snapshots of all
3945 descendent file systems.
3946 .El
3947 .It Xo
3948 .Nm
3949 .Cm diff
3950 .Op Fl FHt
3951 .Ar snapshot Ar snapshot Ns | Ns Ar filesystem
3952 .Xc
3953 Display the difference between a snapshot of a given filesystem and another
3954 snapshot of that filesystem from a later time or the current contents of the
3955 filesystem.
3956 The first column is a character indicating the type of change, the other columns
3957 indicate pathname, new pathname
3958 .Pq in case of rename ,
3959 change in link count, and optionally file type and/or change time.
3960 The types of change are:
3961 .Bd -literal
3962 -       The path has been removed
3963 +       The path has been created
3964 M       The path has been modified
3965 R       The path has been renamed
3966 .Ed
3967 .Bl -tag -width "-F"
3968 .It Fl F
3969 Display an indication of the type of file, in a manner similar to the
3970 .Fl
3971 option of
3972 .Xr ls 1 .
3973 .Bd -literal
3974 B       Block device
3975 C       Character device
3976 /       Directory
3977 >       Door
3978 |       Named pipe
3979 @       Symbolic link
3980 P       Event port
3981 =       Socket
3982 F       Regular file
3983 .Ed
3984 .It Fl H
3985 Give more parsable tab-separated output, without header lines and without
3986 arrows.
3987 .It Fl t
3988 Display the path's inode change time as the first column of output.
3989 .El
3990 .It Xo
3991 .Nm
3992 .Cm load-key
3993 .Op Fl nr
3994 .Op Fl L Ar keylocation
3995 .Fl a | Ar filesystem
3996 .Xc
3997 Load the key for
3998 .Ar filesystem ,
3999 allowing it and all children that inherit the
4000 .Sy keylocation
4001 property to be accessed. The key will be expected in the format specified by the
4002 .Sy keyformat
4003 and location specified by the
4004 .Sy keylocation
4005 property. Note that if the
4006 .Sy keylocation
4007 is set to
4008 .Sy prompt
4009 the terminal will interactively wait for the key to be entered. Loading a key
4010 will not automatically mount the dataset. If that functionality is desired,
4011 .Nm zfs Cm mount Sy -l
4012 will ask for the key and mount the dataset. Once the key is loaded the
4013 .Sy keystatus
4014 property will become
4015 .Sy available .
4016 .Bl -tag -width "-r"
4017 .It Fl r
4018 Recursively loads the keys for the specified filesystem and all descendent
4019 encryption roots.
4020 .It Fl a
4021 Loads the keys for all encryption roots in all imported pools.
4022 .It Fl n
4023 Do a dry-run
4024 .Pq Qq No-op
4025 load-key. This will cause zfs to simply check that the
4026 provided key is correct. This command may be run even if the key is already
4027 loaded.
4028 .It Fl L Ar keylocation
4029 Use
4030 .Ar keylocation
4031 instead of the
4032 .Sy keylocation
4033 property. This will not change the value of the property on the dataset. Note
4034 that if used with either
4035 .Fl r
4036 or
4037 .Fl a ,
4038 .Ar keylocation
4039 may only be given as
4040 .Sy prompt .
4041 .El
4042 .It Xo
4043 .Nm
4044 .Cm unload-key
4045 .Op Fl r
4046 .Fl a | Ar filesystem
4047 .Xc
4048 Unloads a key from ZFS, removing the ability to access the dataset and all of
4049 its children that inherit the
4050 .Sy keylocation
4051 property. This requires that the dataset is not currently open or mounted. Once
4052 the key is unloaded the
4053 .Sy keystatus
4054 property will become
4055 .Sy unavailable .
4056 .Bl -tag -width "-r"
4057 .It Fl r
4058 Recursively unloads the keys for the specified filesystem and all descendent
4059 encryption roots.
4060 .It Fl a
4061 Unloads the keys for all encryption roots in all imported pools.
4062 .El
4063 .It Xo
4064 .Nm
4065 .Cm change-key
4066 .Op Fl l
4067 .Op Fl o Ar keylocation Ns = Ns Ar value
4068 .Op Fl o Ar keyformat Ns = Ns Ar value
4069 .Op Fl o Ar pbkdf2iters Ns = Ns Ar value
4070 .Ar filesystem
4071 .Xc
4072 .It Xo
4073 .Nm
4074 .Cm change-key
4075 .Fl i
4076 .Op Fl l
4077 .Ar filesystem
4078 .Xc
4079 Allows a user to change the encryption key used to access a dataset. This
4080 command requires that the existing key for the dataset is already loaded into
4081 ZFS. This command may also be used to change the
4082 .Sy keylocation ,
4083 .Sy keyformat ,
4084 and
4085 .Sy pbkdf2iters
4086 properties as needed. If the dataset was not previously an encryption root it
4087 will become one. Alternatively, the
4088 .Fl i
4089 flag may be provided to cause an encryption root to inherit the parent's key
4090 instead.
4091 .Bl -tag -width "-r"
4092 .It Fl l
4093 Ensures the key is loaded before attempting to change the key. This is
4094 effectively equivalent to
4095 .Qq Nm zfs Cm load-key Ar filesystem ; Nm zfs Cm change-key Ar filesystem
4096 .It Fl o Ar property Ns = Ns Ar value
4097 Allows the user to set encryption key properties (
4098 .Sy keyformat ,
4099 .Sy keylocation ,
4100 and
4101 .Sy pbkdf2iters
4102 ) while changing the key. This is the only way to alter
4103 .Sy keyformat
4104 and
4105 .Sy pbkdf2iters
4106 after the dataset has been created.
4107 .It Fl i
4108 Indicates that zfs should make
4109 .Ar filesystem
4110 inherit the key of its parent. Note that this command can only be run on an
4111 encryption root that has an encrypted parent.
4112 .El
4113 .El
4114 .Sh EXIT STATUS
4115 The
4116 .Nm
4117 utility exits 0 on success, 1 if an error occurs, and 2 if invalid command line
4118 options were specified.
4119 .Sh EXAMPLES
4120 .Bl -tag -width ""
4121 .It Sy Example 1 No Creating a ZFS File System Hierarchy
4122 The following commands create a file system named
4123 .Em pool/home
4124 and a file system named
4125 .Em pool/home/bob .
4126 The mount point
4127 .Pa /export/home
4128 is set for the parent file system, and is automatically inherited by the child
4129 file system.
4130 .Bd -literal
4131 # zfs create pool/home
4132 # zfs set mountpoint=/export/home pool/home
4133 # zfs create pool/home/bob
4134 .Ed
4135 .It Sy Example 2 No Creating a ZFS Snapshot
4136 The following command creates a snapshot named
4137 .Sy yesterday .
4138 This snapshot is mounted on demand in the
4139 .Pa .zfs/snapshot
4140 directory at the root of the
4141 .Em pool/home/bob
4142 file system.
4143 .Bd -literal
4144 # zfs snapshot pool/home/bob@yesterday
4145 .Ed
4146 .It Sy Example 3 No Creating and Destroying Multiple Snapshots
4147 The following command creates snapshots named
4148 .Sy yesterday
4149 of
4150 .Em pool/home
4151 and all of its descendent file systems.
4152 Each snapshot is mounted on demand in the
4153 .Pa .zfs/snapshot
4154 directory at the root of its file system.
4155 The second command destroys the newly created snapshots.
4156 .Bd -literal
4157 # zfs snapshot -r pool/home@yesterday
4158 # zfs destroy -r pool/home@yesterday
4159 .Ed
4160 .It Sy Example 4 No Disabling and Enabling File System Compression
4161 The following command disables the
4162 .Sy compression
4163 property for all file systems under
4164 .Em pool/home .
4165 The next command explicitly enables
4166 .Sy compression
4167 for
4168 .Em pool/home/anne .
4169 .Bd -literal
4170 # zfs set compression=off pool/home
4171 # zfs set compression=on pool/home/anne
4172 .Ed
4173 .It Sy Example 5 No Listing ZFS Datasets
4174 The following command lists all active file systems and volumes in the system.
4175 Snapshots are displayed if the
4176 .Sy listsnaps
4177 property is
4178 .Sy on .
4179 The default is
4180 .Sy off .
4181 See
4182 .Xr zpool 8
4183 for more information on pool properties.
4184 .Bd -literal
4185 # zfs list
4186 NAME                      USED  AVAIL  REFER  MOUNTPOINT
4187 pool                      450K   457G    18K  /pool
4188 pool/home                 315K   457G    21K  /export/home
4189 pool/home/anne             18K   457G    18K  /export/home/anne
4190 pool/home/bob             276K   457G   276K  /export/home/bob
4191 .Ed
4192 .It Sy Example 6 No Setting a Quota on a ZFS File System
4193 The following command sets a quota of 50 Gbytes for
4194 .Em pool/home/bob .
4195 .Bd -literal
4196 # zfs set quota=50G pool/home/bob
4197 .Ed
4198 .It Sy Example 7 No Listing ZFS Properties
4199 The following command lists all properties for
4200 .Em pool/home/bob .
4201 .Bd -literal
4202 # zfs get all pool/home/bob
4203 NAME           PROPERTY              VALUE                  SOURCE
4204 pool/home/bob  type                  filesystem             -
4205 pool/home/bob  creation              Tue Jul 21 15:53 2009  -
4206 pool/home/bob  used                  21K                    -
4207 pool/home/bob  available             20.0G                  -
4208 pool/home/bob  referenced            21K                    -
4209 pool/home/bob  compressratio         1.00x                  -
4210 pool/home/bob  mounted               yes                    -
4211 pool/home/bob  quota                 20G                    local
4212 pool/home/bob  reservation           none                   default
4213 pool/home/bob  recordsize            128K                   default
4214 pool/home/bob  mountpoint            /pool/home/bob         default
4215 pool/home/bob  sharenfs              off                    default
4216 pool/home/bob  checksum              on                     default
4217 pool/home/bob  compression           on                     local
4218 pool/home/bob  atime                 on                     default
4219 pool/home/bob  devices               on                     default
4220 pool/home/bob  exec                  on                     default
4221 pool/home/bob  setuid                on                     default
4222 pool/home/bob  readonly              off                    default
4223 pool/home/bob  zoned                 off                    default
4224 pool/home/bob  snapdir               hidden                 default
4225 pool/home/bob  acltype               off                    default
4226 pool/home/bob  aclinherit            restricted             default
4227 pool/home/bob  canmount              on                     default
4228 pool/home/bob  xattr                 on                     default
4229 pool/home/bob  copies                1                      default
4230 pool/home/bob  version               4                      -
4231 pool/home/bob  utf8only              off                    -
4232 pool/home/bob  normalization         none                   -
4233 pool/home/bob  casesensitivity       sensitive              -
4234 pool/home/bob  vscan                 off                    default
4235 pool/home/bob  nbmand                off                    default
4236 pool/home/bob  sharesmb              off                    default
4237 pool/home/bob  refquota              none                   default
4238 pool/home/bob  refreservation        none                   default
4239 pool/home/bob  primarycache          all                    default
4240 pool/home/bob  secondarycache        all                    default
4241 pool/home/bob  usedbysnapshots       0                      -
4242 pool/home/bob  usedbydataset         21K                    -
4243 pool/home/bob  usedbychildren        0                      -
4244 pool/home/bob  usedbyrefreservation  0                      -
4245 .Ed
4246 .Pp
4247 The following command gets a single property value.
4248 .Bd -literal
4249 # zfs get -H -o value compression pool/home/bob
4250 on
4251 .Ed
4252 The following command lists all properties with local settings for
4253 .Em pool/home/bob .
4254 .Bd -literal
4255 # zfs get -r -s local -o name,property,value all pool/home/bob
4256 NAME           PROPERTY              VALUE
4257 pool/home/bob  quota                 20G
4258 pool/home/bob  compression           on
4259 .Ed
4260 .It Sy Example 8 No Rolling Back a ZFS File System
4261 The following command reverts the contents of
4262 .Em pool/home/anne
4263 to the snapshot named
4264 .Sy yesterday ,
4265 deleting all intermediate snapshots.
4266 .Bd -literal
4267 # zfs rollback -r pool/home/anne@yesterday
4268 .Ed
4269 .It Sy Example 9 No Creating a ZFS Clone
4270 The following command creates a writable file system whose initial contents are
4271 the same as
4272 .Em pool/home/bob@yesterday .
4273 .Bd -literal
4274 # zfs clone pool/home/bob@yesterday pool/clone
4275 .Ed
4276 .It Sy Example 10 No Promoting a ZFS Clone
4277 The following commands illustrate how to test out changes to a file system, and
4278 then replace the original file system with the changed one, using clones, clone
4279 promotion, and renaming:
4280 .Bd -literal
4281 # zfs create pool/project/production
4282   populate /pool/project/production with data
4283 # zfs snapshot pool/project/production@today
4284 # zfs clone pool/project/production@today pool/project/beta
4285   make changes to /pool/project/beta and test them
4286 # zfs promote pool/project/beta
4287 # zfs rename pool/project/production pool/project/legacy
4288 # zfs rename pool/project/beta pool/project/production
4289   once the legacy version is no longer needed, it can be destroyed
4290 # zfs destroy pool/project/legacy
4291 .Ed
4292 .It Sy Example 11 No Inheriting ZFS Properties
4293 The following command causes
4294 .Em pool/home/bob
4295 and
4296 .Em pool/home/anne
4297 to inherit the
4298 .Sy checksum
4299 property from their parent.
4300 .Bd -literal
4301 # zfs inherit checksum pool/home/bob pool/home/anne
4302 .Ed
4303 .It Sy Example 12 No Remotely Replicating ZFS Data
4304 The following commands send a full stream and then an incremental stream to a
4305 remote machine, restoring them into
4306 .Em poolB/received/fs@a
4307 and
4308 .Em poolB/received/fs@b ,
4309 respectively.
4310 .Em poolB
4311 must contain the file system
4312 .Em poolB/received ,
4313 and must not initially contain
4314 .Em poolB/received/fs .
4315 .Bd -literal
4316 # zfs send pool/fs@a | \e
4317   ssh host zfs receive poolB/received/fs@a
4318 # zfs send -i a pool/fs@b | \e
4319   ssh host zfs receive poolB/received/fs
4320 .Ed
4321 .It Sy Example 13 No Using the zfs receive -d Option
4322 The following command sends a full stream of
4323 .Em poolA/fsA/fsB@snap
4324 to a remote machine, receiving it into
4325 .Em poolB/received/fsA/fsB@snap .
4326 The
4327 .Em fsA/fsB@snap
4328 portion of the received snapshot's name is determined from the name of the sent
4329 snapshot.
4330 .Em poolB
4331 must contain the file system
4332 .Em poolB/received .
4333 If
4334 .Em poolB/received/fsA
4335 does not exist, it is created as an empty file system.
4336 .Bd -literal
4337 # zfs send poolA/fsA/fsB@snap | \e
4338   ssh host zfs receive -d poolB/received
4339 .Ed
4340 .It Sy Example 14 No Setting User Properties
4341 The following example sets the user-defined
4342 .Sy com.example:department
4343 property for a dataset.
4344 .Bd -literal
4345 # zfs set com.example:department=12345 tank/accounting
4346 .Ed
4347 .It Sy Example 15 No Performing a Rolling Snapshot
4348 The following example shows how to maintain a history of snapshots with a
4349 consistent naming scheme.
4350 To keep a week's worth of snapshots, the user destroys the oldest snapshot,
4351 renames the remaining snapshots, and then creates a new snapshot, as follows:
4352 .Bd -literal
4353 # zfs destroy -r pool/users@7daysago
4354 # zfs rename -r pool/users@6daysago @7daysago
4355 # zfs rename -r pool/users@5daysago @6daysago
4356 # zfs rename -r pool/users@yesterday @5daysago
4357 # zfs rename -r pool/users@yesterday @4daysago
4358 # zfs rename -r pool/users@yesterday @3daysago
4359 # zfs rename -r pool/users@yesterday @2daysago
4360 # zfs rename -r pool/users@today @yesterday
4361 # zfs snapshot -r pool/users@today
4362 .Ed
4363 .It Sy Example 16 No Setting sharenfs Property Options on a ZFS File System
4364 The following commands show how to set
4365 .Sy sharenfs
4366 property options to enable
4367 .Sy rw
4368 access for a set of
4369 .Sy IP
4370 addresses and to enable root access for system
4371 .Sy neo
4372 on the
4373 .Em tank/home
4374 file system.
4375 .Bd -literal
4376 # zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home
4377 .Ed
4378 .Pp
4379 If you are using
4380 .Sy DNS
4381 for host name resolution, specify the fully qualified hostname.
4382 .It Sy Example 17 No Delegating ZFS Administration Permissions on a ZFS Dataset
4383 The following example shows how to set permissions so that user
4384 .Sy cindys
4385 can create, destroy, mount, and take snapshots on
4386 .Em tank/cindys .
4387 The permissions on
4388 .Em tank/cindys
4389 are also displayed.
4390 .Bd -literal
4391 # zfs allow cindys create,destroy,mount,snapshot tank/cindys
4392 # zfs allow tank/cindys
4393 ---- Permissions on tank/cindys --------------------------------------
4394 Local+Descendent permissions:
4395         user cindys create,destroy,mount,snapshot
4396 .Ed
4397 .Pp
4398 Because the
4399 .Em tank/cindys
4400 mount point permission is set to 755 by default, user
4401 .Sy cindys
4402 will be unable to mount file systems under
4403 .Em tank/cindys .
4404 Add an ACE similar to the following syntax to provide mount point access:
4405 .Bd -literal
4406 # chmod A+user:cindys:add_subdirectory:allow /tank/cindys
4407 .Ed
4408 .It Sy Example 18 No Delegating Create Time Permissions on a ZFS Dataset
4409 The following example shows how to grant anyone in the group
4410 .Sy staff
4411 to create file systems in
4412 .Em tank/users .
4413 This syntax also allows staff members to destroy their own file systems, but not
4414 destroy anyone else's file system.
4415 The permissions on
4416 .Em tank/users
4417 are also displayed.
4418 .Bd -literal
4419 # zfs allow staff create,mount tank/users
4420 # zfs allow -c destroy tank/users
4421 # zfs allow tank/users
4422 ---- Permissions on tank/users ---------------------------------------
4423 Permission sets:
4424         destroy
4425 Local+Descendent permissions:
4426         group staff create,mount
4427 .Ed
4428 .It Sy Example 19 No Defining and Granting a Permission Set on a ZFS Dataset
4429 The following example shows how to define and grant a permission set on the
4430 .Em tank/users
4431 file system.
4432 The permissions on
4433 .Em tank/users
4434 are also displayed.
4435 .Bd -literal
4436 # zfs allow -s @pset create,destroy,snapshot,mount tank/users
4437 # zfs allow staff @pset tank/users
4438 # zfs allow tank/users
4439 ---- Permissions on tank/users ---------------------------------------
4440 Permission sets:
4441         @pset create,destroy,mount,snapshot
4442 Local+Descendent permissions:
4443         group staff @pset
4444 .Ed
4445 .It Sy Example 20 No Delegating Property Permissions on a ZFS Dataset
4446 The following example shows to grant the ability to set quotas and reservations
4447 on the
4448 .Em users/home
4449 file system.
4450 The permissions on
4451 .Em users/home
4452 are also displayed.
4453 .Bd -literal
4454 # zfs allow cindys quota,reservation users/home
4455 # zfs allow users/home
4456 ---- Permissions on users/home ---------------------------------------
4457 Local+Descendent permissions:
4458         user cindys quota,reservation
4459 cindys% zfs set quota=10G users/home/marks
4460 cindys% zfs get quota users/home/marks
4461 NAME              PROPERTY  VALUE  SOURCE
4462 users/home/marks  quota     10G    local
4463 .Ed
4464 .It Sy Example 21 No Removing ZFS Delegated Permissions on a ZFS Dataset
4465 The following example shows how to remove the snapshot permission from the
4466 .Sy staff
4467 group on the
4468 .Em tank/users
4469 file system.
4470 The permissions on
4471 .Em tank/users
4472 are also displayed.
4473 .Bd -literal
4474 # zfs unallow staff snapshot tank/users
4475 # zfs allow tank/users
4476 ---- Permissions on tank/users ---------------------------------------
4477 Permission sets:
4478         @pset create,destroy,mount,snapshot
4479 Local+Descendent permissions:
4480         group staff @pset
4481 .Ed
4482 .It Sy Example 22 No Showing the differences between a snapshot and a ZFS Dataset
4483 The following example shows how to see what has changed between a prior
4484 snapshot of a ZFS dataset and its current state.
4485 The
4486 .Fl F
4487 option is used to indicate type information for the files affected.
4488 .Bd -literal
4489 # zfs diff -F tank/test@before tank/test
4490 M       /       /tank/test/
4491 M       F       /tank/test/linked      (+1)
4492 R       F       /tank/test/oldname -> /tank/test/newname
4493 -       F       /tank/test/deleted
4494 +       F       /tank/test/created
4495 M       F       /tank/test/modified
4496 .Ed
4497 .It Sy Example 23 No Creating a bookmark
4498 The following example create a bookmark to a snapshot. This bookmark
4499 can then be used instead of snapshot in send streams.
4500 .Bd -literal
4501 # zfs bookmark rpool@snapshot rpool#bookmark
4502 .Ed
4503 .It Sy Example 24 No Setting sharesmb Property Options on a ZFS File System
4504 The following example show how to share SMB filesystem through ZFS. Note that
4505 that a user and his/her password must be given.
4506 .Bd -literal
4507 # smbmount //127.0.0.1/share_tmp /mnt/tmp \\
4508   -o user=workgroup/turbo,password=obrut,uid=1000
4509 .Ed
4510 .Pp
4511 Minimal
4512 .Em /etc/samba/smb.conf
4513 configuration required:
4514 .Pp
4515 Samba will need to listen to 'localhost' (127.0.0.1) for the ZFS utilities to
4516 communicate with Samba. This is the default behavior for most Linux
4517 distributions.
4518 .Pp
4519 Samba must be able to authenticate a user. This can be done in a number of
4520 ways, depending on if using the system password file, LDAP or the Samba
4521 specific smbpasswd file. How to do this is outside the scope of this manual.
4522 Please refer to the
4523 .Xr smb.conf 5
4524 man page for more information.
4525 .Pp
4526 See the
4527 .Sy USERSHARE section
4528 of the
4529 .Xr smb.conf 5
4530 man page for all configuration options in case you need to modify any options
4531 to the share afterwards. Do note that any changes done with the
4532 .Xr net 8
4533 command will be undone if the share is ever unshared (such as at a reboot etc).
4534 .El
4535 .Sh INTERFACE STABILITY
4536 .Sy Committed .
4537 .Sh SEE ALSO
4538 .Xr attr 1 ,
4539 .Xr gzip 1 ,
4540 .Xr ssh 1 ,
4541 .Xr chmod 2 ,
4542 .Xr fsync 2 ,
4543 .Xr stat 2 ,
4544 .Xr write 2 ,
4545 .Xr acl 5 ,
4546 .Xr attributes 5 ,
4547 .Xr exports 5 ,
4548 .Xr exportfs 8 ,
4549 .Xr mount 8 ,
4550 .Xr net 8 ,
4551 .Xr selinux 8 ,
4552 .Xr zpool 8