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