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