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