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