]> git.proxmox.com Git - mirror_zfs.git/blob - man/man8/zfs.8
Document environment variables for zdb, zfs, zinject and zpool.
[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) 2014 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-DnPpRve\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR] \fIsnapshot\fR
178 .fi
179
180 .LP
181 .nf
182 \fBzfs\fR \fBsend\fR [\fB-e\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\fBredundant_metadata\fR=\fBall\fR | \fBmost\fR\fR
1018 .ad
1019 .sp .6
1020 .RS 4n
1021 Controls what types of metadata are stored redundantly. ZFS stores an
1022 extra copy of metadata, so that if a single block is corrupted, the
1023 amount of user data lost is limited. This extra copy is in addition to
1024 any redundancy provided at the pool level (e.g. by mirroring or RAID-Z),
1025 and is in addition to an extra copy specified by the \fBcopies\fR
1026 property (up to a total of 3 copies). For example if the pool is
1027 mirrored, \fBcopies\fR=2, and \fBredundant_metadata\fR=most, then ZFS
1028 stores 6 copies of most metadata, and 4 copies of data and some
1029 metadata.
1030 .sp
1031 When set to \fBall\fR, ZFS stores an extra copy of all metadata. If a
1032 single on-disk block is corrupt, at worst a single block of user data
1033 (which is \fBrecordsize\fR bytes long) can be lost.
1034 .sp
1035 When set to \fBmost\fR, ZFS stores an extra copy of most types of
1036 metadata. This can improve performance of random writes, because less
1037 metadata must be written. In practice, at worst about 100 blocks (of
1038 \fBrecordsize\fR bytes each) of user data can be lost if a single
1039 on-disk block is corrupt. The exact behavior of which metadata blocks
1040 are stored redundantly may change in future releases.
1041 .sp
1042 The default value is \fBall\fR.
1043 .RE
1044
1045 .sp
1046 .ne 2
1047 .na
1048 \fB\fBrefquota\fR=\fIsize\fR | \fBnone\fR\fR
1049 .ad
1050 .sp .6
1051 .RS 4n
1052 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.
1053 .RE
1054
1055 .sp
1056 .ne 2
1057 .mk
1058 .na
1059 \fB\fBrefreservation\fR=\fIsize\fR | \fBnone\fR\fR
1060 .ad
1061 .sp .6
1062 .RS 4n
1063 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.
1064 .sp
1065 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.
1066 .sp
1067 This property can also be referred to by its shortened column name, \fBrefreserv\fR.
1068 .RE
1069
1070 .sp
1071 .ne 2
1072 .mk
1073 .na
1074 \fB\fBrelatime\fR=\fBon\fR | \fBoff\fR\fR
1075 .ad
1076 .sp .6
1077 .RS 4n
1078 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.
1079 .RE
1080
1081 .sp
1082 .ne 2
1083 .mk
1084 .na
1085 \fB\fBreservation\fR=\fIsize\fR | \fBnone\fR\fR
1086 .ad
1087 .sp .6
1088 .RS 4n
1089 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.
1090 .sp
1091 This property can also be referred to by its shortened column name, \fBreserv\fR.
1092 .RE
1093
1094 .sp
1095 .ne 2
1096 .mk
1097 .na
1098 \fB\fBsecondarycache\fR=\fBall\fR | \fBnone\fR | \fBmetadata\fR\fR
1099 .ad
1100 .sp .6
1101 .RS 4n
1102 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.
1103 .RE
1104
1105 .sp
1106 .ne 2
1107 .mk
1108 .na
1109 \fB\fBsetuid\fR=\fBon\fR | \fBoff\fR\fR
1110 .ad
1111 .sp .6
1112 .RS 4n
1113 Controls whether the set-\fBUID\fR bit is respected for the file system. The default value is \fBon\fR.
1114 .RE
1115
1116 .sp
1117 .ne 2
1118 .mk
1119 .na
1120 \fB\fBshareiscsi\fR=\fBon\fR | \fBoff\fR\fR
1121 .ad
1122 .sp .6
1123 .RS 4n
1124 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.
1125 .sp
1126 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.
1127 .RE
1128
1129 .sp
1130 .ne 2
1131 .mk
1132 .na
1133 \fB\fBsharesmb\fR=\fBon\fR | \fBoff\fR
1134 .ad
1135 .sp .6
1136 .RS 4n
1137 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.
1138 .sp
1139 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.
1140 .sp
1141 If the \fBsharesmb\fR property is set to \fBoff\fR, the file systems are unshared.
1142 .sp
1143 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.
1144 .sp
1145 .in +2
1146 Example to mount a SMB filesystem shared through ZFS (share/tmp):
1147 .mk
1148 Note that a user and his/her password \fBmust\fR be given!
1149 .sp
1150 .in +2
1151 smbmount //127.0.0.1/share_tmp /mnt/tmp -o user=workgroup/turbo,password=obrut,uid=1000
1152 .in -2
1153 .in -2
1154 .sp
1155 .ne 2
1156 .mk
1157 .na
1158 \fBMinimal /etc/samba/smb.conf configuration\fR
1159 .sp
1160 .in +2
1161 * 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.
1162 .sp
1163 * 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.
1164 .sp
1165 * 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>.
1166 .sp
1167 .in -2
1168 .RE
1169
1170 .sp
1171 .ne 2
1172 .mk
1173 .na
1174 \fB\fBsharenfs\fR=\fBon\fR | \fBoff\fR | \fIopts\fR\fR
1175 .ad
1176 .sp .6
1177 .RS 4n
1178 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):
1179 .sp
1180 .in +4
1181 .nf
1182 /usr/sbin/exportfs -i -o sec=sys,rw,no_subtree_check,no_root_squash,mountpoint *:<mountpoint of dataset>
1183 .fi
1184 .in -4
1185 .sp
1186 Otherwise, the \fBexportfs\fR(8) command is invoked with options equivalent to the contents of this property.
1187 .sp
1188 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.
1189 .RE
1190
1191 .sp
1192 .ne 2
1193 .mk
1194 .na
1195 \fB\fBlogbias\fR = \fBlatency\fR | \fBthroughput\fR\fR
1196 .ad
1197 .sp .6
1198 .RS 4n
1199 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.
1200 .RE
1201
1202 .sp
1203 .ne 2
1204 .mk
1205 .na
1206 \fB\fBsnapdev\fR=\fBhidden\fR | \fBvisible\fR\fR
1207 .ad
1208 .sp .6
1209 .RS 4n
1210 Controls whether the snapshots devices of zvol's are hidden or visible. The default value is \fBhidden\fR.
1211 .RE
1212
1213 .sp
1214 .ne 2
1215 .mk
1216 .na
1217 \fB\fBsnapdir\fR=\fBhidden\fR | \fBvisible\fR\fR
1218 .ad
1219 .sp .6
1220 .RS 4n
1221 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.
1222 .RE
1223
1224 .sp
1225 .ne 2
1226 .mk
1227 .na
1228 \fB\fBsync\fR=\fBstandard\fR | \fBalways\fR | \fBdisabled\fR\fR
1229 .ad
1230 .sp .6
1231 .RS 4n
1232 Controls the behavior of synchronous requests (e.g. fsync, O_DSYNC).
1233 \fBstandard\fR is the POSIX specified behavior of ensuring all synchronous
1234 requests are written to stable storage and all devices are flushed to ensure
1235 data is not cached by device controllers (this is the default). \fBalways\fR
1236 causes every file system transaction to be written and flushed before its
1237 system call returns. This has a large performance penalty. \fBdisabled\fR
1238 disables synchronous requests. File system transactions are only committed to
1239 stable storage periodically. This option will give the highest performance.
1240 However, it is very dangerous as ZFS would be ignoring the synchronous
1241 transaction demands of applications such as databases or NFS. Administrators
1242 should only use this option when the risks are understood.
1243 .RE
1244
1245 .sp
1246 .ne 2
1247 .na
1248 \fB\fBversion\fR=\fB1\fR | \fB2\fR | \fBcurrent\fR\fR
1249 .ad
1250 .sp .6
1251 .RS 4n
1252 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.
1253 .RE
1254
1255 .sp
1256 .ne 2
1257 .mk
1258 .na
1259 \fB\fBvolsize\fR=\fIsize\fR\fR
1260 .ad
1261 .sp .6
1262 .RS 4n
1263 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.
1264 .sp
1265 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.
1266 .sp
1267 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.
1268 .RE
1269
1270 .sp
1271 .ne 2
1272 .mk
1273 .na
1274 \fB\fBvscan\fR=\fBon\fR | \fBoff\fR\fR
1275 .ad
1276 .sp .6
1277 .RS 4n
1278 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.
1279 .RE
1280
1281 .sp
1282 .ne 2
1283 .mk
1284 .na
1285 \fB\fBxattr\fR=\fBon\fR | \fBoff\fR | \fBsa\fR\fR
1286 .ad
1287 .sp .6
1288 .RS 4n
1289 Controls whether extended attributes are enabled for this file system. Two
1290 styles of extended attributes are supported either directory based or system
1291 attribute based.
1292 .sp
1293 The default value of \fBon\fR enables directory based extended attributes.
1294 This style of xattr imposes no practical limit on either the size or number of
1295 xattrs which may be set on a file. Although under Linux the \fBgetxattr\fR(2)
1296 and \fBsetxattr\fR(2) system calls limit the maximum xattr size to 64K. This
1297 is the most compatible style of xattr and it is supported by the majority of
1298 ZFS implementations.
1299 .sp
1300 System attribute based xattrs may be enabled by setting the value to \fBsa\fR.
1301 The key advantage of this type of xattr is improved performance. Storing
1302 xattrs as system attributes significantly decreases the amount of disk IO
1303 required. Up to 64K of xattr data may be stored per file in the space reserved
1304 for system attributes. If there is not enough space available for an xattr then
1305 it will be automatically written as a directory based xattr. System attribute
1306 based xattrs are not accessable on platforms which do not support the
1307 \fBxattr=sa\fR feature.
1308 .sp
1309 The use of system attribute based xattrs is strongly encouraged for users of
1310 SELinux or Posix ACLs. Both of these features heavily rely of xattrs and
1311 benefit significantly from the reduced xattr access time.
1312 .RE
1313
1314 .sp
1315 .ne 2
1316 .mk
1317 .na
1318 \fB\fBzoned\fR=\fBon\fR | \fBoff\fR\fR
1319 .ad
1320 .sp .6
1321 .RS 4n
1322 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.
1323 .RE
1324
1325 .sp
1326 .LP
1327 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.
1328 .sp
1329 .ne 2
1330 .mk
1331 .na
1332 \fB\fBcasesensitivity\fR=\fBsensitive\fR | \fBinsensitive\fR | \fBmixed\fR\fR
1333 .ad
1334 .sp .6
1335 .RS 4n
1336 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.
1337 .sp
1338 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.
1339 .RE
1340
1341 .sp
1342 .ne 2
1343 .mk
1344 .na
1345 \fB\fBnormalization\fR = \fBnone\fR | \fBformC\fR | \fBformD\fR | \fBformKC\fR | \fBformKD\fR\fR
1346 .ad
1347 .sp .6
1348 .RS 4n
1349 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.
1350 .RE
1351
1352 .sp
1353 .ne 2
1354 .mk
1355 .na
1356 \fB\fButf8only\fR=\fBon\fR | \fBoff\fR\fR
1357 .ad
1358 .sp .6
1359 .RS 4n
1360 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.
1361 .RE
1362
1363 .sp
1364 .LP
1365 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.
1366 .RE
1367
1368 .sp
1369 .ne 2
1370 .mk
1371 .na
1372 \fB\fBcontext\fR=\fBSELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level\fR\fR
1373 .ad
1374 .sp .6
1375 .RS 4n
1376 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.
1377 .RE
1378
1379 .sp
1380 .ne 2
1381 .mk
1382 .na
1383 \fB\fBfscontext\fR=\fBSELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level\fR\fR
1384 .ad
1385 .sp .6
1386 .RS 4n
1387 This flag sets the SELinux context for the filesytem being mounted. See \fBselinux\fR(8) for more information.
1388 .RE
1389
1390 .sp
1391 .ne 2
1392 .mk
1393 .na
1394 \fB\fBdefntext\fR=\fBSELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level\fR\fR
1395 .ad
1396 .sp .6
1397 .RS 4n
1398 This flag sets the SELinux context for unlabeled files. See \fBselinux\fR(8) for more information.
1399 .RE
1400
1401 .sp
1402 .ne 2
1403 .mk
1404 .na
1405 \fB\fBrootcontext\fR=\fBSELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level\fR\fR
1406 .ad
1407 .sp .6
1408 .RS 4n
1409 This flag sets the SELinux context for the root inode of the filesystem. See \fBselinux\fR(8) for more information.
1410 .RE
1411
1412 .sp
1413 .ne 2
1414 .mk
1415 .na
1416 \fB\fBoverlay\fR=\fBon\fR | \fBoff\fR\fR
1417 .ad
1418 .sp .6
1419 .RS 4n
1420 Allow mounting on a busy directory or a directory which already contains files/directories. This is the default mount behavior for Linux filesystems. However, for consistency with ZFS on other platforms overlay mounts are disabled by default. Set \fBoverlay=on\fR to enable overlay mounts.
1421 .RE
1422
1423 .SS "Temporary Mount Point Properties"
1424 .LP
1425 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:
1426 .sp
1427 .in +2
1428 .nf
1429 PROPERTY MOUNT OPTION
1430 devices devices/nodevices
1431 exec exec/noexec
1432 readonly ro/rw
1433 setuid setuid/nosetuid
1434 xattr xattr/noxattr
1435 .fi
1436 .in -2
1437 .sp
1438
1439 .sp
1440 .LP
1441 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.
1442 .SS "User Properties"
1443 .LP
1444 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).
1445 .sp
1446 .LP
1447 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).
1448 .sp
1449 .LP
1450 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).
1451 .sp
1452 .LP
1453 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.
1454 .SS "ZFS Volumes as Swap"
1455 .LP
1456 \fBZFS\fR volumes may be used as Linux swap devices. After creating the volume
1457 with the \fBzfs create\fR command set up and enable the swap area using the
1458 \fBmkswap\fR(8) and \fBswapon\fR(8) commands. Do not swap to a file on a
1459 \fBZFS\fR file system. A \fBZFS\fR swap file configuration is not supported.
1460 .SH SUBCOMMANDS
1461 .LP
1462 All subcommands that modify state are logged persistently to the pool in their original form.
1463 .sp
1464 .ne 2
1465 .mk
1466 .na
1467 \fB\fBzfs ?\fR\fR
1468 .ad
1469 .sp .6
1470 .RS 4n
1471 Displays a help message.
1472 .RE
1473
1474 .sp
1475 .ne 2
1476 .mk
1477 .na
1478 \fB\fBzfs create\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem\fR\fR
1479 .ad
1480 .sp .6
1481 .RS 4n
1482 Creates a new \fBZFS\fR file system. The file system is automatically mounted according to the \fBmountpoint\fR property inherited from the parent.
1483 .sp
1484 .ne 2
1485 .mk
1486 .na
1487 \fB\fB-p\fR\fR
1488 .ad
1489 .sp .6
1490 .RS 4n
1491 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.
1492 .RE
1493
1494 .sp
1495 .ne 2
1496 .mk
1497 .na
1498 \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1499 .ad
1500 .sp .6
1501 .RS 4n
1502 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.
1503 .RE
1504
1505 .RE
1506
1507 .sp
1508 .ne 2
1509 .mk
1510 .na
1511 \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
1512 .ad
1513 .sp .6
1514 .RS 4n
1515 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.
1516 .sp
1517 \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.
1518 .sp
1519 .ne 2
1520 .mk
1521 .na
1522 \fB\fB-p\fR\fR
1523 .ad
1524 .sp .6
1525 .RS 4n
1526 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.
1527 .RE
1528
1529 .sp
1530 .ne 2
1531 .mk
1532 .na
1533 \fB\fB-s\fR\fR
1534 .ad
1535 .sp .6
1536 .RS 4n
1537 Creates a sparse volume with no reservation. See \fBvolsize\fR in the Native Properties section for more information about sparse volumes.
1538 .RE
1539
1540 .sp
1541 .ne 2
1542 .mk
1543 .na
1544 \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1545 .ad
1546 .sp .6
1547 .RS 4n
1548 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.
1549 .RE
1550
1551 .sp
1552 .ne 2
1553 .mk
1554 .na
1555 \fB\fB-b\fR \fIblocksize\fR\fR
1556 .ad
1557 .sp .6
1558 .RS 4n
1559 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.
1560 .RE
1561
1562 .RE
1563
1564 .sp
1565 .ne 2
1566 .mk
1567 .na
1568 \fBzfs destroy\fR [\fB-fnpRrv\fR] \fIfilesystem\fR|\fIvolume\fR
1569 .ad
1570 .sp .6
1571 .RS 4n
1572 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).
1573 .sp
1574 .ne 2
1575 .mk
1576 .na
1577 \fB\fB-r\fR\fR
1578 .ad
1579 .sp .6
1580 .RS 4n
1581 Recursively destroy all children.
1582 .RE
1583
1584 .sp
1585 .ne 2
1586 .mk
1587 .na
1588 \fB\fB-R\fR\fR
1589 .ad
1590 .sp .6
1591 .RS 4n
1592 Recursively destroy all dependents, including cloned file systems outside the target hierarchy.
1593 .RE
1594
1595 .sp
1596 .ne 2
1597 .mk
1598 .na
1599 \fB\fB-f\fR\fR
1600 .ad
1601 .sp .6
1602 .RS 4n
1603 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.
1604 .RE
1605
1606 .sp
1607 .ne 2
1608 .na
1609 \fB\fB-n\fR\fR
1610 .ad
1611 .sp .6
1612 .RS 4n
1613 Do a dry-run ("No-op") deletion. No data will be deleted. This is
1614 useful in conjunction with the \fB-v\fR or \fB-p\fR flags to determine what
1615 data would be deleted.
1616 .RE
1617
1618 .sp
1619 .ne 2
1620 .na
1621 \fB\fB-p\fR\fR
1622 .ad
1623 .sp .6
1624 .RS 4n
1625 Print machine-parsable verbose information about the deleted data.
1626 .RE
1627
1628 .sp
1629 .ne 2
1630 .na
1631 \fB\fB-v\fR\fR
1632 .ad
1633 .sp .6
1634 .RS 4n
1635 Print verbose information about the deleted data.
1636 .RE
1637 .sp
1638
1639 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.
1640 .RE
1641
1642 .sp
1643 .ne 2
1644 .mk
1645 .na
1646 \fBzfs destroy\fR [\fB-dnpRrv\fR] \fIfilesystem\fR|\fIvolume\fR@\fIsnap\fR[%\fIsnap\fR][,...]
1647 .ad
1648 .sp .6
1649 .RS 4n
1650 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.
1651 .sp
1652 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.
1653 .sp
1654 An inclusive range of snapshots may be specified by separating the
1655 first and last snapshots with a percent sign.
1656 The first and/or last snapshots may be left blank, in which case the
1657 filesystem's oldest or newest snapshot will be implied.
1658 .sp
1659 Multiple snapshots
1660 (or ranges of snapshots) of the same filesystem or volume may be specified
1661 in a comma-separated list of snapshots.
1662 Only the snapshot's short name (the
1663 part after the \fB@\fR) should be specified when using a range or
1664 comma-separated list to identify multiple snapshots.
1665 .sp
1666 .ne 2
1667 .mk
1668 .na
1669 \fB\fB-d\fR\fR
1670 .ad
1671 .sp .6
1672 .RS 4n
1673 Defer snapshot deletion.
1674 .RE
1675
1676 .sp
1677 .ne 2
1678 .mk
1679 .na
1680 \fB\fB-r\fR\fR
1681 .ad
1682 .sp .6
1683 .RS 4n
1684 Destroy (or mark for deferred destruction) all snapshots with this name in descendent file systems.
1685 .RE
1686
1687 .sp
1688 .ne 2
1689 .mk
1690 .na
1691 \fB\fB-R\fR\fR
1692 .ad
1693 .sp .6
1694 .RS 4n
1695 Recursively destroy all clones of these snapshots, including the clones,
1696 snapshots, and children. If this flag is specified, the \fB-d\fR flag will
1697 have no effect.
1698 .RE
1699
1700 .sp
1701 .ne 2
1702 .na
1703 \fB\fB-n\fR\fR
1704 .ad
1705 .sp .6
1706 .RS 4n
1707 Do a dry-run ("No-op") deletion. No data will be deleted. This is
1708 useful in conjunction with the \fB-v\fR or \fB-p\fR flags to determine what
1709 data would be deleted.
1710 .RE
1711
1712 .sp
1713 .ne 2
1714 .na
1715 \fB\fB-p\fR\fR
1716 .ad
1717 .sp .6
1718 .RS 4n
1719 Print machine-parsable verbose information about the deleted data.
1720 .RE
1721
1722 .sp
1723 .ne 2
1724 .na
1725 \fB\fB-v\fR\fR
1726 .ad
1727 .sp .6
1728 .RS 4n
1729 Print verbose information about the deleted data.
1730 .RE
1731
1732 .sp
1733 Extreme care should be taken when applying either the \fB-r\fR or the \fB-R\fR
1734 options, as they can destroy large portions of a pool and cause unexpected
1735 behavior for mounted file systems in use.
1736 .RE
1737
1738 .RE
1739
1740 .sp
1741 .ne 2
1742 .mk
1743 .na
1744 \fBzfs destroy\fR \fIfilesystem\fR|\fIvolume\fR#\fIbookmark\fR
1745 .ad
1746 .sp .6
1747 .RS 4n
1748 The given bookmark is destroyed.
1749
1750 .RE
1751
1752 .sp
1753 .ne 2
1754 .na
1755 \fB\fBzfs snapshot\fR [\fB-r\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem@snapname\fR|\fIvolume@snapname\fR\fR ...
1756 .ad
1757 .sp .6
1758 .RS 4n
1759 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.
1760 .sp
1761 .ne 2
1762 .mk
1763 .na
1764 \fB\fB-r\fR\fR
1765 .ad
1766 .sp .6
1767 .RS 4n
1768 Recursively create snapshots of all descendent datasets.
1769 .RE
1770
1771 .sp
1772 .ne 2
1773 .mk
1774 .na
1775 \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1776 .ad
1777 .sp .6
1778 .RS 4n
1779 Sets the specified property; see \fBzfs create\fR for details.
1780 .RE
1781
1782 .RE
1783
1784 .sp
1785 .ne 2
1786 .mk
1787 .na
1788 \fB\fBzfs rollback\fR [\fB-rRf\fR] \fIsnapshot\fR\fR
1789 .ad
1790 .sp .6
1791 .RS 4n
1792 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.
1793 .sp
1794 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.
1795 .sp
1796 .ne 2
1797 .mk
1798 .na
1799 \fB\fB-r\fR\fR
1800 .ad
1801 .sp .6
1802 .RS 4n
1803 Destroy any snapshots and bookmarks more recent than the one specified.
1804 .RE
1805
1806 .sp
1807 .ne 2
1808 .mk
1809 .na
1810 \fB\fB-R\fR\fR
1811 .ad
1812 .sp .6
1813 .RS 4n
1814 Recursively destroy any more recent snapshots and bookmarks, as well as any clones of those snapshots.
1815 .RE
1816
1817 .sp
1818 .ne 2
1819 .mk
1820 .na
1821 \fB\fB-f\fR\fR
1822 .ad
1823 .sp .6
1824 .RS 4n
1825 Used with the \fB-R\fR option to force an unmount of any clone file systems that are to be destroyed.
1826 .RE
1827
1828 .RE
1829
1830 .sp
1831 .ne 2
1832 .mk
1833 .na
1834 \fB\fBzfs clone\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIsnapshot\fR \fIfilesystem\fR|\fIvolume\fR\fR
1835 .ad
1836 .sp .6
1837 .RS 4n
1838 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.
1839 .sp
1840 .ne 2
1841 .mk
1842 .na
1843 \fB\fB-p\fR\fR
1844 .ad
1845 .sp .6
1846 .RS 4n
1847 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.
1848 .RE
1849
1850 .sp
1851 .ne 2
1852 .mk
1853 .na
1854 \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1855 .ad
1856 .sp .6
1857 .RS 4n
1858 Sets the specified property; see \fBzfs create\fR for details.
1859 .RE
1860
1861 .RE
1862
1863 .sp
1864 .ne 2
1865 .mk
1866 .na
1867 \fB\fBzfs promote\fR \fIclone-filesystem\fR\fR
1868 .ad
1869 .sp .6
1870 .RS 4n
1871 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.
1872 .sp
1873 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.
1874 .RE
1875
1876 .sp
1877 .ne 2
1878 .mk
1879 .na
1880 \fB\fBzfs rename\fR [\fB-f\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
1881 .ad
1882 .br
1883 .na
1884 \fB\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
1885 .ad
1886 .br
1887 .na
1888 \fB\fBzfs rename\fR [\fB-fp\fR] \fIfilesystem\fR|\fIvolume\fR \fIfilesystem\fR|\fIvolume\fR\fR
1889 .ad
1890 .sp .6
1891 .RS 4n
1892 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.
1893 .sp
1894 .ne 2
1895 .mk
1896 .na
1897 \fB\fB-p\fR\fR
1898 .ad
1899 .sp .6
1900 .RS 4n
1901 Creates all the nonexistent parent datasets. Datasets created in this manner are automatically mounted according to the \fBmountpoint\fR property inherited from their parent.
1902 .RE
1903
1904 .sp
1905 .ne 2
1906 .na
1907 \fB\fB-f\fR\fR
1908 .ad
1909 .sp .6
1910 .RS 4n
1911 Force unmount any filesystems that need to be unmounted in the process.
1912 .RE
1913
1914 .RE
1915
1916 .sp
1917 .ne 2
1918 .mk
1919 .na
1920 \fB\fBzfs rename\fR \fB-r\fR \fIsnapshot\fR \fIsnapshot\fR\fR
1921 .ad
1922 .sp .6
1923 .RS 4n
1924 Recursively rename the snapshots of all descendent datasets. Snapshots are the only dataset that can be renamed recursively.
1925 .RE
1926
1927 .sp
1928 .ne 2
1929 .mk
1930 .na
1931 \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
1932 .ad
1933 .sp .6
1934 .RS 4n
1935 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.
1936 .sp
1937 .ne 2
1938 .mk
1939 .na
1940 \fB\fB-H\fR\fR
1941 .ad
1942 .sp .6
1943 .RS 4n
1944 Used for scripting mode. Do not print headers and separate fields by a single tab instead of arbitrary white space.
1945 .RE
1946
1947 .sp
1948 .ne 2
1949 .mk
1950 .na
1951 \fB\fB-p\fR\fR
1952 .sp .6
1953 .RS 4n
1954 Display numbers in parsable (exact) values.
1955 .RE
1956
1957 .sp
1958 .ne 2
1959 .mk
1960 .na
1961 \fB\fB-r\fR\fR
1962 .ad
1963 .sp .6
1964 .RS 4n
1965 Recursively display any children of the dataset on the command line.
1966 .RE
1967
1968 .sp
1969 .ne 2
1970 .mk
1971 .na
1972 \fB\fB-d\fR \fIdepth\fR\fR
1973 .ad
1974 .sp .6
1975 .RS 4n
1976 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.
1977 .RE
1978
1979 .sp
1980 .ne 2
1981 .mk
1982 .na
1983 \fB\fB-o\fR \fIproperty\fR\fR
1984 .ad
1985 .sp .6
1986 .RS 4n
1987 A comma-separated list of properties to display. The property must be:
1988 .RS +4
1989 .TP
1990 .ie t \(bu
1991 .el o
1992 One of the properties described in the "Native Properties" section
1993 .RE
1994 .RS +4
1995 .TP
1996 .ie t \(bu
1997 .el o
1998 A user property
1999 .RE
2000 .RS +4
2001 .TP
2002 .ie t \(bu
2003 .el o
2004 The value \fBname\fR to display the dataset name
2005 .RE
2006 .RS +4
2007 .TP
2008 .ie t \(bu
2009 .el o
2010 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.
2011 .RE
2012 .RE
2013
2014 .sp
2015 .ne 2
2016 .mk
2017 .na
2018 \fB\fB-s\fR \fIproperty\fR\fR
2019 .ad
2020 .sp .6
2021 .RS 4n
2022 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.
2023 .sp
2024 The following is a list of sorting criteria:
2025 .RS +4
2026 .TP
2027 .ie t \(bu
2028 .el o
2029 Numeric types sort in numeric order.
2030 .RE
2031 .RS +4
2032 .TP
2033 .ie t \(bu
2034 .el o
2035 String types sort in alphabetical order.
2036 .RE
2037 .RS +4
2038 .TP
2039 .ie t \(bu
2040 .el o
2041 Types inappropriate for a row sort that row to the literal bottom, regardless of the specified ordering.
2042 .RE
2043 .RS +4
2044 .TP
2045 .ie t \(bu
2046 .el o
2047 If no sorting options are specified the existing behavior of \fBzfs list\fR is preserved.
2048 .RE
2049 .RE
2050
2051 .sp
2052 .ne 2
2053 .mk
2054 .na
2055 \fB\fB-S\fR \fIproperty\fR\fR
2056 .ad
2057 .sp .6
2058 .RS 4n
2059 Same as the \fB-s\fR option, but sorts by property in descending order.
2060 .RE
2061
2062 .sp
2063 .ne 2
2064 .mk
2065 .na
2066 \fB\fB-t\fR \fItype\fR\fR
2067 .ad
2068 .sp .6
2069 .RS 4n
2070 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.
2071 .RE
2072
2073 .RE
2074
2075 .sp
2076 .ne 2
2077 .mk
2078 .na
2079 \fB\fBzfs set\fR \fIproperty\fR=\fIvalue\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
2080 .ad
2081 .sp .6
2082 .RS 4n
2083 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.
2084 .RE
2085
2086 .sp
2087 .ne 2
2088 .mk .na
2089 \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
2090 .ad
2091 .sp .6
2092 .RS 4n
2093 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:
2094 .sp
2095 .in +2
2096 .nf
2097 name Dataset name
2098 property Property name
2099 value Property value
2100 source Property source. Can either be local, default,
2101 temporary, inherited, or none (-).
2102 .fi
2103 .in -2
2104 .sp
2105
2106 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.
2107 .sp
2108 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).
2109 .sp
2110 .ne 2
2111 .mk
2112 .na
2113 \fB\fB-r\fR\fR
2114 .ad
2115 .sp .6
2116 .RS 4n
2117 Recursively display properties for any children.
2118 .RE
2119
2120 .sp
2121 .ne 2
2122 .mk
2123 .na
2124 \fB\fB-d\fR \fIdepth\fR\fR
2125 .ad
2126 .sp .6
2127 .RS 4n
2128 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.
2129 .RE
2130
2131 .sp
2132 .ne 2
2133 .mk
2134 .na
2135 \fB\fB-H\fR\fR
2136 .ad
2137 .sp .6
2138 .RS 4n
2139 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.
2140 .RE
2141
2142 .sp
2143 .ne 2
2144 .mk
2145 .na
2146 \fB\fB-o\fR \fIfield\fR\fR
2147 .ad
2148 .sp .6
2149 .RS 4n
2150 A comma-separated list of columns to display. \fBname,property,value,source\fR is the default value.
2151 .RE
2152
2153 .sp
2154 .ne 2
2155 .mk
2156 .na
2157 \fB\fB-s\fR \fIsource\fR\fR
2158 .ad
2159 .sp .6
2160 .RS 4n
2161 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.
2162 .RE
2163
2164 .sp
2165 .ne 2
2166 .mk
2167 .na
2168 \fB\fB-p\fR\fR
2169 .ad
2170 .sp .6
2171 .RS 4n
2172 Display numbers in parsable (exact) values.
2173 .RE
2174
2175 .RE
2176
2177 .sp
2178 .ne 2
2179 .mk
2180 .na
2181 \fB\fBzfs inherit\fR [\fB-r\fR] \fIproperty\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
2182 .ad
2183 .sp .6
2184 .RS 4n
2185 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.
2186 .sp
2187 .ne 2
2188 .mk
2189 .na
2190 \fB\fB-r\fR\fR
2191 .ad
2192 .sp .6
2193 .RS 4n
2194 Recursively inherit the given property for all children.
2195 .RE
2196
2197 .RE
2198
2199 .sp
2200 .ne 2
2201 .mk
2202 .na
2203 \fB\fBzfs upgrade\fR [\fB-v\fR]\fR
2204 .ad
2205 .sp .6
2206 .RS 4n
2207 Displays a list of file systems that are not the most recent version.
2208 .RE
2209
2210 .sp
2211 .ne 2
2212 .mk
2213 .na
2214 \fB\fBzfs upgrade\fR [\fB-r\fR] [\fB-V\fR \fIversion\fR] [\fB-a\fR | \fIfilesystem\fR]\fR
2215 .ad
2216 .sp .6
2217 .RS 4n
2218 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.
2219 .sp
2220 In general, the file system version is independent of the pool version. See \fBzpool\fR(8) for information on the \fBzpool upgrade\fR command.
2221 .sp
2222 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.
2223 .sp
2224 .ne 2
2225 .mk
2226 .na
2227 \fB\fB-a\fR\fR
2228 .ad
2229 .sp .6
2230 .RS 4n
2231 Upgrade all file systems on all imported pools.
2232 .RE
2233
2234 .sp
2235 .ne 2
2236 .mk
2237 .na
2238 \fB\fIfilesystem\fR\fR
2239 .ad
2240 .sp .6
2241 .RS 4n
2242 Upgrade the specified file system.
2243 .RE
2244
2245 .sp
2246 .ne 2
2247 .mk
2248 .na
2249 \fB\fB-r\fR\fR
2250 .ad
2251 .sp .6
2252 .RS 4n
2253 Upgrade the specified file system and all descendent file systems
2254 .RE
2255
2256 .sp
2257 .ne 2
2258 .mk
2259 .na
2260 \fB\fB-V\fR \fIversion\fR\fR
2261 .ad
2262 .sp .6
2263 .RS 4n
2264 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.
2265 .RE
2266
2267 .RE
2268
2269 .sp
2270 .ne 2
2271 .mk
2272 .na
2273 \fBzfs\fR \fBuserspace\fR [\fB-Hinp\fR] [\fB-o\fR \fIfield\fR[,...]]
2274 [\fB-s\fR \fIfield\fR] ...
2275 [\fB-S\fR \fIfield\fR] ...
2276 [\fB-t\fR \fItype\fR[,...]] \fIfilesystem\fR|\fIsnapshot\fR
2277 .ad
2278 .sp .6
2279 .RS 4n
2280 Displays space consumed by, and quotas on, each user in the specified
2281 filesystem or snapshot. This corresponds to the \fBuserused@\fR\fIuser\fR and
2282 \fBuserquota@\fR\fIuser\fR properties.
2283 .sp
2284 .ne 2
2285 .mk
2286 .na
2287 \fB\fB-n\fR\fR
2288 .ad
2289 .sp .6
2290 .RS 4n
2291 Print numeric ID instead of user/group name.
2292 .RE
2293
2294 .sp
2295 .ne 2
2296 .mk
2297 .na
2298 \fB\fB-H\fR\fR
2299 .ad
2300 .sp .6
2301 .RS 4n
2302 Do not print headers, use tab-delimited output.
2303 .RE
2304
2305 .sp
2306 .ne 2
2307 .mk
2308 .na
2309 \fB\fB-p\fR\fR
2310 .ad
2311 .sp .6
2312 .RS 4n
2313 Use exact (parsable) numeric output.
2314 .RE
2315
2316 .sp
2317 .ne 2
2318 .mk
2319 .na
2320 \fB\fB-o\fR \fIfield\fR[,...]\fR
2321 .ad
2322 .sp .6
2323 .RS 4n
2324 Display only the specified fields from the following
2325 set: \fBtype, name, used, quota\fR. The default is to display all fields.
2326 .RE
2327
2328 .sp
2329 .ne 2
2330 .mk
2331 .na
2332 \fB\fB-s\fR \fIfield\fR\fR
2333 .ad
2334 .sp .6
2335 .RS 4n
2336 Sort output by this field. The \fIs\fR and \fIS\fR flags may be specified
2337 multiple times to sort first by one field, then by another. The default is
2338 \fB-s type\fR \fB-s name\fR.
2339 .RE
2340
2341 .sp
2342 .ne 2
2343 .mk
2344 .na
2345 \fB\fB-S\fR \fIfield\fR\fR
2346 .ad
2347 .sp .6
2348 .RS 4n
2349 Sort by this field in reverse order. See \fB-s\fR.
2350 .RE
2351
2352 .sp
2353 .ne 2
2354 .mk
2355 .na
2356 \fB\fB-t\fR \fItype\fR[,...]\fR
2357 .ad
2358 .sp .6
2359 .RS 4n
2360 Print only the specified types from the following
2361 set: \fBall, posixuser, smbuser, posixgroup, smbgroup\fR. The default
2362 is \fB-t posixuser,smbuser\fR. The default can be changed to include group
2363 types.
2364 .RE
2365
2366 .sp
2367 .ne 2
2368 .mk
2369 .na
2370 \fB\fB-i\fR\fR
2371 .ad
2372 .sp .6
2373 .RS 4n
2374 Translate SID to POSIX ID. The POSIX ID may be ephemeral if no mapping exists.
2375 Normal POSIX interfaces (for example, \fBstat\fR(2), \fBls\fR \fB-l\fR) perform
2376 this translation, so the \fB-i\fR option allows the output from \fBzfs
2377 userspace\fR to be compared directly with those utilities. However, \fB-i\fR
2378 may lead to confusion if some files were created by an SMB user before a
2379 SMB-to-POSIX name mapping was established. In such a case, some files will be owned
2380 by the SMB entity and some by the POSIX entity. However, the \fB-i\fR option
2381 will report that the POSIX entity has the total usage and quota for both.
2382 .RE
2383
2384 .RE
2385
2386 .sp
2387 .ne 2
2388 .mk
2389 .na
2390 \fBzfs\fR \fBgroupspace\fR [\fB-Hinp\fR] [\fB-o\fR \fIfield\fR[,...]]
2391 [\fB-s\fR \fIfield\fR] ...
2392 [\fB-S\fR \fIfield\fR] ...
2393 [\fB-t\fR \fItype\fR[,...]] \fIfilesystem\fR|\fIsnapshot\fR
2394 .ad
2395 .sp .6
2396 .RS 4n
2397 Displays space consumed by, and quotas on, each group in the specified
2398 filesystem or snapshot. This subcommand is identical to \fBzfs userspace\fR,
2399 except that the default types to display are \fB-t posixgroup,smbgroup\fR.
2400 .RE
2401
2402 .sp
2403 .ne 2
2404 .mk
2405 .na
2406 \fB\fBzfs mount\fR\fR
2407 .ad
2408 .sp .6
2409 .RS 4n
2410 Displays all \fBZFS\fR file systems currently mounted.
2411 .RE
2412
2413 .sp
2414 .ne 2
2415 .mk
2416 .na
2417 \fB\fBzfs mount\fR [\fB-vO\fR] [\fB-o\fR \fIoptions\fR] \fB-a\fR | \fIfilesystem\fR\fR
2418 .ad
2419 .sp .6
2420 .RS 4n
2421 Mounts \fBZFS\fR file systems. Invoked automatically as part of the boot process.
2422 .sp
2423 .ne 2
2424 .mk
2425 .na
2426 \fB\fB-o\fR \fIoptions\fR\fR
2427 .ad
2428 .sp .6
2429 .RS 4n
2430 An optional, comma-separated list of mount options to use temporarily for the
2431 duration of the mount. See the "Temporary Mount Point Properties" section for
2432 details.
2433 .RE
2434
2435 .sp
2436 .ne 2
2437 .mk
2438 .na
2439 \fB\fB-O\fR\fR
2440 .ad
2441 .sp .6
2442 .RS 4n
2443 Perform an overlay mount. See \fBmount\fR(8) for more information.
2444 .RE
2445
2446 .sp
2447 .ne 2
2448 .mk
2449 .na
2450 \fB\fB-v\fR\fR
2451 .ad
2452 .sp .6
2453 .RS 4n
2454 Report mount progress.
2455 .RE
2456
2457 .sp
2458 .ne 2
2459 .mk
2460 .na
2461 \fB\fB-a\fR\fR
2462 .ad
2463 .sp .6
2464 .RS 4n
2465 Mount all available \fBZFS\fR file systems. Invoked automatically as part of
2466 the boot process.
2467 .RE
2468
2469 .sp
2470 .ne 2
2471 .mk
2472 .na
2473 \fB\fIfilesystem\fR\fR
2474 .ad
2475 .sp .6
2476 .RS 4n
2477 Mount the specified filesystem.
2478 .RE
2479
2480 .RE
2481
2482 .sp
2483 .ne 2
2484 .mk
2485 .na
2486 \fB\fBzfs unmount\fR [\fB-f\fR] \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR\fR
2487 .ad
2488 .sp .6
2489 .RS 4n
2490 Unmounts currently mounted \fBZFS\fR file systems. Invoked automatically as part of the shutdown process.
2491 .sp
2492 .ne 2
2493 .mk
2494 .na
2495 \fB\fB-f\fR\fR
2496 .ad
2497 .sp .6
2498 .RS 4n
2499 Forcefully unmount the file system, even if it is currently in use.
2500 .RE
2501
2502 .sp
2503 .ne 2
2504 .mk
2505 .na
2506 \fB\fB-a\fR\fR
2507 .ad
2508 .sp .6
2509 .RS 4n
2510 Unmount all available \fBZFS\fR file systems. Invoked automatically as part of the boot process.
2511 .RE
2512
2513 .sp
2514 .ne 2
2515 .mk
2516 .na
2517 \fB\fIfilesystem\fR|\fImountpoint\fR\fR
2518 .ad
2519 .sp .6
2520 .RS 4n
2521 Unmount the specified filesystem. The command can also be given a path to a \fBZFS\fR file system mount point on the system.
2522 .RE
2523
2524 .RE
2525
2526 .sp
2527 .ne 2
2528 .mk
2529 .na
2530 \fB\fBzfs share\fR \fB-a\fR | \fIfilesystem\fR\fR
2531 .ad
2532 .sp .6
2533 .RS 4n
2534 Shares available \fBZFS\fR file systems.
2535 .sp
2536 .ne 2
2537 .mk
2538 .na
2539 \fB\fB-a\fR\fR
2540 .ad
2541 .sp .6
2542 .RS 4n
2543 Share all available \fBZFS\fR file systems. Invoked automatically as part of the boot process.
2544 .RE
2545
2546 .sp
2547 .ne 2
2548 .mk
2549 .na
2550 \fB\fIfilesystem\fR\fR
2551 .ad
2552 .sp .6
2553 .RS 4n
2554 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.
2555 .RE
2556
2557 .RE
2558
2559 .sp
2560 .ne 2
2561 .mk
2562 .na
2563 \fB\fBzfs unshare\fR \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR\fR
2564 .ad
2565 .sp .6
2566 .RS 4n
2567 Unshares currently shared \fBZFS\fR file systems. This is invoked automatically as part of the shutdown process.
2568 .sp
2569 .ne 2
2570 .mk
2571 .na
2572 \fB\fB-a\fR\fR
2573 .ad
2574 .sp .6
2575 .RS 4n
2576 Unshare all available \fBZFS\fR file systems. Invoked automatically as part of the boot process.
2577 .RE
2578
2579 .sp
2580 .ne 2
2581 .mk
2582 .na
2583 \fB\fIfilesystem\fR|\fImountpoint\fR\fR
2584 .ad
2585 .sp .6
2586 .RS 4n
2587 Unshare the specified filesystem. The command can also be given a path to a \fBZFS\fR file system shared on the system.
2588 .RE
2589
2590 .RE
2591
2592 .sp
2593 .ne 2
2594 .mk
2595 .na
2596 \fB\fBzfs bookmark\fR \fIsnapshot\fR \fIbookmark\fR\fR
2597 .ad
2598 .sp .6
2599 .RS 4n
2600 Creates a bookmark of the given snapshot. Bookmarks mark the point in time
2601 when the snapshot was created, and can be used as the incremental source for
2602 a \fBzfs send\fR command.
2603 .sp
2604 This feature must be enabled to be used.
2605 See \fBzpool-features\fR(5) for details on ZFS feature flags and the
2606 \fBbookmarks\fR feature.
2607 .RE
2608
2609
2610 .RE
2611 .sp
2612 .ne 2
2613 .na
2614 \fBzfs send\fR [\fB-DnPpRve\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR] \fIsnapshot\fR
2615 .ad
2616 .sp .6
2617 .RS 4n
2618 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.
2619 .sp
2620 .ne 2
2621 .mk
2622 .na
2623 \fB\fB-i\fR \fIsnapshot\fR\fR
2624 .ad
2625 .sp .6
2626 .RS 4n
2627 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.
2628 .sp
2629 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).
2630 .RE
2631
2632 .sp
2633 .ne 2
2634 .mk
2635 .na
2636 \fB\fB-I\fR \fIsnapshot\fR\fR
2637 .ad
2638 .sp .6
2639 .RS 4n
2640 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.
2641 .RE
2642
2643 .sp
2644 .ne 2
2645 .mk
2646 .na
2647 \fB\fB-R\fR\fR
2648 .ad
2649 .sp .6
2650 .RS 4n
2651 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.
2652 .sp
2653 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.
2654 .RE
2655
2656 .sp
2657 .ne 2
2658 .mk
2659 .na
2660 \fB\fB-D\fR\fR
2661 .ad
2662 .sp .6
2663 .RS 4n
2664 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).
2665 .RE
2666
2667 .sp
2668 .ne 2
2669 .mk
2670 .na
2671 \fB\fB-e\fR\fR
2672 .ad
2673 .sp .6
2674 .RS 4n
2675 Generate a more compact stream by using WRITE_EMBEDDED records for blocks
2676 which are stored more compactly on disk by the \fBembedded_data\fR pool
2677 feature. This flag has no effect if the \fBembedded_data\fR feature is
2678 disabled. The receiving system must have the \fBembedded_data\fR feature
2679 enabled. If the \fBlz4_compress\fR feature is active on the sending system,
2680 then the receiving system must have that feature enabled as well. See
2681 \fBzpool-features\fR(5) for details on ZFS feature flags and the
2682 \fBembedded_data\fR feature.
2683 .RE
2684
2685 .sp
2686 .ne 2
2687 .na
2688 \fB\fB-p\fR\fR
2689 .ad
2690 .sp .6
2691 .RS 4n
2692 Include the dataset's properties in the stream. This flag is implicit when -R is specified. The receiving system must also support this feature.
2693 .RE
2694
2695 .sp
2696 .ne 2
2697 .na
2698 \fB\fB-n\fR\fR
2699 .ad
2700 .sp .6
2701 .RS 4n
2702 Do a dry-run ("No-op") send. Do not generate any actual send data. This is
2703 useful in conjunction with the \fB-v\fR or \fB-P\fR flags to determine what
2704 data will be sent.
2705 .RE
2706
2707 .sp
2708 .ne 2
2709 .na
2710 \fB\fB-P\fR\fR
2711 .ad
2712 .sp .6
2713 .RS 4n
2714 Print machine-parsable verbose information about the stream package generated.
2715 .RE
2716
2717 .sp
2718 .ne 2
2719 .mk
2720 .na
2721 \fB\fB-v\fR\fR
2722 .ad
2723 .sp .6
2724 .RS 4n
2725 Print verbose information about the stream package generated. This information
2726 includes a per-second report of how much data has been sent.
2727 .RE
2728
2729 The format of the stream is committed. You will be able to receive your streams on future versions of \fBZFS\fR.
2730 .RE
2731
2732 .RE
2733 .sp
2734 .ne 2
2735 .na
2736 \fBzfs send\fR [\fB-e\fR] [\fB-i\fR \fIsnapshot\fR|\fIbookmark\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR
2737 .ad
2738 .sp .6
2739 .RS 4n
2740 Generate a send stream, which may be of a filesystem, and may be
2741 incremental from a bookmark. If the destination is a filesystem or volume,
2742 the pool must be read-only, or the filesystem must not be mounted. When the
2743 stream generated from a filesystem or volume is received, the default snapshot
2744 name will be "--head--".
2745
2746 .sp
2747 .ne 2
2748 .na
2749 \fB-i\fR \fIsnapshot\fR|\fIbookmark\fR
2750 .ad
2751 .sp .6
2752 .RS 4n
2753 Generate an incremental send stream. The incremental source must be an earlier
2754 snapshot in the destination's history. It will commonly be an earlier
2755 snapshot in the destination's filesystem, in which case it can be
2756 specified as the last component of the name (the \fB#\fR or \fB@\fR character
2757 and following).
2758 .sp
2759 If the incremental target is a clone, the incremental source can
2760 be the origin snapshot, or an earlier snapshot in the origin's filesystem,
2761 or the origin's origin, etc.
2762 .RE
2763
2764 .RE
2765 .sp
2766 .ne 2
2767 .mk
2768 .na
2769 \fB\fBzfs receive\fR [\fB-vnFu\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
2770 .ad
2771 .br
2772 .na
2773 \fB\fBzfs receive\fR [\fB-vnFu\fR] [\fB-d\fR|\fB-e\fR] \fIfilesystem\fR\fR
2774 .ad
2775 .sp .6
2776 .RS 4n
2777 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.
2778 .sp
2779 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.
2780 .sp
2781 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.
2782 .sp
2783 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.
2784 .sp
2785 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.
2786 .sp
2787 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.
2788 .sp
2789 .ne 2
2790 .mk
2791 .na
2792 \fB\fB-d\fR\fR
2793 .ad
2794 .sp .6
2795 .RS 4n
2796 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.
2797 .RE
2798
2799
2800 .sp
2801 .ne 2
2802 .na
2803 \fB\fB-e\fR\fR
2804 .ad
2805 .sp .6
2806 .RS 4n
2807 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.
2808 .RE
2809
2810 .sp
2811 .ne 2
2812 .mk
2813 .na
2814 \fB\fB-u\fR\fR
2815 .ad
2816 .sp .6
2817 .RS 4n
2818 File system that is associated with the received stream is not mounted.
2819 .RE
2820
2821 .sp
2822 .ne 2
2823 .na
2824 \fB\fB-v\fR\fR
2825 .ad
2826 .sp .6
2827 .RS 4n
2828 Print verbose information about the stream and the time required to perform the receive operation.
2829 .RE
2830
2831 .sp
2832 .ne 2
2833 .mk
2834 .na
2835 \fB\fB-n\fR\fR
2836 .ad
2837 .sp .6
2838 .RS 4n
2839 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.
2840 .RE
2841
2842 .sp
2843 .ne 2
2844 .mk
2845 .na
2846 \fB\fB-F\fR\fR
2847 .ad
2848 .sp .6
2849 .RS 4n
2850 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.
2851 .RE
2852
2853 .sp
2854 .ne 2
2855 .na
2856 \fB\fB-e\fR\fR
2857 .ad
2858 .sp .6
2859 .RS 4n
2860 Generate a more compact stream by using WRITE_EMBEDDED records for blocks
2861 which are stored more compactly on disk by the \fBembedded_data\fR pool
2862 feature. This flag has no effect if the \fBembedded_data\fR feature is
2863 disabled. The receiving system must have the \fBembedded_data\fR feature
2864 enabled. If the \fBlz4_compress\fR feature is active on the sending system,
2865 then the receiving system must have that feature enabled as well. See
2866 \fBzpool-features\fR(5) for details on ZFS feature flags and the
2867 \fBembedded_data\fR feature.
2868 .RE
2869 .RE
2870
2871 .sp
2872 .ne 2
2873 .mk
2874 .na
2875 \fB\fBzfs allow\fR \fIfilesystem\fR | \fIvolume\fR\fR
2876 .ad
2877 .sp .6
2878 .RS 4n
2879 Displays permissions that have been delegated on the specified filesystem or volume. See the other forms of \fBzfs allow\fR for more information.
2880 .RE
2881
2882 .sp
2883 .ne 2
2884 .mk
2885 .na
2886 \fB\fBzfs allow\fR [\fB-ldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR| \fIvolume\fR\fR
2887 .ad
2888 .br
2889 .na
2890 \fB\fBzfs allow\fR [\fB-ld\fR] \fB-e\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR | \fIvolume\fR\fR
2891 .ad
2892 .sp .6
2893 .RS 4n
2894 Delegates \fBZFS\fR administration permission for the file systems to non-privileged users.
2895 .sp
2896 .ne 2
2897 .mk
2898 .na
2899 \fB[\fB-ug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...]\fR
2900 .ad
2901 .sp .6
2902 .RS 4n
2903 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.
2904 .RE
2905
2906 .sp
2907 .ne 2
2908 .mk
2909 .na
2910 \fB[\fB-e\fR] \fIperm\fR|@\fIsetname\fR[,...]\fR
2911 .ad
2912 .sp .6
2913 .RS 4n
2914 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.
2915 .RE
2916
2917 .sp
2918 .ne 2
2919 .mk
2920 .na
2921 \fB[\fB-ld\fR] \fIfilesystem\fR|\fIvolume\fR\fR
2922 .ad
2923 .sp .6
2924 .RS 4n
2925 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.
2926 .RE
2927
2928 .RE
2929
2930 .sp
2931 .LP
2932 Permissions are generally the ability to use a \fBZFS\fR subcommand or change a \fBZFS\fR property. The following permissions are available:
2933 .sp
2934 .in +2
2935 .nf
2936 NAME TYPE NOTES
2937 allow subcommand Must also have the permission that is being
2938 allowed
2939 clone subcommand Must also have the 'create' ability and 'mount'
2940 ability in the origin file system
2941 create subcommand Must also have the 'mount' ability
2942 destroy subcommand Must also have the 'mount' ability
2943 diff subcommand Allows lookup of paths within a dataset
2944 given an object number, and the ability to
2945 create snapshots necessary to 'zfs diff'.
2946 mount subcommand Allows mount/umount of ZFS datasets
2947 promote subcommand Must also have the 'mount'
2948 and 'promote' ability in the origin file system
2949 receive subcommand Must also have the 'mount' and 'create' ability
2950 rename subcommand Must also have the 'mount' and 'create'
2951 ability in the new parent
2952 rollback subcommand Must also have the 'mount' ability
2953 send subcommand
2954 share subcommand Allows sharing file systems over NFS or SMB
2955 protocols
2956 snapshot subcommand Must also have the 'mount' ability
2957 groupquota other Allows accessing any groupquota@... property
2958 groupused other Allows reading any groupused@... property
2959 userprop other Allows changing any user property
2960 userquota other Allows accessing any userquota@... property
2961 userused other Allows reading any userused@... property
2962
2963 acltype property
2964 aclinherit property
2965 atime property
2966 canmount property
2967 casesensitivity property
2968 checksum property
2969 compression property
2970 copies property
2971 dedup property
2972 devices property
2973 exec property
2974 logbias property
2975 mlslabel property
2976 mountpoint property
2977 nbmand property
2978 normalization property
2979 primarycache property
2980 quota property
2981 readonly property
2982 recordsize property
2983 refquota property
2984 refreservation property
2985 reservation property
2986 secondarycache property
2987 setuid property
2988 shareiscsi property
2989 sharenfs property
2990 sharesmb property
2991 snapdir property
2992 utf8only property
2993 version property
2994 volblocksize property
2995 volsize property
2996 vscan property
2997 xattr property
2998 zoned property
2999 .fi
3000 .in -2
3001 .sp
3002
3003 .sp
3004 .ne 2
3005 .mk
3006 .na
3007 \fB\fBzfs allow\fR \fB-c\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR\fR
3008 .ad
3009 .sp .6
3010 .RS 4n
3011 Sets "create time" permissions. These permissions are granted (locally) to the creator of any newly-created descendent file system.
3012 .RE
3013
3014 .sp
3015 .ne 2
3016 .mk
3017 .na
3018 \fB\fBzfs allow\fR \fB-s\fR @\fIsetname\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR\fR
3019 .ad
3020 .sp .6
3021 .RS 4n
3022 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.
3023 .RE
3024
3025 .sp
3026 .ne 2
3027 .mk
3028 .na
3029 \fB\fBzfs unallow\fR [\fB-rldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] [\fIperm\fR|@\fIsetname\fR[, ...]] \fIfilesystem\fR|\fIvolume\fR\fR
3030 .ad
3031 .br
3032 .na
3033 \fB\fBzfs unallow\fR [\fB-rld\fR] \fB-e\fR [\fIperm\fR|@\fIsetname\fR [,...]] \fIfilesystem\fR|\fIvolume\fR\fR
3034 .ad
3035 .br
3036 .na
3037 \fB\fBzfs unallow\fR [\fB-r\fR] \fB-c\fR [\fIperm\fR|@\fIsetname\fR[,...]]\fR
3038 .ad
3039 .br
3040 .na
3041 \fB\fIfilesystem\fR|\fIvolume\fR\fR
3042 .ad
3043 .sp .6
3044 .RS 4n
3045 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.
3046 .sp
3047 .ne 2
3048 .mk
3049 .na
3050 \fB\fB-r\fR\fR
3051 .ad
3052 .sp .6
3053 .RS 4n
3054 Recursively remove the permissions from this file system and all descendents.
3055 .RE
3056
3057 .RE
3058
3059 .sp
3060 .ne 2
3061 .mk
3062 .na
3063 \fB\fBzfs unallow\fR [\fB-r\fR] \fB-s\fR @\fIsetname\fR [\fIperm\fR|@\fIsetname\fR[,...]]\fR
3064 .ad
3065 .br
3066 .na
3067 \fB\fIfilesystem\fR|\fIvolume\fR\fR
3068 .ad
3069 .sp .6
3070 .RS 4n
3071 Removes permissions from a permission set. If no permissions are specified, then all permissions are removed, thus removing the set entirely.
3072 .RE
3073
3074 .sp
3075 .ne 2
3076 .mk
3077 .na
3078 \fB\fBzfs hold\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
3079 .ad
3080 .sp .6
3081 .RS 4n
3082 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.
3083 .sp
3084 If a hold exists on a snapshot, attempts to destroy that snapshot by using the \fBzfs destroy\fR command return \fBEBUSY\fR.
3085 .sp
3086 .ne 2
3087 .mk
3088 .na
3089 \fB\fB-r\fR\fR
3090 .ad
3091 .sp .6
3092 .RS 4n
3093 Specifies that a hold with the given tag is applied recursively to the snapshots of all descendent file systems.
3094 .RE
3095
3096 .RE
3097
3098 .sp
3099 .ne 2
3100 .mk
3101 .na
3102 \fB\fBzfs holds\fR [\fB-r\fR] \fIsnapshot\fR...\fR
3103 .ad
3104 .sp .6
3105 .RS 4n
3106 Lists all existing user references for the given snapshot or snapshots.
3107 .sp
3108 .ne 2
3109 .mk
3110 .na
3111 \fB\fB-r\fR\fR
3112 .ad
3113 .sp .6
3114 .RS 4n
3115 Lists the holds that are set on the named descendent snapshots, in addition to listing the holds on the named snapshot.
3116 .RE
3117
3118 .RE
3119
3120 .sp
3121 .ne 2
3122 .mk
3123 .na
3124 \fB\fBzfs release\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
3125 .ad
3126 .sp .6
3127 .RS 4n
3128 Removes a single reference, named with the \fItag\fR argument, from the specified snapshot or snapshots. The tag must already exist for each snapshot.
3129 .sp
3130 If a hold exists on a snapshot, attempts to destroy that snapshot by using the \fBzfs destroy\fR command return \fBEBUSY\fR.
3131 .sp
3132 .ne 2
3133 .mk
3134 .na
3135 \fB\fB-r\fR\fR
3136 .ad
3137 .sp .6
3138 .RS 4n
3139 Recursively releases a hold with the given tag on the snapshots of all descendent file systems.
3140 .RE
3141
3142 .RE
3143
3144 .sp
3145 .ne 2
3146 .mk
3147 .na
3148 \fB\fBzfs diff\fR [\fB-FHt\fR] \fIsnapshot\fR \fIsnapshot|filesystem\fR
3149 .ad
3150 .sp .6
3151 .RS 4n
3152 Display the difference between a snapshot of a given filesystem and another
3153 snapshot of that filesystem from a later time or the current contents of the
3154 filesystem. The first column is a character indicating the type of change,
3155 the other columns indicate pathname, new pathname (in case of rename), change
3156 in link count, and optionally file type and/or change time.
3157
3158 The types of change are:
3159 .in +2
3160 .nf
3161 - The path has been removed
3162 + The path has been created
3163 M The path has been modified
3164 R The path has been renamed
3165 .fi
3166 .in -2
3167 .sp
3168 .ne 2
3169 .na
3170 \fB-F\fR
3171 .ad
3172 .sp .6
3173 .RS 4n
3174 Display an indication of the type of file, in a manner similar to the \fB-F\fR
3175 option of \fBls\fR(1).
3176 .in +2
3177 .nf
3178 B Block device
3179 C Character device
3180 / Directory
3181 > Door
3182 | Named pipe
3183 @ Symbolic link
3184 P Event port
3185 = Socket
3186 F Regular file
3187 .fi
3188 .in -2
3189 .RE
3190 .sp
3191 .ne 2
3192 .na
3193 \fB-H\fR
3194 .ad
3195 .sp .6
3196 .RS 4n
3197 Give more parsable tab-separated output, without header lines and without arrows.
3198 .RE
3199 .sp
3200 .ne 2
3201 .na
3202 \fB-t\fR
3203 .ad
3204 .sp .6
3205 .RS 4n
3206 Display the path's inode change time as the first column of output.
3207 .RE
3208
3209 .SH EXAMPLES
3210 .LP
3211 \fBExample 1 \fRCreating a ZFS File System Hierarchy
3212 .sp
3213 .LP
3214 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.
3215
3216 .sp
3217 .in +2
3218 .nf
3219 # \fBzfs create pool/home\fR
3220 # \fBzfs set mountpoint=/export/home pool/home\fR
3221 # \fBzfs create pool/home/bob\fR
3222 .fi
3223 .in -2
3224 .sp
3225
3226 .LP
3227 \fBExample 2 \fRCreating a ZFS Snapshot
3228 .sp
3229 .LP
3230 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.
3231
3232 .sp
3233 .in +2
3234 .nf
3235 # \fBzfs snapshot pool/home/bob@yesterday\fR
3236 .fi
3237 .in -2
3238 .sp
3239
3240 .LP
3241 \fBExample 3 \fRCreating and Destroying Multiple Snapshots
3242 .sp
3243 .LP
3244 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.
3245
3246 .sp
3247 .in +2
3248 .nf
3249 # \fBzfs snapshot -r pool/home@yesterday\fR
3250 # \fBzfs destroy -r pool/home@yesterday\fR
3251 .fi
3252 .in -2
3253 .sp
3254
3255 .LP
3256 \fBExample 4 \fRDisabling and Enabling File System Compression
3257 .sp
3258 .LP
3259 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.
3260
3261 .sp
3262 .in +2
3263 .nf
3264 # \fBzfs set compression=off pool/home\fR
3265 # \fBzfs set compression=on pool/home/anne\fR
3266 .fi
3267 .in -2
3268 .sp
3269
3270 .LP
3271 \fBExample 5 \fRListing ZFS Datasets
3272 .sp
3273 .LP
3274 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.
3275
3276 .sp
3277 .in +2
3278 .nf
3279 # \fBzfs list\fR
3280 NAME USED AVAIL REFER MOUNTPOINT
3281 pool 450K 457G 18K /pool
3282 pool/home 315K 457G 21K /export/home
3283 pool/home/anne 18K 457G 18K /export/home/anne
3284 pool/home/bob 276K 457G 276K /export/home/bob
3285 .fi
3286 .in -2
3287 .sp
3288
3289 .LP
3290 \fBExample 6 \fRSetting a Quota on a ZFS File System
3291 .sp
3292 .LP
3293 The following command sets a quota of 50 Gbytes for \fBpool/home/bob\fR.
3294
3295 .sp
3296 .in +2
3297 .nf
3298 # \fBzfs set quota=50G pool/home/bob\fR
3299 .fi
3300 .in -2
3301 .sp
3302
3303 .LP
3304 \fBExample 7 \fRListing ZFS Properties
3305 .sp
3306 .LP
3307 The following command lists all properties for \fBpool/home/bob\fR.
3308
3309 .sp
3310 .in +2
3311 .nf
3312 # \fBzfs get all pool/home/bob\fR
3313 NAME PROPERTY VALUE SOURCE
3314 pool/home/bob type filesystem -
3315 pool/home/bob creation Tue Jul 21 15:53 2009 -
3316 pool/home/bob used 21K -
3317 pool/home/bob available 20.0G -
3318 pool/home/bob referenced 21K -
3319 pool/home/bob compressratio 1.00x -
3320 pool/home/bob mounted yes -
3321 pool/home/bob quota 20G local
3322 pool/home/bob reservation none default
3323 pool/home/bob recordsize 128K default
3324 pool/home/bob mountpoint /pool/home/bob default
3325 pool/home/bob sharenfs off default
3326 pool/home/bob checksum on default
3327 pool/home/bob compression on local
3328 pool/home/bob atime on default
3329 pool/home/bob devices on default
3330 pool/home/bob exec on default
3331 pool/home/bob setuid on default
3332 pool/home/bob readonly off default
3333 pool/home/bob zoned off default
3334 pool/home/bob snapdir hidden default
3335 pool/home/bob acltype off default
3336 pool/home/bob aclinherit restricted default
3337 pool/home/bob canmount on default
3338 pool/home/bob shareiscsi off default
3339 pool/home/bob xattr on default
3340 pool/home/bob copies 1 default
3341 pool/home/bob version 4 -
3342 pool/home/bob utf8only off -
3343 pool/home/bob normalization none -
3344 pool/home/bob casesensitivity sensitive -
3345 pool/home/bob vscan off default
3346 pool/home/bob nbmand off default
3347 pool/home/bob sharesmb off default
3348 pool/home/bob refquota none default
3349 pool/home/bob refreservation none default
3350 pool/home/bob primarycache all default
3351 pool/home/bob secondarycache all default
3352 pool/home/bob usedbysnapshots 0 -
3353 pool/home/bob usedbydataset 21K -
3354 pool/home/bob usedbychildren 0 -
3355 pool/home/bob usedbyrefreservation 0 -
3356 pool/home/bob logbias latency default
3357 pool/home/bob dedup off default
3358 pool/home/bob mlslabel none default
3359 pool/home/bob relatime off default
3360 .fi
3361 .in -2
3362 .sp
3363
3364 .sp
3365 .LP
3366 The following command gets a single property value.
3367
3368 .sp
3369 .in +2
3370 .nf
3371 # \fBzfs get -H -o value compression pool/home/bob\fR
3372 on
3373 .fi
3374 .in -2
3375 .sp
3376
3377 .sp
3378 .LP
3379 The following command lists all properties with local settings for \fBpool/home/bob\fR.
3380
3381 .sp
3382 .in +2
3383 .nf
3384 # \fBzfs get -r -s local -o name,property,value all pool/home/bob\fR
3385 NAME PROPERTY VALUE
3386 pool/home/bob quota 20G
3387 pool/home/bob compression on
3388 .fi
3389 .in -2
3390 .sp
3391
3392 .LP
3393 \fBExample 8 \fRRolling Back a ZFS File System
3394 .sp
3395 .LP
3396 The following command reverts the contents of \fBpool/home/anne\fR to the snapshot named \fByesterday\fR, deleting all intermediate snapshots.
3397
3398 .sp
3399 .in +2
3400 .nf
3401 # \fBzfs rollback -r pool/home/anne@yesterday\fR
3402 .fi
3403 .in -2
3404 .sp
3405
3406 .LP
3407 \fBExample 9 \fRCreating a ZFS Clone
3408 .sp
3409 .LP
3410 The following command creates a writable file system whose initial contents are the same as \fBpool/home/bob@yesterday\fR.
3411
3412 .sp
3413 .in +2
3414 .nf
3415 # \fBzfs clone pool/home/bob@yesterday pool/clone\fR
3416 .fi
3417 .in -2
3418 .sp
3419
3420 .LP
3421 \fBExample 10 \fRPromoting a ZFS Clone
3422 .sp
3423 .LP
3424 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:
3425
3426 .sp
3427 .in +2
3428 .nf
3429 # \fBzfs create pool/project/production\fR
3430 populate /pool/project/production with data
3431 # \fBzfs snapshot pool/project/production@today\fR
3432 # \fBzfs clone pool/project/production@today pool/project/beta\fR
3433 make changes to /pool/project/beta and test them
3434 # \fBzfs promote pool/project/beta\fR
3435 # \fBzfs rename pool/project/production pool/project/legacy\fR
3436 # \fBzfs rename pool/project/beta pool/project/production\fR
3437 once the legacy version is no longer needed, it can be destroyed
3438 # \fBzfs destroy pool/project/legacy\fR
3439 .fi
3440 .in -2
3441 .sp
3442
3443 .LP
3444 \fBExample 11 \fRInheriting ZFS Properties
3445 .sp
3446 .LP
3447 The following command causes \fBpool/home/bob\fR and \fBpool/home/anne\fR to inherit the \fBchecksum\fR property from their parent.
3448
3449 .sp
3450 .in +2
3451 .nf
3452 # \fBzfs inherit checksum pool/home/bob pool/home/anne\fR
3453 .fi
3454 .in -2
3455 .sp
3456
3457 .LP
3458 \fBExample 12 \fRRemotely Replicating ZFS Data
3459 .sp
3460 .LP
3461 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.
3462
3463 .sp
3464 .in +2
3465 .nf
3466 # \fBzfs send pool/fs@a | \e\fR
3467 \fBssh host zfs receive poolB/received/fs@a\fR
3468 # \fBzfs send -i a pool/fs@b | ssh host \e\fR
3469 \fBzfs receive poolB/received/fs\fR
3470 .fi
3471 .in -2
3472 .sp
3473
3474 .LP
3475 \fBExample 13 \fRUsing the \fBzfs receive\fR \fB-d\fR Option
3476 .sp
3477 .LP
3478 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.
3479
3480 .sp
3481 .in +2
3482 .nf
3483 # \fBzfs send poolA/fsA/fsB@snap | \e
3484 ssh host zfs receive -d poolB/received\fR
3485 .fi
3486 .in -2
3487 .sp
3488
3489 .LP
3490 \fBExample 14 \fRSetting User Properties
3491 .sp
3492 .LP
3493 The following example sets the user-defined \fBcom.example:department\fR property for a dataset.
3494
3495 .sp
3496 .in +2
3497 .nf
3498 # \fBzfs set com.example:department=12345 tank/accounting\fR
3499 .fi
3500 .in -2
3501 .sp
3502
3503 .LP
3504 \fBExample 15 \fRCreating a ZFS Volume as an iSCSI Target Device
3505 .sp
3506 .LP
3507 The following example shows how to create a \fBZFS\fR volume as an \fBiSCSI\fR target.
3508
3509 .sp
3510 .in +2
3511 .nf
3512 # \fBzfs create -V 2g pool/volumes/vol1\fR
3513 # \fBzfs set shareiscsi=on pool/volumes/vol1\fR
3514 # \fBiscsitadm list target\fR
3515 Target: pool/volumes/vol1
3516 iSCSI Name:
3517 iqn.1986-03.com.sun:02:7b4b02a6-3277-eb1b-e686-a24762c52a8c
3518 Connections: 0
3519 .fi
3520 .in -2
3521 .sp
3522
3523 .sp
3524 .LP
3525 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).
3526 .LP
3527 \fBExample 16 \fRPerforming a Rolling Snapshot
3528 .sp
3529 .LP
3530 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:
3531
3532 .sp
3533 .in +2
3534 .nf
3535 # \fBzfs destroy -r pool/users@7daysago\fR
3536 # \fBzfs rename -r pool/users@6daysago @7daysago\fR
3537 # \fBzfs rename -r pool/users@5daysago @6daysago\fR
3538 # \fBzfs rename -r pool/users@4daysago @5daysago\fR
3539 # \fBzfs rename -r pool/users@3daysago @4daysago\fR
3540 # \fBzfs rename -r pool/users@2daysago @3daysago\fR
3541 # \fBzfs rename -r pool/users@yesterday @2daysago\fR
3542 # \fBzfs rename -r pool/users@today @yesterday\fR
3543 # \fBzfs snapshot -r pool/users@today\fR
3544 .fi
3545 .in -2
3546 .sp
3547
3548 .LP
3549 \fBExample 17 \fRSetting \fBsharenfs\fR Property Options on a ZFS File System
3550 .sp
3551 .LP
3552 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.
3553
3554 .sp
3555 .in +2
3556 .nf
3557 # \fBzfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home\fR
3558 .fi
3559 .in -2
3560 .sp
3561
3562 .sp
3563 .LP
3564 If you are using \fBDNS\fR for host name resolution, specify the fully qualified hostname.
3565
3566 .LP
3567 \fBExample 18 \fRDelegating ZFS Administration Permissions on a ZFS Dataset
3568 .sp
3569 .LP
3570 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.
3571
3572 .sp
3573 .in +2
3574 .nf
3575 # \fBzfs allow cindys create,destroy,mount,snapshot tank/cindys\fR
3576 # \fBzfs allow tank/cindys\fR
3577 -------------------------------------------------------------
3578 Local+Descendent permissions on (tank/cindys)
3579 user cindys create,destroy,mount,snapshot
3580 -------------------------------------------------------------
3581 .fi
3582 .in -2
3583 .sp
3584
3585 .sp
3586 .LP
3587 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:
3588 .sp
3589 .in +2
3590 .nf
3591 # \fBchmod A+user:cindys:add_subdirectory:allow /tank/cindys\fR
3592 .fi
3593 .in -2
3594 .sp
3595
3596 .LP
3597 \fBExample 19 \fRDelegating Create Time Permissions on a ZFS Dataset
3598 .sp
3599 .LP
3600 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.
3601
3602 .sp
3603 .in +2
3604 .nf
3605 # \fBzfs allow staff create,mount tank/users\fR
3606 # \fBzfs allow -c destroy tank/users\fR
3607 # \fBzfs allow tank/users\fR
3608 -------------------------------------------------------------
3609 Create time permissions on (tank/users)
3610 create,destroy
3611 Local+Descendent permissions on (tank/users)
3612 group staff create,mount
3613 -------------------------------------------------------------
3614 .fi
3615 .in -2
3616 .sp
3617
3618 .LP
3619 \fBExample 20 \fRDefining and Granting a Permission Set on a ZFS Dataset
3620 .sp
3621 .LP
3622 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.
3623
3624 .sp
3625 .in +2
3626 .nf
3627 # \fBzfs allow -s @pset create,destroy,snapshot,mount tank/users\fR
3628 # \fBzfs allow staff @pset tank/users\fR
3629 # \fBzfs allow tank/users\fR
3630 -------------------------------------------------------------
3631 Permission sets on (tank/users)
3632 @pset create,destroy,mount,snapshot
3633 Create time permissions on (tank/users)
3634 create,destroy
3635 Local+Descendent permissions on (tank/users)
3636 group staff @pset,create,mount
3637 -------------------------------------------------------------
3638 .fi
3639 .in -2
3640 .sp
3641
3642 .LP
3643 \fBExample 21 \fRDelegating Property Permissions on a ZFS Dataset
3644 .sp
3645 .LP
3646 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.
3647
3648 .sp
3649 .in +2
3650 .nf
3651 # \fBzfs allow cindys quota,reservation users/home\fR
3652 # \fBzfs allow users/home\fR
3653 -------------------------------------------------------------
3654 Local+Descendent permissions on (users/home)
3655 user cindys quota,reservation
3656 -------------------------------------------------------------
3657 cindys% \fBzfs set quota=10G users/home/marks\fR
3658 cindys% \fBzfs get quota users/home/marks\fR
3659 NAME PROPERTY VALUE SOURCE
3660 users/home/marks quota 10G local
3661 .fi
3662 .in -2
3663 .sp
3664
3665 .LP
3666 \fBExample 22 \fRRemoving ZFS Delegated Permissions on a ZFS Dataset
3667 .sp
3668 .LP
3669 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.
3670
3671 .sp
3672 .in +2
3673 .nf
3674 # \fBzfs unallow staff snapshot tank/users\fR
3675 # \fBzfs allow tank/users\fR
3676 -------------------------------------------------------------
3677 Permission sets on (tank/users)
3678 @pset create,destroy,mount,snapshot
3679 Create time permissions on (tank/users)
3680 create,destroy
3681 Local+Descendent permissions on (tank/users)
3682 group staff @pset,create,mount
3683 -------------------------------------------------------------
3684 .fi
3685 .in -2
3686 .sp
3687
3688 .LP
3689 \fBExample 23\fR Showing the differences between a snapshot and a ZFS Dataset
3690 .sp
3691 .LP
3692 The following example shows how to see what has changed between a prior
3693 snapshot of a ZFS Dataset and its current state. The \fB-F\fR option is used
3694 to indicate type information for the files affected.
3695
3696 .sp
3697 .in +2
3698 .nf
3699 # zfs diff -F tank/test@before tank/test
3700 M / /tank/test/
3701 M F /tank/test/linked (+1)
3702 R F /tank/test/oldname -> /tank/test/newname
3703 - F /tank/test/deleted
3704 + F /tank/test/created
3705 M F /tank/test/modified
3706 .fi
3707 .in -2
3708 .sp
3709
3710 .SH "ENVIRONMENT VARIABLES"
3711 .TP
3712 .B "ZFS_ABORT
3713 Cause \fBzfs\fR to dump core on exit for the purposes of running \fB::findleaks\fR.
3714
3715 .SH EXIT STATUS
3716 .LP
3717 The following exit values are returned:
3718 .sp
3719 .ne 2
3720 .mk
3721 .na
3722 \fB\fB0\fR\fR
3723 .ad
3724 .sp .6
3725 .RS 4n
3726 Successful completion.
3727 .RE
3728
3729 .sp
3730 .ne 2
3731 .mk
3732 .na
3733 \fB\fB1\fR\fR
3734 .ad
3735 .sp .6
3736 .RS 4n
3737 An error occurred.
3738 .RE
3739
3740 .sp
3741 .ne 2
3742 .mk
3743 .na
3744 \fB\fB2\fR\fR
3745 .ad
3746 .sp .6
3747 .RS 4n
3748 Invalid command line options were specified.
3749 .RE
3750
3751 .SH SEE ALSO
3752 .LP
3753 \fBchmod\fR(2), \fBfsync\fR(2), \fBgzip\fR(1), \fBmount\fR(8), \fBssh\fR(1), \fBstat\fR(2), \fBwrite\fR(2), \fBzpool\fR(8)