]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - cddl/contrib/opensolaris/cmd/zfs/zfs.8
Add mkimg, a utility for making disk images from raw partition contents.
[FreeBSD/FreeBSD.git] / cddl / contrib / opensolaris / cmd / zfs / zfs.8
1 '\" te
2 .\" Copyright (c) 2013, Martin Matuska <mm@FreeBSD.org>.
3 .\" All Rights Reserved.
4 .\"
5 .\" The contents of this file are subject to the terms of the
6 .\" Common Development and Distribution License (the "License").
7 .\" You may not use this file except in compliance with the License.
8 .\"
9 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 .\" or http://www.opensolaris.org/os/licensing.
11 .\" See the License for the specific language governing permissions
12 .\" and limitations under the License.
13 .\"
14 .\" When distributing Covered Code, include this CDDL HEADER in each
15 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 .\" If applicable, add the following below this CDDL HEADER, with the
17 .\" fields enclosed by brackets "[]" replaced with your own identifying
18 .\" information: Portions Copyright [yyyy] [name of copyright owner]
19 .\"
20 .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved.
21 .\" Copyright (c) 2013 by Delphix. All rights reserved.
22 .\" Copyright (c) 2011, Pawel Jakub Dawidek <pjd@FreeBSD.org>
23 .\" Copyright (c) 2012, Glen Barber <gjb@FreeBSD.org>
24 .\" Copyright (c) 2012, Bryan Drewery <bdrewery@FreeBSD.org>
25 .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
26 .\" Copyright (c) 2013 Nexenta Systems, Inc. All Rights Reserved.
27 .\" Copyright (c) 2013, Joyent, Inc. All rights reserved.
28 .\" Copyright (c) 2013, Steven Hartland <smh@FreeBSD.org>
29 .\" Copyright (c) 2014, Xin LI <delphij@FreeBSD.org>
30 .\"
31 .\" $FreeBSD$
32 .\"
33 .Dd March 20, 2014
34 .Dt ZFS 8
35 .Os
36 .Sh NAME
37 .Nm zfs
38 .Nd configures ZFS file systems
39 .Sh SYNOPSIS
40 .Nm
41 .Op Fl \&?
42 .Nm
43 .Cm create
44 .Op Fl pu
45 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... 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
52 .Ar size volume
53 .Nm
54 .Cm destroy
55 .Op Fl fnpRrv
56 .Ar filesystem Ns | Ns Ar volume
57 .Nm
58 .Cm destroy
59 .Op Fl dnpRrv
60 .Sm off
61 .Ar filesystem Ns | Ns volume
62 .Ns @snap
63 .Op % Ns Ar snap
64 .Op , Ns Ar snap Op % Ns Ar snap
65 .Op , Ns ...
66 .Sm on
67 .Nm
68 .Cm destroy
69 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
70 .Nm
71 .Cm snapshot Ns | Ns Cm snap
72 .Op Fl r
73 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
74 .Ar filesystem@snapname Ns | Ns Ar volume@snapname
75 .Ar filesystem@snapname Ns | Ns Ar volume@snapname Ns ...
76 .Nm
77 .Cm rollback
78 .Op Fl rRf
79 .Ar snapshot
80 .Nm
81 .Cm clone
82 .Op Fl p
83 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
84 .Ar snapshot filesystem Ns | Ns Ar volume
85 .Nm
86 .Cm promote
87 .Ar clone-filesystem
88 .Nm
89 .Cm rename
90 .Op Fl f
91 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
92 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
93 .Nm
94 .Cm rename
95 .Op Fl f
96 .Fl p
97 .Ar filesystem Ns | Ns Ar volume
98 .Ar filesystem Ns | Ns Ar volume
99 .Nm
100 .Cm rename
101 .Fl r
102 .Ar snapshot snapshot
103 .Nm
104 .Cm rename
105 .Fl u
106 .Op Fl p
107 .Ar filesystem filesystem
108 .Nm
109 .Cm list
110 .Op Fl r Ns | Ns Fl d Ar depth
111 .Op Fl Hp
112 .Op Fl o Ar property Ns Oo , Ns property Ns Oc Ns ...
113 .Op Fl t Ar type Ns Oo , Ns type Ns Oc Ns ...
114 .Oo Fl s Ar property Oc Ns ...
115 .Oo Fl S Ar property Oc Ns ...
116 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
117 .Nm
118 .Cm set
119 .Ar property Ns = Ns Ar value
120 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
121 .Nm
122 .Cm get
123 .Op Fl r Ns | Ns Fl d Ar depth
124 .Op Fl Hp
125 .Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ...
126 .Op Fl t Ar type Ns Oo Ns , Ar type Oc Ns ...
127 .Op Fl s Ar source Ns Oo Ns , Ns Ar source Oc Ns ...
128 .Ar all | property Ns Oo Ns , Ns Ar property Oc Ns ...
129 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
130 .Nm
131 .Cm inherit
132 .Op Fl rS
133 .Ar property
134 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
135 .Nm
136 .Cm upgrade
137 .Op Fl v
138 .Nm
139 .Cm upgrade
140 .Op Fl r
141 .Op Fl V Ar version
142 .Fl a | Ar filesystem
143 .Nm
144 .Cm userspace
145 .Op Fl Hinp
146 .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
147 .Oo Fl s Ar field Oc Ns ...
148 .Oo Fl S Ar field Oc Ns ...
149 .Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ...
150 .Ar filesystem Ns | Ns Ar snapshot
151 .Nm
152 .Cm groupspace
153 .Op Fl Hinp
154 .Op Fl o Ar field Ns Oo , Ns field Oc Ns ...
155 .Oo Fl s Ar field Oc Ns ...
156 .Oo Fl S Ar field Oc Ns ...
157 .Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ...
158 .Ar filesystem Ns | Ns Ar snapshot
159 .Nm
160 .Cm mount
161 .Nm
162 .Cm mount
163 .Op Fl vO
164 .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
165 .Fl a | Ar filesystem
166 .Nm
167 .Cm unmount Ns | Ns Cm umount
168 .Op Fl f
169 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
170 .Nm
171 .Cm share
172 .Fl a | Ar filesystem
173 .Nm
174 .Cm unshare
175 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
176 .Nm
177 .Cm bookmark
178 .Ar snapshot
179 .Ar bookmark
180 .Nm
181 .Cm send
182 .Op Fl DnPpRv
183 .Op Fl i Ar snapshot | Fl I Ar snapshot
184 .Ar snapshot
185 .Nm
186 .Cm send
187 .Op Fl i Ar snapshot Ns | Ns bookmark
188 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
189 .Nm
190 .Cm receive Ns | Ns Cm recv
191 .Op Fl vnFu
192 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
193 .Nm
194 .Cm receive Ns | Ns Cm recv
195 .Op Fl vnFu
196 .Op Fl d | e
197 .Ar filesystem
198 .Nm
199 .Cm allow
200 .Ar filesystem Ns | Ns Ar volume
201 .Nm
202 .Cm allow
203 .Op Fl ldug
204 .Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
205 .Ar perm Ns | Ns Ar @setname Ns
206 .Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ...
207 .Ar filesystem Ns | Ns Ar volume
208 .Nm
209 .Cm allow
210 .Op Fl ld
211 .Fl e Ns | Ns Cm everyone
212 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
213 .Ns ...
214 .Ar filesystem Ns | Ns Ar volume
215 .Nm
216 .Cm allow
217 .Fl c
218 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
219 .Ns ...
220 .Ar filesystem Ns | Ns Ar volume
221 .Nm
222 .Cm allow
223 .Fl s
224 .Ar @setname
225 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
226 .Ns ...
227 .Ar filesystem Ns | Ns Ar volume
228 .Nm
229 .Cm unallow
230 .Op Fl rldug
231 .Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
232 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
233 .Ns ... Oc
234 .Ar filesystem Ns | Ns Ar volume
235 .Nm
236 .Cm unallow
237 .Op Fl rld
238 .Fl e Ns | Ns Cm everyone
239 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
240 .Ns ... Oc
241 .Ar filesystem Ns | Ns Ar volume
242 .Nm
243 .Cm unallow
244 .Op Fl r
245 .Fl c
246 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
247 .Ns ... Oc
248 .Ar filesystem Ns | Ns Ar volume
249 .Nm
250 .Cm unallow
251 .Op Fl r
252 .Fl s
253 .Ar @setname
254 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
255 .Ns ... Oc
256 .Ar filesystem Ns | Ns Ar volume
257 .Nm
258 .Cm hold
259 .Op Fl r
260 .Ar tag snapshot Ns ...
261 .Nm
262 .Cm holds
263 .Op Fl r
264 .Ar snapshot Ns ...
265 .Nm
266 .Cm release
267 .Op Fl r
268 .Ar tag snapshot Ns ...
269 .Nm
270 .Cm diff
271 .Op Fl FHt
272 .Ar snapshot
273 .Op Ar snapshot Ns | Ns Ar filesystem
274 .Nm
275 .Cm jail
276 .Ar jailid Ns | Ns Ar jailname filesystem
277 .Nm
278 .Cm unjail
279 .Ar jailid Ns | Ns Ar jailname filesystem
280 .Sh DESCRIPTION
281 The
282 .Nm
283 command configures
284 .Tn ZFS
285 datasets within a
286 .Tn ZFS
287 storage pool, as described in
288 .Xr zpool 8 .
289 A dataset is identified by a unique path within the
290 .Tn ZFS
291 namespace. For example:
292 .Bd -ragged -offset 4n
293 .No pool/ Ns Brq filesystem,volume,snapshot
294 .Ed
295 .Pp
296 where the maximum length of a dataset name is
297 .Dv MAXNAMELEN
298 (256 bytes).
299 .Pp
300 A dataset can be one of the following:
301 .Bl -hang -width 12n
302 .It Sy file system
303 A
304 .Tn ZFS
305 dataset of type
306 .Em filesystem
307 can be mounted within the standard system namespace and behaves like other file
308 systems. While
309 .Tn ZFS
310 file systems are designed to be
311 .Tn POSIX
312 compliant, known issues exist that prevent compliance in some cases.
313 Applications that depend on standards conformance might fail due to nonstandard
314 behavior when checking file system free space.
315 .It Sy volume
316 A logical volume exported as a raw or block device. This type of dataset should
317 only be used under special circumstances. File systems are typically used in
318 most environments.
319 .It Sy snapshot
320 A read-only version of a file system or volume at a given point in time. It is
321 specified as
322 .Em filesystem@name
323 or
324 .Em volume@name .
325 .El
326 .Ss ZFS File System Hierarchy
327 A
328 .Tn ZFS
329 storage pool is a logical collection of devices that provide space for
330 datasets. A storage pool is also the root of the
331 .Tn ZFS
332 file system hierarchy.
333 .Pp
334 The root of the pool can be accessed as a file system, such as mounting and
335 unmounting, taking snapshots, and setting properties. The physical storage
336 characteristics, however, are managed by the
337 .Xr zpool 8
338 command.
339 .Pp
340 See
341 .Xr zpool 8
342 for more information on creating and administering pools.
343 .Ss Snapshots
344 A snapshot is a read-only copy of a file system or volume. Snapshots can be
345 created extremely quickly, and initially consume no additional space within the
346 pool. As data within the active dataset changes, the snapshot consumes more
347 data than would otherwise be shared with the active dataset.
348 .Pp
349 Snapshots can have arbitrary names. Snapshots of volumes can be cloned or
350 rolled back, but cannot be accessed independently.
351 .Pp
352 File system snapshots can be accessed under the
353 .Pa \&.zfs/snapshot
354 directory in the root of the file system. Snapshots are automatically mounted
355 on demand and may be unmounted at regular intervals. The visibility of the
356 .Pa \&.zfs
357 directory can be controlled by the
358 .Sy snapdir
359 property.
360 .Ss Clones
361 A clone is a writable volume or file system whose initial contents are the same
362 as another dataset. As with snapshots, creating a clone is nearly
363 instantaneous, and initially consumes no additional space.
364 .Pp
365 Clones can only be created from a snapshot. When a snapshot is cloned, it
366 creates an implicit dependency between the parent and child. Even though the
367 clone is created somewhere else in the dataset hierarchy, the original snapshot
368 cannot be destroyed as long as a clone exists. The
369 .Sy origin
370 property exposes this dependency, and the
371 .Cm destroy
372 command lists any such dependencies, if they exist.
373 .Pp
374 The clone parent-child dependency relationship can be reversed by using the
375 .Cm promote
376 subcommand. This causes the "origin" file system to become a clone of the
377 specified file system, which makes it possible to destroy the file system that
378 the clone was created from.
379 .Ss Mount Points
380 Creating a
381 .Tn ZFS
382 file system is a simple operation, so the number of file systems per system is
383 likely to be numerous. To cope with this,
384 .Tn ZFS
385 automatically manages mounting and unmounting file systems without the need to
386 edit the
387 .Pa /etc/fstab
388 file. All automatically managed file systems are mounted by
389 .Tn ZFS
390 at boot time.
391 .Pp
392 By default, file systems are mounted under
393 .Pa /path ,
394 where
395 .Ar path
396 is the name of the file system in the
397 .Tn ZFS
398 namespace. Directories are created and destroyed as needed.
399 .Pp
400 A file system can also have a mount point set in the
401 .Sy mountpoint
402 property. This directory is created as needed, and
403 .Tn ZFS
404 automatically mounts the file system when the
405 .Qq Nm Cm mount Fl a
406 command is invoked (without editing
407 .Pa /etc/fstab ) .
408 The
409 .Sy mountpoint
410 property can be inherited, so if
411 .Em pool/home
412 has a mount point of
413 .Pa /home ,
414 then
415 .Em pool/home/user
416 automatically inherits a mount point of
417 .Pa /home/user .
418 .Pp
419 A file system
420 .Sy mountpoint
421 property of
422 .Cm none
423 prevents the file system from being mounted.
424 .Pp
425 If needed,
426 .Tn ZFS
427 file systems can also be managed with traditional tools
428 .Pq Xr mount 8 , Xr umount 8 , Xr fstab 5 .
429 If a file system's mount point is set to
430 .Cm legacy ,
431 .Tn ZFS
432 makes no attempt to manage the file system, and the administrator is
433 responsible for mounting and unmounting the file system.
434 .Ss Jails
435 .No A Tn ZFS
436 dataset can be attached to a jail by using the
437 .Qq Nm Cm jail
438 subcommand. You cannot attach a dataset to one jail and the children of the
439 same dataset to another jails. To allow management of the dataset from within
440 a jail, the
441 .Sy jailed
442 property has to be set and the jail needs access to the
443 .Pa /dev/zfs
444 device. The
445 .Sy quota
446 property cannot be changed from within a jail. See
447 .Xr jail 8
448 for information on how to allow mounting
449 .Tn ZFS
450 datasets from within a jail.
451 .Pp
452 .No A Tn ZFS
453 dataset can be detached from a jail using the
454 .Qq Nm Cm unjail
455 subcommand.
456 .Pp
457 After a dataset is attached to a jail and the jailed property is set, a jailed
458 file system cannot be mounted outside the jail, since the jail administrator
459 might have set the mount point to an unacceptable value.
460 .Ss Deduplication
461 Deduplication is the process for removing redundant data at the block-level,
462 reducing the total amount of data stored. If a file system has the
463 .Cm dedup
464 property enabled, duplicate data blocks are removed synchronously. The result
465 is that only unique data is stored and common components are shared among
466 files.
467 .Ss Native Properties
468 Properties are divided into two types, native properties and user-defined (or
469 "user") properties. Native properties either export internal statistics or
470 control
471 .Tn ZFS
472 behavior. In addition, native properties are either editable or read-only. User
473 properties have no effect on
474 .Tn ZFS
475 behavior, but you can use them to annotate datasets in a way that is meaningful
476 in your environment. For more information about user properties, see the
477 .Qq Sx User Properties
478 section, below.
479 .Pp
480 Every dataset has a set of properties that export statistics about the dataset
481 as well as control various behaviors. Properties are inherited from the parent
482 unless overridden by the child. Some properties apply only to certain types of
483 datasets (file systems, volumes, or snapshots).
484 .Pp
485 The values of numeric properties can be specified using human-readable suffixes
486 (for example,
487 .Sy k , KB , M , Gb ,
488 and so forth, up to
489 .Sy Z
490 for zettabyte). The following are all valid (and equal) specifications:
491 .Bd -ragged -offset 4n
492 1536M, 1.5g, 1.50GB
493 .Ed
494 .Pp
495 The values of non-numeric properties are case sensitive and must be lowercase,
496 except for
497 .Sy mountpoint , sharenfs , No and Sy sharesmb .
498 .Pp
499 The following native properties consist of read-only statistics about the
500 dataset. These properties can be neither set, nor inherited. Native properties
501 apply to all dataset types unless otherwise noted.
502 .Bl -tag -width 2n
503 .It Sy available
504 The amount of space available to the dataset and all its children, assuming
505 that there is no other activity in the pool. Because space is shared within a
506 pool, availability can be limited by any number of factors, including physical
507 pool size, quotas, reservations, or other datasets within the pool.
508 .Pp
509 This property can also be referred to by its shortened column name,
510 .Sy avail .
511 .It Sy compressratio
512 For non-snapshots, the compression ratio achieved for the
513 .Sy used
514 space of this dataset, expressed as a multiplier.  The
515 .Sy used
516 property includes descendant datasets, and, for clones, does not include
517 the space shared with the origin snapshot.  For snapshots, the
518 .Sy compressratio
519 is the same as the
520 .Sy refcompressratio
521 property. Compression can be turned on by running:
522 .Qq Nm Cm set compression=on Ar dataset
523 The default value is
524 .Cm off .
525 .It Sy creation
526 The time this dataset was created.
527 .It Sy clones
528 For snapshots, this property is a comma-separated list of filesystems or
529 volumes which are clones of this snapshot.  The clones'
530 .Sy origin
531 property is this snapshot.  If the
532 .Sy clones
533 property is not empty, then this snapshot can not be destroyed (even with the
534 .Fl r
535 or
536 .Fl f
537 options).
538 .It Sy defer_destroy
539 This property is
540 .Cm on
541 if the snapshot has been marked for deferred destroy by using the
542 .Qq Nm Cm destroy -d
543 command. Otherwise, the property is
544 .Cm off .
545 .It Sy logicalreferenced
546 The amount of space that is
547 .Qq logically
548 accessible by this dataset.
549 See the
550 .Sy referenced
551 property.
552 The logical space ignores the effect of the
553 .Sy compression
554 and
555 .Sy copies
556 properties, giving a quantity closer to the amount of data that applications
557 see.
558 However, it does include space consumed by metadata.
559 .Pp
560 This property can also be referred to by its shortened column name,
561 .Sy lrefer .
562 .It Sy logicalused
563 The amount of space that is
564 .Qq logically
565 consumed by this dataset and all its descendents.
566 See the
567 .Sy used
568 property.
569 The logical space ignores the effect of the
570 .Sy compression
571 and
572 .Sy copies
573 properties, giving a quantity closer to the amount of data that applications
574 see.
575 .Pp
576 This property can also be referred to by its shortened column name,
577 .Sy lused .
578 .It Sy mounted
579 For file systems, indicates whether the file system is currently mounted. This
580 property can be either
581 .Cm yes
582 or
583 .Cm no .
584 .It Sy origin
585 For cloned file systems or volumes, the snapshot from which the clone was
586 created. See also the
587 .Sy clones
588 property.
589 .It Sy referenced
590 The amount of data that is accessible by this dataset, which may or may not be
591 shared with other datasets in the pool. When a snapshot or clone is created, it
592 initially references the same amount of space as the file system or snapshot it
593 was created from, since its contents are identical.
594 .Pp
595 This property can also be referred to by its shortened column name,
596 .Sy refer .
597 .It Sy refcompressratio
598 The compression ratio achieved for the
599 .Sy referenced
600 space of this dataset, expressed as a multiplier.  See also the
601 .Sy compressratio
602 property.
603 .It Sy type
604 The type of dataset:
605 .Sy filesystem , volume , No or Sy snapshot .
606 .It Sy used
607 The amount of space consumed by this dataset and all its descendents. This is
608 the value that is checked against this dataset's quota and reservation. The
609 space used does not include this dataset's reservation, but does take into
610 account the reservations of any descendent datasets. The amount of space that a
611 dataset consumes from its parent, as well as the amount of space that are freed
612 if this dataset is recursively destroyed, is the greater of its space used and
613 its reservation.
614 .Pp
615 When snapshots (see the
616 .Qq Sx Snapshots
617 section) are created, their space is
618 initially shared between the snapshot and the file system, and possibly with
619 previous snapshots. As the file system changes, space that was previously
620 shared becomes unique to the snapshot, and counted in the snapshot's space
621 used. Additionally, deleting snapshots can increase the amount of space unique
622 to (and used by) other snapshots.
623 .Pp
624 The amount of space used, available, or referenced does not take into account
625 pending changes. Pending changes are generally accounted for within a few
626 seconds. Committing a change to a disk using
627 .Xr fsync 2
628 or
629 .Sy O_SYNC
630 does not necessarily guarantee that the space usage information is updated
631 immediately.
632 .It Sy usedby*
633 The
634 .Sy usedby*
635 properties decompose the
636 .Sy used
637 properties into the various reasons that space is used. Specifically,
638 .Sy used No =
639 .Sy usedbysnapshots + usedbydataset + usedbychildren + usedbyrefreservation .
640 These properties are only available for datasets created
641 with
642 .Tn ZFS
643 pool version 13 pools and higher.
644 .It Sy usedbysnapshots
645 The amount of space consumed by snapshots of this dataset. In particular, it is
646 the amount of space that would be freed if all of this dataset's snapshots were
647 destroyed. Note that this is not simply the sum of the snapshots'
648 .Sy used
649 properties because space can be shared by multiple snapshots.
650 .It Sy usedbydataset
651 The amount of space used by this dataset itself, which would be freed if the
652 dataset were destroyed (after first removing any
653 .Sy refreservation
654 and destroying any necessary snapshots or descendents).
655 .It Sy usedbychildren
656 The amount of space used by children of this dataset, which would be freed if
657 all the dataset's children were destroyed.
658 .It Sy usedbyrefreservation
659 The amount of space used by a
660 .Sy refreservation
661 set on this dataset, which would be freed if the
662 .Sy refreservation
663 was removed.
664 .It Sy userused@ Ns Ar user
665 The amount of space consumed by the specified user in this dataset. Space is
666 charged to the owner of each file, as displayed by
667 .Qq Nm ls Fl l .
668 The amount of space charged is displayed by
669 .Qq Nm du
670 and
671 .Qq Nm ls Fl s .
672 See the
673 .Qq Nm Cm userspace
674 subcommand for more information.
675 .Pp
676 Unprivileged users can access only their own space usage. The root user, or a
677 user who has been granted the
678 .Sy userused
679 privilege with
680 .Qq Nm Cm allow ,
681 can access everyone's usage.
682 .Pp
683 The
684 .Sy userused@ Ns ...
685 properties are not displayed by
686 .Qq Nm Cm get all .
687 The user's name must be appended after the
688 .Sy @
689 symbol, using one of the following forms:
690 .Bl -bullet -offset 2n
691 .It
692 POSIX name (for example,
693 .Em joe )
694 .It
695 POSIX numeric ID (for example,
696 .Em 1001 )
697 .El
698 .It Sy userrefs
699 This property is set to the number of user holds on this snapshot. User holds
700 are set by using the
701 .Qq Nm Cm hold
702 command.
703 .It Sy groupused@ Ns Ar group
704 The amount of space consumed by the specified group in this dataset. Space is
705 charged to the group of each file, as displayed by
706 .Nm ls Fl l .
707 See the
708 .Sy userused@ Ns Ar user
709 property for more information.
710 .Pp
711 Unprivileged users can only access their own groups' space usage. The root
712 user, or a user who has been granted the
713 .Sy groupused
714 privilege with
715 .Qq Nm Cm allow ,
716 can access all groups' usage.
717 .It Sy volblocksize Ns = Ns Ar blocksize
718 For volumes, specifies the block size of the volume. The
719 .Ar blocksize
720 cannot be changed once the volume has been written, so it should be set at
721 volume creation time. The default
722 .Ar blocksize
723 for volumes is 8 Kbytes. Any
724 power of 2 from 512 bytes to 128 Kbytes is valid.
725 .Pp
726 This property can also be referred to by its shortened column name,
727 .Sy volblock .
728 .It Sy written
729 The amount of
730 .Sy referenced
731 space written to this dataset since the previous snapshot.
732 .It Sy written@ Ns Ar snapshot
733 The amount of
734 .Sy referenced
735 space written to this dataset since the specified snapshot.  This is the space
736 that is referenced by this dataset but was not referenced by the specified
737 snapshot.
738 .Pp
739 The
740 .Ar snapshot
741 may be specified as a short snapshot name (just the part after the
742 .Sy @ ) ,
743 in which case it will be interpreted as a snapshot in the same filesystem as
744 this dataset. The
745 .Ar snapshot
746 may be a full snapshot name
747 .Pq Em filesystem@snapshot ,
748 which for clones may be a snapshot in the origin's filesystem (or the origin of
749 the origin's filesystem, etc).
750 .El
751 .Pp
752 The following native properties can be used to change the behavior of a
753 .Tn ZFS
754 dataset.
755 .Bl -tag -width 2n
756 .It Xo
757 .Sy aclinherit Ns = Ns Cm discard |
758 .Cm noallow |
759 .Cm restricted |
760 .Cm passthrough |
761 .Cm passthrough-x
762 .Xc
763 Controls how
764 .Tn ACL
765 entries are inherited when files and directories are created. A file system
766 with an
767 .Sy aclinherit
768 property of
769 .Cm discard
770 does not inherit any
771 .Tn ACL
772 entries. A file system with an
773 .Sy aclinherit
774 property value of
775 .Cm noallow
776 only inherits inheritable
777 .Tn ACL
778 entries that specify "deny" permissions. The property value
779 .Cm restricted
780 (the default) removes the
781 .Em write_acl
782 and
783 .Em write_owner
784 permissions when the
785 .Tn ACL
786 entry is inherited. A file system with an
787 .Sy aclinherit
788 property value of
789 .Cm passthrough
790 inherits all inheritable
791 .Tn ACL
792 entries without any modifications made to the
793 .Tn ACL
794 entries when they are inherited. A file system with an
795 .Sy aclinherit
796 property value of
797 .Cm passthrough-x
798 has the same meaning as
799 .Cm passthrough ,
800 except that the
801 .Em owner@ , group@ , No and Em everyone@ Tn ACE Ns s
802 inherit the execute permission only if the file creation mode also requests the
803 execute bit.
804 .Pp
805 When the property value is set to
806 .Cm passthrough ,
807 files are created with a mode determined by the inheritable
808 .Tn ACE Ns s.
809 If no inheritable
810 .Tn ACE Ns s
811 exist that affect the mode, then the mode is set in accordance to the requested
812 mode from the application.
813 .It Sy aclmode Ns = Ns Cm discard | groupmask | passthrough | restricted
814 Controls how an
815 .Tn ACL
816 is modified during
817 .Xr chmod 2 .
818 A file system with an
819 .Sy aclmode
820 property of
821 .Cm discard
822 (the default) deletes all
823 .Tn ACL
824 entries that do not represent the mode of the file. An
825 .Sy aclmode
826 property of
827 .Cm groupmask
828 reduces permissions granted in all
829 .Em ALLOW
830 entries found in the
831 .Tn ACL
832 such that they are no greater than the group permissions specified by
833 .Xr chmod 2 .
834 A file system with an
835 .Sy aclmode
836 property of
837 .Cm passthrough
838 indicates that no changes are made to the
839 .Tn ACL
840 other than creating or updating the necessary
841 .Tn ACL
842 entries to represent the new mode of the file or directory.
843 An
844 .Sy aclmode
845 property of
846 .Cm restricted
847 will cause the
848 .Xr chmod 2
849 operation to return an error when used on any file or directory which has
850 a non-trivial
851 .Tn ACL
852 whose entries can not be represented by a mode.
853 .Xr chmod 2
854 is required to change the set user ID, set group ID, or sticky bits on a file
855 or directory, as they do not have equivalent
856 .Tn ACL
857 entries.
858 In order to use
859 .Xr chmod 2
860 on a file or directory with a non-trivial
861 .Tn ACL
862 when
863 .Sy aclmode
864 is set to
865 .Cm restricted ,
866 you must first remove all
867 .Tn ACL
868 entries which do not represent the current mode.
869 .It Sy atime Ns = Ns Cm on | off
870 Controls whether the access time for files is updated when they are read.
871 Turning this property off avoids producing write traffic when reading files and
872 can result in significant performance gains, though it might confuse mailers
873 and other similar utilities. The default value is
874 .Cm on .
875 .It Sy canmount Ns = Ns Cm on | off | noauto
876 If this property is set to
877 .Cm off ,
878 the file system cannot be mounted, and is ignored by
879 .Qq Nm Cm mount Fl a .
880 Setting this property to
881 .Cm off
882 is similar to setting the
883 .Sy mountpoint
884 property to
885 .Cm none ,
886 except that the dataset still has a normal
887 .Sy mountpoint
888 property, which can be inherited. Setting this property to
889 .Cm off
890 allows datasets to be used solely as a mechanism to inherit properties. One
891 example of setting
892 .Sy canmount Ns = Ns Cm off
893 is to have two datasets with the same
894 .Sy mountpoint ,
895 so that the children of both datasets appear in the same directory, but might
896 have different inherited characteristics.
897 .Pp
898 When the
899 .Cm noauto
900 value is set, a dataset can only be mounted and unmounted explicitly. The
901 dataset is not mounted automatically when the dataset is created or imported,
902 nor is it mounted by the
903 .Qq Nm Cm mount Fl a
904 command or unmounted by the
905 .Qq Nm Cm umount Fl a
906 command.
907 .Pp
908 This property is not inherited.
909 .It Sy checksum Ns = Ns Cm on | off | fletcher2 | fletcher4 | sha256 | noparity
910 Controls the checksum used to verify data integrity. The default value is
911 .Cm on ,
912 which automatically selects an appropriate algorithm (currently,
913 .Cm fletcher4 ,
914 but this may change in future releases). The value
915 .Cm off
916 disables integrity checking on user data.
917 The value
918 .Cm noparity
919 not only
920 disables integrity but also disables maintaining parity for user data.  This
921 setting is used internally by a dump device residing on a RAID-Z pool and should
922 not be used by any other dataset.
923 Disabling checksums is
924 .Em NOT
925 a recommended practice.
926 .It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | zle | Cm lz4
927 Controls the compression algorithm used for this dataset. The
928 .Cm lzjb
929 compression algorithm is optimized for performance while providing decent data
930 compression. Setting compression to
931 .Cm on
932 uses the
933 .Cm lzjb
934 compression algorithm. The
935 .Cm gzip
936 compression algorithm uses the same compression as the
937 .Xr gzip 1
938 command. You can specify the
939 .Cm gzip
940 level by using the value
941 .Cm gzip- Ns Ar N
942 where
943 .Ar N
944 is an integer from 1 (fastest) to 9 (best compression ratio). Currently,
945 .Cm gzip
946 is equivalent to
947 .Cm gzip-6
948 (which is also the default for
949 .Xr gzip 1 ) .
950 The
951 .Cm zle
952 compression algorithm compresses runs of zeros.
953 .Pp
954 The
955 .Sy lz4
956 compression algorithm is a high-performance replacement
957 for the
958 .Sy lzjb
959 algorithm. It features significantly faster
960 compression and decompression, as well as a moderately higher
961 compression ratio than
962 .Sy lzjb ,
963 but can only be used on pools with
964 the
965 .Sy lz4_compress
966 feature set to
967 .Sy enabled .
968 See
969 .Xr zpool-features 7
970 for details on ZFS feature flags and the
971 .Sy lz4_compress
972 feature.
973 .Pp
974 This property can also be referred to by its shortened column name
975 .Cm compress .
976 Changing this property affects only newly-written data.
977 .It Sy copies Ns = Ns Cm 1 | 2 | 3
978 Controls the number of copies of data stored for this dataset. These copies are
979 in addition to any redundancy provided by the pool, for example, mirroring or
980 RAID-Z. The copies are stored on different disks, if possible. The space used
981 by multiple copies is charged to the associated file and dataset, changing the
982 .Sy used
983 property and counting against quotas and reservations.
984 .Pp
985 Changing this property only affects newly-written data. Therefore, set this
986 property at file system creation time by using the
987 .Fl o Cm copies= Ns Ar N
988 option.
989 .It Sy dedup Ns = Ns Cm on | off | verify | sha256 Ns Op Cm ,verify
990 Configures deduplication for a dataset. The default value is
991 .Cm off .
992 The default deduplication checksum is
993 .Cm sha256
994 (this may change in the future).
995 When
996 .Sy dedup
997 is enabled, the checksum defined here overrides the
998 .Sy checksum
999 property. Setting the value to
1000 .Cm verify
1001 has the same effect as the setting
1002 .Cm sha256,verify .
1003 .Pp
1004 If set to
1005 .Cm verify ,
1006 .Tn ZFS
1007 will do a byte-to-byte comparsion in case of two blocks having the same
1008 signature to make sure the block contents are identical.
1009 .It Sy devices Ns = Ns Cm on | off
1010 The
1011 .Sy devices
1012 property is currently not supported on
1013 .Fx .
1014 .It Sy exec Ns = Ns Cm on | off
1015 Controls whether processes can be executed from within this file system. The
1016 default value is
1017 .Cm on .
1018 .It Sy mlslabel Ns = Ns Ar label | Cm none
1019 The
1020 .Sy mlslabel
1021 property is currently not supported on
1022 .Fx .
1023 .It Sy mountpoint Ns = Ns Ar path | Cm none | legacy
1024 Controls the mount point used for this file system. See the
1025 .Qq Sx Mount Points
1026 section for more information on how this property is used.
1027 .Pp
1028 When the
1029 .Sy mountpoint
1030 property is changed for a file system, the file system and any children that
1031 inherit the mount point are unmounted. If the new value is
1032 .Cm legacy ,
1033 then they remain unmounted. Otherwise, they are automatically remounted in the
1034 new location if the property was previously
1035 .Cm legacy
1036 or
1037 .Cm none ,
1038 or if they were mounted before the property was changed. In addition, any
1039 shared file systems are unshared and shared in the new location.
1040 .It Sy nbmand Ns = Ns Cm on | off
1041 The
1042 .Sy nbmand
1043 property is currently not supported on
1044 .Fx .
1045 .It Sy primarycache Ns = Ns Cm all | none | metadata
1046 Controls what is cached in the primary cache (ARC). If this property is set to
1047 .Cm all ,
1048 then both user data and metadata is cached. If this property is set to
1049 .Cm none ,
1050 then neither user data nor metadata is cached. If this property is set to
1051 .Cm metadata ,
1052 then only metadata is cached. The default value is
1053 .Cm all .
1054 .It Sy quota Ns = Ns Ar size | Cm none
1055 Limits the amount of space a dataset and its descendents can consume. This
1056 property enforces a hard limit on the amount of space used. This includes all
1057 space consumed by descendents, including file systems and snapshots. Setting a
1058 quota on a descendent of a dataset that already has a quota does not override
1059 the ancestor's quota, but rather imposes an additional limit.
1060 .Pp
1061 Quotas cannot be set on volumes, as the
1062 .Sy volsize
1063 property acts as an implicit quota.
1064 .It Sy userquota@ Ns Ar user Ns = Ns Ar size | Cm none
1065 Limits the amount of space consumed by the specified user.
1066 Similar to the
1067 .Sy refquota
1068 property, the
1069 .Sy userquota
1070 space calculation does not include space that is used by descendent datasets,
1071 such as snapshots and clones. User space consumption is identified by the
1072 .Sy userspace@ Ns Ar user
1073 property.
1074 .Pp
1075 Enforcement of user quotas may be delayed by several seconds. This delay means
1076 that a user might exceed their quota before the system notices that they are
1077 over quota and begins to refuse additional writes with the
1078 .Em EDQUOT
1079 error message. See the
1080 .Cm userspace
1081 subcommand for more information.
1082 .Pp
1083 Unprivileged users can only access their own groups' space usage. The root
1084 user, or a user who has been granted the
1085 .Sy userquota
1086 privilege with
1087 .Qq Nm Cm allow ,
1088 can get and set everyone's quota.
1089 .Pp
1090 This property is not available on volumes, on file systems before version 4, or
1091 on pools before version 15. The
1092 .Sy userquota@ Ns ...
1093 properties are not displayed by
1094 .Qq Nm Cm get all .
1095 The user's name must be appended after the
1096 .Sy @
1097 symbol, using one of the following forms:
1098 .Bl -bullet -offset 2n
1099 .It
1100 POSIX name (for example,
1101 .Em joe )
1102 .It
1103 POSIX numeric ID (for example,
1104 .Em 1001 )
1105 .El
1106 .It Sy groupquota@ Ns Ar group Ns = Ns Ar size | Cm none
1107 Limits the amount of space consumed by the specified group. Group space
1108 consumption is identified by the
1109 .Sy userquota@ Ns Ar user
1110 property.
1111 .Pp
1112 Unprivileged users can access only their own groups' space usage. The root
1113 user, or a user who has been granted the
1114 .Sy groupquota
1115 privilege with
1116 .Qq Nm Cm allow ,
1117 can get and set all groups' quotas.
1118 .It Sy readonly Ns = Ns Cm on | off
1119 Controls whether this dataset can be modified. The default value is
1120 .Cm off .
1121 .It Sy recordsize Ns = Ns Ar size
1122 Specifies a suggested block size for files in the file system. This property is
1123 designed solely for use with database workloads that access files in fixed-size
1124 records.
1125 .Tn ZFS
1126 automatically tunes block sizes according to internal algorithms optimized for
1127 typical access patterns.
1128 .Pp
1129 For databases that create very large files but access them in small random
1130 chunks, these algorithms may be suboptimal. Specifying a
1131 .Sy recordsize
1132 greater than or equal to the record size of the database can result in
1133 significant performance gains. Use of this property for general purpose file
1134 systems is strongly discouraged, and may adversely affect performance.
1135 .Pp
1136 The size specified must be a power of two greater than or equal to 512 and less
1137 than or equal to 128 Kbytes.
1138 .Pp
1139 Changing the file system's
1140 .Sy recordsize
1141 affects only files created afterward; existing files are unaffected.
1142 .Pp
1143 This property can also be referred to by its shortened column name,
1144 .Sy recsize .
1145 .It Sy refquota Ns = Ns Ar size | Cm none
1146 Limits the amount of space a dataset can consume. This property enforces a hard
1147 limit on the amount of space used. This hard limit does not include space used
1148 by descendents, including file systems and snapshots.
1149 .It Sy refreservation Ns = Ns Ar size | Cm none
1150 The minimum amount of space guaranteed to a dataset, not including its
1151 descendents. When the amount of space used is below this value, the dataset is
1152 treated as if it were taking up the amount of space specified by
1153 .Sy refreservation .
1154 The
1155 .Sy refreservation
1156 reservation is accounted for in the parent datasets' space used, and counts
1157 against the parent datasets' quotas and reservations.
1158 .Pp
1159 If
1160 .Sy refreservation
1161 is set, a snapshot is only allowed if there is enough free pool space outside
1162 of this reservation to accommodate the current number of "referenced" bytes in
1163 the dataset.
1164 .Pp
1165 This property can also be referred to by its shortened column name,
1166 .Sy refreserv .
1167 .It Sy reservation Ns = Ns Ar size | Cm none
1168 The minimum amount of space guaranteed to a dataset and its descendents. When
1169 the amount of space used is below this value, the dataset is treated as if it
1170 were taking up the amount of space specified by its reservation. Reservations
1171 are accounted for in the parent datasets' space used, and count against the
1172 parent datasets' quotas and reservations.
1173 .Pp
1174 This property can also be referred to by its shortened column name,
1175 .Sy reserv .
1176 .It Sy secondarycache Ns = Ns Cm all | none | metadata
1177 Controls what is cached in the secondary cache (L2ARC). If this property is set
1178 to
1179 .Cm all ,
1180 then both user data and metadata is cached. If this property is set to
1181 .Cm none ,
1182 then neither user data nor metadata is cached. If this property is set to
1183 .Cm metadata ,
1184 then only metadata is cached. The default value is
1185 .Cm all .
1186 .It Sy setuid Ns = Ns Cm on | off
1187 Controls whether the
1188 .No set- Ns Tn UID
1189 bit is respected for the file system. The default value is
1190 .Cm on .
1191 .It Sy sharesmb Ns = Ns Cm on | off | Ar opts
1192 The
1193 .Sy sharesmb
1194 property currently has no effect on
1195 .Fx .
1196 .It Sy sharenfs Ns = Ns Cm on | off | Ar opts
1197 Controls whether the file system is shared via
1198 .Tn NFS ,
1199 and what options are used. A file system with a
1200 .Sy sharenfs
1201 property of
1202 .Cm off
1203 is managed the traditional way via
1204 .Xr exports 5 .
1205 Otherwise, the file system is automatically shared and unshared with the
1206 .Qq Nm Cm share
1207 and
1208 .Qq Nm Cm unshare
1209 commands. If the property is set to
1210 .Cm on
1211 no
1212 .Tn NFS
1213 export options are used. Otherwise,
1214 .Tn NFS
1215 export options are equivalent to the contents of this property. The export
1216 options may be comma-separated. See
1217 .Xr exports 5
1218 for a list of valid options.
1219 .Pp
1220 When the
1221 .Sy sharenfs
1222 property is changed for a dataset, the
1223 .Xr mountd 8
1224 daemon is reloaded.
1225 .It Sy logbias Ns = Ns Cm latency | throughput
1226 Provide a hint to
1227 .Tn ZFS
1228 about handling of synchronous requests in this dataset.
1229 If
1230 .Sy logbias
1231 is set to
1232 .Cm latency
1233 (the default),
1234 .Tn ZFS
1235 will use pool log devices (if configured) to handle the requests at low
1236 latency. If
1237 .Sy logbias
1238 is set to
1239 .Cm throughput ,
1240 .Tn ZFS
1241 will not use configured pool log devices.
1242 .Tn ZFS
1243 will instead optimize synchronous operations for global pool throughput and
1244 efficient use of resources.
1245 .It Sy snapdir Ns = Ns Cm hidden | visible
1246 Controls whether the
1247 .Pa \&.zfs
1248 directory is hidden or visible in the root of the file system as discussed in
1249 the
1250 .Qq Sx Snapshots
1251 section. The default value is
1252 .Cm hidden .
1253 .It Sy sync Ns = Ns Cm standard | always | disabled
1254 Controls the behavior of synchronous requests (e.g.
1255 .Xr fsync 2 ,
1256 O_DSYNC). This property accepts the following values:
1257 .Bl -tag -offset 4n -width 8n
1258 .It Sy standard
1259 This is the POSIX specified behavior of ensuring all synchronous requests are
1260 written to stable storage and all devices are flushed to ensure data is not
1261 cached by device controllers (this is the default).
1262 .It Sy always
1263 All file system transactions are written and flushed before their system calls
1264 return. This has a large performance penalty.
1265 .It Sy disabled
1266 Disables synchronous requests. File system transactions are only committed to
1267 stable storage periodically. This option will give the highest performance.
1268 However, it is very dangerous as
1269 .Tn ZFS
1270 would be ignoring the synchronous transaction demands of applications such as
1271 databases or
1272 .Tn NFS .
1273 Administrators should only use this option when the risks are understood.
1274 .El
1275 .It Sy volsize Ns = Ns Ar size
1276 For volumes, specifies the logical size of the volume. By default, creating a
1277 volume establishes a reservation of equal size. For storage pools with a
1278 version number of 9 or higher, a
1279 .Sy refreservation
1280 is set instead. Any changes to
1281 .Sy volsize
1282 are reflected in an equivalent change to the reservation (or
1283 .Sy refreservation ) .
1284 The
1285 .Sy volsize
1286 can only be set to a multiple of
1287 .Cm volblocksize ,
1288 and cannot be zero.
1289 .Pp
1290 The reservation is kept equal to the volume's logical size to prevent
1291 unexpected behavior for consumers. Without the reservation, the volume could
1292 run out of space, resulting in undefined behavior or data corruption, depending
1293 on how the volume is used. These effects can also occur when the volume size is
1294 changed while it is in use (particularly when shrinking the size). Extreme care
1295 should be used when adjusting the volume size.
1296 .Pp
1297 Though not recommended, a "sparse volume" (also known as "thin provisioning")
1298 can be created by specifying the
1299 .Fl s
1300 option to the
1301 .Qq Nm Cm create Fl V
1302 command, or by changing the reservation after the volume has been created. A
1303 "sparse volume" is a volume where the reservation is less then the volume size.
1304 Consequently, writes to a sparse volume can fail with
1305 .Sy ENOSPC
1306 when the pool is low on space. For a sparse volume, changes to
1307 .Sy volsize
1308 are not reflected in the reservation.
1309 .It Sy vscan Ns = Ns Cm off | on
1310 The
1311 .Sy vscan
1312 property is currently not supported on
1313 .Fx .
1314 .It Sy xattr Ns = Ns Cm off | on
1315 The
1316 .Sy xattr
1317 property is currently not supported on
1318 .Fx .
1319 .It Sy jailed Ns = Ns Cm off | on
1320 Controls whether the dataset is managed from a jail. See the
1321 .Qq Sx Jails
1322 section for more information. The default value is
1323 .Cm off .
1324 .El
1325 .Pp
1326 The following three properties cannot be changed after the file system is
1327 created, and therefore, should be set when the file system is created. If the
1328 properties are not set with the
1329 .Qq Nm Cm create
1330 or
1331 .Nm zpool Cm create
1332 commands, these properties are inherited from the parent dataset. If the parent
1333 dataset lacks these properties due to having been created prior to these
1334 features being supported, the new file system will have the default values for
1335 these properties.
1336 .Bl -tag -width 4n
1337 .It Sy casesensitivity Ns = Ns Cm sensitive | insensitive | mixed
1338 Indicates whether the file name matching algorithm used by the file system
1339 should be case-sensitive, case-insensitive, or allow a combination of both
1340 styles of matching. The default value for the
1341 .Sy casesensitivity
1342 property is
1343 .Cm sensitive .
1344 Traditionally, UNIX and POSIX file systems have case-sensitive file names.
1345 .Pp
1346 The
1347 .Cm mixed
1348 value for the
1349 .Sy casesensitivity
1350 property indicates that the
1351 file system can support requests for both case-sensitive and case-insensitive
1352 matching behavior.
1353 .It Sy normalization Ns = Ns Cm none | formC | formD | formKC | formKD
1354 Indicates whether the file system should perform a
1355 .Sy unicode
1356 normalization of file names whenever two file names are compared, and which
1357 normalization algorithm should be used. File names are always stored
1358 unmodified, names are normalized as part of any comparison process. If this
1359 property is set to a legal value other than
1360 .Cm none ,
1361 and the
1362 .Sy utf8only
1363 property was left unspecified, the
1364 .Sy utf8only
1365 property is automatically set to
1366 .Cm on .
1367 The default value of the
1368 .Sy normalization
1369 property is
1370 .Cm none .
1371 This property cannot be changed after the file system is created.
1372 .It Sy utf8only Ns = Ns Cm on | off
1373 Indicates whether the file system should reject file names that include
1374 characters that are not present in the
1375 .Sy UTF-8
1376 character code set. If this property is explicitly set to
1377 .Cm off ,
1378 the normalization property must either not be explicitly set or be set to
1379 .Cm none .
1380 The default value for the
1381 .Sy utf8only
1382 property is
1383 .Cm off .
1384 This property cannot be changed after the file system is created.
1385 .El
1386 .Pp
1387 The
1388 .Sy casesensitivity , normalization , No and Sy utf8only
1389 properties are also new permissions that can be assigned to non-privileged
1390 users by using the
1391 .Tn ZFS
1392 delegated administration feature.
1393 .Ss Temporary Mount Point Properties
1394 When a file system is mounted, either through
1395 .Xr mount 8
1396 for legacy mounts or the
1397 .Qq Nm Cm mount
1398 command for normal file systems, its mount options are set according to its
1399 properties. The correlation between properties and mount options is as follows:
1400 .Bl -column -offset 4n "PROPERTY" "MOUNT OPTION"
1401 .It "PROPERTY   MOUNT OPTION"
1402 .It "atime      atime/noatime"
1403 .It "exec       exec/noexec"
1404 .It "readonly   ro/rw"
1405 .It "setuid     suid/nosuid"
1406 .El
1407 .Pp
1408 In addition, these options can be set on a per-mount basis using the
1409 .Fl o
1410 option, without affecting the property that is stored on disk. The values
1411 specified on the command line override the values stored in the dataset. These
1412 properties are reported as "temporary" by the
1413 .Qq Nm Cm get
1414 command. If the properties are changed while the dataset is mounted, the new
1415 setting overrides any temporary settings.
1416 .Ss User Properties
1417 In addition to the standard native properties,
1418 .Tn ZFS
1419 supports arbitrary user properties. User properties have no effect on
1420 .Tn ZFS
1421 behavior, but applications or administrators can use them to annotate datasets
1422 (file systems, volumes, and snapshots).
1423 .Pp
1424 User property names must contain a colon
1425 .Pq Sy \&:
1426 character to distinguish them from native properties. They may contain
1427 lowercase letters, numbers, and the following punctuation characters: colon
1428 .Pq Sy \&: ,
1429 dash
1430 .Pq Sy \&- ,
1431 period
1432 .Pq Sy \&.
1433 and underscore
1434 .Pq Sy \&_ .
1435 The expected convention is that the property name is divided into two portions
1436 such as
1437 .Em module Ns Sy \&: Ns Em property ,
1438 but this namespace is not enforced by
1439 .Tn ZFS .
1440 User property names can be at most 256 characters, and cannot begin with a dash
1441 .Pq Sy \&- .
1442 .Pp
1443 When making programmatic use of user properties, it is strongly suggested to
1444 use a reversed
1445 .Tn DNS
1446 domain name for the
1447 .Ar module
1448 component of property names to reduce the chance that two
1449 independently-developed packages use the same property name for different
1450 purposes. Property names beginning with
1451 .Em com.sun
1452 are reserved for use by Sun Microsystems.
1453 .Pp
1454 The values of user properties are arbitrary strings, are always inherited, and
1455 are never validated. All of the commands that operate on properties
1456 .Po
1457 .Qq Nm Cm list ,
1458 .Qq Nm Cm get ,
1459 .Qq Nm Cm set
1460 and so forth
1461 .Pc
1462 can be used to manipulate both native properties and user properties. Use the
1463 .Qq Nm Cm inherit
1464 command to clear a user property. If the property is not defined in any parent
1465 dataset, it is removed entirely. Property values are limited to 1024
1466 characters.
1467 .Sh SUBCOMMANDS
1468 All subcommands that modify state are logged persistently to the pool in their
1469 original form.
1470 .Bl -tag -width 2n
1471 .It Xo
1472 .Nm
1473 .Op Fl \&?
1474 .Xc
1475 .Pp
1476 Displays a help message.
1477 .It Xo
1478 .Nm
1479 .Cm create
1480 .Op Fl pu
1481 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1482 .Ar filesystem
1483 .Xc
1484 .Pp
1485 Creates a new
1486 .Tn ZFS
1487 file system. The file system is automatically mounted according to the
1488 .Sy mountpoint
1489 property inherited from the parent.
1490 .Bl -tag -width indent
1491 .It Fl p
1492 Creates all the non-existing parent datasets. Datasets created in this manner
1493 are automatically mounted according to the
1494 .Sy mountpoint
1495 property inherited from their parent. Any property specified on the command
1496 line using the
1497 .Fl o
1498 option is ignored. If the target filesystem already exists, the operation
1499 completes successfully.
1500 .It Fl u
1501 Newly created file system is not mounted.
1502 .It Fl o Ar property Ns = Ns Ar value
1503 Sets the specified property as if the command
1504 .Qq Nm Cm set Ar property Ns = Ns Ar value
1505 was invoked at the same time the dataset was created. Any editable
1506 .Tn ZFS
1507 property can also be set at creation time. Multiple
1508 .Fl o
1509 options can be specified. An error results if the same property is specified in
1510 multiple
1511 .Fl o
1512 options.
1513 .El
1514 .It Xo
1515 .Nm
1516 .Cm create
1517 .Op Fl ps
1518 .Op Fl b Ar blocksize
1519 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1520 .Fl V
1521 .Ar size volume
1522 .Xc
1523 .Pp
1524 Creates a volume of the given size. The volume is exported as a block device in
1525 .Pa /dev/zvol/path ,
1526 where
1527 .Ar path
1528 is the name of the volume in the
1529 .Tn ZFS
1530 namespace. The size represents the logical size as exported by the device. By
1531 default, a reservation of equal size is created.
1532 .Pp
1533 .Ar size
1534 is automatically rounded up to the nearest 128 Kbytes to ensure that
1535 the volume has an integral number of blocks regardless of
1536 .Ar blocksize .
1537 .Bl -tag -width indent
1538 .It Fl p
1539 Creates all the non-existing parent datasets. Datasets created in this manner
1540 are automatically mounted according to the
1541 .Sy mountpoint
1542 property inherited from their parent. Any property specified on the command
1543 line using the
1544 .Fl o
1545 option is ignored. If the target filesystem already exists, the operation
1546 completes successfully.
1547 .It Fl s
1548 Creates a sparse volume with no reservation. See
1549 .Sy volsize
1550 in the
1551 .Qq Sx Native Properties
1552 section for more information about sparse volumes.
1553 .It Fl b Ar blocksize
1554 Equivalent to
1555 .Fl o Cm volblocksize Ns = Ns Ar blocksize .
1556 If this option is specified in conjunction with
1557 .Fl o Cm volblocksize ,
1558 the resulting behavior is undefined.
1559 .It Fl o Ar property Ns = Ns Ar value
1560 Sets the specified property as if the
1561 .Qq Nm Cm set Ar property Ns = Ns Ar value
1562 command was invoked at the same time the dataset was created. Any editable
1563 .Tn ZFS
1564 property can also be set at creation time. Multiple
1565 .Fl o
1566 options can be specified. An error results if the same property is specified in
1567 multiple
1568 .Fl o
1569 options.
1570 .El
1571 .It Xo
1572 .Nm
1573 .Cm destroy
1574 .Op Fl fnpRrv
1575 .Ar filesystem Ns | Ns Ar volume
1576 .Xc
1577 .Pp
1578 Destroys the given dataset. By default, the command unshares any file systems
1579 that are currently shared, unmounts any file systems that are currently
1580 mounted, and refuses to destroy a dataset that has active dependents (children
1581 or clones).
1582 .Bl -tag -width indent
1583 .It Fl r
1584 Recursively destroy all children.
1585 .It Fl R
1586 Recursively destroy all dependents, including cloned file systems outside the
1587 target hierarchy.
1588 .It Fl f
1589 Force an unmount of any file systems using the
1590 .Qq Nm Cm unmount Fl f
1591 command. This option has no effect on non-file systems or unmounted file
1592 systems.
1593 .It Fl n
1594 Do a dry-run ("No-op") deletion. No data will be deleted. This is useful in
1595 conjunction with the
1596 .Fl v
1597 or
1598 .Fl p
1599 flags to determine what data would be deleted.
1600 .It Fl p
1601 Print machine-parsable verbose information about the deleted data.
1602 .It Fl v
1603 Print verbose information about the deleted data.
1604 .El
1605 .Pp
1606 Extreme care should be taken when applying either the
1607 .Fl r
1608 or the
1609 .Fl R
1610 options, as they can destroy large portions of a pool and cause unexpected
1611 behavior for mounted file systems in use.
1612 .It Xo
1613 .Nm
1614 .Cm destroy
1615 .Op Fl dnpRrv
1616 .Sm off
1617 .Ar snapshot
1618 .Op % Ns Ar snapname
1619 .Op , Ns ...
1620 .Sm on
1621 .Xc
1622 .Pp
1623 The given snapshots are destroyed immediately if and only if the
1624 .Qq Nm Cm destroy
1625 command without the
1626 .Fl d
1627 option would have destroyed it. Such immediate destruction would occur, for
1628 example, if the snapshot had no clones and the user-initiated reference count
1629 were zero.
1630 .Pp
1631 If a snapshot does not qualify for immediate destruction, it is marked for
1632 deferred deletion. In this state, it exists as a usable, visible snapshot until
1633 both of the preconditions listed above are met, at which point it is destroyed.
1634 .Pp
1635 An inclusive range of snapshots may be specified by separating the
1636 first and last snapshots with a percent sign
1637 .Pq Sy % .
1638 The first and/or last snapshots may be left blank, in which case the
1639 filesystem's oldest or newest snapshot will be implied.
1640 .Pp
1641 Multiple snapshots
1642 (or ranges of snapshots) of the same filesystem or volume may be specified
1643 in a comma-separated list of snapshots.
1644 Only the snapshot's short name (the
1645 part after the
1646 .Sy @ )
1647 should be specified when using a range or comma-separated list to identify
1648 multiple snapshots.
1649 .Bl -tag -width indent
1650 .It Fl r
1651 Destroy (or mark for deferred deletion) all snapshots with this name in
1652 descendent file systems.
1653 .It Fl R
1654 Recursively destroy all clones of these snapshots, including the clones,
1655 snapshots, and children.
1656 If this flag is specified, the
1657 .Op fl d
1658 flag will have no effect.
1659 .It Fl n
1660 Do a dry-run ("No-op") deletion. No data will be deleted. This is useful in
1661 conjunction with the
1662 .Fl v
1663 or
1664 .Fl p
1665 flags to determine what data would be deleted.
1666 .It Fl p
1667 Print machine-parsable verbose information about the deleted data.
1668 .It Fl v
1669 Print verbose information about the deleted data.
1670 .It Fl d
1671 Defer snapshot deletion.
1672 .El
1673 .Pp
1674 Extreme care should be taken when applying either the
1675 .Fl r
1676 or the
1677 .Fl R
1678 options, as they can destroy large portions of a pool and cause unexpected
1679 behavior for mounted file systems in use.
1680 .It Xo
1681 .Nm
1682 .Cm destroy
1683 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
1684 .Xc
1685 .Pp
1686 The given bookmark is destroyed.
1687 .It Xo
1688 .Nm
1689 .Cm snapshot Ns | Ns Cm snap
1690 .Op Fl r
1691 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1692 .Ar filesystem@snapname Ns | Ns volume@snapname
1693 .Ar filesystem@snapname Ns | Ns volume@snapname Ns ...
1694 .Xc
1695 .Pp
1696 Creates snapshots with the given names. All previous modifications by
1697 successful system calls to the file system are part of the snapshots.
1698 Snapshots are taken atomically, so that all snapshots correspond to the same
1699 moment in time. See the
1700 .Qq Sx Snapshots
1701 section for details.
1702 .Bl -tag -width indent
1703 .It Fl r
1704 Recursively create snapshots of all descendent datasets
1705 .It Fl o Ar property Ns = Ns Ar value
1706 Sets the specified property; see
1707 .Qq Nm Cm create
1708 for details.
1709 .El
1710 .It Xo
1711 .Nm
1712 .Cm rollback
1713 .Op Fl rRf
1714 .Ar snapshot
1715 .Xc
1716 .Pp
1717 Roll back the given dataset to a previous snapshot. When a dataset is rolled
1718 back, all data that has changed since the snapshot is discarded, and the
1719 dataset reverts to the state at the time of the snapshot. By default, the
1720 command refuses to roll back to a snapshot other than the most recent one. In
1721 order to do so, all intermediate snapshots and bookmarks must be destroyed
1722 by specifying the
1723 .Fl r
1724 option.
1725 .Pp
1726 The
1727 .Fl rR
1728 options do not recursively destroy the child snapshots of a
1729 recursive snapshot.
1730 Only direct snapshots of the specified filesystem
1731 are destroyed by either of these options.
1732 To completely roll back a
1733 recursive snapshot, you must rollback the individual child snapshots.
1734 .Bl -tag -width indent
1735 .It Fl r
1736 Destroy any snapshots and bookmarks more recent than the one specified.
1737 .It Fl R
1738 Destroy any more recent snapshots and bookmarks, as well as any clones of those
1739 snapshots.
1740 .It Fl f
1741 Used with the
1742 .Fl R
1743 option to force an unmount of any clone file systems that are to be destroyed.
1744 .El
1745 .It Xo
1746 .Nm
1747 .Cm clone
1748 .Op Fl p
1749 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1750 .Ar snapshot filesystem Ns | Ns Ar volume
1751 .Xc
1752 .Pp
1753 Creates a clone of the given snapshot. See the
1754 .Qq Sx Clones
1755 section for details. The target dataset can be located anywhere in the
1756 .Tn ZFS
1757 hierarchy, and is created as the same type as the original.
1758 .Bl -tag -width indent
1759 .It Fl p
1760 Creates all the non-existing parent datasets. Datasets created in this manner
1761 are automatically mounted according to the
1762 .Sy mountpoint
1763 property inherited from their parent. If the target filesystem or volume
1764 already exists, the operation completes successfully.
1765 .It Fl o Ar property Ns = Ns Ar value
1766 Sets the specified property; see
1767 .Qq Nm Cm create
1768 for details.
1769 .El
1770 .It Xo
1771 .Nm
1772 .Cm promote
1773 .Ar clone-filesystem
1774 .Xc
1775 .Pp
1776 Promotes a clone file system to no longer be dependent on its "origin"
1777 snapshot. This makes it possible to destroy the file system that the clone was
1778 created from. The clone parent-child dependency relationship is reversed, so
1779 that the origin file system becomes a clone of the specified file system.
1780 .Pp
1781 The snapshot that was cloned, and any snapshots previous to this snapshot, are
1782 now owned by the promoted clone. The space they use moves from the origin file
1783 system to the promoted clone, so enough space must be available to accommodate
1784 these snapshots. No new space is consumed by this operation, but the space
1785 accounting is adjusted. The promoted clone must not have any conflicting
1786 snapshot names of its own. The
1787 .Cm rename
1788 subcommand can be used to rename any conflicting snapshots.
1789 .It Xo
1790 .Nm
1791 .Cm rename
1792 .Op Fl f
1793 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1794 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1795 .Xc
1796 .It Xo
1797 .Nm
1798 .Cm rename
1799 .Op Fl f
1800 .Fl p
1801 .Ar filesystem Ns | Ns Ar volume
1802 .Ar filesystem Ns | Ns Ar volume
1803 .Xc
1804 .It Xo
1805 .Nm
1806 .Cm rename
1807 .Fl u
1808 .Op Fl p
1809 .Ar filesystem filesystem
1810 .Xc
1811 .Pp
1812 Renames the given dataset. The new target can be located anywhere in the
1813 .Tn ZFS
1814 hierarchy, with the exception of snapshots. Snapshots can only be renamed
1815 within the parent file system or volume. When renaming a snapshot, the parent
1816 file system of the snapshot does not need to be specified as part of the second
1817 argument. Renamed file systems can inherit new mount points, in which case they
1818 are unmounted and remounted at the new mount point.
1819 .Bl -tag -width indent
1820 .It Fl p
1821 Creates all the nonexistent parent datasets. Datasets created in this manner
1822 are automatically mounted according to the
1823 .Sy mountpoint
1824 property inherited from their parent.
1825 .It Fl u
1826 Do not remount file systems during rename. If a file system's
1827 .Sy mountpoint
1828 property is set to
1829 .Cm legacy
1830 or
1831 .Cm none ,
1832 file system is not unmounted even if this option is not given.
1833 .It Fl f
1834 Force unmount any filesystems that need to be unmounted in the process.
1835 This flag has no effect if used together with the
1836 .Fl u
1837 flag.
1838 .El
1839 .It Xo
1840 .Nm
1841 .Cm rename
1842 .Fl r
1843 .Ar snapshot snapshot
1844 .Xc
1845 .Pp
1846 Recursively rename the snapshots of all descendent datasets. Snapshots are the
1847 only dataset that can be renamed recursively.
1848 .It Xo
1849 .Nm
1850 .Cm list
1851 .Op Fl r Ns | Ns Fl d Ar depth
1852 .Op Fl Hp
1853 .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
1854 .Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
1855 .Oo Fl s Ar property Oc Ns ...
1856 .Oo Fl S Ar property Oc Ns ...
1857 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
1858 .Xc
1859 .Pp
1860 Lists the property information for the given datasets in tabular form. If
1861 specified, you can list property information by the absolute pathname or the
1862 relative pathname. By default, all file systems and volumes are displayed.
1863 Snapshots are displayed if the
1864 .Sy listsnaps
1865 property is
1866 .Cm on
1867 (the default is
1868 .Cm off ) .
1869 The following fields are displayed,
1870 .Sy name , used , available , referenced , mountpoint .
1871 .Bl -tag -width indent
1872 .It Fl r
1873 Recursively display any children of the dataset on the command line.
1874 .It Fl d Ar depth
1875 Recursively display any children of the dataset, limiting the recursion to
1876 .Ar depth .
1877 A depth of
1878 .Sy 1
1879 will display only the dataset and its direct children.
1880 .It Fl H
1881 Used for scripting mode. Do not print headers and separate fields by a single
1882 tab instead of arbitrary white space.
1883 .It Fl p
1884 Display numbers in parsable (exact) values.
1885 .It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
1886 A comma-separated list of properties to display. The property must be:
1887 .Bl -bullet -offset 2n
1888 .It
1889 One of the properties described in the
1890 .Qq Sx Native Properties
1891 section
1892 .It
1893 A user property
1894 .It
1895 The value
1896 .Cm name
1897 to display the dataset name
1898 .It
1899 The value
1900 .Cm space
1901 to display space usage properties on file systems and volumes. This is a
1902 shortcut for specifying
1903 .Fl o
1904 .Sy name,avail,used,usedsnap,usedds,usedrefreserv,usedchild
1905 .Fl t
1906 .Sy filesystem,volume
1907 syntax.
1908 .El
1909 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
1910 A comma-separated list of types to display, where
1911 .Ar type
1912 is one of
1913 .Sy filesystem , snapshot , snap , volume , bookmark , No or Sy all .
1914 For example, specifying
1915 .Fl t Cm snapshot
1916 displays only snapshots.
1917 .It Fl s Ar property
1918 A property for sorting the output by column in ascending order based on the
1919 value of the property. The property must be one of the properties described in
1920 the
1921 .Qq Sx Properties
1922 section, or the special value
1923 .Cm name
1924 to sort by the dataset name. Multiple properties can be specified at one time
1925 using multiple
1926 .Fl s
1927 property options. Multiple
1928 .Fl s
1929 options are evaluated from left to right in decreasing order of importance.
1930 .Pp
1931 The following is a list of sorting criteria:
1932 .Bl -bullet -offset 2n
1933 .It
1934 Numeric types sort in numeric order.
1935 .It
1936 String types sort in alphabetical order.
1937 .It
1938 Types inappropriate for a row sort that row to the literal bottom, regardless
1939 of the specified ordering.
1940 .It
1941 If no sorting options are specified the existing behavior of
1942 .Qq Nm Cm list
1943 is preserved.
1944 .El
1945 .It Fl S Ar property
1946 Same as the
1947 .Fl s
1948 option, but sorts by property in descending order.
1949 .El
1950 .It Xo
1951 .Nm
1952 .Cm set
1953 .Ar property Ns = Ns Ar value
1954 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1955 .Xc
1956 .Pp
1957 Sets the property to the given value for each dataset. Only some properties can
1958 be edited. See the "Properties" section for more information on what properties
1959 can be set and acceptable values. Numeric values can be specified as exact
1960 values, or in a human-readable form with a suffix of
1961 .Sy B , K , M , G , T , P , E , Z
1962 (for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes, or
1963 zettabytes, respectively). User properties can be set on snapshots. For more
1964 information, see the
1965 .Qq Sx User Properties
1966 section.
1967 .It Xo
1968 .Nm
1969 .Cm get
1970 .Op Fl r Ns | Ns Fl d Ar depth
1971 .Op Fl Hp
1972 .Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ...
1973 .Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
1974 .Op Fl s Ar source Ns Oo , Ns Ar source Oc Ns ...
1975 .Ar all | property Ns Oo , Ns Ar property Oc Ns ...
1976 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
1977 .Xc
1978 .Pp
1979 Displays properties for the given datasets. If no datasets are specified, then
1980 the command displays properties for all datasets on the system. For each
1981 property, the following columns are displayed:
1982 .Pp
1983 .Bl -hang -width "property" -offset indent -compact
1984 .It name
1985 Dataset name
1986 .It property
1987 Property name
1988 .It value
1989 Property value
1990 .It source
1991 Property source. Can either be local, default, temporary, inherited, or none
1992 (\&-).
1993 .El
1994 .Pp
1995 All columns except the
1996 .Sy RECEIVED
1997 column are displayed by default. The columns to display can be specified
1998 by using the
1999 .Fl o
2000 option. This command takes a comma-separated list of properties as described in
2001 the
2002 .Qq Sx Native Properties
2003 and
2004 .Qq Sx User Properties
2005 sections.
2006 .Pp
2007 The special value
2008 .Cm all
2009 can be used to display all properties that apply to the given dataset's type
2010 (filesystem, volume, snapshot, or bookmark).
2011 .Bl -tag -width indent
2012 .It Fl r
2013 Recursively display properties for any children.
2014 .It Fl d Ar depth
2015 Recursively display any children of the dataset, limiting the recursion to
2016 .Ar depth .
2017 A depth of
2018 .Sy 1
2019 will display only the dataset and its direct children.
2020 .It Fl H
2021 Display output in a form more easily parsed by scripts. Any headers are
2022 omitted, and fields are explicitly separated by a single tab instead of an
2023 arbitrary amount of space.
2024 .It Fl p
2025 Display numbers in parsable (exact) values.
2026 .It Fl o Cm all | Ar field Ns Oo , Ns Ar field Oc Ns ...
2027 A comma-separated list of columns to display. Supported values are
2028 .Sy name,property,value,received,source .
2029 Default values are
2030 .Sy name,property,value,source .
2031 The keyword
2032 .Cm all
2033 specifies all columns.
2034 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2035 A comma-separated list of types to display, where
2036 .Ar type
2037 is one of
2038 .Sy filesystem , snapshot , volume , No or Sy all .
2039 For example, specifying
2040 .Fl t Cm snapshot
2041 displays only snapshots.
2042 .It Fl s Ar source Ns Oo , Ns Ar source Oc Ns ...
2043 A comma-separated list of sources to display. Those properties coming from a
2044 source other than those in this list are ignored. Each source must be one of
2045 the following:
2046 .Sy local,default,inherited,temporary,received,none .
2047 The default value is all sources.
2048 .El
2049 .It Xo
2050 .Nm
2051 .Cm inherit
2052 .Op Fl rS
2053 .Ar property
2054 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2055 .Xc
2056 .Pp
2057 Clears the specified property, causing it to be inherited from an ancestor. If
2058 no ancestor has the property set, then the default value is used. See the
2059 .Qq Sx Properties
2060 section for a listing of default values, and details on which properties can be
2061 inherited.
2062 .Bl -tag -width indent
2063 .It Fl r
2064 Recursively inherit the given property for all children.
2065 .It Fl S
2066 For properties with a received value, revert to this value. This flag has no
2067 effect on properties that do not have a received value.
2068 .El
2069 .It Xo
2070 .Nm
2071 .Cm upgrade
2072 .Op Fl v
2073 .Xc
2074 .Pp
2075 Displays a list of file systems that are not the most recent version.
2076 .Bl -tag -width indent
2077 .It Fl v
2078 Displays
2079 .Tn ZFS
2080 filesystem versions supported by the current software. The current
2081 .Tn ZFS
2082 filesystem version and all previous supported versions are displayed, along
2083 with an explanation of the features provided with each version.
2084 .El
2085 .It Xo
2086 .Nm
2087 .Cm upgrade
2088 .Op Fl r
2089 .Op Fl V Ar version
2090 .Fl a | Ar filesystem
2091 .Xc
2092 .Pp
2093 Upgrades file systems to a new on-disk version. Once this is done, the file
2094 systems will no longer be accessible on systems running older versions of the
2095 software.
2096 .Qq Nm Cm send
2097 streams generated from new snapshots of these file systems cannot be accessed
2098 on systems running older versions of the software.
2099 .Pp
2100 In general, the file system version is independent of the pool version. See
2101 .Xr zpool 8
2102 for information on the
2103 .Nm zpool Cm upgrade
2104 command.
2105 .Pp
2106 In some cases, the file system version and the pool version are interrelated
2107 and the pool version must be upgraded before the file system version can be
2108 upgraded.
2109 .Bl -tag -width indent
2110 .It Fl r
2111 Upgrade the specified file system and all descendent file systems.
2112 .It Fl V Ar version
2113 Upgrade to the specified
2114 .Ar version .
2115 If the
2116 .Fl V
2117 flag is not specified, this command upgrades to the most recent version. This
2118 option can only be used to increase the version number, and only up to the most
2119 recent version supported by this software.
2120 .It Fl a
2121 Upgrade all file systems on all imported pools.
2122 .It Ar filesystem
2123 Upgrade the specified file system.
2124 .El
2125 .It Xo
2126 .Nm
2127 .Cm userspace
2128 .Op Fl Hinp
2129 .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2130 .Oo Fl s Ar field Oc Ns ...
2131 .Oo Fl S Ar field Oc Ns ...
2132 .Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2133 .Ar filesystem Ns | Ns Ar snapshot
2134 .Xc
2135 .Pp
2136 Displays space consumed by, and quotas on, each user in the specified
2137 filesystem or snapshot. This corresponds to the
2138 .Sy userused@ Ns Ar user
2139 and
2140 .Sy userquota@ Ns Ar user
2141 properties.
2142 .Bl -tag -width indent
2143 .It Fl n
2144 Print numeric ID instead of user/group name.
2145 .It Fl H
2146 Do not print headers, use tab-delimited output.
2147 .It Fl p
2148 Use exact (parsable) numeric output.
2149 .It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2150 Display only the specified fields from the following set:
2151 .Sy type,name,used,quota .
2152 The default is to display all fields.
2153 .It Fl s Ar field
2154 Sort output by this field. The
2155 .Fl s
2156 and
2157 .Fl S
2158 flags may be specified multiple times to sort first by one field, then by
2159 another. The default is
2160 .Fl s Cm type Fl s Cm name .
2161 .It Fl S Ar field
2162 Sort by this field in reverse order. See
2163 .Fl s .
2164 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2165 Print only the specified types from the following set:
2166 .Sy all,posixuser,smbuser,posixgroup,smbgroup .
2167 .Pp
2168 The default is
2169 .Fl t Cm posixuser,smbuser .
2170 .Pp
2171 The default can be changed to include group types.
2172 .It Fl i
2173 Translate SID to POSIX ID. This flag currently has no effect on
2174 .Fx .
2175 .El
2176 .It Xo
2177 .Nm
2178 .Cm groupspace
2179 .Op Fl Hinp
2180 .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2181 .Oo Fl s Ar field Oc Ns ...
2182 .Oo Fl S Ar field Oc Ns ...
2183 .Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2184 .Ar filesystem Ns | Ns Ar snapshot
2185 .Xc
2186 .Pp
2187 Displays space consumed by, and quotas on, each group in the specified
2188 filesystem or snapshot. This subcommand is identical to
2189 .Qq Nm Cm userspace ,
2190 except that the default types to display are
2191 .Fl t Sy posixgroup,smbgroup .
2192 .It Xo
2193 .Nm
2194 .Cm mount
2195 .Xc
2196 .Pp
2197 Displays all
2198 .Tn ZFS
2199 file systems currently mounted.
2200 .Bl -tag -width indent
2201 .It Fl f
2202 .El
2203 .It Xo
2204 .Nm
2205 .Cm mount
2206 .Op Fl vO
2207 .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
2208 .Fl a | Ar filesystem
2209 .Xc
2210 .Pp
2211 Mounts
2212 .Tn ZFS
2213 file systems.
2214 .Bl -tag -width indent
2215 .It Fl v
2216 Report mount progress.
2217 .It Fl O
2218 Perform an overlay mount. Overlay mounts are not supported on
2219 .Fx .
2220 .It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
2221 An optional, comma-separated list of mount options to use temporarily for the
2222 duration of the mount. See the
2223 .Qq Sx Temporary Mount Point Properties
2224 section for details.
2225 .It Fl a
2226 Mount all available
2227 .Tn ZFS
2228 file systems.
2229 This command may be executed on
2230 .Fx
2231 system startup by
2232 .Pa /etc/rc.d/zfs .
2233 For more information, see variable
2234 .Va zfs_enable
2235 in
2236 .Xr rc.conf 5 .
2237 .It Ar filesystem
2238 Mount the specified filesystem.
2239 .El
2240 .It Xo
2241 .Nm
2242 .Cm unmount Ns | Ns Cm umount
2243 .Op Fl f
2244 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2245 .Xc
2246 .Pp
2247 Unmounts currently mounted
2248 .Tn ZFS
2249 file systems.
2250 .Bl -tag -width indent
2251 .It Fl f
2252 Forcefully unmount the file system, even if it is currently in use.
2253 .It Fl a
2254 Unmount all available
2255 .Tn ZFS
2256 file systems.
2257 .It Ar filesystem | mountpoint
2258 Unmount the specified filesystem. The command can also be given a path to a
2259 .Tn ZFS
2260 file system mount point on the system.
2261 .El
2262 .It Xo
2263 .Nm
2264 .Cm share
2265 .Fl a | Ar filesystem
2266 .Xc
2267 .Pp
2268 Shares
2269 .Tn ZFS
2270 file systems that have the
2271 .Sy sharenfs
2272 property set.
2273 .Bl -tag -width indent
2274 .It Fl a
2275 Share all
2276 .Tn ZFS
2277 file systems that have the
2278 .Sy sharenfs
2279 property set.
2280 This command may be executed on
2281 .Fx
2282 system startup by
2283 .Pa /etc/rc.d/zfs .
2284 For more information, see variable
2285 .Va zfs_enable
2286 in
2287 .Xr rc.conf 5 .
2288 .It Ar filesystem
2289 Share the specified filesystem according to the
2290 .Tn sharenfs
2291 property. File systems are shared when the
2292 .Tn sharenfs
2293 property is set.
2294 .El
2295 .It Xo
2296 .Nm
2297 .Cm unshare
2298 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2299 .Xc
2300 .Pp
2301 Unshares
2302 .Tn ZFS
2303 file systems that have the
2304 .Tn sharenfs
2305 property set.
2306 .Bl -tag -width indent
2307 .It Fl a
2308 Unshares
2309 .Tn ZFS
2310 file systems that have the
2311 .Sy sharenfs
2312 property set.
2313 This command may be executed on
2314 .Fx
2315 system shutdown by
2316 .Pa /etc/rc.d/zfs .
2317 For more information, see variable
2318 .Va zfs_enable
2319 in
2320 .Xr rc.conf 5 .
2321 .It Ar filesystem | mountpoint
2322 Unshare the specified filesystem. The command can also be given a path to a
2323 .Tn ZFS
2324 file system shared on the system.
2325 .El
2326 .It Xo
2327 .Nm
2328 .Cm bookmark
2329 .Ar snapshot
2330 .Ar bookmark
2331 .Xc
2332 .Pp
2333 Creates a bookmark of the given snapshot.
2334 Bookmarks mark the point in time
2335 when the snapshot was created, and can be used as the incremental source for
2336 a
2337 .Qq Nm Cm send
2338 command.
2339 .Pp
2340 This feature must be enabled to be used.
2341 See
2342 .Xr zpool-features 7
2343 for details on ZFS feature flags and the
2344 .Sy bookmark
2345 feature.
2346 .It Xo
2347 .Nm
2348 .Cm send
2349 .Op Fl DnPpRv
2350 .Op Fl i Ar snapshot | Fl I Ar snapshot
2351 .Ar snapshot
2352 .Xc
2353 .Pp
2354 Creates a stream representation of the last
2355 .Ar snapshot
2356 argument (not part of
2357 .Fl i
2358 or
2359 .Fl I )
2360 which is written to standard output. The output can be redirected to
2361 a file or to a different system (for example, using
2362 .Xr ssh 1 ) .
2363 By default, a full stream is generated.
2364 .Bl -tag -width indent
2365 .It Fl i Ar snapshot
2366 Generate an incremental stream from the first
2367 .Ar snapshot Pq the incremental source
2368 to the second
2369 .Ar snapshot Pq the incremental target .
2370 The incremental source can be specified as the last component of the
2371 snapshot name
2372 .Pq the Em @ No character and following
2373 and
2374 it is assumed to be from the same file system as the incremental target.
2375 .Pp
2376 If the destination is a clone, the source may be the origin snapshot, which
2377 must be fully specified (for example,
2378 .Cm pool/fs@origin ,
2379 not just
2380 .Cm @origin ) .
2381 .It Fl I Ar snapshot
2382 Generate a stream package that sends all intermediary snapshots from the first
2383 .Ar snapshot
2384 to the second
2385 .Ar snapshot .
2386 For example,
2387 .Ic -I @a fs@d
2388 is similar to
2389 .Ic -i @a fs@b; -i @b fs@c; -i @c fs@d .
2390 The incremental
2391 source may be specified as with the
2392 .Fl i
2393 option.
2394 .It Fl R
2395 Generate a replication stream package, which will replicate the specified
2396 filesystem, and all descendent file systems, up to the named snapshot. When
2397 received, all properties, snapshots, descendent file systems, and clones are
2398 preserved.
2399 .Pp
2400 If the
2401 .Fl i
2402 or
2403 .Fl I
2404 flags are used in conjunction with the
2405 .Fl R
2406 flag, an incremental replication stream is generated. The current values of
2407 properties, and current snapshot and file system names are set when the stream
2408 is received. If the
2409 .Fl F
2410 flag is specified when this stream is received, snapshots and file systems that
2411 do not exist on the sending side are destroyed.
2412 .It Fl D
2413 Generate a deduplicated stream. Blocks which would have been sent multiple
2414 times in the send stream will only be sent once.  The receiving system must
2415 also support this feature to receive a deduplicated stream.  This flag can
2416 be used regardless of the dataset's
2417 .Sy dedup
2418 property, but performance will be much better if the filesystem uses a
2419 dedup-capable checksum (eg.
2420 .Sy sha256 ) .
2421 .It Fl p
2422 Include the dataset's properties in the stream. This flag is implicit when
2423 .Fl R
2424 is specified. The receiving system must also support this feature.
2425 .It Fl n
2426 Do a dry-run ("No-op") send.  Do not generate any actual send data.  This is
2427 useful in conjunction with the
2428 .Fl v
2429 or
2430 .Fl P
2431 flags to determine what data will be sent.
2432 .It Fl P
2433 Print machine-parsable verbose information about the stream package generated.
2434 .It Fl v
2435 Print verbose information about the stream package generated.
2436 This information includes a per-second report of how much data has been sent.
2437 .El
2438 .Pp
2439 The format of the stream is committed. You will be able to receive your streams
2440 on future versions of
2441 .Tn ZFS .
2442 .It Xo
2443 .Nm
2444 .Cm send
2445 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
2446 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2447 .Xc
2448 .Pp
2449 Generate a send stream, which may be of a filesystem, and may be
2450 incremental from a bookmark.
2451 If the destination is a filesystem or volume,
2452 the pool must be read-only, or the filesystem must not be mounted.
2453 When the
2454 stream generated from a filesystem or volume is received, the default snapshot
2455 name will be
2456 .Pq --head-- .
2457 .Bl -tag -width indent
2458 .It Fl i Ar snapshot Ns | Ns bookmark
2459 Generate an incremental send stream.
2460 The incremental source must be an earlier
2461 snapshot in the destination's history.
2462 It will commonly be an earlier
2463 snapshot in the destination's filesystem, in which case it can be
2464 specified as the last component of the name
2465 .Pq the Em # No or Em @ No character and following .
2466 .Pp
2467 If the incremental target is a clone, the incremental source can
2468 be the origin snapshot, or an earlier snapshot in the origin's filesystem,
2469 or the origin's origin, etc.
2470 .El
2471 .It Xo
2472 .Nm
2473 .Cm receive Ns | Ns Cm recv
2474 .Op Fl vnFu
2475 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2476 .Xc
2477 .It Xo
2478 .Nm
2479 .Cm receive Ns | Ns Cm recv
2480 .Op Fl vnFu
2481 .Op Fl d | e
2482 .Ar filesystem
2483 .Xc
2484 .Pp
2485 Creates a snapshot whose contents are as specified in the stream provided on
2486 standard input. If a full stream is received, then a new file system is created
2487 as well. Streams are created using the
2488 .Qq Nm Cm send
2489 subcommand, which by default creates a full stream.
2490 .Qq Nm Cm recv
2491 can be used as an alias for
2492 .Qq Nm Cm receive .
2493 .Pp
2494 If an incremental stream is received, then the destination file system must
2495 already exist, and its most recent snapshot must match the incremental stream's
2496 source. For
2497 .Sy zvol Ns s,
2498 the destination device link is destroyed and recreated, which means the
2499 .Sy zvol
2500 cannot be accessed during the
2501 .Sy receive
2502 operation.
2503 .Pp
2504 When a snapshot replication package stream that is generated by using the
2505 .Qq Nm Cm send Fl R
2506 command is received, any snapshots that do not exist on the sending location
2507 are destroyed by using the
2508 .Qq Nm Cm destroy Fl d
2509 command.
2510 .Pp
2511 The name of the snapshot (and file system, if a full stream is received) that
2512 this subcommand creates depends on the argument type and the
2513 .Fl d
2514 or
2515 .Fl e
2516 option.
2517 .Pp
2518 If the argument is a snapshot name, the specified
2519 .Ar snapshot
2520 is created. If the argument is a file system or volume name, a snapshot with
2521 the same name as the sent snapshot is created within the specified
2522 .Ar filesystem
2523 or
2524 .Ar volume .
2525 If the
2526 .Fl d
2527 or
2528 .Fl e
2529 option is specified, the snapshot name is determined by appending the sent
2530 snapshot's name to the specified
2531 .Ar filesystem .
2532 If the
2533 .Fl d
2534 option is specified, all but the pool name of the sent snapshot path is
2535 appended (for example,
2536 .Sy b/c@1
2537 appended from sent snapshot
2538 .Sy a/b/c@1 ) ,
2539 and if the
2540 .Fl e
2541 option is specified, only the tail of the sent snapshot path is appended (for
2542 example,
2543 .Sy c@1
2544 appended from sent snapshot
2545 .Sy a/b/c@1 ) .
2546 In the case of
2547 .Fl d ,
2548 any file systems needed to replicate the path of the sent snapshot are created
2549 within the specified file system.
2550 .Bl -tag -width indent
2551 .It Fl d
2552 Use the full sent snapshot path without the first element (without pool name)
2553 to determine the name of the new snapshot as described in the paragraph above.
2554 .It Fl e
2555 Use only the last element of the sent snapshot path to determine the name of
2556 the new snapshot as described in the paragraph above.
2557 .It Fl u
2558 File system that is associated with the received stream is not mounted.
2559 .It Fl v
2560 Print verbose information about the stream and the time required to perform the
2561 receive operation.
2562 .It Fl n
2563 Do not actually receive the stream. This can be useful in conjunction with the
2564 .Fl v
2565 option to verify the name the receive operation would use.
2566 .It Fl F
2567 Force a rollback of the file system to the most recent snapshot before
2568 performing the receive operation. If receiving an incremental replication
2569 stream (for example, one generated by
2570 .Qq Nm Cm send Fl R Bro Fl i | Fl I Brc ) ,
2571 destroy snapshots and file systems that do not exist on the sending side.
2572 .El
2573 .It Xo
2574 .Nm
2575 .Cm allow
2576 .Ar filesystem Ns | Ns Ar volume
2577 .Xc
2578 .Pp
2579 Displays permissions that have been delegated on the specified filesystem or
2580 volume. See the other forms of
2581 .Qq Nm Cm allow
2582 for more information.
2583 .It Xo
2584 .Nm
2585 .Cm allow
2586 .Op Fl ldug
2587 .Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
2588 .Ar perm Ns | Ns Ar @setname Ns
2589 .Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ...
2590 .Ar filesystem Ns | Ns Ar volume
2591 .Xc
2592 .It Xo
2593 .Nm
2594 .Cm allow
2595 .Op Fl ld
2596 .Fl e Ns | Ns Cm everyone
2597 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
2598 .Ns ...
2599 .Ar filesystem Ns | Ns Ar volume
2600 .Xc
2601 .Pp
2602 Delegates
2603 .Tn ZFS
2604 administration permission for the file systems to non-privileged users.
2605 .Bl -tag -width indent
2606 .It Xo
2607 .Op Fl ug
2608 .Ar user Ns | Ns Ar group Ns Oo , Ar user Ns | Ns Ar group Oc Ns ...
2609 .Xc
2610 Specifies to whom the permissions are delegated. Multiple entities can be
2611 specified as a comma-separated list. If neither of the
2612 .Fl ug
2613 options are specified, then the argument is interpreted preferentially as the
2614 keyword
2615 .Cm everyone ,
2616 then as a user name, and lastly as a group name. To specify
2617 a user or group named
2618 .Qq everyone ,
2619 use the
2620 .Fl u
2621 or
2622 .Fl g
2623 options. To specify a group with the same name as a user, use the
2624 .Fl g
2625 option.
2626 .It Op Fl e Ns | Ns Cm everyone
2627 Specifies that the permissions be delegated to
2628 .Qq everyone .
2629 .It Xo
2630 .Ar perm Ns | Ns Ar @setname Ns Oo , Ns Ar perm Ns | Ns Ar @setname Oc Ns ...
2631 .Xc
2632 The permissions to delegate. Multiple permissions
2633 may be specified as a comma-separated list. Permission names are the same as
2634 .Tn ZFS
2635 subcommand and property names. See the property list below. Property set names,
2636 which begin with an at sign
2637 .Pq Sy @ ,
2638 may be specified. See the
2639 .Fl s
2640 form below for details.
2641 .It Xo
2642 .Op Fl ld
2643 .Ar filesystem Ns | Ns Ar volume
2644 .Xc
2645 Specifies where the permissions are delegated. If neither of the
2646 .Fl ld
2647 options are specified, or both are, then the permissions are allowed for the
2648 file system or volume, and all of its descendents. If only the
2649 .Fl l
2650 option is used, then is allowed "locally" only for the specified file system.
2651 If only the
2652 .Fl d
2653 option is used, then is allowed only for the descendent file systems.
2654 .El
2655 .Pp
2656 Permissions are generally the ability to use a
2657 .Tn ZFS
2658 subcommand or change a
2659 .Tn ZFS
2660 property. The following permissions are available:
2661 .Bl -column -offset 4n "secondarycache" "subcommand"
2662 .It NAME Ta TYPE Ta NOTES
2663 .It allow Ta subcommand Ta Must Xo
2664 also have the permission that is being allowed
2665 .Xc
2666 .It clone Ta subcommand Ta Must Xo
2667 also have the 'create' ability and 'mount' ability in the origin file system
2668 .Xc
2669 .It create Ta subcommand Ta Must also have the 'mount' ability
2670 .It destroy Ta subcommand Ta Must also have the 'mount' ability
2671 .It diff Ta subcommand Ta Allows lookup of paths within a dataset given an
2672 object number, and the ability to create snapshots necessary to 'zfs diff'
2673 .It hold Ta subcommand Ta Allows adding a user hold to a snapshot
2674 .It mount Ta subcommand Ta Allows mount/umount of Tn ZFS No datasets
2675 .It promote Ta subcommand Ta Must Xo
2676 also have the 'mount' and 'promote' ability in the origin file system
2677 .Xc
2678 .It receive Ta subcommand Ta Must also have the 'mount' and 'create' ability
2679 .It release Ta subcommand Ta Allows Xo
2680 releasing a user hold which might destroy the snapshot
2681 .Xc
2682 .It rename Ta subcommand Ta Must Xo
2683 also have the 'mount' and 'create' ability in the new parent
2684 .Xc
2685 .It rollback Ta subcommand Ta Must also have the 'mount' ability
2686 .It send Ta subcommand
2687 .It share Ta subcommand Ta Allows Xo
2688 sharing file systems over the
2689 .Tn NFS
2690 protocol
2691 .Xc
2692 .It snapshot Ta subcommand Ta Must also have the 'mount' ability
2693 .It groupquota Ta other Ta Allows accessing any groupquota@... property
2694 .It groupused Ta other Ta Allows reading any groupused@... property
2695 .It userprop Ta other Ta Allows changing any user property
2696 .It userquota Ta other Ta Allows accessing any userquota@... property
2697 .It userused Ta other Ta Allows reading any userused@... property
2698 .It aclinherit Ta property
2699 .It aclmode Ta property
2700 .It atime Ta property
2701 .It canmount Ta property
2702 .It casesensitivity Ta property
2703 .It checksum Ta property
2704 .It compression Ta property
2705 .It copies Ta property
2706 .It dedup Ta property
2707 .It devices Ta property
2708 .It exec Ta property
2709 .It logbias Ta property
2710 .It jailed Ta property
2711 .It mlslabel Ta property
2712 .It mountpoint Ta property
2713 .It nbmand Ta property
2714 .It normalization Ta property
2715 .It primarycache Ta property
2716 .It quota Ta property
2717 .It readonly Ta property
2718 .It recordsize Ta property
2719 .It refquota Ta property
2720 .It refreservation Ta property
2721 .It reservation Ta property
2722 .It secondarycache Ta property
2723 .It setuid Ta property
2724 .It sharenfs Ta property
2725 .It sharesmb Ta property
2726 .It snapdir Ta property
2727 .It sync Ta property
2728 .It utf8only Ta property
2729 .It version Ta property
2730 .It volblocksize Ta property
2731 .It volsize Ta property
2732 .It vscan Ta property
2733 .It xattr Ta property
2734 .El
2735 .It Xo
2736 .Nm
2737 .Cm allow
2738 .Fl c
2739 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
2740 .Ns ...
2741 .Ar filesystem Ns | Ns Ar volume
2742 .Xc
2743 .Pp
2744 Sets "create time" permissions. These permissions are granted (locally) to the
2745 creator of any newly-created descendent file system.
2746 .It Xo
2747 .Nm
2748 .Cm allow
2749 .Fl s
2750 .Ar @setname
2751 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
2752 .Ns ...
2753 .Ar filesystem Ns | Ns Ar volume
2754 .Xc
2755 .Pp
2756 Defines or adds permissions to a permission set. The set can be used by other
2757 .Qq Nm Cm allow
2758 commands for the specified file system and its descendents. Sets are evaluated
2759 dynamically, so changes to a set are immediately reflected. Permission sets
2760 follow the same naming restrictions as ZFS file systems, but the name must
2761 begin with an "at sign"
2762 .Pq Sy @ ,
2763 and can be no more than 64 characters long.
2764 .It Xo
2765 .Nm
2766 .Cm unallow
2767 .Op Fl rldug
2768 .Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
2769 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
2770 .Ns ... Oc
2771 .Ar filesystem Ns | Ns Ar volume
2772 .Xc
2773 .It Xo
2774 .Nm
2775 .Cm unallow
2776 .Op Fl rld
2777 .Fl e Ns | Ns Cm everyone
2778 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
2779 .Ns ... Oc
2780 .Ar filesystem Ns | Ns Ar volume
2781 .Xc
2782 .It Xo
2783 .Nm
2784 .Cm unallow
2785 .Op Fl r
2786 .Fl c
2787 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
2788 .Ns ... Oc
2789 .Ar filesystem Ns | Ns Ar volume
2790 .Xc
2791 .Pp
2792 Removes permissions that were granted with the
2793 .Qq Nm Cm allow
2794 command. No permissions are explicitly denied, so other permissions granted are
2795 still in effect. For example, if the permission is granted by an ancestor. If
2796 no permissions are specified, then all permissions for the specified
2797 .Ar user , group , No or everyone
2798 are removed. Specifying
2799 .Cm everyone
2800 .Po or using the Fl e
2801 option
2802 .Pc only removes the permissions that were granted to everyone ,
2803 not all permissions for every user and group. See the
2804 .Qq Nm Cm allow
2805 command for a description of the
2806 .Fl ldugec
2807 options.
2808 .Bl -tag -width indent
2809 .It Fl r
2810 Recursively remove the permissions from this file system and all descendents.
2811 .El
2812 .It Xo
2813 .Nm
2814 .Cm unallow
2815 .Op Fl r
2816 .Fl s
2817 .Ar @setname
2818 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
2819 .Ns ... Oc
2820 .Ar filesystem Ns | Ns Ar volume
2821 .Xc
2822 .Pp
2823 Removes permissions from a permission set. If no permissions are specified,
2824 then all permissions are removed, thus removing the set entirely.
2825 .It Xo
2826 .Nm
2827 .Cm hold
2828 .Op Fl r
2829 .Ar tag snapshot Ns ...
2830 .Xc
2831 .Pp
2832 Adds a single reference, named with the
2833 .Ar tag
2834 argument, to the specified snapshot or snapshots. Each snapshot has its own tag
2835 namespace, and tags must be unique within that space.
2836 .Pp
2837 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
2838 .Qq Nm Cm destroy
2839 command returns
2840 .Em EBUSY .
2841 .Bl -tag -width indent
2842 .It Fl r
2843 Specifies that a hold with the given tag is applied recursively to the
2844 snapshots of all descendent file systems.
2845 .El
2846 .It Xo
2847 .Nm
2848 .Cm holds
2849 .Op Fl r
2850 .Ar snapshot Ns ...
2851 .Xc
2852 .Pp
2853 Lists all existing user references for the given snapshot or snapshots.
2854 .Bl -tag -width indent
2855 .It Fl r
2856 Lists the holds that are set on the named descendent snapshots, in addition to
2857 listing the holds on the named snapshot.
2858 .El
2859 .It Xo
2860 .Nm
2861 .Cm release
2862 .Op Fl r
2863 .Ar tag snapshot Ns ...
2864 .Xc
2865 .Pp
2866 Removes a single reference, named with the
2867 .Ar tag
2868 argument, from the specified snapshot or snapshots. The tag must already exist
2869 for each snapshot.
2870 .Bl -tag -width indent
2871 .It Fl r
2872 Recursively releases a hold with the given tag on the snapshots of all
2873 descendent file systems.
2874 .El
2875 .It Xo
2876 .Nm
2877 .Cm diff
2878 .Op Fl FHt
2879 .Ar snapshot
2880 .Op Ar snapshot Ns | Ns Ar filesystem
2881 .Xc
2882 .Pp
2883 Display the difference between a snapshot of a given filesystem and another
2884 snapshot of that filesystem from a later time or the current contents of the
2885 filesystem.  The first column is a character indicating the type of change,
2886 the other columns indicate pathname, new pathname
2887 .Pq in case of rename ,
2888 change in link count, and optionally file type and/or change time.
2889 .Pp
2890 The types of change are:
2891 .Bl -column -offset 2n indent
2892 .It \&- Ta path was removed
2893 .It \&+ Ta path was added
2894 .It \&M Ta path was modified
2895 .It \&R Ta path was renamed
2896 .El
2897 .Bl -tag -width indent
2898 .It Fl F
2899 Display an indication of the type of file, in a manner similar to the
2900 .Fl F
2901 option of
2902 .Xr ls 1 .
2903 .Bl -column -offset 2n indent
2904 .It \&B Ta block device
2905 .It \&C Ta character device
2906 .It \&F Ta regular file
2907 .It \&/ Ta directory
2908 .It \&@ Ta symbolic link
2909 .It \&= Ta socket
2910 .It \&> Ta door (not supported on Fx )
2911 .It \&| Ta named pipe (not supported on Fx )
2912 .It \&P Ta event port (not supported on Fx )
2913 .El
2914 .It Fl H
2915 Give more parsable tab-separated output, without header lines and without
2916 arrows.
2917 .It Fl t
2918 Display the path's inode change time as the first column of output.
2919 .El
2920 .It Xo
2921 .Nm
2922 .Cm jail
2923 .Ar jailid filesystem
2924 .Xc
2925 .Pp
2926 Attaches the specified
2927 .Ar filesystem
2928 to the jail identified by JID
2929 .Ar jailid .
2930 From now on this file system tree can be managed from within a jail if the
2931 .Sy jailed
2932 property has been set. To use this functionality, the jail needs the
2933 .Va allow.mount
2934 and
2935 .Va allow.mount.zfs
2936 parameters set to 1 and the
2937 .Va enforce_statfs
2938 parameter set to a value lower than 2.
2939 .Pp
2940 See
2941 .Xr jail 8
2942 for more information on managing jails and configuring the parameters above.
2943 .It Xo
2944 .Nm
2945 .Cm unjail
2946 .Ar jailid filesystem
2947 .Xc
2948 .Pp
2949 Detaches the specified
2950 .Ar filesystem
2951 from the jail identified by JID
2952 .Ar jailid .
2953 .El
2954 .Sh EXIT STATUS
2955 The following exit values are returned:
2956 .Bl -tag -offset 2n -width 2n
2957 .It 0
2958 Successful completion.
2959 .It 1
2960 An error occurred.
2961 .It 2
2962 Invalid command line options were specified.
2963 .El
2964 .Sh EXAMPLES
2965 .Bl -tag -width 0n
2966 .It Sy Example 1 No Creating a Tn ZFS No File System Hierarchy
2967 .Pp
2968 The following commands create a file system named
2969 .Em pool/home
2970 and a file system named
2971 .Em pool/home/bob .
2972 The mount point
2973 .Pa /home
2974 is set for the parent file system, and is automatically inherited by the child
2975 file system.
2976 .Bd -literal -offset 2n
2977 .Li # Ic zfs create pool/home
2978 .Li # Ic zfs set mountpoint=/home pool/home
2979 .Li # Ic zfs create pool/home/bob
2980 .Ed
2981 .It Sy Example 2 No Creating a Tn ZFS No Snapshot
2982 .Pp
2983 The following command creates a snapshot named
2984 .Sy yesterday .
2985 This snapshot is mounted on demand in the
2986 .Pa \&.zfs/snapshot
2987 directory at the root of the
2988 .Em pool/home/bob
2989 file system.
2990 .Bd -literal -offset 2n
2991 .Li # Ic zfs snapshot pool/home/bob@yesterday
2992 .Ed
2993 .It Sy Example 3 No Creating and Destroying Multiple Snapshots
2994 .Pp
2995 The following command creates snapshots named
2996 .Em yesterday
2997 of
2998 .Em pool/home
2999 and all of its descendent file systems. Each snapshot is mounted on demand in
3000 the
3001 .Pa \&.zfs/snapshot
3002 directory at the root of its file system. The second command destroys the newly
3003 created snapshots.
3004 .Bd -literal -offset 2n
3005 .Li # Ic zfs snapshot -r pool/home@yesterday
3006 .Li # Ic zfs destroy -r pool/home@yesterday
3007 .Ed
3008 .It Sy Example 4 No Disabling and Enabling File System Compression
3009 .Pp
3010 The following command disables the
3011 .Sy compression
3012 property for all file systems under
3013 .Em pool/home .
3014 The next command explicitly enables
3015 .Sy compression
3016 for
3017 .Em pool/home/anne .
3018 .Bd -literal -offset 2n
3019 .Li # Ic zfs set compression=off pool/home
3020 .Li # Ic zfs set compression=on pool/home/anne
3021 .Ed
3022 .It Sy Example 5 No Listing Tn ZFS No Datasets
3023 .Pp
3024 The following command lists all active file systems and volumes in the system.
3025 Snapshots are displayed if the
3026 .Sy listsnaps
3027 property is
3028 .Cm on .
3029 The default is
3030 .Cm off .
3031 See
3032 .Xr zpool 8
3033 for more information on pool properties.
3034 .Bd -literal -offset 2n
3035 .Li # Ic zfs list
3036    NAME                      USED  AVAIL  REFER  MOUNTPOINT
3037    pool                      450K   457G    18K  /pool
3038    pool/home                 315K   457G    21K  /home
3039    pool/home/anne             18K   457G    18K  /home/anne
3040    pool/home/bob             276K   457G   276K  /home/bob
3041 .Ed
3042 .It Sy Example 6 No Setting a Quota on a Tn ZFS No File System
3043 .Pp
3044 The following command sets a quota of 50 Gbytes for
3045 .Em pool/home/bob .
3046 .Bd -literal -offset 2n
3047 .Li # Ic zfs set quota=50G pool/home/bob
3048 .Ed
3049 .It Sy Example 7 No Listing Tn ZFS No Properties
3050 .Pp
3051 The following command lists all properties for
3052 .Em pool/home/bob .
3053 .Bd -literal -offset 2n
3054 .Li # Ic zfs get all pool/home/bob
3055 NAME           PROPERTY              VALUE                  SOURCE
3056 pool/home/bob  type                  filesystem             -
3057 pool/home/bob  creation              Tue Jul 21 15:53 2009  -
3058 pool/home/bob  used                  21K                    -
3059 pool/home/bob  available             20.0G                  -
3060 pool/home/bob  referenced            21K                    -
3061 pool/home/bob  compressratio         1.00x                  -
3062 pool/home/bob  mounted               yes                    -
3063 pool/home/bob  quota                 20G                    local
3064 pool/home/bob  reservation           none                   default
3065 pool/home/bob  recordsize            128K                   default
3066 pool/home/bob  mountpoint            /home/bob              default
3067 pool/home/bob  sharenfs              off                    default
3068 pool/home/bob  checksum              on                     default
3069 pool/home/bob  compression           on                     local
3070 pool/home/bob  atime                 on                     default
3071 pool/home/bob  devices               on                     default
3072 pool/home/bob  exec                  on                     default
3073 pool/home/bob  setuid                on                     default
3074 pool/home/bob  readonly              off                    default
3075 pool/home/bob  jailed                off                    default
3076 pool/home/bob  snapdir               hidden                 default
3077 pool/home/bob  aclmode               discard                default
3078 pool/home/bob  aclinherit            restricted             default
3079 pool/home/bob  canmount              on                     default
3080 pool/home/bob  xattr                 on                     default
3081 pool/home/bob  copies                1                      default
3082 pool/home/bob  version               5                      -
3083 pool/home/bob  utf8only              off                    -
3084 pool/home/bob  normalization         none                   -
3085 pool/home/bob  casesensitivity       sensitive              -
3086 pool/home/bob  vscan                 off                    default
3087 pool/home/bob  nbmand                off                    default
3088 pool/home/bob  sharesmb              off                    default
3089 pool/home/bob  refquota              none                   default
3090 pool/home/bob  refreservation        none                   default
3091 pool/home/bob  primarycache          all                    default
3092 pool/home/bob  secondarycache        all                    default
3093 pool/home/bob  usedbysnapshots       0                      -
3094 pool/home/bob  usedbydataset         21K                    -
3095 pool/home/bob  usedbychildren        0                      -
3096 pool/home/bob  usedbyrefreservation  0                      -
3097 pool/home/bob  logbias               latency                default
3098 pool/home/bob  dedup                 off                    default
3099 pool/home/bob  mlslabel                                     -
3100 pool/home/bob  sync                  standard               default
3101 pool/home/bob  refcompressratio      1.00x                  -
3102 .Ed
3103 .Pp
3104 The following command gets a single property value.
3105 .Bd -literal -offset 2n
3106 .Li # Ic zfs get -H -o value compression pool/home/bob
3107 on
3108 .Ed
3109 .Pp
3110 The following command lists all properties with local settings for
3111 .Em pool/home/bob .
3112 .Bd -literal -offset 2n
3113 .Li # Ic zfs get -s local -o name,property,value all pool/home/bob
3114 NAME           PROPERTY              VALUE
3115 pool/home/bob  quota                 20G
3116 pool/home/bob  compression           on
3117 .Ed
3118 .It Sy Example 8 No Rolling Back a Tn ZFS No File System
3119 .Pp
3120 The following command reverts the contents of
3121 .Em pool/home/anne
3122 to the snapshot named
3123 .Em yesterday ,
3124 deleting all intermediate snapshots.
3125 .Bd -literal -offset 2n
3126 .Li # Ic zfs rollback -r pool/home/anne@yesterday
3127 .Ed
3128 .It Sy Example 9 No Creating a Tn ZFS No Clone
3129 .Pp
3130 The following command creates a writable file system whose initial contents are
3131 the same as
3132 .Em pool/home/bob@yesterday .
3133 .Bd -literal -offset 2n
3134 .Li # Ic zfs clone pool/home/bob@yesterday pool/clone
3135 .Ed
3136 .It Sy Example 10 No Promoting a Tn ZFS No Clone
3137 .Pp
3138 The following commands illustrate how to test out changes to a file system, and
3139 then replace the original file system with the changed one, using clones, clone
3140 promotion, and renaming:
3141 .Bd -literal -offset 2n
3142 .Li # Ic zfs create pool/project/production
3143 .Ed
3144 .Pp
3145 Populate
3146 .Pa /pool/project/production
3147 with data and continue with the following commands:
3148 .Bd -literal -offset 2n
3149 .Li # Ic zfs snapshot pool/project/production@today
3150 .Li # Ic zfs clone pool/project/production@today pool/project/beta
3151 .Ed
3152 .Pp
3153 Now make changes to
3154 .Pa /pool/project/beta
3155 and continue with the following commands:
3156 .Bd -literal -offset 2n
3157 .Li # Ic zfs promote pool/project/beta
3158 .Li # Ic zfs rename pool/project/production pool/project/legacy
3159 .Li # Ic zfs rename pool/project/beta pool/project/production
3160 .Ed
3161 .Pp
3162 Once the legacy version is no longer needed, it can be destroyed.
3163 .Bd -literal -offset 2n
3164 .Li # Ic zfs destroy pool/project/legacy
3165 .Ed
3166 .It Sy Example 11 No Inheriting Tn ZFS No Properties
3167 .Pp
3168 The following command causes
3169 .Em pool/home/bob
3170 and
3171 .Em pool/home/anne
3172 to inherit the
3173 .Sy checksum
3174 property from their parent.
3175 .Bd -literal -offset 2n
3176 .Li # Ic zfs inherit checksum pool/home/bob pool/home/anne
3177 .Ed
3178 .It Sy Example 12 No Remotely Replicating Tn ZFS No Data
3179 .Pp
3180 The following commands send a full stream and then an incremental stream to a
3181 remote machine, restoring them into
3182 .Sy poolB/received/fs@a
3183 and
3184 .Sy poolB/received/fs@b ,
3185 respectively.
3186 .Sy poolB
3187 must contain the file system
3188 .Sy poolB/received ,
3189 and must not initially contain
3190 .Sy poolB/received/fs .
3191 .Bd -literal -offset 2n
3192 .Li # Ic zfs send pool/fs@a | ssh host zfs receive poolB/received/fs@a
3193 .Li # Ic zfs send -i a pool/fs@b | ssh host zfs receive poolB/received/fs
3194 .Ed
3195 .It Xo
3196 .Sy Example 13
3197 Using the
3198 .Qq zfs receive -d
3199 Option
3200 .Xc
3201 .Pp
3202 The following command sends a full stream of
3203 .Sy poolA/fsA/fsB@snap
3204 to a remote machine, receiving it into
3205 .Sy poolB/received/fsA/fsB@snap .
3206 The
3207 .Sy fsA/fsB@snap
3208 portion of the received snapshot's name is determined from the name of the sent
3209 snapshot.
3210 .Sy poolB
3211 must contain the file system
3212 .Sy poolB/received .
3213 If
3214 .Sy poolB/received/fsA
3215 does not exist, it is created as an empty file system.
3216 .Bd -literal -offset 2n
3217 .Li # Ic zfs send poolA/fsA/fsB@snap | ssh host zfs receive -d poolB/received
3218 .Ed
3219 .It Sy Example 14 No Setting User Properties
3220 .Pp
3221 The following example sets the user-defined
3222 .Sy com.example:department
3223 property for a dataset.
3224 .Bd -literal -offset 2n
3225 .Li # Ic zfs set com.example:department=12345 tank/accounting
3226 .Ed
3227 .It Sy Example 15 No Performing a Rolling Snapshot
3228 .Pp
3229 The following example shows how to maintain a history of snapshots with a
3230 consistent naming scheme. To keep a week's worth of snapshots, the user
3231 destroys the oldest snapshot, renames the remaining snapshots, and then creates
3232 a new snapshot, as follows:
3233 .Bd -literal -offset 2n
3234 .Li # Ic zfs destroy -r pool/users@7daysago
3235 .Li # Ic zfs rename -r pool/users@6daysago @7daysago
3236 .Li # Ic zfs rename -r pool/users@5daysago @6daysago
3237 .Li # Ic zfs rename -r pool/users@4daysago @5daysago
3238 .Li # Ic zfs rename -r pool/users@3daysago @4daysago
3239 .Li # Ic zfs rename -r pool/users@2daysago @3daysago
3240 .Li # Ic zfs rename -r pool/users@yesterday @2daysago
3241 .Li # Ic zfs rename -r pool/users@today @yesterday
3242 .Li # Ic zfs snapshot -r pool/users@today
3243 .Ed
3244 .It Xo
3245 .Sy Example 16
3246 Setting
3247 .Qq sharenfs
3248 Property Options on a ZFS File System
3249 .Xc
3250 .Pp
3251 The following command shows how to set
3252 .Sy sharenfs
3253 property options to enable root access for a specific network on the
3254 .Em tank/home
3255 file system. The contents of the
3256 .Sy sharenfs
3257 property are valid
3258 .Xr exports 5
3259 options.
3260 .Bd -literal -offset 2n
3261 .Li # Ic zfs set sharenfs="maproot=root,network 192.168.0.0/24" tank/home
3262 .Ed
3263 .Pp
3264 Another way to write this command with the same result is:
3265 .Bd -literal -offset 2n
3266 .Li # Ic set zfs sharenfs="-maproot=root -network 192.168.0.0/24" tank/home
3267 .Ed
3268 .It Xo
3269 .Sy Example 17
3270 Delegating
3271 .Tn ZFS
3272 Administration Permissions on a
3273 .Tn ZFS
3274 Dataset
3275 .Xc
3276 .Pp
3277 The following example shows how to set permissions so that user
3278 .Em cindys
3279 can create, destroy, mount, and take snapshots on
3280 .Em tank/cindys .
3281 The permissions on
3282 .Em tank/cindys
3283 are also displayed.
3284 .Bd -literal -offset 2n
3285 .Li # Ic zfs allow cindys create,destroy,mount,snapshot tank/cindys
3286 .Li # Ic zfs allow tank/cindys
3287 -------------------------------------------------------------
3288 Local+Descendent permissions on (tank/cindys)
3289           user cindys create,destroy,mount,snapshot
3290 -------------------------------------------------------------
3291 .Ed
3292 .It Sy Example 18 No Delegating Create Time Permissions on a Tn ZFS No Dataset
3293 .Pp
3294 The following example shows how to grant anyone in the group
3295 .Em staff
3296 to create file systems in
3297 .Em tank/users .
3298 This syntax also allows staff members to destroy their own file systems, but
3299 not destroy anyone else's file system. The permissions on
3300 .Em tank/users
3301 are also displayed.
3302 .Bd -literal -offset 2n
3303 .Li # Ic zfs allow staff create,mount tank/users
3304 .Li # Ic zfs allow -c destroy tank/users
3305 .Li # Ic zfs allow tank/users
3306 -------------------------------------------------------------
3307 Create time permissions on (tank/users)
3308           create,destroy
3309 Local+Descendent permissions on (tank/users)
3310           group staff create,mount
3311 -------------------------------------------------------------
3312 .Ed
3313 .It Xo
3314 .Sy Example 19
3315 Defining and Granting a Permission Set on a
3316 .Tn ZFS
3317 Dataset
3318 .Xc
3319 .Pp
3320 The following example shows how to define and grant a permission set on the
3321 .Em tank/users
3322 file system. The permissions on
3323 .Em tank/users
3324 are also displayed.
3325 .Bd -literal -offset 2n
3326 .Li # Ic zfs allow -s @pset create,destroy,snapshot,mount tank/users
3327 .Li # Ic zfs allow staff @pset tank/users
3328 .Li # Ic zfs allow tank/users
3329 -------------------------------------------------------------
3330 Permission sets on (tank/users)
3331         @pset create,destroy,mount,snapshot
3332 Create time permissions on (tank/users)
3333         create,destroy
3334 Local+Descendent permissions on (tank/users)
3335         group staff @pset,create,mount
3336 -------------------------------------------------------------
3337 .Ed
3338 .It Sy Example 20 No Delegating Property Permissions on a Tn ZFS No Dataset
3339 .Pp
3340 The following example shows to grant the ability to set quotas and reservations
3341 on the
3342 .Sy users/home
3343 file system. The permissions on
3344 .Sy users/home
3345 are also displayed.
3346 .Bd -literal -offset 2n
3347 .Li # Ic zfs allow cindys quota,reservation users/home
3348 .Li # Ic zfs allow cindys
3349 -------------------------------------------------------------
3350 Local+Descendent permissions on (users/home)
3351         user cindys quota,reservation
3352 -------------------------------------------------------------
3353 .Li # Ic su - cindys
3354 .Li cindys% Ic zfs set quota=10G users/home/marks
3355 .Li cindys% Ic zfs get quota users/home/marks
3356 NAME              PROPERTY  VALUE             SOURCE
3357 users/home/marks  quota     10G               local
3358 .Ed
3359 .It Sy Example 21 No Removing ZFS Delegated Permissions on a Tn ZFS No Dataset
3360 .Pp
3361 The following example shows how to remove the snapshot permission from the
3362 .Em staff
3363 group on the
3364 .Em tank/users
3365 file system. The permissions on
3366 .Em tank/users
3367 are also displayed.
3368 .Bd -literal -offset 2n
3369 .Li # Ic zfs unallow staff snapshot tank/users
3370 .Li # Ic zfs allow tank/users
3371 -------------------------------------------------------------
3372 Permission sets on (tank/users)
3373         @pset create,destroy,mount,snapshot
3374 Create time permissions on (tank/users)
3375         create,destroy
3376 Local+Descendent permissions on (tank/users)
3377         group staff @pset,create,mount
3378 -------------------------------------------------------------
3379 .Ed
3380 .It Sy Example 22 Showing the differences between a snapshot and a ZFS Dataset
3381 .Pp
3382 The following example shows how to see what has changed between a prior
3383 snapshot of a ZFS Dataset and its current state.  The
3384 .Fl F
3385 option is used to indicate type information for the files affected.
3386 .Bd -literal -offset 2n
3387 .Li # Ic zfs diff tank/test@before tank/test
3388 M       /       /tank/test/
3389 M       F       /tank/test/linked      (+1)
3390 R       F       /tank/test/oldname -> /tank/test/newname
3391 -       F       /tank/test/deleted
3392 +       F       /tank/test/created
3393 M       F       /tank/test/modified
3394 .Ed
3395 .El
3396 .Sh SEE ALSO
3397 .Xr chmod 2 ,
3398 .Xr fsync 2 ,
3399 .Xr exports 5 ,
3400 .Xr fstab 5 ,
3401 .Xr rc.conf 5 ,
3402 .Xr jail 8 ,
3403 .Xr mount 8 ,
3404 .Xr umount 8 ,
3405 .Xr zpool 8
3406 .Sh AUTHORS
3407 This manual page is a
3408 .Xr mdoc 7
3409 reimplementation of the
3410 .Tn OpenSolaris
3411 manual page
3412 .Em zfs(1M) ,
3413 modified and customized for
3414 .Fx
3415 and licensed under the
3416 Common Development and Distribution License
3417 .Pq Tn CDDL .
3418 .Pp
3419 The
3420 .Xr mdoc 7
3421 implementation of this manual page was initially written by
3422 .An Martin Matuska Aq mm@FreeBSD.org .