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