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