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