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