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