dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / share / man / man1m / zfs.1m
blob926d61cbf0a15aed12539837483de38199829393
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
269 .Cm program
270 .Op Fl t Ar timeout
271 .Op Fl m Ar memory_limit
272 .Ar pool script
273 .Op Ar arg1 No ...
274 .Sh DESCRIPTION
277 command configures ZFS datasets within a ZFS storage pool, as described in
278 .Xr zpool 1M .
279 A dataset is identified by a unique path within the ZFS namespace.
280 For example:
281 .Bd -literal
282 pool/{filesystem,volume,snapshot}
285 where the maximum length of a dataset name is
286 .Dv MAXNAMELEN
287 .Pq 256 bytes .
289 A dataset can be one of the following:
290 .Bl -tag -width "file system"
291 .It Sy file system
292 A ZFS dataset of type
293 .Sy filesystem
294 can be mounted within the standard system namespace and behaves like other file
295 systems.
296 While ZFS file systems are designed to be POSIX compliant, known issues exist
297 that prevent compliance in some cases.
298 Applications that depend on standards conformance might fail due to non-standard
299 behavior when checking file system free space.
300 .It Sy volume
301 A logical volume exported as a raw or block device.
302 This type of dataset should only be used under special circumstances.
303 File systems are typically used in most environments.
304 .It Sy snapshot
305 A read-only version of a file system or volume at a given point in time.
306 It is specified as
307 .Ar filesystem Ns @ Ns Ar name
309 .Ar volume Ns @ Ns Ar name .
311 .Ss ZFS File System Hierarchy
312 A ZFS storage pool is a logical collection of devices that provide space for
313 datasets.
314 A storage pool is also the root of the ZFS file system hierarchy.
316 The root of the pool can be accessed as a file system, such as mounting and
317 unmounting, taking snapshots, and setting properties.
318 The physical storage characteristics, however, are managed by the
319 .Xr zpool 1M
320 command.
323 .Xr zpool 1M
324 for more information on creating and administering pools.
325 .Ss Snapshots
326 A snapshot is a read-only copy of a file system or volume.
327 Snapshots can be created extremely quickly, and initially consume no additional
328 space within the pool.
329 As data within the active dataset changes, the snapshot consumes more data than
330 would otherwise be shared with the active dataset.
332 Snapshots can have arbitrary names.
333 Snapshots of volumes can be cloned or rolled back, but cannot be accessed
334 independently.
336 File system snapshots can be accessed under the
337 .Pa .zfs/snapshot
338 directory in the root of the file system.
339 Snapshots are automatically mounted on demand and may be unmounted at regular
340 intervals.
341 The visibility of the
342 .Pa .zfs
343 directory can be controlled by the
344 snapdir
345 property.
346 .Ss Clones
347 A clone is a writable volume or file system whose initial contents are the same
348 as another dataset.
349 As with snapshots, creating a clone is nearly instantaneous, and initially
350 consumes no additional space.
352 Clones can only be created from a snapshot.
353 When a snapshot is cloned, it creates an implicit dependency between the parent
354 and child.
355 Even though the clone is created somewhere else in the dataset hierarchy, the
356 original snapshot cannot be destroyed as long as a clone exists.
358 .Sy origin
359 property exposes this dependency, and the
360 .Cm destroy
361 command lists any such dependencies, if they exist.
363 The clone parent-child dependency relationship can be reversed by using the
364 .Cm promote
365 subcommand.
366 This causes the
367 .Qq origin
368 file system to become a clone of the specified file system, which makes it
369 possible to destroy the file system that the clone was created from.
370 .Ss "Mount Points"
371 Creating a ZFS file system is a simple operation, so the number of file systems
372 per system is likely to be numerous.
373 To cope with this, ZFS automatically manages mounting and unmounting file
374 systems without the need to edit the
375 .Pa /etc/vfstab
376 file.
377 All automatically managed file systems are mounted by ZFS at boot time.
379 By default, file systems are mounted under
380 .Pa /path ,
381 where
382 .Ar path
383 is the name of the file system in the ZFS namespace.
384 Directories are created and destroyed as needed.
386 A file system can also have a mount point set in the
387 .Sy mountpoint
388 property.
389 This directory is created as needed, and ZFS automatically mounts the file
390 system when the
391 .Nm zfs Cm mount Fl a
392 command is invoked
393 .Po without editing
394 .Pa /etc/vfstab
395 .Pc .
397 .Sy mountpoint
398 property can be inherited, so if
399 .Em pool/home
400 has a mount point of
401 .Pa /export/stuff ,
402 then
403 .Em pool/home/user
404 automatically inherits a mount point of
405 .Pa /export/stuff/user .
407 A file system
408 .Sy mountpoint
409 property of
410 .Sy none
411 prevents the file system from being mounted.
413 If needed, ZFS file systems can also be managed with traditional tools
415 .Nm mount ,
416 .Nm umount ,
417 .Pa /etc/vfstab
418 .Pc .
419 If a file system's mount point is set to
420 .Sy legacy ,
421 ZFS makes no attempt to manage the file system, and the administrator is
422 responsible for mounting and unmounting the file system.
423 .Ss "Zones"
424 A ZFS file system can be added to a non-global zone by using the
425 .Nm zonecfg Cm add Sy fs
426 subcommand.
427 A ZFS file system that is added to a non-global zone must have its
428 .Sy mountpoint
429 property set to
430 .Sy legacy .
432 The physical properties of an added file system are controlled by the global
433 administrator.
434 However, the zone administrator can create, modify, or destroy files within the
435 added file system, depending on how the file system is mounted.
437 A dataset can also be delegated to a non-global zone by using the
438 .Nm zonecfg Cm add Sy dataset
439 subcommand.
440 You cannot delegate a dataset to one zone and the children of the same dataset
441 to another zone.
442 The zone administrator can change properties of the dataset or any of its
443 children.
444 However, the
445 .Sy quota ,
446 .Sy filesystem_limit
448 .Sy snapshot_limit
449 properties of the delegated dataset can be modified only by the global
450 administrator.
452 A ZFS volume can be added as a device to a non-global zone by using the
453 .Nm zonecfg Cm add Sy device
454 subcommand.
455 However, its physical properties can be modified only by the global
456 administrator.
458 For more information about
459 .Nm zonecfg
460 syntax, see
461 .Xr zonecfg 1M .
463 After a dataset is delegated to a non-global zone, the
464 .Sy zoned
465 property is automatically set.
466 A zoned file system cannot be mounted in the global zone, since the zone
467 administrator might have to set the mount point to an unacceptable value.
469 The global administrator can forcibly clear the
470 .Sy zoned
471 property, though this should be done with extreme care.
472 The global administrator should verify that all the mount points are acceptable
473 before clearing the property.
474 .Ss Native Properties
475 Properties are divided into two types, native properties and user-defined
476 .Po or
477 .Qq user
479 properties.
480 Native properties either export internal statistics or control ZFS behavior.
481 In addition, native properties are either editable or read-only.
482 User properties have no effect on ZFS behavior, but you can use them to annotate
483 datasets in a way that is meaningful in your environment.
484 For more information about user properties, see the
485 .Sx User Properties
486 section, below.
488 Every dataset has a set of properties that export statistics about the dataset
489 as well as control various behaviors.
490 Properties are inherited from the parent unless overridden by the child.
491 Some properties apply only to certain types of datasets
492 .Pq file systems, volumes, or snapshots .
494 The values of numeric properties can be specified using human-readable suffixes
495 .Po for example,
496 .Sy k ,
497 .Sy KB ,
498 .Sy M ,
499 .Sy Gb ,
500 and so forth, up to
501 .Sy Z
502 for zettabyte
503 .Pc .
504 The following are all valid
505 .Pq and equal
506 specifications:
507 .Li 1536M, 1.5g, 1.50GB .
509 The values of non-numeric properties are case sensitive and must be lowercase,
510 except for
511 .Sy mountpoint ,
512 .Sy sharenfs ,
514 .Sy sharesmb .
516 The following native properties consist of read-only statistics about the
517 dataset.
518 These properties can be neither set, nor inherited.
519 Native properties apply to all dataset types unless otherwise noted.
520 .Bl -tag -width "usedbyrefreservation"
521 .It Sy available
522 The amount of space available to the dataset and all its children, assuming that
523 there is no other activity in the pool.
524 Because space is shared within a pool, availability can be limited by any number
525 of factors, including physical pool size, quotas, reservations, or other
526 datasets within the pool.
528 This property can also be referred to by its shortened column name,
529 .Sy avail .
530 .It Sy compressratio
531 For non-snapshots, the compression ratio achieved for the
532 .Sy used
533 space of this dataset, expressed as a multiplier.
535 .Sy used
536 property includes descendant datasets, and, for clones, does not include the
537 space shared with the origin snapshot.
538 For snapshots, the
539 .Sy compressratio
540 is the same as the
541 .Sy refcompressratio
542 property.
543 Compression can be turned on by running:
544 .Nm zfs Cm set Sy compression Ns = Ns Sy on Ar dataset .
545 The default value is
546 .Sy off .
547 .It Sy creation
548 The time this dataset was created.
549 .It Sy clones
550 For snapshots, this property is a comma-separated list of filesystems or volumes
551 which are clones of this snapshot.
552 The clones'
553 .Sy origin
554 property is this snapshot.
555 If the
556 .Sy clones
557 property is not empty, then this snapshot can not be destroyed
558 .Po even with the
559 .Fl r
561 .Fl f
562 options
563 .Pc .
564 .It Sy defer_destroy
565 This property is
566 .Sy on
567 if the snapshot has been marked for deferred destroy by using the
568 .Nm zfs Cm destroy Fl d
569 command.
570 Otherwise, the property is
571 .Sy off .
572 .It Sy filesystem_count
573 The total number of filesystems and volumes that exist under this location in
574 the dataset tree.
575 This value is only available when a
576 .Sy filesystem_limit
577 has been set somewhere in the tree under which the dataset resides.
578 .It Sy logicalreferenced
579 The amount of space that is
580 .Qq logically
581 accessible by this dataset.
582 See the
583 .Sy referenced
584 property.
585 The logical space ignores the effect of the
586 .Sy compression
588 .Sy copies
589 properties, giving a quantity closer to the amount of data that applications
590 see.
591 However, it does include space consumed by metadata.
593 This property can also be referred to by its shortened column name,
594 .Sy lrefer .
595 .It Sy logicalused
596 The amount of space that is
597 .Qq logically
598 consumed by this dataset and all its descendents.
599 See the
600 .Sy used
601 property.
602 The logical space ignores the effect of the
603 .Sy compression
605 .Sy copies
606 properties, giving a quantity closer to the amount of data that applications
607 see.
608 However, it does include space consumed by metadata.
610 This property can also be referred to by its shortened column name,
611 .Sy lused .
612 .It Sy mounted
613 For file systems, indicates whether the file system is currently mounted.
614 This property can be either
615 .Sy yes
617 .Sy no .
618 .It Sy origin
619 For cloned file systems or volumes, the snapshot from which the clone was
620 created.
621 See also the
622 .Sy clones
623 property.
624 .It Sy receive_resume_token
625 For filesystems or volumes which have saved partially-completed state from
626 .Sy zfs receive -s ,
627 this opaque token can be provided to
628 .Sy zfs send -t
629 to resume and complete the
630 .Sy zfs receive .
631 .It Sy referenced
632 The amount of data that is accessible by this dataset, which may or may not be
633 shared with other datasets in the pool.
634 When a snapshot or clone is created, it initially references the same amount of
635 space as the file system or snapshot it was created from, since its contents are
636 identical.
638 This property can also be referred to by its shortened column name,
639 .Sy refer .
640 .It Sy refcompressratio
641 The compression ratio achieved for the
642 .Sy referenced
643 space of this dataset, expressed as a multiplier.
644 See also the
645 .Sy compressratio
646 property.
647 .It Sy snapshot_count
648 The total number of snapshots that exist under this location in the dataset
649 tree.
650 This value is only available when a
651 .Sy snapshot_limit
652 has been set somewhere in the tree under which the dataset resides.
653 .It Sy type
654 The type of dataset:
655 .Sy filesystem ,
656 .Sy volume ,
658 .Sy snapshot .
659 .It Sy used
660 The amount of space consumed by this dataset and all its descendents.
661 This is the value that is checked against this dataset's quota and reservation.
662 The space used does not include this dataset's reservation, but does take into
663 account the reservations of any descendent datasets.
664 The amount of space that a dataset consumes from its parent, as well as the
665 amount of space that is freed if this dataset is recursively destroyed, is the
666 greater of its space used and its reservation.
668 The used space of a snapshot
669 .Po see the
670 .Sx Snapshots
671 section
673 is space that is referenced exclusively by this snapshot.
674 If this snapshot is destroyed, the amount of
675 .Sy used
676 space will be freed.
677 Space that is shared by multiple snapshots isn't accounted for in this metric.
678 When a snapshot is destroyed, space that was previously shared with this
679 snapshot can become unique to snapshots adjacent to it, thus changing the used
680 space of those snapshots.
681 The used space of the latest snapshot can also be affected by changes in the
682 file system.
683 Note that the
684 .Sy used
685 space of a snapshot is a subset of the
686 .Sy written
687 space of the snapshot.
689 The amount of space used, available, or referenced does not take into account
690 pending changes.
691 Pending changes are generally accounted for within a few seconds.
692 Committing a change to a disk using
693 .Xr fsync 3C
695 .Dv O_SYNC
696 does not necessarily guarantee that the space usage information is updated
697 immediately.
698 .It Sy usedby*
700 .Sy usedby*
701 properties decompose the
702 .Sy used
703 properties into the various reasons that space is used.
704 Specifically,
705 .Sy used No =
706 .Sy usedbychildren No +
707 .Sy usedbydataset No +
708 .Sy usedbyrefreservation No +
709 .Sy usedbysnapshots .
710 These properties are only available for datasets created on
711 .Nm zpool
712 .Qo version 13 Qc
713 pools.
714 .It Sy usedbychildren
715 The amount of space used by children of this dataset, which would be freed if
716 all the dataset's children were destroyed.
717 .It Sy usedbydataset
718 The amount of space used by this dataset itself, which would be freed if the
719 dataset were destroyed
720 .Po after first removing any
721 .Sy refreservation
722 and destroying any necessary snapshots or descendents
723 .Pc .
724 .It Sy usedbyrefreservation
725 The amount of space used by a
726 .Sy refreservation
727 set on this dataset, which would be freed if the
728 .Sy refreservation
729 was removed.
730 .It Sy usedbysnapshots
731 The amount of space consumed by snapshots of this dataset.
732 In particular, it is the amount of space that would be freed if all of this
733 dataset's snapshots were destroyed.
734 Note that this is not simply the sum of the snapshots'
735 .Sy used
736 properties because space can be shared by multiple snapshots.
737 .It Sy userused Ns @ Ns Em user
738 The amount of space consumed by the specified user in this dataset.
739 Space is charged to the owner of each file, as displayed by
740 .Nm ls Fl l .
741 The amount of space charged is displayed by
742 .Nm du
744 .Nm ls Fl s .
745 See the
746 .Nm zfs Cm userspace
747 subcommand for more information.
749 Unprivileged users can access only their own space usage.
750 The root user, or a user who has been granted the
751 .Sy userused
752 privilege with
753 .Nm zfs Cm allow ,
754 can access everyone's usage.
757 .Sy userused Ns @ Ns Em ...
758 properties are not displayed by
759 .Nm zfs Cm get Sy all .
760 The user's name must be appended after the @ symbol, using one of the following
761 forms:
762 .Bl -bullet -width ""
764 .Em POSIX name
765 .Po for example,
766 .Sy joe
769 .Em POSIX numeric ID
770 .Po for example,
771 .Sy 789
774 .Em SID name
775 .Po for example,
776 .Sy joe.smith@mydomain
779 .Em SID numeric ID
780 .Po for example,
781 .Sy S-1-123-456-789
784 .It Sy userrefs
785 This property is set to the number of user holds on this snapshot.
786 User holds are set by using the
787 .Nm zfs Cm hold
788 command.
789 .It Sy groupused Ns @ Ns Em group
790 The amount of space consumed by the specified group in this dataset.
791 Space is charged to the group of each file, as displayed by
792 .Nm ls Fl l .
793 See the
794 .Sy userused Ns @ Ns Em user
795 property for more information.
797 Unprivileged users can only access their own groups' space usage.
798 The root user, or a user who has been granted the
799 .Sy groupused
800 privilege with
801 .Nm zfs Cm allow ,
802 can access all groups' usage.
803 .It Sy volblocksize
804 For volumes, specifies the block size of the volume.
806 .Sy blocksize
807 cannot be changed once the volume has been written, so it should be set at
808 volume creation time.
809 The default
810 .Sy blocksize
811 for volumes is 8 Kbytes.
812 Any power of 2 from 512 bytes to 128 Kbytes is valid.
814 This property can also be referred to by its shortened column name,
815 .Sy volblock .
816 .It Sy written
817 The amount of space
818 .Sy referenced
819 by this dataset, that was written since the previous snapshot
820 .Pq i.e. that is not referenced by the previous snapshot .
821 .It Sy written Ns @ Ns Em snapshot
822 The amount of
823 .Sy referenced
824 space written to this dataset since the specified snapshot.
825 This is the space that is referenced by this dataset but was not referenced by
826 the specified snapshot.
829 .Em snapshot
830 may be specified as a short snapshot name
831 .Po just the part after the
832 .Sy @
833 .Pc ,
834 in which case it will be interpreted as a snapshot in the same filesystem as
835 this dataset.
837 .Em snapshot
838 may be a full snapshot name
839 .Po Em filesystem Ns @ Ns Em snapshot Pc ,
840 which for clones may be a snapshot in the origin's filesystem
841 .Pq or the origin of the origin's filesystem, etc.
844 The following native properties can be used to change the behavior of a ZFS
845 dataset.
846 .Bl -tag -width ""
847 .It Xo
848 .Sy aclinherit Ns = Ns Sy discard Ns | Ns Sy noallow Ns | Ns
849 .Sy restricted Ns | Ns Sy passthrough Ns | Ns Sy passthrough-x
851 Controls how ACEs are inherited when files and directories are created.
852 .Bl -tag -width "passthrough-x"
853 .It Sy discard
854 does not inherit any ACEs.
855 .It Sy noallow
856 only inherits inheritable ACEs that specify
857 .Qq deny
858 permissions.
859 .It Sy restricted
860 default, removes the
861 .Sy write_acl
863 .Sy write_owner
864 permissions when the ACE is inherited.
865 .It Sy passthrough
866 inherits all inheritable ACEs without any modifications.
867 .It Sy passthrough-x
868 same meaning as
869 .Sy passthrough ,
870 except that the
871 .Sy owner@ ,
872 .Sy group@ ,
874 .Sy everyone@
875 ACEs inherit the execute permission only if the file creation mode also requests
876 the execute bit.
879 When the property value is set to
880 .Sy passthrough ,
881 files are created with a mode determined by the inheritable ACEs.
882 If no inheritable ACEs exist that affect the mode, then the mode is set in
883 accordance to the requested mode from the application.
884 .It Xo
885 .Sy aclmode Ns = Ns Sy discard Ns | Ns Sy groupmask Ns | Ns
886 .Sy passthrough Ns | Ns Sy restricted
888 Controls how an ACL is modified during
889 .Xr chmod 2
890 and how inherited ACEs are modified by the file creation mode.
891 .Bl -tag -width "passthrough"
892 .It Sy discard
893 default, deletes all ACEs except for those representing the mode of the file or
894 directory requested by
895 .Xr chmod 2 .
896 .It Sy groupmask
897 reduces permissions granted by all
898 .Sy ALLOW
899 entries found in the ACL such that they are no greater than the group
900 permissions specified by the mode.
901 .It Sy passthrough
902 indicates that no changes are made to the ACL other than creating or updating
903 the necessary ACEs to represent the new mode of the file or directory.
904 .It Sy restricted
905 causes the
906 .Xr chmod 2
907 operation to return an error when used on any file or directory which has a
908 non-trivial ACL, with entries in addition to those that represent the mode.
911 .Xr chmod 2
912 is required to change the set user ID, set group ID, or sticky bit on a file or
913 directory, as they do not have equivalent ACEs.
914 In order to use
915 .Xr chmod 2
916 on a file or directory with a non-trivial ACL when
917 .Sy aclmode
918 is set to
919 .Sy restricted ,
920 you must first remove all ACEs except for those that represent the current mode.
921 .It Sy atime Ns = Ns Sy on Ns | Ns Sy off
922 Controls whether the access time for files is updated when they are read.
923 Turning this property off avoids producing write traffic when reading files and
924 can result in significant performance gains, though it might confuse mailers
925 and other similar utilities.
926 The default value is
927 .Sy on .
928 .It Sy canmount Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy noauto
929 If this property is set to
930 .Sy off ,
931 the file system cannot be mounted, and is ignored by
932 .Nm zfs Cm mount Fl a .
933 Setting this property to
934 .Sy off
935 is similar to setting the
936 .Sy mountpoint
937 property to
938 .Sy none ,
939 except that the dataset still has a normal
940 .Sy mountpoint
941 property, which can be inherited.
942 Setting this property to
943 .Sy off
944 allows datasets to be used solely as a mechanism to inherit properties.
945 One example of setting
946 .Sy canmount Ns = Ns Sy off
947 is to have two datasets with the same
948 .Sy mountpoint ,
949 so that the children of both datasets appear in the same directory, but might
950 have different inherited characteristics.
952 When set to
953 .Sy noauto ,
954 a dataset can only be mounted and unmounted explicitly.
955 The dataset is not mounted automatically when the dataset is created or
956 imported, nor is it mounted by the
957 .Nm zfs Cm mount Fl a
958 command or unmounted by the
959 .Nm zfs Cm unmount Fl a
960 command.
962 This property is not inherited.
963 .It Xo
964 .Sy checksum Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy fletcher2 Ns | Ns
965 .Sy fletcher4 Ns | Ns Sy sha256 Ns | Ns Sy noparity Ns | Ns
966 .Sy sha512 Ns | Ns Sy skein Ns | Ns Sy edonr
968 Controls the checksum used to verify data integrity.
969 The default value is
970 .Sy on ,
971 which automatically selects an appropriate algorithm
972 .Po currently,
973 .Sy fletcher4 ,
974 but this may change in future releases
975 .Pc .
976 The value
977 .Sy off
978 disables integrity checking on user data.
979 The value
980 .Sy noparity
981 not only disables integrity but also disables maintaining parity for user data.
982 This setting is used internally by a dump device residing on a RAID-Z pool and
983 should not be used by any other dataset.
984 Disabling checksums is
985 .Sy NOT
986 a recommended practice.
989 .Sy sha512 ,
990 .Sy skein ,
992 .Sy edonr
993 checksum algorithms require enabling the appropriate features on the pool.
994 Please see
995 .Xr zpool-features 5
996 for more information on these algorithms.
998 Changing this property affects only newly-written data.
999 .It Xo
1000 .Sy compression Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy gzip Ns | Ns
1001 .Sy gzip- Ns Em N Ns | Ns Sy lz4 Ns | Ns Sy lzjb Ns | Ns Sy zle
1003 Controls the compression algorithm used for this dataset.
1005 Setting compression to
1006 .Sy on
1007 indicates that the current default compression algorithm should be used.
1008 The default balances compression and decompression speed, with compression ratio
1009 and is expected to work well on a wide variety of workloads.
1010 Unlike all other settings for this property,
1011 .Sy on
1012 does not select a fixed compression type.
1013 As new compression algorithms are added to ZFS and enabled on a pool, the
1014 default compression algorithm may change.
1015 The current default compression algorithm is either
1016 .Sy lzjb
1017 or, if the
1018 .Sy lz4_compress
1019 feature is enabled,
1020 .Sy lz4 .
1023 .Sy lz4
1024 compression algorithm is a high-performance replacement for the
1025 .Sy lzjb
1026 algorithm.
1027 It features significantly faster compression and decompression, as well as a
1028 moderately higher compression ratio than
1029 .Sy lzjb ,
1030 but can only be used on pools with the
1031 .Sy lz4_compress
1032 feature set to
1033 .Sy enabled .
1035 .Xr zpool-features 5
1036 for details on ZFS feature flags and the
1037 .Sy lz4_compress
1038 feature.
1041 .Sy lzjb
1042 compression algorithm is optimized for performance while providing decent data
1043 compression.
1046 .Sy gzip
1047 compression algorithm uses the same compression as the
1048 .Xr gzip 1
1049 command.
1050 You can specify the
1051 .Sy gzip
1052 level by using the value
1053 .Sy gzip- Ns Em N ,
1054 where
1055 .Em N
1056 is an integer from 1
1057 .Pq fastest
1058 to 9
1059 .Pq best compression ratio .
1060 Currently,
1061 .Sy gzip
1062 is equivalent to
1063 .Sy gzip-6
1064 .Po which is also the default for
1065 .Xr gzip 1
1066 .Pc .
1069 .Sy zle
1070 compression algorithm compresses runs of zeros.
1072 This property can also be referred to by its shortened column name
1073 .Sy compress .
1074 Changing this property affects only newly-written data.
1075 .It Sy copies Ns = Ns Sy 1 Ns | Ns Sy 2 Ns | Ns Sy 3
1076 Controls the number of copies of data stored for this dataset.
1077 These copies are in addition to any redundancy provided by the pool, for
1078 example, mirroring or RAID-Z.
1079 The copies are stored on different disks, if possible.
1080 The space used by multiple copies is charged to the associated file and dataset,
1081 changing the
1082 .Sy used
1083 property and counting against quotas and reservations.
1085 Changing this property only affects newly-written data.
1086 Therefore, set this property at file system creation time by using the
1087 .Fl o Sy copies Ns = Ns Ar N
1088 option.
1089 .It Sy devices Ns = Ns Sy on Ns | Ns Sy off
1090 Controls whether device nodes can be opened on this file system.
1091 The default value is
1092 .Sy on .
1093 .It Sy exec Ns = Ns Sy on Ns | Ns Sy off
1094 Controls whether processes can be executed from within this file system.
1095 The default value is
1096 .Sy on .
1097 .It Sy filesystem_limit Ns = Ns Em count Ns | Ns Sy none
1098 Limits the number of filesystems and volumes that can exist under this point in
1099 the dataset tree.
1100 The limit is not enforced if the user is allowed to change the limit.
1101 Setting a
1102 .Sy filesystem_limit
1104 .Sy on
1105 a descendent of a filesystem that already has a
1106 .Sy filesystem_limit
1107 does not override the ancestor's
1108 .Sy filesystem_limit ,
1109 but rather imposes an additional limit.
1110 This feature must be enabled to be used
1111 .Po see
1112 .Xr zpool-features 5
1113 .Pc .
1114 .It Sy mountpoint Ns = Ns Pa path Ns | Ns Sy none Ns | Ns Sy legacy
1115 Controls the mount point used for this file system.
1116 See the
1117 .Sx Mount Points
1118 section for more information on how this property is used.
1120 When the
1121 .Sy mountpoint
1122 property is changed for a file system, the file system and any children that
1123 inherit the mount point are unmounted.
1124 If the new value is
1125 .Sy legacy ,
1126 then they remain unmounted.
1127 Otherwise, they are automatically remounted in the new location if the property
1128 was previously
1129 .Sy legacy
1131 .Sy none ,
1132 or if they were mounted before the property was changed.
1133 In addition, any shared file systems are unshared and shared in the new
1134 location.
1135 .It Sy nbmand Ns = Ns Sy on Ns | Ns Sy off
1136 Controls whether the file system should be mounted with
1137 .Sy nbmand
1138 .Pq Non Blocking mandatory locks .
1139 This is used for SMB clients.
1140 Changes to this property only take effect when the file system is umounted and
1141 remounted.
1143 .Xr mount 1M
1144 for more information on
1145 .Sy nbmand
1146 mounts.
1147 .It Sy primarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1148 Controls what is cached in the primary cache
1149 .Pq ARC .
1150 If this property is set to
1151 .Sy all ,
1152 then both user data and metadata is cached.
1153 If this property is set to
1154 .Sy none ,
1155 then neither user data nor metadata is cached.
1156 If this property is set to
1157 .Sy metadata ,
1158 then only metadata is cached.
1159 The default value is
1160 .Sy all .
1161 .It Sy quota Ns = Ns Em size Ns | Ns Sy none
1162 Limits the amount of space a dataset and its descendents can consume.
1163 This property enforces a hard limit on the amount of space used.
1164 This includes all space consumed by descendents, including file systems and
1165 snapshots.
1166 Setting a quota on a descendent of a dataset that already has a quota does not
1167 override the ancestor's quota, but rather imposes an additional limit.
1169 Quotas cannot be set on volumes, as the
1170 .Sy volsize
1171 property acts as an implicit quota.
1172 .It Sy snapshot_limit Ns = Ns Em count Ns | Ns Sy none
1173 Limits the number of snapshots that can be created on a dataset and its
1174 descendents.
1175 Setting a
1176 .Sy snapshot_limit
1177 on a descendent of a dataset that already has a
1178 .Sy snapshot_limit
1179 does not override the ancestor's
1180 .Sy snapshot_limit ,
1181 but rather imposes an additional limit.
1182 The limit is not enforced if the user is allowed to change the limit.
1183 For example, this means that recursive snapshots taken from the global zone are
1184 counted against each delegated dataset within a zone.
1185 This feature must be enabled to be used
1186 .Po see
1187 .Xr zpool-features 5
1188 .Pc .
1189 .It Sy userquota@ Ns Em user Ns = Ns Em size Ns | Ns Sy none
1190 Limits the amount of space consumed by the specified user.
1191 User space consumption is identified by the
1192 .Sy userspace@ Ns Em user
1193 property.
1195 Enforcement of user quotas may be delayed by several seconds.
1196 This delay means that a user might exceed their quota before the system notices
1197 that they are over quota and begins to refuse additional writes with the
1198 .Er EDQUOT
1199 error message.
1200 See the
1201 .Nm zfs Cm userspace
1202 subcommand for more information.
1204 Unprivileged users can only access their own groups' space usage.
1205 The root user, or a user who has been granted the
1206 .Sy userquota
1207 privilege with
1208 .Nm zfs Cm allow ,
1209 can get and set everyone's quota.
1211 This property is not available on volumes, on file systems before version 4, or
1212 on pools before version 15.
1214 .Sy userquota@ Ns Em ...
1215 properties are not displayed by
1216 .Nm zfs Cm get Sy all .
1217 The user's name must be appended after the
1218 .Sy @
1219 symbol, using one of the following forms:
1220 .Bl -bullet
1222 .Em POSIX name
1223 .Po for example,
1224 .Sy joe
1227 .Em POSIX numeric ID
1228 .Po for example,
1229 .Sy 789
1232 .Em SID name
1233 .Po for example,
1234 .Sy joe.smith@mydomain
1237 .Em SID numeric ID
1238 .Po for example,
1239 .Sy S-1-123-456-789
1242 .It Sy groupquota@ Ns Em group Ns = Ns Em size Ns | Ns Sy none
1243 Limits the amount of space consumed by the specified group.
1244 Group space consumption is identified by the
1245 .Sy groupused@ Ns Em group
1246 property.
1248 Unprivileged users can access only their own groups' space usage.
1249 The root user, or a user who has been granted the
1250 .Sy groupquota
1251 privilege with
1252 .Nm zfs Cm allow ,
1253 can get and set all groups' quotas.
1254 .It Sy readonly Ns = Ns Sy on Ns | Ns Sy off
1255 Controls whether this dataset can be modified.
1256 The default value is
1257 .Sy off .
1259 This property can also be referred to by its shortened column name,
1260 .Sy rdonly .
1261 .It Sy recordsize Ns = Ns Em size
1262 Specifies a suggested block size for files in the file system.
1263 This property is designed solely for use with database workloads that access
1264 files in fixed-size records.
1265 ZFS automatically tunes block sizes according to internal algorithms optimized
1266 for typical access patterns.
1268 For databases that create very large files but access them in small random
1269 chunks, these algorithms may be suboptimal.
1270 Specifying a
1271 .Sy recordsize
1272 greater than or equal to the record size of the database can result in
1273 significant performance gains.
1274 Use of this property for general purpose file systems is strongly discouraged,
1275 and may adversely affect performance.
1277 The size specified must be a power of two greater than or equal to 512 and less
1278 than or equal to 128 Kbytes.
1279 If the
1280 .Sy large_blocks
1281 feature is enabled on the pool, the size may be up to 1 Mbyte.
1283 .Xr zpool-features 5
1284 for details on ZFS feature flags.
1286 Changing the file system's
1287 .Sy recordsize
1288 affects only files created afterward; existing files are unaffected.
1290 This property can also be referred to by its shortened column name,
1291 .Sy recsize .
1292 .It Sy redundant_metadata Ns = Ns Sy all Ns | Ns Sy most
1293 Controls what types of metadata are stored redundantly.
1294 ZFS stores an extra copy of metadata, so that if a single block is corrupted,
1295 the amount of user data lost is limited.
1296 This extra copy is in addition to any redundancy provided at the pool level
1297 .Pq e.g. by mirroring or RAID-Z ,
1298 and is in addition to an extra copy specified by the
1299 .Sy copies
1300 property
1301 .Pq up to a total of 3 copies .
1302 For example if the pool is mirrored,
1303 .Sy copies Ns = Ns 2 ,
1305 .Sy redundant_metadata Ns = Ns Sy most ,
1306 then ZFS stores 6 copies of most metadata, and 4 copies of data and some
1307 metadata.
1309 When set to
1310 .Sy all ,
1311 ZFS stores an extra copy of all metadata.
1312 If a single on-disk block is corrupt, at worst a single block of user data
1313 .Po which is
1314 .Sy recordsize
1315 bytes long
1317 can be lost.
1319 When set to
1320 .Sy most ,
1321 ZFS stores an extra copy of most types of metadata.
1322 This can improve performance of random writes, because less metadata must be
1323 written.
1324 In practice, at worst about 100 blocks
1325 .Po of
1326 .Sy recordsize
1327 bytes each
1329 of user data can be lost if a single on-disk block is corrupt.
1330 The exact behavior of which metadata blocks are stored redundantly may change in
1331 future releases.
1333 The default value is
1334 .Sy all .
1335 .It Sy refquota Ns = Ns Em size Ns | Ns Sy none
1336 Limits the amount of space a dataset can consume.
1337 This property enforces a hard limit on the amount of space used.
1338 This hard limit does not include space used by descendents, including file
1339 systems and snapshots.
1340 .It Sy refreservation Ns = Ns Em size Ns | Ns Sy none
1341 The minimum amount of space guaranteed to a dataset, not including its
1342 descendents.
1343 When the amount of space used is below this value, the dataset is treated as if
1344 it were taking up the amount of space specified by
1345 .Sy refreservation .
1347 .Sy refreservation
1348 reservation is accounted for in the parent datasets' space used, and counts
1349 against the parent datasets' quotas and reservations.
1352 .Sy refreservation
1353 is set, a snapshot is only allowed if there is enough free pool space outside of
1354 this reservation to accommodate the current number of
1355 .Qq referenced
1356 bytes in the dataset.
1358 This property can also be referred to by its shortened column name,
1359 .Sy refreserv .
1360 .It Sy reservation Ns = Ns Em size Ns | Ns Sy none
1361 The minimum amount of space guaranteed to a dataset and its descendents.
1362 When the amount of space used is below this value, the dataset is treated as if
1363 it were taking up the amount of space specified by its reservation.
1364 Reservations are accounted for in the parent datasets' space used, and count
1365 against the parent datasets' quotas and reservations.
1367 This property can also be referred to by its shortened column name,
1368 .Sy reserv .
1369 .It Sy secondarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1370 Controls what is cached in the secondary cache
1371 .Pq L2ARC .
1372 If this property is set to
1373 .Sy all ,
1374 then both user data and metadata is cached.
1375 If this property is set to
1376 .Sy none ,
1377 then neither user data nor metadata is cached.
1378 If this property is set to
1379 .Sy metadata ,
1380 then only metadata is cached.
1381 The default value is
1382 .Sy all .
1383 .It Sy setuid Ns = Ns Sy on Ns | Ns Sy off
1384 Controls whether the setuid bit is respected for the file system.
1385 The default value is
1386 .Sy on .
1387 .It Sy sharesmb Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1388 Controls whether the file system is shared via SMB, and what options are to be
1389 used.
1390 A file system with the
1391 .Sy sharesmb
1392 property set to
1393 .Sy off
1394 is managed through traditional tools such as
1395 .Xr sharemgr 1M .
1396 Otherwise, the file system is automatically shared and unshared with the
1397 .Nm zfs Cm share
1399 .Nm zfs Cm unshare
1400 commands.
1401 If the property is set to
1402 .Sy on ,
1404 .Xr sharemgr 1M
1405 command is invoked with no options.
1406 Otherwise, the
1407 .Xr sharemgr 1M
1408 command is invoked with options equivalent to the contents of this property.
1410 Because SMB shares requires a resource name, a unique resource name is
1411 constructed from the dataset name.
1412 The constructed name is a copy of the dataset name except that the characters in
1413 the dataset name, which would be illegal in the resource name, are replaced with
1414 underscore
1415 .Pq Sy _
1416 characters.
1417 A pseudo property
1418 .Qq name
1419 is also supported that allows you to replace the data set name with a specified
1420 name.
1421 The specified name is then used to replace the prefix dataset in the case of
1422 inheritance.
1423 For example, if the dataset
1424 .Em data/home/john
1425 is set to
1426 .Sy name Ns = Ns Sy john ,
1427 then
1428 .Em data/home/john
1429 has a resource name of
1430 .Sy john .
1431 If a child dataset
1432 .Em data/home/john/backups
1433 is shared, it has a resource name of
1434 .Sy john_backups .
1436 When SMB shares are created, the SMB share name appears as an entry in the
1437 .Pa .zfs/shares
1438 directory.
1439 You can use the
1440 .Nm ls
1442 .Nm chmod
1443 command to display the share-level ACLs on the entries in this directory.
1445 When the
1446 .Sy sharesmb
1447 property is changed for a dataset, the dataset and any children inheriting the
1448 property are re-shared with the new options, only if the property was previously
1449 set to
1450 .Sy off ,
1451 or if they were shared before the property was changed.
1452 If the new property is set to
1453 .Sy off ,
1454 the file systems are unshared.
1455 .It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1456 Controls whether the file system is shared via NFS, and what options are to be
1457 used.
1458 A file system with a
1459 .Sy sharenfs
1460 property of
1461 .Sy off
1462 is managed through traditional tools such as
1463 .Xr share 1M ,
1464 .Xr unshare 1M ,
1466 .Xr dfstab 4 .
1467 Otherwise, the file system is automatically shared and unshared with the
1468 .Nm zfs Cm share
1470 .Nm zfs Cm unshare
1471 commands.
1472 If the property is set to
1473 .Sy on ,
1474 .Xr share 1M
1475 command is invoked with no options.
1476 Otherwise, the
1477 .Xr share 1M
1478 command is invoked with options equivalent to the contents of this property.
1480 When the
1481 .Sy sharenfs
1482 property is changed for a dataset, the dataset and any children inheriting the
1483 property are re-shared with the new options, only if the property was previously
1484 .Sy off ,
1485 or if they were shared before the property was changed.
1486 If the new property is
1487 .Sy off ,
1488 the file systems are unshared.
1489 .It Sy logbias Ns = Ns Sy latency Ns | Ns Sy throughput
1490 Provide a hint to ZFS about handling of synchronous requests in this dataset.
1492 .Sy logbias
1493 is set to
1494 .Sy latency
1495 .Pq the default ,
1496 ZFS will use pool log devices
1497 .Pq if configured
1498 to handle the requests at low latency.
1500 .Sy logbias
1501 is set to
1502 .Sy throughput ,
1503 ZFS will not use configured pool log devices.
1504 ZFS will instead optimize synchronous operations for global pool throughput and
1505 efficient use of resources.
1506 .It Sy snapdir Ns = Ns Sy hidden Ns | Ns Sy visible
1507 Controls whether the
1508 .Pa .zfs
1509 directory is hidden or visible in the root of the file system as discussed in
1511 .Sx Snapshots
1512 section.
1513 The default value is
1514 .Sy hidden .
1515 .It Sy sync Ns = Ns Sy standard Ns | Ns Sy always Ns | Ns Sy disabled
1516 Controls the behavior of synchronous requests
1517 .Pq e.g. fsync, O_DSYNC .
1518 .Sy standard
1519 is the
1520 .Tn POSIX
1521 specified behavior of ensuring all synchronous requests are written to stable
1522 storage and all devices are flushed to ensure data is not cached by device
1523 controllers
1524 .Pq this is the default .
1525 .Sy always
1526 causes every file system transaction to be written and flushed before its
1527 system call returns.
1528 This has a large performance penalty.
1529 .Sy disabled
1530 disables synchronous requests.
1531 File system transactions are only committed to stable storage periodically.
1532 This option will give the highest performance.
1533 However, it is very dangerous as ZFS would be ignoring the synchronous
1534 transaction demands of applications such as databases or NFS.
1535 Administrators should only use this option when the risks are understood.
1536 .It Sy version Ns = Ns Em N Ns | Ns Sy current
1537 The on-disk version of this file system, which is independent of the pool
1538 version.
1539 This property can only be set to later supported versions.
1540 See the
1541 .Nm zfs Cm upgrade
1542 command.
1543 .It Sy volsize Ns = Ns Em size
1544 For volumes, specifies the logical size of the volume.
1545 By default, creating a volume establishes a reservation of equal size.
1546 For storage pools with a version number of 9 or higher, a
1547 .Sy refreservation
1548 is set instead.
1549 Any changes to
1550 .Sy volsize
1551 are reflected in an equivalent change to the reservation
1552 .Po or
1553 .Sy refreservation
1554 .Pc .
1556 .Sy volsize
1557 can only be set to a multiple of
1558 .Sy volblocksize ,
1559 and cannot be zero.
1561 The reservation is kept equal to the volume's logical size to prevent unexpected
1562 behavior for consumers.
1563 Without the reservation, the volume could run out of space, resulting in
1564 undefined behavior or data corruption, depending on how the volume is used.
1565 These effects can also occur when the volume size is changed while it is in use
1566 .Pq particularly when shrinking the size .
1567 Extreme care should be used when adjusting the volume size.
1569 Though not recommended, a
1570 .Qq sparse volume
1571 .Po also known as
1572 .Qq thin provisioning
1574 can be created by specifying the
1575 .Fl s
1576 option to the
1577 .Nm zfs Cm create Fl V
1578 command, or by changing the reservation after the volume has been created.
1580 .Qq sparse volume
1581 is a volume where the reservation is less then the volume size.
1582 Consequently, writes to a sparse volume can fail with
1583 .Er ENOSPC
1584 when the pool is low on space.
1585 For a sparse volume, changes to
1586 .Sy volsize
1587 are not reflected in the reservation.
1588 .It Sy vscan Ns = Ns Sy on Ns | Ns Sy off
1589 Controls whether regular files should be scanned for viruses when a file is
1590 opened and closed.
1591 In addition to enabling this property, the virus scan service must also be
1592 enabled for virus scanning to occur.
1593 The default value is
1594 .Sy off .
1595 .It Sy xattr Ns = Ns Sy on Ns | Ns Sy off
1596 Controls whether extended attributes are enabled for this file system.
1597 The default value is
1598 .Sy on .
1599 .It Sy zoned Ns = Ns Sy on Ns | Ns Sy off
1600 Controls whether the dataset is managed from a non-global zone.
1601 See the
1602 .Sx Zones
1603 section for more information.
1604 The default value is
1605 .Sy off .
1608 The following three properties cannot be changed after the file system is
1609 created, and therefore, should be set when the file system is created.
1610 If the properties are not set with the
1611 .Nm zfs Cm create
1613 .Nm zpool Cm create
1614 commands, these properties are inherited from the parent dataset.
1615 If the parent dataset lacks these properties due to having been created prior to
1616 these features being supported, the new file system will have the default values
1617 for these properties.
1618 .Bl -tag -width ""
1619 .It Xo
1620 .Sy casesensitivity Ns = Ns Sy sensitive Ns | Ns
1621 .Sy insensitive Ns | Ns Sy mixed
1623 Indicates whether the file name matching algorithm used by the file system
1624 should be case-sensitive, case-insensitive, or allow a combination of both
1625 styles of matching.
1626 The default value for the
1627 .Sy casesensitivity
1628 property is
1629 .Sy sensitive .
1630 Traditionally,
1633 .Tn POSIX
1634 file systems have case-sensitive file names.
1637 .Sy mixed
1638 value for the
1639 .Sy casesensitivity
1640 property indicates that the file system can support requests for both
1641 case-sensitive and case-insensitive matching behavior.
1642 Currently, case-insensitive matching behavior on a file system that supports
1643 mixed behavior is limited to the SMB server product.
1644 For more information about the
1645 .Sy mixed
1646 value behavior, see the "ZFS Administration Guide".
1647 .It Xo
1648 .Sy normalization Ns = Ns Sy none Ns | Ns Sy formC Ns | Ns
1649 .Sy formD Ns | Ns Sy formKC Ns | Ns Sy formKD
1651 Indicates whether the file system should perform a
1652 .Sy unicode
1653 normalization of file names whenever two file names are compared, and which
1654 normalization algorithm should be used.
1655 File names are always stored unmodified, names are normalized as part of any
1656 comparison process.
1657 If this property is set to a legal value other than
1658 .Sy none ,
1659 and the
1660 .Sy utf8only
1661 property was left unspecified, the
1662 .Sy utf8only
1663 property is automatically set to
1664 .Sy on .
1665 The default value of the
1666 .Sy normalization
1667 property is
1668 .Sy none .
1669 This property cannot be changed after the file system is created.
1670 .It Sy utf8only Ns = Ns Sy on Ns | Ns Sy off
1671 Indicates whether the file system should reject file names that include
1672 characters that are not present in the
1673 .Sy UTF-8
1674 character code set.
1675 If this property is explicitly set to
1676 .Sy off ,
1677 the normalization property must either not be explicitly set or be set to
1678 .Sy none .
1679 The default value for the
1680 .Sy utf8only
1681 property is
1682 .Sy off .
1683 This property cannot be changed after the file system is created.
1687 .Sy casesensitivity ,
1688 .Sy normalization ,
1690 .Sy utf8only
1691 properties are also new permissions that can be assigned to non-privileged users
1692 by using the ZFS delegated administration feature.
1693 .Ss "Temporary Mount Point Properties"
1694 When a file system is mounted, either through
1695 .Xr mount 1M
1696 for legacy mounts or the
1697 .Nm zfs Cm mount
1698 command for normal file systems, its mount options are set according to its
1699 properties.
1700 The correlation between properties and mount options is as follows:
1701 .Bd -literal
1702     PROPERTY                MOUNT OPTION
1703     devices                 devices/nodevices
1704     exec                    exec/noexec
1705     readonly                ro/rw
1706     setuid                  setuid/nosetuid
1707     xattr                   xattr/noxattr
1710 In addition, these options can be set on a per-mount basis using the
1711 .Fl o
1712 option, without affecting the property that is stored on disk.
1713 The values specified on the command line override the values stored in the
1714 dataset.
1716 .Sy nosuid
1717 option is an alias for
1718 .Sy nodevices Ns , Ns Sy nosetuid .
1719 These properties are reported as
1720 .Qq temporary
1721 by the
1722 .Nm zfs Cm get
1723 command.
1724 If the properties are changed while the dataset is mounted, the new setting
1725 overrides any temporary settings.
1726 .Ss "User Properties"
1727 In addition to the standard native properties, ZFS supports arbitrary user
1728 properties.
1729 User properties have no effect on ZFS behavior, but applications or
1730 administrators can use them to annotate datasets
1731 .Pq file systems, volumes, and snapshots .
1733 User property names must contain a colon
1734 .Pq Qq Sy \&:
1735 character to distinguish them from native properties.
1736 They may contain lowercase letters, numbers, and the following punctuation
1737 characters: colon
1738 .Pq Qq Sy \&: ,
1739 dash
1740 .Pq Qq Sy - ,
1741 period
1742 .Pq Qq Sy \&. ,
1743 and underscore
1744 .Pq Qq Sy _ .
1745 The expected convention is that the property name is divided into two portions
1746 such as
1747 .Em module Ns : Ns Em property ,
1748 but this namespace is not enforced by ZFS.
1749 User property names can be at most 256 characters, and cannot begin with a dash
1750 .Pq Qq Sy - .
1752 When making programmatic use of user properties, it is strongly suggested to use
1753 a reversed
1754 .Sy DNS
1755 domain name for the
1756 .Em module
1757 component of property names to reduce the chance that two
1758 independently-developed packages use the same property name for different
1759 purposes.
1761 The values of user properties are arbitrary strings, are always inherited, and
1762 are never validated.
1763 All of the commands that operate on properties
1764 .Po Nm zfs Cm list ,
1765 .Nm zfs Cm get ,
1766 .Nm zfs Cm set ,
1767 and so forth
1769 can be used to manipulate both native properties and user properties.
1770 Use the
1771 .Nm zfs Cm inherit
1772 command to clear a user property.
1773 If the property is not defined in any parent dataset, it is removed entirely.
1774 Property values are limited to 8192 bytes.
1775 .Ss ZFS Volumes as Swap or Dump Devices
1776 During an initial installation a swap device and dump device are created on ZFS
1777 volumes in the ZFS root pool.
1778 By default, the swap area size is based on 1/2 the size of physical memory up to
1779 2 Gbytes.
1780 The size of the dump device depends on the kernel's requirements at installation
1781 time.
1782 Separate ZFS volumes must be used for the swap area and dump devices.
1783 Do not swap to a file on a ZFS file system.
1784 A ZFS swap file configuration is not supported.
1786 If you need to change your swap area or dump device after the system is
1787 installed or upgraded, use the
1788 .Xr swap 1M
1790 .Xr dumpadm 1M
1791 commands.
1792 .Sh SUBCOMMANDS
1793 All subcommands that modify state are logged persistently to the pool in their
1794 original form.
1795 .Bl -tag -width ""
1796 .It Nm Fl \?
1797 Displays a help message.
1798 .It Xo
1800 .Cm create
1801 .Op Fl p
1802 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1803 .Ar filesystem
1805 Creates a new ZFS file system.
1806 The file system is automatically mounted according to the
1807 .Sy mountpoint
1808 property inherited from the parent.
1809 .Bl -tag -width "-o"
1810 .It Fl o Ar property Ns = Ns Ar value
1811 Sets the specified property as if the command
1812 .Nm zfs Cm set Ar property Ns = Ns Ar value
1813 was invoked at the same time the dataset was created.
1814 Any editable ZFS property can also be set at creation time.
1815 Multiple
1816 .Fl o
1817 options can be specified.
1818 An error results if the same property is specified in multiple
1819 .Fl o
1820 options.
1821 .It Fl p
1822 Creates all the non-existing parent datasets.
1823 Datasets created in this manner are automatically mounted according to the
1824 .Sy mountpoint
1825 property inherited from their parent.
1826 Any property specified on the command line using the
1827 .Fl o
1828 option is ignored.
1829 If the target filesystem already exists, the operation completes successfully.
1831 .It Xo
1833 .Cm create
1834 .Op Fl ps
1835 .Op Fl b Ar blocksize
1836 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1837 .Fl V Ar size Ar volume
1839 Creates a volume of the given size.
1840 The volume is exported as a block device in
1841 .Pa /dev/zvol/{dsk,rdsk}/path ,
1842 where
1843 .Em path
1844 is the name of the volume in the ZFS namespace.
1845 The size represents the logical size as exported by the device.
1846 By default, a reservation of equal size is created.
1848 .Ar size
1849 is automatically rounded up to the nearest 128 Kbytes to ensure that the volume
1850 has an integral number of blocks regardless of
1851 .Sy blocksize .
1852 .Bl -tag -width "-b"
1853 .It Fl b Ar blocksize
1854 Equivalent to
1855 .Fl o Sy volblocksize Ns = Ns Ar blocksize .
1856 If this option is specified in conjunction with
1857 .Fl o Sy volblocksize ,
1858 the resulting behavior is undefined.
1859 .It Fl o Ar property Ns = Ns Ar value
1860 Sets the specified property as if the
1861 .Nm zfs Cm set Ar property Ns = Ns Ar value
1862 command was invoked at the same time the dataset was created.
1863 Any editable ZFS property can also be set at creation time.
1864 Multiple
1865 .Fl o
1866 options can be specified.
1867 An error results if the same property is specified in multiple
1868 .Fl o
1869 options.
1870 .It Fl p
1871 Creates all the non-existing parent datasets.
1872 Datasets created in this manner are automatically mounted according to the
1873 .Sy mountpoint
1874 property inherited from their parent.
1875 Any property specified on the command line using the
1876 .Fl o
1877 option is ignored.
1878 If the target filesystem already exists, the operation completes successfully.
1879 .It Fl s
1880 Creates a sparse volume with no reservation.
1882 .Sy volsize
1883 in the
1884 .Sx Native Properties
1885 section for more information about sparse volumes.
1887 .It Xo
1889 .Cm destroy
1890 .Op Fl Rfnprv
1891 .Ar filesystem Ns | Ns Ar volume
1893 Destroys the given dataset.
1894 By default, the command unshares any file systems that are currently shared,
1895 unmounts any file systems that are currently mounted, and refuses to destroy a
1896 dataset that has active dependents
1897 .Pq children or clones .
1898 .Bl -tag -width "-R"
1899 .It Fl R
1900 Recursively destroy all dependents, including cloned file systems outside the
1901 target hierarchy.
1902 .It Fl f
1903 Force an unmount of any file systems using the
1904 .Nm unmount Fl f
1905 command.
1906 This option has no effect on non-file systems or unmounted file systems.
1907 .It Fl n
1908 Do a dry-run
1909 .Pq Qq No-op
1910 deletion.
1911 No data will be deleted.
1912 This is useful in conjunction with the
1913 .Fl v
1915 .Fl p
1916 flags to determine what data would be deleted.
1917 .It Fl p
1918 Print machine-parsable verbose information about the deleted data.
1919 .It Fl r
1920 Recursively destroy all children.
1921 .It Fl v
1922 Print verbose information about the deleted data.
1925 Extreme care should be taken when applying either the
1926 .Fl r
1927 or the
1928 .Fl R
1929 options, as they can destroy large portions of a pool and cause unexpected
1930 behavior for mounted file systems in use.
1931 .It Xo
1933 .Cm destroy
1934 .Op Fl Rdnprv
1935 .Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns
1936 .Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ...
1938 The given snapshots are destroyed immediately if and only if the
1939 .Nm zfs Cm destroy
1940 command without the
1941 .Fl d
1942 option would have destroyed it.
1943 Such immediate destruction would occur, for example, if the snapshot had no
1944 clones and the user-initiated reference count were zero.
1946 If a snapshot does not qualify for immediate destruction, it is marked for
1947 deferred deletion.
1948 In this state, it exists as a usable, visible snapshot until both of the
1949 preconditions listed above are met, at which point it is destroyed.
1951 An inclusive range of snapshots may be specified by separating the first and
1952 last snapshots with a percent sign.
1953 The first and/or last snapshots may be left blank, in which case the
1954 filesystem's oldest or newest snapshot will be implied.
1956 Multiple snapshots
1957 .Pq or ranges of snapshots
1958 of the same filesystem or volume may be specified in a comma-separated list of
1959 snapshots.
1960 Only the snapshot's short name
1961 .Po the part after the
1962 .Sy @
1964 should be specified when using a range or comma-separated list to identify
1965 multiple snapshots.
1966 .Bl -tag -width "-R"
1967 .It Fl R
1968 Recursively destroy all clones of these snapshots, including the clones,
1969 snapshots, and children.
1970 If this flag is specified, the
1971 .Fl d
1972 flag will have no effect.
1973 .It Fl d
1974 Defer snapshot deletion.
1975 .It Fl n
1976 Do a dry-run
1977 .Pq Qq No-op
1978 deletion.
1979 No data will be deleted.
1980 This is useful in conjunction with the
1981 .Fl p
1983 .Fl v
1984 flags to determine what data would be deleted.
1985 .It Fl p
1986 Print machine-parsable verbose information about the deleted data.
1987 .It Fl r
1988 Destroy
1989 .Pq or mark for deferred deletion
1990 all snapshots with this name in descendent file systems.
1991 .It Fl v
1992 Print verbose information about the deleted data.
1994 Extreme care should be taken when applying either the
1995 .Fl r
1996 or the
1997 .Fl R
1998 options, as they can destroy large portions of a pool and cause unexpected
1999 behavior for mounted file systems in use.
2001 .It Xo
2003 .Cm destroy
2004 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
2006 The given bookmark is destroyed.
2007 .It Xo
2009 .Cm snapshot
2010 .Op Fl r
2011 .Oo Fl o Ar property Ns = Ns value Oc Ns ...
2012 .Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ...
2014 Creates snapshots with the given names.
2015 All previous modifications by successful system calls to the file system are
2016 part of the snapshots.
2017 Snapshots are taken atomically, so that all snapshots correspond to the same
2018 moment in time.
2019 See the
2020 .Sx Snapshots
2021 section for details.
2022 .Bl -tag -width "-o"
2023 .It Fl o Ar property Ns = Ns Ar value
2024 Sets the specified property; see
2025 .Nm zfs Cm create
2026 for details.
2027 .It Fl r
2028 Recursively create snapshots of all descendent datasets
2030 .It Xo
2032 .Cm rollback
2033 .Op Fl Rfr
2034 .Ar snapshot
2036 Roll back the given dataset to a previous snapshot.
2037 When a dataset is rolled back, all data that has changed since the snapshot is
2038 discarded, and the dataset reverts to the state at the time of the snapshot.
2039 By default, the command refuses to roll back to a snapshot other than the most
2040 recent one.
2041 In order to do so, all intermediate snapshots and bookmarks must be destroyed by
2042 specifying the
2043 .Fl r
2044 option.
2047 .Fl rR
2048 options do not recursively destroy the child snapshots of a recursive snapshot.
2049 Only direct snapshots of the specified filesystem are destroyed by either of
2050 these options.
2051 To completely roll back a recursive snapshot, you must rollback the individual
2052 child snapshots.
2053 .Bl -tag -width "-R"
2054 .It Fl R
2055 Destroy any more recent snapshots and bookmarks, as well as any clones of those
2056 snapshots.
2057 .It Fl f
2058 Used with the
2059 .Fl R
2060 option to force an unmount of any clone file systems that are to be destroyed.
2061 .It Fl r
2062 Destroy any snapshots and bookmarks more recent than the one specified.
2064 .It Xo
2066 .Cm clone
2067 .Op Fl p
2068 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
2069 .Ar snapshot Ar filesystem Ns | Ns Ar volume
2071 Creates a clone of the given snapshot.
2072 See the
2073 .Sx Clones
2074 section for details.
2075 The target dataset can be located anywhere in the ZFS hierarchy, and is created
2076 as the same type as the original.
2077 .Bl -tag -width "-o"
2078 .It Fl o Ar property Ns = Ns Ar value
2079 Sets the specified property; see
2080 .Nm zfs Cm create
2081 for details.
2082 .It Fl p
2083 Creates all the non-existing parent datasets.
2084 Datasets created in this manner are automatically mounted according to the
2085 .Sy mountpoint
2086 property inherited from their parent.
2087 If the target filesystem or volume already exists, the operation completes
2088 successfully.
2090 .It Xo
2092 .Cm promote
2093 .Ar clone-filesystem
2095 Promotes a clone file system to no longer be dependent on its
2096 .Qq origin
2097 snapshot.
2098 This makes it possible to destroy the file system that the clone was created
2099 from.
2100 The clone parent-child dependency relationship is reversed, so that the origin
2101 file system becomes a clone of the specified file system.
2103 The snapshot that was cloned, and any snapshots previous to this snapshot, are
2104 now owned by the promoted clone.
2105 The space they use moves from the origin file system to the promoted clone, so
2106 enough space must be available to accommodate these snapshots.
2107 No new space is consumed by this operation, but the space accounting is
2108 adjusted.
2109 The promoted clone must not have any conflicting snapshot names of its own.
2111 .Cm rename
2112 subcommand can be used to rename any conflicting snapshots.
2113 .It Xo
2115 .Cm rename
2116 .Op Fl f
2117 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2118 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2121 .Cm rename
2122 .Op Fl fp
2123 .Ar filesystem Ns | Ns Ar volume
2124 .Ar filesystem Ns | Ns Ar volume
2126 Renames the given dataset.
2127 The new target can be located anywhere in the ZFS hierarchy, with the exception
2128 of snapshots.
2129 Snapshots can only be renamed within the parent file system or volume.
2130 When renaming a snapshot, the parent file system of the snapshot does not need
2131 to be specified as part of the second argument.
2132 Renamed file systems can inherit new mount points, in which case they are
2133 unmounted and remounted at the new mount point.
2134 .Bl -tag -width "-a"
2135 .It Fl f
2136 Force unmount any filesystems that need to be unmounted in the process.
2137 .It Fl p
2138 Creates all the nonexistent parent datasets.
2139 Datasets created in this manner are automatically mounted according to the
2140 .Sy mountpoint
2141 property inherited from their parent.
2143 .It Xo
2145 .Cm rename
2146 .Fl r
2147 .Ar snapshot Ar snapshot
2149 Recursively rename the snapshots of all descendent datasets.
2150 Snapshots are the only dataset that can be renamed recursively.
2151 .It Xo
2153 .Cm list
2154 .Op Fl r Ns | Ns Fl d Ar depth
2155 .Op Fl Hp
2156 .Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc
2157 .Oo Fl s Ar property Oc Ns ...
2158 .Oo Fl S Ar property Oc Ns ...
2159 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2160 .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ...
2162 Lists the property information for the given datasets in tabular form.
2163 If specified, you can list property information by the absolute pathname or the
2164 relative pathname.
2165 By default, all file systems and volumes are displayed.
2166 Snapshots are displayed if the
2167 .Sy listsnaps
2168 property is
2169 .Sy on
2170 .Po the default is
2171 .Sy off
2172 .Pc .
2173 The following fields are displayed,
2174 .Sy name Ns , Ns Sy used Ns , Ns Sy available Ns , Ns Sy referenced Ns , Ns
2175 .Sy mountpoint .
2176 .Bl -tag -width "-H"
2177 .It Fl H
2178 Used for scripting mode.
2179 Do not print headers and separate fields by a single tab instead of arbitrary
2180 white space.
2181 .It Fl S Ar property
2182 Same as the
2183 .Fl s
2184 option, but sorts by property in descending order.
2185 .It Fl d Ar depth
2186 Recursively display any children of the dataset, limiting the recursion to
2187 .Ar depth .
2189 .Ar depth
2191 .Sy 1
2192 will display only the dataset and its direct children.
2193 .It Fl o Ar property
2194 A comma-separated list of properties to display.
2195 The property must be:
2196 .Bl -bullet
2198 One of the properties described in the
2199 .Sx Native Properties
2200 section
2202 A user property
2204 The value
2205 .Sy name
2206 to display the dataset name
2208 The value
2209 .Sy space
2210 to display space usage properties on file systems and volumes.
2211 This is a shortcut for specifying
2212 .Fl o Sy name Ns , Ns Sy avail Ns , Ns Sy used Ns , Ns Sy usedsnap Ns , Ns
2213 .Sy usedds Ns , Ns Sy usedrefreserv Ns , Ns Sy usedchild Fl t
2214 .Sy filesystem Ns , Ns Sy volume
2215 syntax.
2217 .It Fl p
2218 Display numbers in parsable
2219 .Pq exact
2220 values.
2221 .It Fl r
2222 Recursively display any children of the dataset on the command line.
2223 .It Fl s Ar property
2224 A property for sorting the output by column in ascending order based on the
2225 value of the property.
2226 The property must be one of the properties described in the
2227 .Sx Properties
2228 section, or the special value
2229 .Sy name
2230 to sort by the dataset name.
2231 Multiple properties can be specified at one time using multiple
2232 .Fl s
2233 property options.
2234 Multiple
2235 .Fl s
2236 options are evaluated from left to right in decreasing order of importance.
2237 The following is a list of sorting criteria:
2238 .Bl -bullet
2240 Numeric types sort in numeric order.
2242 String types sort in alphabetical order.
2244 Types inappropriate for a row sort that row to the literal bottom, regardless of
2245 the specified ordering.
2248 If no sorting options are specified the existing behavior of
2249 .Nm zfs Cm list
2250 is preserved.
2251 .It Fl t Ar type
2252 A comma-separated list of types to display, where
2253 .Ar type
2254 is one of
2255 .Sy filesystem ,
2256 .Sy snapshot ,
2257 .Sy volume ,
2258 .Sy bookmark ,
2260 .Sy all .
2261 For example, specifying
2262 .Fl t Sy snapshot
2263 displays only snapshots.
2265 .It Xo
2267 .Cm set
2268 .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ...
2269 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2271 Sets the property or list of properties to the given value(s) for each dataset.
2272 Only some properties can be edited.
2273 See the
2274 .Sx Properties
2275 section for more information on what properties can be set and acceptable
2276 values.
2277 Numeric values can be specified as exact values, or in a human-readable form
2278 with a suffix of
2279 .Sy B , K , M , G , T , P , E , Z
2280 .Po for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes,
2281 or zettabytes, respectively
2282 .Pc .
2283 User properties can be set on snapshots.
2284 For more information, see the
2285 .Sx User Properties
2286 section.
2287 .It Xo
2289 .Cm get
2290 .Op Fl r Ns | Ns Fl d Ar depth
2291 .Op Fl Hp
2292 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2293 .Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc
2294 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2295 .Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ...
2296 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Ns ...
2298 Displays properties for the given datasets.
2299 If no datasets are specified, then the command displays properties for all
2300 datasets on the system.
2301 For each property, the following columns are displayed:
2302 .Bd -literal
2303     name      Dataset name
2304     property  Property name
2305     value     Property value
2306     source    Property source.  Can either be local, default,
2307               temporary, inherited, or none (-).
2310 All columns are displayed by default, though this can be controlled by using the
2311 .Fl o
2312 option.
2313 This command takes a comma-separated list of properties as described in the
2314 .Sx Native Properties
2316 .Sx User Properties
2317 sections.
2319 The special value
2320 .Sy all
2321 can be used to display all properties that apply to the given dataset's type
2322 .Pq filesystem, volume, snapshot, or bookmark .
2323 .Bl -tag -width "-H"
2324 .It Fl H
2325 Display output in a form more easily parsed by scripts.
2326 Any headers are omitted, and fields are explicitly separated by a single tab
2327 instead of an arbitrary amount of space.
2328 .It Fl d Ar depth
2329 Recursively display any children of the dataset, limiting the recursion to
2330 .Ar depth .
2331 A depth of
2332 .Sy 1
2333 will display only the dataset and its direct children.
2334 .It Fl o Ar field
2335 A comma-separated list of columns to display.
2336 .Sy name Ns , Ns Sy property Ns , Ns Sy value Ns , Ns Sy source
2337 is the default value.
2338 .It Fl p
2339 Display numbers in parsable
2340 .Pq exact
2341 values.
2342 .It Fl r
2343 Recursively display properties for any children.
2344 .It Fl s Ar source
2345 A comma-separated list of sources to display.
2346 Those properties coming from a source other than those in this list are ignored.
2347 Each source must be one of the following:
2348 .Sy local ,
2349 .Sy default ,
2350 .Sy inherited ,
2351 .Sy temporary ,
2353 .Sy none .
2354 The default value is all sources.
2355 .It Fl t Ar type
2356 A comma-separated list of types to display, where
2357 .Ar type
2358 is one of
2359 .Sy filesystem ,
2360 .Sy snapshot ,
2361 .Sy volume ,
2362 .Sy bookmark ,
2364 .Sy all .
2366 .It Xo
2368 .Cm inherit
2369 .Op Fl rS
2370 .Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2372 Clears the specified property, causing it to be inherited from an ancestor,
2373 restored to default if no ancestor has the property set, or with the
2374 .Fl S
2375 option reverted to the received value if one exists.
2376 See the
2377 .Sx Properties
2378 section for a listing of default values, and details on which properties can be
2379 inherited.
2380 .Bl -tag -width "-r"
2381 .It Fl r
2382 Recursively inherit the given property for all children.
2383 .It Fl S
2384 Revert the property to the received value if one exists; otherwise operate as
2385 if the
2386 .Fl S
2387 option was not specified.
2389 .It Xo
2391 .Cm upgrade
2393 Displays a list of file systems that are not the most recent version.
2394 .It Xo
2396 .Cm upgrade
2397 .Fl v
2399 Displays a list of currently supported file system versions.
2400 .It Xo
2402 .Cm upgrade
2403 .Op Fl r
2404 .Op Fl V Ar version
2405 .Fl a | Ar filesystem
2407 Upgrades file systems to a new on-disk version.
2408 Once this is done, the file systems will no longer be accessible on systems
2409 running older versions of the software.
2410 .Nm zfs Cm send
2411 streams generated from new snapshots of these file systems cannot be accessed on
2412 systems running older versions of the software.
2414 In general, the file system version is independent of the pool version.
2416 .Xr zpool 1M
2417 for information on the
2418 .Nm zpool Cm upgrade
2419 command.
2421 In some cases, the file system version and the pool version are interrelated and
2422 the pool version must be upgraded before the file system version can be
2423 upgraded.
2424 .Bl -tag -width "-V"
2425 .It Fl V Ar version
2426 Upgrade to the specified
2427 .Ar version .
2428 If the
2429 .Fl V
2430 flag is not specified, this command upgrades to the most recent version.
2431 This
2432 option can only be used to increase the version number, and only up to the most
2433 recent version supported by this software.
2434 .It Fl a
2435 Upgrade all file systems on all imported pools.
2436 .It Ar filesystem
2437 Upgrade the specified file system.
2438 .It Fl r
2439 Upgrade the specified file system and all descendent file systems.
2441 .It Xo
2443 .Cm userspace
2444 .Op Fl Hinp
2445 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2446 .Oo Fl s Ar field Oc Ns ...
2447 .Oo Fl S Ar field Oc Ns ...
2448 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2449 .Ar filesystem Ns | Ns Ar snapshot
2451 Displays space consumed by, and quotas on, each user in the specified filesystem
2452 or snapshot.
2453 This corresponds to the
2454 .Sy userused@ Ns Em user
2456 .Sy userquota@ Ns Em user
2457 properties.
2458 .Bl -tag -width "-H"
2459 .It Fl H
2460 Do not print headers, use tab-delimited output.
2461 .It Fl S Ar field
2462 Sort by this field in reverse order.
2464 .Fl s .
2465 .It Fl i
2466 Translate SID to POSIX ID.
2467 The POSIX ID may be ephemeral if no mapping exists.
2468 Normal POSIX interfaces
2469 .Po for example,
2470 .Xr stat 2 ,
2471 .Nm ls Fl l
2473 perform this translation, so the
2474 .Fl i
2475 option allows the output from
2476 .Nm zfs Cm userspace
2477 to be compared directly with those utilities.
2478 However,
2479 .Fl i
2480 may lead to confusion if some files were created by an SMB user before a
2481 SMB-to-POSIX name mapping was established.
2482 In such a case, some files will be owned by the SMB entity and some by the POSIX
2483 entity.
2484 However, the
2485 .Fl i
2486 option will report that the POSIX entity has the total usage and quota for both.
2487 .It Fl n
2488 Print numeric ID instead of user/group name.
2489 .It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2490 Display only the specified fields from the following set:
2491 .Sy type ,
2492 .Sy name ,
2493 .Sy used ,
2494 .Sy quota .
2495 The default is to display all fields.
2496 .It Fl p
2497 Use exact
2498 .Pq parsable
2499 numeric output.
2500 .It Fl s Ar field
2501 Sort output by this field.
2503 .Fl s
2505 .Fl S
2506 flags may be specified multiple times to sort first by one field, then by
2507 another.
2508 The default is
2509 .Fl s Sy type Fl s Sy name .
2510 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2511 Print only the specified types from the following set:
2512 .Sy all ,
2513 .Sy posixuser ,
2514 .Sy smbuser ,
2515 .Sy posixgroup ,
2516 .Sy smbgroup .
2517 The default is
2518 .Fl t Sy posixuser Ns , Ns Sy smbuser .
2519 The default can be changed to include group types.
2521 .It Xo
2523 .Cm groupspace
2524 .Op Fl Hinp
2525 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2526 .Oo Fl s Ar field Oc Ns ...
2527 .Oo Fl S Ar field Oc Ns ...
2528 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2529 .Ar filesystem Ns | Ns Ar snapshot
2531 Displays space consumed by, and quotas on, each group in the specified
2532 filesystem or snapshot.
2533 This subcommand is identical to
2534 .Nm zfs Cm userspace ,
2535 except that the default types to display are
2536 .Fl t Sy posixgroup Ns , Ns Sy smbgroup .
2537 .It Xo
2539 .Cm mount
2541 Displays all ZFS file systems currently mounted.
2542 .It Xo
2544 .Cm mount
2545 .Op Fl Ov
2546 .Op Fl o Ar options
2547 .Fl a | Ar filesystem
2549 Mounts ZFS file systems.
2550 .Bl -tag -width "-O"
2551 .It Fl O
2552 Perform an overlay mount.
2554 .Xr mount 1M
2555 for more information.
2556 .It Fl a
2557 Mount all available ZFS file systems.
2558 Invoked automatically as part of the boot process.
2559 .It Ar filesystem
2560 Mount the specified filesystem.
2561 .It Fl o Ar options
2562 An optional, comma-separated list of mount options to use temporarily for the
2563 duration of the mount.
2564 See the
2565 .Sx Temporary Mount Point Properties
2566 section for details.
2567 .It Fl v
2568 Report mount progress.
2570 .It Xo
2572 .Cm unmount
2573 .Op Fl f
2574 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2576 Unmounts currently mounted ZFS file systems.
2577 .Bl -tag -width "-a"
2578 .It Fl a
2579 Unmount all available ZFS file systems.
2580 Invoked automatically as part of the shutdown process.
2581 .It Ar filesystem Ns | Ns Ar mountpoint
2582 Unmount the specified filesystem.
2583 The command can also be given a path to a ZFS file system mount point on the
2584 system.
2585 .It Fl f
2586 Forcefully unmount the file system, even if it is currently in use.
2588 .It Xo
2590 .Cm share
2591 .Fl a | Ar filesystem
2593 Shares available ZFS file systems.
2594 .Bl -tag -width "-a"
2595 .It Fl a
2596 Share all available ZFS file systems.
2597 Invoked automatically as part of the boot process.
2598 .It Ar filesystem
2599 Share the specified filesystem according to the
2600 .Sy sharenfs
2602 .Sy sharesmb
2603 properties.
2604 File systems are shared when the
2605 .Sy sharenfs
2607 .Sy sharesmb
2608 property is set.
2610 .It Xo
2612 .Cm unshare
2613 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2615 Unshares currently shared ZFS file systems.
2616 .Bl -tag -width "-a"
2617 .It Fl a
2618 Unshare all available ZFS file systems.
2619 Invoked automatically as part of the shutdown process.
2620 .It Ar filesystem Ns | Ns Ar mountpoint
2621 Unshare the specified filesystem.
2622 The command can also be given a path to a ZFS file system shared on the system.
2624 .It Xo
2626 .Cm bookmark
2627 .Ar snapshot bookmark
2629 Creates a bookmark of the given snapshot.
2630 Bookmarks mark the point in time when the snapshot was created, and can be used
2631 as the incremental source for a
2632 .Nm zfs Cm send
2633 command.
2635 This feature must be enabled to be used.
2637 .Xr zpool-features 5
2638 for details on ZFS feature flags and the
2639 .Sy bookmarks
2640 feature.
2641 .It Xo
2643 .Cm send
2644 .Op Fl DLPRcenpv
2645 .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
2646 .Ar snapshot
2648 Creates a stream representation of the second
2649 .Ar snapshot ,
2650 which is written to standard output.
2651 The output can be redirected to a file or to a different system
2652 .Po for example, using
2653 .Xr ssh 1
2654 .Pc .
2655 By default, a full stream is generated.
2656 .Bl -tag -width "-D"
2657 .It Fl D, -dedup
2658 Generate a deduplicated stream.
2659 Blocks which would have been sent multiple times in the send stream will only be
2660 sent once.
2661 The receiving system must also support this feature to receive a deduplicated
2662 stream.
2663 This flag can be used regardless of the dataset's
2664 .Sy dedup
2665 property, but performance will be much better if the filesystem uses a
2666 dedup-capable checksum
2667 .Po for example,
2668 .Sy sha256
2669 .Pc .
2670 .It Fl I Ar snapshot
2671 Generate a stream package that sends all intermediary snapshots from the first
2672 snapshot to the second snapshot.
2673 For example,
2674 .Fl I Em @a Em fs@d
2675 is similar to
2676 .Fl i Em @a Em fs@b Ns ; Fl i Em @b Em fs@c Ns ; Fl i Em @c Em fs@d .
2677 The incremental source may be specified as with the
2678 .Fl i
2679 option.
2680 .It Fl L, -large-block
2681 Generate a stream which may contain blocks larger than 128KB.
2682 This flag has no effect if the
2683 .Sy large_blocks
2684 pool feature is disabled, or if the
2685 .Sy recordsize
2686 property of this filesystem has never been set above 128KB.
2687 The receiving system must have the
2688 .Sy large_blocks
2689 pool feature enabled as well.
2691 .Xr zpool-features 5
2692 for details on ZFS feature flags and the
2693 .Sy large_blocks
2694 feature.
2695 .It Fl P, -parsable
2696 Print machine-parsable verbose information about the stream package generated.
2697 .It Fl R, -replicate
2698 Generate a replication stream package, which will replicate the specified
2699 file system, and all descendent file systems, up to the named snapshot.
2700 When received, all properties, snapshots, descendent file systems, and clones
2701 are preserved.
2703 If the
2704 .Fl i
2706 .Fl I
2707 flags are used in conjunction with the
2708 .Fl R
2709 flag, an incremental replication stream is generated.
2710 The current values of properties, and current snapshot and file system names are
2711 set when the stream is received.
2712 If the
2713 .Fl F
2714 flag is specified when this stream is received, snapshots and file systems that
2715 do not exist on the sending side are destroyed.
2716 .It Fl e, -embed
2717 Generate a more compact stream by using
2718 .Sy WRITE_EMBEDDED
2719 records for blocks which are stored more compactly on disk by the
2720 .Sy embedded_data
2721 pool feature.
2722 This flag has no effect if the
2723 .Sy embedded_data
2724 feature is disabled.
2725 The receiving system must have the
2726 .Sy embedded_data
2727 feature enabled.
2728 If the
2729 .Sy lz4_compress
2730 feature is active on the sending system, then the receiving system must have
2731 that feature enabled as well.
2733 .Xr zpool-features 5
2734 for details on ZFS feature flags and the
2735 .Sy embedded_data
2736 feature.
2737 .It Fl c, -compressed
2738 Generate a more compact stream by using compressed WRITE records for blocks
2739 which are compressed on disk and in memory
2740 .Po see the
2741 .Sy compression
2742 property for details
2743 .Pc .
2744 If the
2745 .Sy lz4_compress
2746 feature is active on the sending system, then the receiving system must have
2747 that feature enabled as well.
2748 If the
2749 .Sy large_blocks
2750 feature is enabled on the sending system but the
2751 .Fl L
2752 option is not supplied in conjunction with
2753 .Fl c ,
2754 then the data will be decompressed before sending so it can be split into
2755 smaller block sizes.
2756 .It Fl i Ar snapshot
2757 Generate an incremental stream from the first
2758 .Ar snapshot
2759 .Pq the incremental source
2760 to the second
2761 .Ar snapshot
2762 .Pq the incremental target .
2763 The incremental source can be specified as the last component of the snapshot
2764 name
2765 .Po the
2766 .Sy @
2767 character and following
2769 and it is assumed to be from the same file system as the incremental target.
2771 If the destination is a clone, the source may be the origin snapshot, which must
2772 be fully specified
2773 .Po for example,
2774 .Em pool/fs@origin ,
2775 not just
2776 .Em @origin
2777 .Pc .
2778 .It Fl n, -dryrun
2779 Do a dry-run
2780 .Pq Qq No-op
2781 send.
2782 Do not generate any actual send data.
2783 This is useful in conjunction with the
2784 .Fl v
2786 .Fl P
2787 flags to determine what data will be sent.
2788 In this case, the verbose output will be written to standard output
2789 .Po contrast with a non-dry-run, where the stream is written to standard output
2790 and the verbose output goes to standard error
2791 .Pc .
2792 .It Fl p, -props
2793 Include the dataset's properties in the stream.
2794 This flag is implicit when
2795 .Fl R
2796 is specified.
2797 The receiving system must also support this feature.
2798 .It Fl v, -verbose
2799 Print verbose information about the stream package generated.
2800 This information includes a per-second report of how much data has been sent.
2802 The format of the stream is committed.
2803 You will be able to receive your streams on future versions of ZFS .
2805 .It Xo
2807 .Cm send
2808 .Op Fl Lce
2809 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
2810 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2812 Generate a send stream, which may be of a filesystem, and may be incremental
2813 from a bookmark.
2814 If the destination is a filesystem or volume, the pool must be read-only, or the
2815 filesystem must not be mounted.
2816 When the stream generated from a filesystem or volume is received, the default
2817 snapshot name will be
2818 .Qq --head-- .
2819 .Bl -tag -width "-L"
2820 .It Fl L, -large-block
2821 Generate a stream which may contain blocks larger than 128KB.
2822 This flag has no effect if the
2823 .Sy large_blocks
2824 pool feature is disabled, or if the
2825 .Sy recordsize
2826 property of this filesystem has never been set above 128KB.
2827 The receiving system must have the
2828 .Sy large_blocks
2829 pool feature enabled as well.
2831 .Xr zpool-features 5
2832 for details on ZFS feature flags and the
2833 .Sy large_blocks
2834 feature.
2835 .It Fl c, -compressed
2836 Generate a more compact stream by using compressed WRITE records for blocks
2837 which are compressed on disk and in memory
2838 .Po see the
2839 .Sy compression
2840 property for details
2841 .Pc .
2842 If the
2843 .Sy lz4_compress
2844 feature is active on the sending system, then the receiving system must have
2845 that feature enabled as well.
2846 If the
2847 .Sy large_blocks
2848 feature is enabled on the sending system but the
2849 .Fl L
2850 option is not supplied in conjunction with
2851 .Fl c ,
2852 then the data will be decompressed before sending so it can be split into
2853 smaller block sizes.
2854 .It Fl e, -embed
2855 Generate a more compact stream by using
2856 .Sy WRITE_EMBEDDED
2857 records for blocks which are stored more compactly on disk by the
2858 .Sy embedded_data
2859 pool feature.
2860 This flag has no effect if the
2861 .Sy embedded_data
2862 feature is disabled.
2863 The receiving system must have the
2864 .Sy embedded_data
2865 feature enabled.
2866 If the
2867 .Sy lz4_compress
2868 feature is active on the sending system, then the receiving system must have
2869 that feature enabled as well.
2871 .Xr zpool-features 5
2872 for details on ZFS feature flags and the
2873 .Sy embedded_data
2874 feature.
2875 .It Fl i Ar snapshot Ns | Ns Ar bookmark
2876 Generate an incremental send stream.
2877 The incremental source must be an earlier snapshot in the destination's history.
2878 It will commonly be an earlier snapshot in the destination's file system, in
2879 which case it can be specified as the last component of the name
2880 .Po the
2881 .Sy #
2883 .Sy @
2884 character and following
2885 .Pc .
2887 If the incremental target is a clone, the incremental source can be the origin
2888 snapshot, or an earlier snapshot in the origin's filesystem, or the origin's
2889 origin, etc.
2891 .It Xo
2893 .Cm send
2894 .Op Fl Penv
2895 .Fl t
2896 .Ar receive_resume_token
2898 Creates a send stream which resumes an interrupted receive.
2900 .Ar receive_resume_token
2901 is the value of this property on the filesystem or volume that was being
2902 received into.
2903 See the documentation for
2904 .Sy zfs receive -s
2905 for more details.
2906 .It Xo
2908 .Cm receive
2909 .Op Fl Fnsuv
2910 .Op Fl o Sy origin Ns = Ns Ar snapshot
2911 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2914 .Cm receive
2915 .Op Fl Fnsuv
2916 .Op Fl d Ns | Ns Fl e
2917 .Op Fl o Sy origin Ns = Ns Ar snapshot
2918 .Ar filesystem
2920 Creates a snapshot whose contents are as specified in the stream provided on
2921 standard input.
2922 If a full stream is received, then a new file system is created as well.
2923 Streams are created using the
2924 .Nm zfs Cm send
2925 subcommand, which by default creates a full stream.
2926 .Nm zfs Cm recv
2927 can be used as an alias for
2928 .Nm zfs Cm receive.
2930 If an incremental stream is received, then the destination file system must
2931 already exist, and its most recent snapshot must match the incremental stream's
2932 source.
2934 .Sy zvols ,
2935 the destination device link is destroyed and recreated, which means the
2936 .Sy zvol
2937 cannot be accessed during the
2938 .Cm receive
2939 operation.
2941 When a snapshot replication package stream that is generated by using the
2942 .Nm zfs Cm send Fl R
2943 command is received, any snapshots that do not exist on the sending location are
2944 destroyed by using the
2945 .Nm zfs Cm destroy Fl d
2946 command.
2948 The name of the snapshot
2949 .Pq and file system, if a full stream is received
2950 that this subcommand creates depends on the argument type and the use of the
2951 .Fl d
2953 .Fl e
2954 options.
2956 If the argument is a snapshot name, the specified
2957 .Ar snapshot
2958 is created.
2959 If the argument is a file system or volume name, a snapshot with the same name
2960 as the sent snapshot is created within the specified
2961 .Ar filesystem
2963 .Ar volume .
2964 If neither of the
2965 .Fl d
2967 .Fl e
2968 options are specified, the provided target snapshot name is used exactly as
2969 provided.
2972 .Fl d
2974 .Fl e
2975 options cause the file system name of the target snapshot to be determined by
2976 appending a portion of the sent snapshot's name to the specified target
2977 .Ar filesystem .
2978 If the
2979 .Fl d
2980 option is specified, all but the first element of the sent snapshot's file
2981 system path
2982 .Pq usually the pool name
2983 is used and any required intermediate file systems within the specified one are
2984 created.
2985 If the
2986 .Fl e
2987 option is specified, then only the last element of the sent snapshot's file
2988 system name
2989 .Pq i.e. the name of the source file system itself
2990 is used as the target file system name.
2991 .Bl -tag -width "-F"
2992 .It Fl F
2993 Force a rollback of the file system to the most recent snapshot before
2994 performing the receive operation.
2995 If receiving an incremental replication stream
2996 .Po for example, one generated by
2997 .Nm zfs Cm send Fl R Op Fl i Ns | Ns Fl I
2998 .Pc ,
2999 destroy snapshots and file systems that do not exist on the sending side.
3000 .It Fl d
3001 Discard the first element of the sent snapshot's file system name, using the
3002 remaining elements to determine the name of the target file system for the new
3003 snapshot as described in the paragraph above.
3004 .It Fl e
3005 Discard all but the last element of the sent snapshot's file system name, using
3006 that element to determine the name of the target file system for the new
3007 snapshot as described in the paragraph above.
3008 .It Fl n
3009 Do not actually receive the stream.
3010 This can be useful in conjunction with the
3011 .Fl v
3012 option to verify the name the receive operation would use.
3013 .It Fl o Sy origin Ns = Ns Ar snapshot
3014 Forces the stream to be received as a clone of the given snapshot.
3015 If the stream is a full send stream, this will create the filesystem
3016 described by the stream as a clone of the specified snapshot.
3017 Which snapshot was specified will not affect the success or failure of the
3018 receive, as long as the snapshot does exist.
3019 If the stream is an incremental send stream, all the normal verification will be
3020 performed.
3021 .It Fl u
3022 File system that is associated with the received stream is not mounted.
3023 .It Fl v
3024 Print verbose information about the stream and the time required to perform the
3025 receive operation.
3026 .It Fl s
3027 If the receive is interrupted, save the partially received state, rather
3028 than deleting it.
3029 Interruption may be due to premature termination of the stream
3030 .Po e.g. due to network failure or failure of the remote system
3031 if the stream is being read over a network connection
3032 .Pc ,
3033 a checksum error in the stream, termination of the
3034 .Nm zfs Cm receive
3035 process, or unclean shutdown of the system.
3037 The receive can be resumed with a stream generated by
3038 .Nm zfs Cm send Fl t Ar token ,
3039 where the
3040 .Ar token
3041 is the value of the
3042 .Sy receive_resume_token
3043 property of the filesystem or volume which is received into.
3045 To use this flag, the storage pool must have the
3046 .Sy extensible_dataset
3047 feature enabled.
3049 .Xr zpool-features 5
3050 for details on ZFS feature flags.
3052 .It Xo
3054 .Cm receive
3055 .Fl A
3056 .Ar filesystem Ns | Ns Ar volume
3058 Abort an interrupted
3059 .Nm zfs Cm receive Fl s ,
3060 deleting its saved partially received state.
3061 .It Xo
3063 .Cm allow
3064 .Ar filesystem Ns | Ns Ar volume
3066 Displays permissions that have been delegated on the specified filesystem or
3067 volume.
3068 See the other forms of
3069 .Nm zfs Cm allow
3070 for more information.
3071 .It Xo
3073 .Cm allow
3074 .Op Fl dglu
3075 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3076 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3077 .Ar setname Oc Ns ...
3078 .Ar filesystem Ns | Ns Ar volume
3081 .Cm allow
3082 .Op Fl dl
3083 .Fl e Ns | Ns Sy everyone
3084 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3085 .Ar setname Oc Ns ...
3086 .Ar filesystem Ns | Ns Ar volume
3088 Delegates ZFS administration permission for the file systems to non-privileged
3089 users.
3090 .Bl -tag -width "-d"
3091 .It Fl d
3092 Allow only for the descendent file systems.
3093 .It Fl e Ns | Ns Sy everyone
3094 Specifies that the permissions be delegated to everyone.
3095 .It Fl g Ar group Ns Oo , Ns Ar group Oc Ns ...
3096 Explicitly specify that permissions are delegated to the group.
3097 .It Fl l
3098 Allow
3099 .Qq locally
3100 only for the specified file system.
3101 .It Fl u Ar user Ns Oo , Ns Ar user Oc Ns ...
3102 Explicitly specify that permissions are delegated to the user.
3103 .It Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3104 Specifies to whom the permissions are delegated.
3105 Multiple entities can be specified as a comma-separated list.
3106 If neither of the
3107 .Fl gu
3108 options are specified, then the argument is interpreted preferentially as the
3109 keyword
3110 .Sy everyone ,
3111 then as a user name, and lastly as a group name.
3112 To specify a user or group named
3113 .Qq everyone ,
3114 use the
3115 .Fl g
3117 .Fl u
3118 options.
3119 To specify a group with the same name as a user, use the
3120 .Fl g
3121 options.
3122 .It Xo
3123 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3124 .Ar setname Oc Ns ...
3126 The permissions to delegate.
3127 Multiple permissions may be specified as a comma-separated list.
3128 Permission names are the same as ZFS subcommand and property names.
3129 See the property list below.
3130 Property set names, which begin with
3131 .Sy @ ,
3132 may be specified.
3133 See the
3134 .Fl s
3135 form below for details.
3138 If neither of the
3139 .Fl dl
3140 options are specified, or both are, then the permissions are allowed for the
3141 file system or volume, and all of its descendents.
3143 Permissions are generally the ability to use a ZFS subcommand or change a ZFS
3144 property.
3145 The following permissions are available:
3146 .Bd -literal
3147 NAME             TYPE           NOTES
3148 allow            subcommand     Must also have the permission that is being
3149                                 allowed
3150 clone            subcommand     Must also have the 'create' ability and 'mount'
3151                                 ability in the origin file system
3152 create           subcommand     Must also have the 'mount' ability
3153 destroy          subcommand     Must also have the 'mount' ability
3154 diff             subcommand     Allows lookup of paths within a dataset
3155                                 given an object number, and the ability to
3156                                 create snapshots necessary to 'zfs diff'.
3157 mount            subcommand     Allows mount/umount of ZFS datasets
3158 promote          subcommand     Must also have the 'mount'
3159                                 and 'promote' ability in the origin file system
3160 receive          subcommand     Must also have the 'mount' and 'create' ability
3161 rename           subcommand     Must also have the 'mount' and 'create'
3162                                 ability in the new parent
3163 rollback         subcommand     Must also have the 'mount' ability
3164 send             subcommand
3165 share            subcommand     Allows sharing file systems over NFS or SMB
3166                                 protocols
3167 snapshot         subcommand     Must also have the 'mount' ability
3169 groupquota       other          Allows accessing any groupquota@... property
3170 groupused        other          Allows reading any groupused@... property
3171 userprop         other          Allows changing any user property
3172 userquota        other          Allows accessing any userquota@... property
3173 userused         other          Allows reading any userused@... property
3175 aclinherit       property
3176 aclmode          property
3177 atime            property
3178 canmount         property
3179 casesensitivity  property
3180 checksum         property
3181 compression      property
3182 copies           property
3183 devices          property
3184 exec             property
3185 filesystem_limit property
3186 mountpoint       property
3187 nbmand           property
3188 normalization    property
3189 primarycache     property
3190 quota            property
3191 readonly         property
3192 recordsize       property
3193 refquota         property
3194 refreservation   property
3195 reservation      property
3196 secondarycache   property
3197 setuid           property
3198 sharenfs         property
3199 sharesmb         property
3200 snapdir          property
3201 snapshot_limit   property
3202 utf8only         property
3203 version          property
3204 volblocksize     property
3205 volsize          property
3206 vscan            property
3207 xattr            property
3208 zoned            property
3210 .It Xo
3212 .Cm allow
3213 .Fl c
3214 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3215 .Ar setname Oc Ns ...
3216 .Ar filesystem Ns | Ns Ar volume
3218 Sets
3219 .Qq create time
3220 permissions.
3221 These permissions are granted
3222 .Pq locally
3223 to the creator of any newly-created descendent file system.
3224 .It Xo
3226 .Cm allow
3227 .Fl s No @ Ns Ar setname
3228 .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3229 .Ar setname Oc Ns ...
3230 .Ar filesystem Ns | Ns Ar volume
3232 Defines or adds permissions to a permission set.
3233 The set can be used by other
3234 .Nm zfs Cm allow
3235 commands for the specified file system and its descendents.
3236 Sets are evaluated dynamically, so changes to a set are immediately reflected.
3237 Permission sets follow the same naming restrictions as ZFS file systems, but the
3238 name must begin with
3239 .Sy @ ,
3240 and can be no more than 64 characters long.
3241 .It Xo
3243 .Cm unallow
3244 .Op Fl dglru
3245 .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3246 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3247 .Ar setname Oc Ns ... Oc
3248 .Ar filesystem Ns | Ns Ar volume
3251 .Cm unallow
3252 .Op Fl dlr
3253 .Fl e Ns | Ns Sy everyone
3254 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3255 .Ar setname Oc Ns ... Oc
3256 .Ar filesystem Ns | Ns Ar volume
3259 .Cm unallow
3260 .Op Fl r
3261 .Fl c
3262 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3263 .Ar setname Oc Ns ... Oc
3264 .Ar filesystem Ns | Ns Ar volume
3266 Removes permissions that were granted with the
3267 .Nm zfs Cm allow
3268 command.
3269 No permissions are explicitly denied, so other permissions granted are still in
3270 effect.
3271 For example, if the permission is granted by an ancestor.
3272 If no permissions are specified, then all permissions for the specified
3273 .Ar user ,
3274 .Ar group ,
3276 .Sy everyone
3277 are removed.
3278 Specifying
3279 .Sy everyone
3280 .Po or using the
3281 .Fl e
3282 option
3284 only removes the permissions that were granted to everyone, not all permissions
3285 for every user and group.
3286 See the
3287 .Nm zfs Cm allow
3288 command for a description of the
3289 .Fl ldugec
3290 options.
3291 .Bl -tag -width "-r"
3292 .It Fl r
3293 Recursively remove the permissions from this file system and all descendents.
3295 .It Xo
3297 .Cm unallow
3298 .Op Fl r
3299 .Fl s No @ Ns Ar setname
3300 .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3301 .Ar setname Oc Ns ... Oc
3302 .Ar filesystem Ns | Ns Ar volume
3304 Removes permissions from a permission set.
3305 If no permissions are specified, then all permissions are removed, thus removing
3306 the set entirely.
3307 .It Xo
3309 .Cm hold
3310 .Op Fl r
3311 .Ar tag Ar snapshot Ns ...
3313 Adds a single reference, named with the
3314 .Ar tag
3315 argument, to the specified snapshot or snapshots.
3316 Each snapshot has its own tag namespace, and tags must be unique within that
3317 space.
3319 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3320 .Nm zfs Cm destroy
3321 command return
3322 .Er EBUSY .
3323 .Bl -tag -width "-r"
3324 .It Fl r
3325 Specifies that a hold with the given tag is applied recursively to the snapshots
3326 of all descendent file systems.
3328 .It Xo
3330 .Cm holds
3331 .Op Fl r
3332 .Ar snapshot Ns ...
3334 Lists all existing user references for the given snapshot or snapshots.
3335 .Bl -tag -width "-r"
3336 .It Fl r
3337 Lists the holds that are set on the named descendent snapshots, in addition to
3338 listing the holds on the named snapshot.
3340 .It Xo
3342 .Cm release
3343 .Op Fl r
3344 .Ar tag Ar snapshot Ns ...
3346 Removes a single reference, named with the
3347 .Ar tag
3348 argument, from the specified snapshot or snapshots.
3349 The tag must already exist for each snapshot.
3350 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3351 .Nm zfs Cm destroy
3352 command return
3353 .Er EBUSY .
3354 .Bl -tag -width "-r"
3355 .It Fl r
3356 Recursively releases a hold with the given tag on the snapshots of all
3357 descendent file systems.
3359 .It Xo
3361 .Cm diff
3362 .Op Fl FHt
3363 .Ar snapshot Ar snapshot Ns | Ns Ar filesystem
3365 Display the difference between a snapshot of a given filesystem and another
3366 snapshot of that filesystem from a later time or the current contents of the
3367 filesystem.
3368 The first column is a character indicating the type of change, the other columns
3369 indicate pathname, new pathname
3370 .Pq in case of rename ,
3371 change in link count, and optionally file type and/or change time.
3372 The types of change are:
3373 .Bd -literal
3374 -       The path has been removed
3375 +       The path has been created
3376 M       The path has been modified
3377 R       The path has been renamed
3379 .Bl -tag -width "-F"
3380 .It Fl F
3381 Display an indication of the type of file, in a manner similar to the
3383 option of
3384 .Xr ls 1 .
3385 .Bd -literal
3386 B       Block device
3387 C       Character device
3388 /       Directory
3389 >       Door
3390 |       Named pipe
3391 @       Symbolic link
3392 P       Event port
3393 =       Socket
3394 F       Regular file
3396 .It Fl H
3397 Give more parsable tab-separated output, without header lines and without
3398 arrows.
3399 .It Fl t
3400 Display the path's inode change time as the first column of output.
3402 .It Xo
3404 .Cm program
3405 .Op Fl t Ar timeout
3406 .Op Fl m Ar memory_limit
3407 .Ar pool script
3408 .Op Ar arg1 No ...
3410 Executes
3411 .Ar script
3412 as a ZFS channel program on
3413 .Ar pool .
3414 The ZFS channel
3415 program interface allows ZFS administrative operations to be run
3416 programmatically via a Lua script.
3417 The entire script is executed atomically, with no other administrative
3418 operations taking effect concurrently.
3419 A library of ZFS calls is made available to channel program scripts.
3420 Channel programs may only be run with root privileges.
3422 For full documentation of the ZFS channel program interface, see the manual
3423 page for
3424 .Xr zfs-program 1M .
3425 .Bl -tag -width ""
3426 .It Fl t Ar timeout
3427 Execution time limit, in milliseconds.
3428 If a channel program executes for longer than the provided timeout, it will
3429 be stopped and an error will be returned.
3430 The default timeout is 1000 ms, and can be set to a maximum of 10000 ms.
3431 .It Fl m Ar memory-limit
3432 Memory limit, in bytes.
3433 If a channel program attempts to allocate more memory than the given limit,
3434 it will be stopped and an error returned.
3435 The default memory limit is 10 MB, and can be set to a maximum of 100 MB.
3437 All remaining argument strings are passed directly to the channel program as
3438 arguments.
3440 .Xr zfs-program 1M
3441 for more information.
3444 .Sh EXIT STATUS
3447 utility exits 0 on success, 1 if an error occurs, and 2 if invalid command line
3448 options were specified.
3449 .Sh EXAMPLES
3450 .Bl -tag -width ""
3451 .It Sy Example 1 No Creating a ZFS File System Hierarchy
3452 The following commands create a file system named
3453 .Em pool/home
3454 and a file system named
3455 .Em pool/home/bob .
3456 The mount point
3457 .Pa /export/home
3458 is set for the parent file system, and is automatically inherited by the child
3459 file system.
3460 .Bd -literal
3461 # zfs create pool/home
3462 # zfs set mountpoint=/export/home pool/home
3463 # zfs create pool/home/bob
3465 .It Sy Example 2 No Creating a ZFS Snapshot
3466 The following command creates a snapshot named
3467 .Sy yesterday .
3468 This snapshot is mounted on demand in the
3469 .Pa .zfs/snapshot
3470 directory at the root of the
3471 .Em pool/home/bob
3472 file system.
3473 .Bd -literal
3474 # zfs snapshot pool/home/bob@yesterday
3476 .It Sy Example 3 No Creating and Destroying Multiple Snapshots
3477 The following command creates snapshots named
3478 .Sy yesterday
3480 .Em pool/home
3481 and all of its descendent file systems.
3482 Each snapshot is mounted on demand in the
3483 .Pa .zfs/snapshot
3484 directory at the root of its file system.
3485 The second command destroys the newly created snapshots.
3486 .Bd -literal
3487 # zfs snapshot -r pool/home@yesterday
3488 # zfs destroy -r pool/home@yesterday
3490 .It Sy Example 4 No Disabling and Enabling File System Compression
3491 The following command disables the
3492 .Sy compression
3493 property for all file systems under
3494 .Em pool/home .
3495 The next command explicitly enables
3496 .Sy compression
3498 .Em pool/home/anne .
3499 .Bd -literal
3500 # zfs set compression=off pool/home
3501 # zfs set compression=on pool/home/anne
3503 .It Sy Example 5 No Listing ZFS Datasets
3504 The following command lists all active file systems and volumes in the system.
3505 Snapshots are displayed if the
3506 .Sy listsnaps
3507 property is
3508 .Sy on .
3509 The default is
3510 .Sy off .
3512 .Xr zpool 1M
3513 for more information on pool properties.
3514 .Bd -literal
3515 # zfs list
3516 NAME                      USED  AVAIL  REFER  MOUNTPOINT
3517 pool                      450K   457G    18K  /pool
3518 pool/home                 315K   457G    21K  /export/home
3519 pool/home/anne             18K   457G    18K  /export/home/anne
3520 pool/home/bob             276K   457G   276K  /export/home/bob
3522 .It Sy Example 6 No Setting a Quota on a ZFS File System
3523 The following command sets a quota of 50 Gbytes for
3524 .Em pool/home/bob .
3525 .Bd -literal
3526 # zfs set quota=50G pool/home/bob
3528 .It Sy Example 7 No Listing ZFS Properties
3529 The following command lists all properties for
3530 .Em pool/home/bob .
3531 .Bd -literal
3532 # zfs get all pool/home/bob
3533 NAME           PROPERTY              VALUE                  SOURCE
3534 pool/home/bob  type                  filesystem             -
3535 pool/home/bob  creation              Tue Jul 21 15:53 2009  -
3536 pool/home/bob  used                  21K                    -
3537 pool/home/bob  available             20.0G                  -
3538 pool/home/bob  referenced            21K                    -
3539 pool/home/bob  compressratio         1.00x                  -
3540 pool/home/bob  mounted               yes                    -
3541 pool/home/bob  quota                 20G                    local
3542 pool/home/bob  reservation           none                   default
3543 pool/home/bob  recordsize            128K                   default
3544 pool/home/bob  mountpoint            /pool/home/bob         default
3545 pool/home/bob  sharenfs              off                    default
3546 pool/home/bob  checksum              on                     default
3547 pool/home/bob  compression           on                     local
3548 pool/home/bob  atime                 on                     default
3549 pool/home/bob  devices               on                     default
3550 pool/home/bob  exec                  on                     default
3551 pool/home/bob  setuid                on                     default
3552 pool/home/bob  readonly              off                    default
3553 pool/home/bob  zoned                 off                    default
3554 pool/home/bob  snapdir               hidden                 default
3555 pool/home/bob  aclmode               discard                default
3556 pool/home/bob  aclinherit            restricted             default
3557 pool/home/bob  canmount              on                     default
3558 pool/home/bob  xattr                 on                     default
3559 pool/home/bob  copies                1                      default
3560 pool/home/bob  version               4                      -
3561 pool/home/bob  utf8only              off                    -
3562 pool/home/bob  normalization         none                   -
3563 pool/home/bob  casesensitivity       sensitive              -
3564 pool/home/bob  vscan                 off                    default
3565 pool/home/bob  nbmand                off                    default
3566 pool/home/bob  sharesmb              off                    default
3567 pool/home/bob  refquota              none                   default
3568 pool/home/bob  refreservation        none                   default
3569 pool/home/bob  primarycache          all                    default
3570 pool/home/bob  secondarycache        all                    default
3571 pool/home/bob  usedbysnapshots       0                      -
3572 pool/home/bob  usedbydataset         21K                    -
3573 pool/home/bob  usedbychildren        0                      -
3574 pool/home/bob  usedbyrefreservation  0                      -
3577 The following command gets a single property value.
3578 .Bd -literal
3579 # zfs get -H -o value compression pool/home/bob
3582 The following command lists all properties with local settings for
3583 .Em pool/home/bob .
3584 .Bd -literal
3585 # zfs get -r -s local -o name,property,value all pool/home/bob
3586 NAME           PROPERTY              VALUE
3587 pool/home/bob  quota                 20G
3588 pool/home/bob  compression           on
3590 .It Sy Example 8 No Rolling Back a ZFS File System
3591 The following command reverts the contents of
3592 .Em pool/home/anne
3593 to the snapshot named
3594 .Sy yesterday ,
3595 deleting all intermediate snapshots.
3596 .Bd -literal
3597 # zfs rollback -r pool/home/anne@yesterday
3599 .It Sy Example 9 No Creating a ZFS Clone
3600 The following command creates a writable file system whose initial contents are
3601 the same as
3602 .Em pool/home/bob@yesterday .
3603 .Bd -literal
3604 # zfs clone pool/home/bob@yesterday pool/clone
3606 .It Sy Example 10 No Promoting a ZFS Clone
3607 The following commands illustrate how to test out changes to a file system, and
3608 then replace the original file system with the changed one, using clones, clone
3609 promotion, and renaming:
3610 .Bd -literal
3611 # zfs create pool/project/production
3612   populate /pool/project/production with data
3613 # zfs snapshot pool/project/production@today
3614 # zfs clone pool/project/production@today pool/project/beta
3615   make changes to /pool/project/beta and test them
3616 # zfs promote pool/project/beta
3617 # zfs rename pool/project/production pool/project/legacy
3618 # zfs rename pool/project/beta pool/project/production
3619   once the legacy version is no longer needed, it can be destroyed
3620 # zfs destroy pool/project/legacy
3622 .It Sy Example 11 No Inheriting ZFS Properties
3623 The following command causes
3624 .Em pool/home/bob
3626 .Em pool/home/anne
3627 to inherit the
3628 .Sy checksum
3629 property from their parent.
3630 .Bd -literal
3631 # zfs inherit checksum pool/home/bob pool/home/anne
3633 .It Sy Example 12 No Remotely Replicating ZFS Data
3634 The following commands send a full stream and then an incremental stream to a
3635 remote machine, restoring them into
3636 .Em poolB/received/fs@a
3638 .Em poolB/received/fs@b ,
3639 respectively.
3640 .Em poolB
3641 must contain the file system
3642 .Em poolB/received ,
3643 and must not initially contain
3644 .Em poolB/received/fs .
3645 .Bd -literal
3646 # zfs send pool/fs@a | \e
3647   ssh host zfs receive poolB/received/fs@a
3648 # zfs send -i a pool/fs@b | \e
3649   ssh host zfs receive poolB/received/fs
3651 .It Sy Example 13 No Using the zfs receive -d Option
3652 The following command sends a full stream of
3653 .Em poolA/fsA/fsB@snap
3654 to a remote machine, receiving it into
3655 .Em poolB/received/fsA/fsB@snap .
3657 .Em fsA/fsB@snap
3658 portion of the received snapshot's name is determined from the name of the sent
3659 snapshot.
3660 .Em poolB
3661 must contain the file system
3662 .Em poolB/received .
3664 .Em poolB/received/fsA
3665 does not exist, it is created as an empty file system.
3666 .Bd -literal
3667 # zfs send poolA/fsA/fsB@snap | \e
3668   ssh host zfs receive -d poolB/received
3670 .It Sy Example 14 No Setting User Properties
3671 The following example sets the user-defined
3672 .Sy com.example:department
3673 property for a dataset.
3674 .Bd -literal
3675 # zfs set com.example:department=12345 tank/accounting
3677 .It Sy Example 15 No Performing a Rolling Snapshot
3678 The following example shows how to maintain a history of snapshots with a
3679 consistent naming scheme.
3680 To keep a week's worth of snapshots, the user destroys the oldest snapshot,
3681 renames the remaining snapshots, and then creates a new snapshot, as follows:
3682 .Bd -literal
3683 # zfs destroy -r pool/users@7daysago
3684 # zfs rename -r pool/users@6daysago @7daysago
3685 # zfs rename -r pool/users@5daysago @6daysago
3686 # zfs rename -r pool/users@yesterday @5daysago
3687 # zfs rename -r pool/users@yesterday @4daysago
3688 # zfs rename -r pool/users@yesterday @3daysago
3689 # zfs rename -r pool/users@yesterday @2daysago
3690 # zfs rename -r pool/users@today @yesterday
3691 # zfs snapshot -r pool/users@today
3693 .It Sy Example 16 No Setting sharenfs Property Options on a ZFS File System
3694 The following commands show how to set
3695 .Sy sharenfs
3696 property options to enable
3697 .Sy rw
3698 access for a set of
3699 .Sy IP
3700 addresses and to enable root access for system
3701 .Sy neo
3702 on the
3703 .Em tank/home
3704 file system.
3705 .Bd -literal
3706 # zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home
3709 If you are using
3710 .Sy DNS
3711 for host name resolution, specify the fully qualified hostname.
3712 .It Sy Example 17 No Delegating ZFS Administration Permissions on a ZFS Dataset
3713 The following example shows how to set permissions so that user
3714 .Sy cindys
3715 can create, destroy, mount, and take snapshots on
3716 .Em tank/cindys .
3717 The permissions on
3718 .Em tank/cindys
3719 are also displayed.
3720 .Bd -literal
3721 # zfs allow cindys create,destroy,mount,snapshot tank/cindys
3722 # zfs allow tank/cindys
3723 ---- Permissions on tank/cindys --------------------------------------
3724 Local+Descendent permissions:
3725         user cindys create,destroy,mount,snapshot
3728 Because the
3729 .Em tank/cindys
3730 mount point permission is set to 755 by default, user
3731 .Sy cindys
3732 will be unable to mount file systems under
3733 .Em tank/cindys .
3734 Add an ACE similar to the following syntax to provide mount point access:
3735 .Bd -literal
3736 # chmod A+user:cindys:add_subdirectory:allow /tank/cindys
3738 .It Sy Example 18 No Delegating Create Time Permissions on a ZFS Dataset
3739 The following example shows how to grant anyone in the group
3740 .Sy staff
3741 to create file systems in
3742 .Em tank/users .
3743 This syntax also allows staff members to destroy their own file systems, but not
3744 destroy anyone else's file system.
3745 The permissions on
3746 .Em tank/users
3747 are also displayed.
3748 .Bd -literal
3749 # zfs allow staff create,mount tank/users
3750 # zfs allow -c destroy tank/users
3751 # zfs allow tank/users
3752 ---- Permissions on tank/users ---------------------------------------
3753 Permission sets:
3754         destroy
3755 Local+Descendent permissions:
3756         group staff create,mount
3758 .It Sy Example 19 No Defining and Granting a Permission Set on a ZFS Dataset
3759 The following example shows how to define and grant a permission set on the
3760 .Em tank/users
3761 file system.
3762 The permissions on
3763 .Em tank/users
3764 are also displayed.
3765 .Bd -literal
3766 # zfs allow -s @pset create,destroy,snapshot,mount tank/users
3767 # zfs allow staff @pset tank/users
3768 # zfs allow tank/users
3769 ---- Permissions on tank/users ---------------------------------------
3770 Permission sets:
3771         @pset create,destroy,mount,snapshot
3772 Local+Descendent permissions:
3773         group staff @pset
3775 .It Sy Example 20 No Delegating Property Permissions on a ZFS Dataset
3776 The following example shows to grant the ability to set quotas and reservations
3777 on the
3778 .Em users/home
3779 file system.
3780 The permissions on
3781 .Em users/home
3782 are also displayed.
3783 .Bd -literal
3784 # zfs allow cindys quota,reservation users/home
3785 # zfs allow users/home
3786 ---- Permissions on users/home ---------------------------------------
3787 Local+Descendent permissions:
3788         user cindys quota,reservation
3789 cindys% zfs set quota=10G users/home/marks
3790 cindys% zfs get quota users/home/marks
3791 NAME              PROPERTY  VALUE  SOURCE
3792 users/home/marks  quota     10G    local
3794 .It Sy Example 21 No Removing ZFS Delegated Permissions on a ZFS Dataset
3795 The following example shows how to remove the snapshot permission from the
3796 .Sy staff
3797 group on the
3798 .Em tank/users
3799 file system.
3800 The permissions on
3801 .Em tank/users
3802 are also displayed.
3803 .Bd -literal
3804 # zfs unallow staff snapshot tank/users
3805 # zfs allow tank/users
3806 ---- Permissions on tank/users ---------------------------------------
3807 Permission sets:
3808         @pset create,destroy,mount,snapshot
3809 Local+Descendent permissions:
3810         group staff @pset
3812 .It Sy Example 22 No Showing the differences between a snapshot and a ZFS Dataset
3813 The following example shows how to see what has changed between a prior
3814 snapshot of a ZFS dataset and its current state.
3816 .Fl F
3817 option is used to indicate type information for the files affected.
3818 .Bd -literal
3819 # zfs diff -F tank/test@before tank/test
3820 M       /       /tank/test/
3821 M       F       /tank/test/linked      (+1)
3822 R       F       /tank/test/oldname -> /tank/test/newname
3823 -       F       /tank/test/deleted
3824 +       F       /tank/test/created
3825 M       F       /tank/test/modified
3828 .Sh INTERFACE STABILITY
3829 .Sy Committed .
3830 .Sh SEE ALSO
3831 .Xr gzip 1 ,
3832 .Xr ssh 1 ,
3833 .Xr mount 1M ,
3834 .Xr share 1M ,
3835 .Xr sharemgr 1M ,
3836 .Xr unshare 1M ,
3837 .Xr zonecfg 1M ,
3838 .Xr zpool 1M ,
3839 .Xr chmod 2 ,
3840 .Xr stat 2 ,
3841 .Xr write 2 ,
3842 .Xr fsync 3C ,
3843 .Xr dfstab 4 ,
3844 .Xr acl 5 ,
3845 .Xr attributes 5