26dc6cadc122c68d67b2ed94d201b8f29a101f1f
[zfs.git] / man / man8 / zfs.8
1 '\" te
2 .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
4 .\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
5 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
7 .\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
8 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
9 .TH zfs 8 "8 Apr 2011" "ZFS pool 28, filesystem 5" "System Administration Commands"
10 .SH NAME
11 zfs \- configures ZFS file systems
12 .SH SYNOPSIS
13 .LP
14 .nf
15 \fBzfs\fR [\fB-?\fR]
16 .fi
17
18 .LP
19 .nf
20 \fBzfs\fR \fBcreate\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem\fR
21 .fi
22
23 .LP
24 .nf
25 \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
26 .fi
27
28 .LP
29 .nf
30 \fBzfs\fR \fBdestroy\fR [\fB-rRf\fR] \fIfilesystem\fR|\fIvolume\fR
31 .fi
32
33 .LP
34 .nf
35 \fBzfs\fR \fBdestroy\fR [\fB-rRd\fR] \fIsnapshot\fR
36 .fi
37
38 .LP
39 .nf
40 \fBzfs\fR \fBsnapshot\fR [\fB-r\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR]... 
41       \fIfilesystem@snapname\fR|\fIvolume@snapname\fR
42 .fi
43
44 .LP
45 .nf
46 \fBzfs\fR \fBrollback\fR [\fB-rRf\fR] \fIsnapshot\fR
47 .fi
48
49 .LP
50 .nf
51 \fBzfs\fR \fBclone\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIsnapshot\fR \fIfilesystem\fR|\fIvolume\fR
52 .fi
53
54 .LP
55 .nf
56 \fBzfs\fR \fBpromote\fR \fIclone-filesystem\fR
57 .fi
58
59 .LP
60 .nf
61 \fBzfs\fR \fBrename\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR 
62      \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR
63 .fi
64
65 .LP
66 .nf
67 \fBzfs\fR \fBrename\fR [\fB-p\fR] \fIfilesystem\fR|\fIvolume\fR \fIfilesystem\fR|\fIvolume\fR
68 .fi
69
70 .LP
71 .nf
72 \fBzfs\fR \fBrename\fR \fB-r\fR \fIsnapshot\fR \fIsnapshot\fR
73 .fi
74
75 .LP
76 .nf
77 \fBzfs\fR \fBlist\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-H\fR][\fB-o\fR \fIproperty\fR[,...]] [\fB-t\fR \fItype\fR[,...]]
78      [\fB-s\fR \fIproperty\fR] ... [\fB-S\fR \fIproperty\fR] ... [\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR] ...
79 .fi
80
81 .LP
82 .nf
83 \fBzfs\fR \fBset\fR \fIproperty\fR=\fIvalue\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...
84 .fi
85
86 .LP
87 .nf
88 \fBzfs\fR \fBget\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-Hp\fR][\fB-o\fR \fIfield\fR[,...]] [\fB-s\fR \fIsource\fR[,...]]
89      "\fIall\fR" | \fIproperty\fR[,...] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...
90 .fi
91
92 .LP
93 .nf
94 \fBzfs\fR \fBinherit\fR [\fB-r\fR] \fIproperty\fR \fIfilesystem\fR|\fIvolume|snapshot\fR ...
95 .fi
96
97 .LP
98 .nf
99 \fBzfs\fR \fBupgrade\fR [\fB-v\fR]
100 .fi
101
102 .LP
103 .nf
104 \fBzfs\fR \fBupgrade\fR [\fB-r\fR] [\fB-V\fR \fIversion\fR] \fB-a\fR | \fIfilesystem\fR
105 .fi
106
107 .LP
108 .nf
109 \fBzfs\fR \fBuserspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR] ...
110      [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR|\fIsnapshot\fR
111 .fi
112
113 .LP
114 .nf
115 \fBzfs\fR \fBgroupspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR] ...
116      [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR|\fIsnapshot\fR
117 .fi
118
119 .LP
120 .nf
121 \fBzfs\fR \fBmount\fR 
122 .fi
123
124 .LP
125 .nf
126 \fBzfs\fR \fBmount\fR [\fB-vO\fR] [\fB-o \fIoptions\fR\fR] \fB-a\fR | \fIfilesystem\fR
127 .fi
128
129 .LP
130 .nf
131 \fBzfs\fR \fBunmount\fR [\fB-f\fR] \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR
132 .fi
133
134 .LP
135 .nf
136 \fBzfs\fR \fBshare\fR \fB-a\fR | \fIfilesystem\fR
137 .fi
138
139 .LP
140 .nf
141 \fBzfs\fR \fBunshare\fR \fB-a\fR \fIfilesystem\fR|\fImountpoint\fR
142 .fi
143
144 .LP
145 .nf
146 \fBzfs\fR \fBsend\fR [\fB-vRDp\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR] \fIsnapshot\fR
147 .fi
148
149 .LP
150 .nf
151 \fBzfs\fR \fBreceive\fR [\fB-vnFu\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR
152 .fi
153
154 .LP
155 .nf
156 \fBzfs\fR \fBreceive\fR [\fB-vnFu\fR] \fB-d\fR \fIfilesystem\fR
157 .fi
158
159 .LP
160 .nf
161 \fBzfs\fR \fBallow\fR \fIfilesystem\fR|\fIvolume\fR
162 .fi
163
164 .LP
165 .nf
166 \fBzfs\fR \fBallow\fR [\fB-ldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] \fIperm\fR|\fI@setname\fR[,...] 
167      \fIfilesystem\fR|\fIvolume\fR
168 .fi
169
170 .LP
171 .nf
172 \fBzfs\fR \fBallow\fR [\fB-ld\fR] \fB-e\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR
173 .fi
174
175 .LP
176 .nf
177 \fBzfs\fR \fBallow\fR \fB-c\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR
178 .fi
179
180 .LP
181 .nf
182 \fBzfs\fR \fBallow\fR \fB-s\fR @\fIsetname\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR
183 .fi
184
185 .LP
186 .nf
187 \fBzfs\fR \fBunallow\fR [\fB-rldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] [\fIperm\fR|@\fIsetname\fR[,... ]] 
188      \fIfilesystem\fR|\fIvolume\fR
189 .fi
190
191 .LP
192 .nf
193 \fBzfs\fR \fBunallow\fR [\fB-rld\fR] \fB-e\fR [\fIperm\fR|@\fIsetname\fR[,... ]] \fIfilesystem\fR|\fIvolume\fR
194 .fi
195
196 .LP
197 .nf
198 \fBzfs\fR \fBunallow\fR [\fB-r\fR] \fB-c\fR [\fIperm\fR|@\fIsetname\fR[ ... ]] \fIfilesystem\fR|\fIvolume\fR
199 .fi
200
201 .LP
202 .nf
203 \fBzfs\fR \fBunallow\fR [\fB-r\fR] \fB-s\fR @\fIsetname\fR [\fIperm\fR|@\fIsetname\fR[,... ]] \fIfilesystem\fR|\fIvolume\fR
204 .fi
205
206 .LP
207 .nf
208 \fBzfs\fR \fBhold\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...
209 .fi
210
211 .LP
212 .nf
213 \fBzfs\fR \fBholds\fR [\fB-r\fR] \fIsnapshot\fR...
214 .fi
215
216 .LP
217 .nf
218 \fBzfs\fR \fBrelease\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...
219 .fi
220
221 .SH DESCRIPTION
222 .sp
223 .LP
224 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:
225 .sp
226 .in +2
227 .nf
228 pool/{filesystem,volume,snapshot}
229 .fi
230 .in -2
231 .sp
232
233 .sp
234 .LP
235 where the maximum length of a dataset name is \fBMAXNAMELEN\fR (256 bytes).
236 .sp
237 .LP
238 A dataset can be one of the following:
239 .sp
240 .ne 2
241 .mk
242 .na
243 \fB\fIfile system\fR\fR
244 .ad
245 .sp .6
246 .RS 4n
247 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.
248 .RE
249
250 .sp
251 .ne 2
252 .mk
253 .na
254 \fB\fIvolume\fR\fR
255 .ad
256 .sp .6
257 .RS 4n
258 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.
259 .RE
260
261 .sp
262 .ne 2
263 .mk
264 .na
265 \fB\fIsnapshot\fR\fR
266 .ad
267 .sp .6
268 .RS 4n
269 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.
270 .RE
271
272 .SS "ZFS File System Hierarchy"
273 .sp
274 .LP
275 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.
276 .sp
277 .LP
278 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.
279 .sp
280 .LP
281 See \fBzpool\fR(8) for more information on creating and administering pools.
282 .SS "Snapshots"
283 .sp
284 .LP
285 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.
286 .sp
287 .LP
288 Snapshots can have arbitrary names. Snapshots of volumes can be cloned or rolled back, but cannot be accessed independently.
289 .sp
290 .LP
291 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.
292 .SS "Clones"
293 .sp
294 .LP
295 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.
296 .sp
297 .LP
298 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.
299 .sp
300 .LP
301 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.
302 .SS "Mount Points"
303 .sp
304 .LP
305 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.
306 .sp
307 .LP
308 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.
309 .sp
310 .LP
311 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.
312 .sp
313 .LP
314 A file system \fBmountpoint\fR property of \fBnone\fR prevents the file system from being mounted.
315 .sp
316 .LP
317 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.
318 .SS "Native Properties"
319 .sp
320 .LP
321 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.
322 .sp
323 .LP
324 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).
325 .sp
326 .LP
327 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: 
328 .sp
329 .in +2
330 .nf
331 1536M, 1.5g, 1.50GB
332 .fi
333 .in -2
334 .sp
335
336 .sp
337 .LP
338 The values of non-numeric properties are case sensitive and must be lowercase, except for \fBmountpoint\fR, \fBsharenfs\fR, and \fBsharesmb\fR.
339 .sp
340 .LP
341 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.
342 .sp
343 .ne 2
344 .mk
345 .na
346 \fB\fBavailable\fR\fR
347 .ad
348 .sp .6
349 .RS 4n
350 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.
351 .sp
352 This property can also be referred to by its shortened column name, \fBavail\fR.
353 .RE
354
355 .sp
356 .ne 2
357 .mk
358 .na
359 \fB\fBcompressratio\fR\fR
360 .ad
361 .sp .6
362 .RS 4n
363 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.
364 .RE
365
366 .sp
367 .ne 2
368 .mk
369 .na
370 \fB\fBcreation\fR\fR
371 .ad
372 .sp .6
373 .RS 4n
374 The time this dataset was created.
375 .RE
376
377 .sp
378 .ne 2
379 .mk
380 .na
381 \fB\fBdefer_destroy\fR\fR
382 .ad
383 .sp .6
384 .RS 4n
385 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.
386 .RE
387
388 .sp
389 .ne 2
390 .mk
391 .na
392 \fB\fBmounted\fR\fR
393 .ad
394 .sp .6
395 .RS 4n
396 For file systems, indicates whether the file system is currently mounted. This property can be either \fByes\fR or \fBno\fR.
397 .RE
398
399 .sp
400 .ne 2
401 .mk
402 .na
403 \fB\fBorigin\fR\fR
404 .ad
405 .sp .6
406 .RS 4n
407 For cloned file systems or volumes, the snapshot from which the clone was created. The origin cannot be destroyed (even with the \fB-r\fR or \fB-f\fR options) so long as a clone exists.
408 .RE
409
410 .sp
411 .ne 2
412 .mk
413 .na
414 \fB\fBreferenced\fR\fR
415 .ad
416 .sp .6
417 .RS 4n
418 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.
419 .sp
420 This property can also be referred to by its shortened column name, \fBrefer\fR.
421 .RE
422
423 .sp
424 .ne 2
425 .mk
426 .na
427 \fB\fBrefcompressratio\fR\fR
428 .ad
429 .sp .6
430 .RS 4n
431 The compression ratio achieved for the \fBreferenced\fR space of this
432 dataset, expressed as a multiplier.  See also the \fBcompressratio\fR
433 property.
434 .RE
435
436 .sp
437 .ne 2
438 .mk
439 .na
440 \fB\fBtype\fR\fR
441 .ad
442 .sp .6
443 .RS 4n
444 The type of dataset: \fBfilesystem\fR, \fBvolume\fR, or \fBsnapshot\fR.
445 .RE
446
447 .sp
448 .ne 2
449 .mk
450 .na
451 \fB\fBused\fR\fR
452 .ad
453 .sp .6
454 .RS 4n
455 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.
456 .sp
457 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.
458 .sp
459 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.
460 .RE
461
462 .sp
463 .ne 2
464 .mk
465 .na
466 \fB\fBusedby*\fR\fR
467 .ad
468 .sp .6
469 .RS 4n
470 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.
471 .RE
472
473 .sp
474 .ne 2
475 .mk
476 .na
477 \fB\fBusedbychildren\fR\fR
478 .ad
479 .sp .6
480 .RS 4n
481 The amount of space used by children of this dataset, which would be freed if all the dataset's children were destroyed.
482 .RE
483
484 .sp
485 .ne 2
486 .mk
487 .na
488 \fB\fBusedbydataset\fR\fR
489 .ad
490 .sp .6
491 .RS 4n
492 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).
493 .RE
494
495 .sp
496 .ne 2
497 .mk
498 .na
499 \fB\fBusedbyrefreservation\fR\fR
500 .ad
501 .sp .6
502 .RS 4n
503 The amount of space used by a \fBrefreservation\fR set on this dataset, which would be freed if the \fBrefreservation\fR was removed.
504 .RE
505
506 .sp
507 .ne 2
508 .mk
509 .na
510 \fB\fBusedbysnapshots\fR\fR
511 .ad
512 .sp .6
513 .RS 4n
514 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.
515 .RE
516
517 .sp
518 .ne 2
519 .mk
520 .na
521 \fB\fBuserused@\fR\fIuser\fR\fR
522 .ad
523 .sp .6
524 .RS 4n
525 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.
526 .sp
527 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.
528 .sp
529 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:
530 .RS +4
531 .TP
532 .ie t \(bu
533 .el o
534 \fIPOSIX name\fR (for example, \fBjoe\fR)
535 .RE
536 .RS +4
537 .TP
538 .ie t \(bu
539 .el o
540 \fIPOSIX numeric ID\fR (for example, \fB789\fR)
541 .RE
542 .RS +4
543 .TP
544 .ie t \(bu
545 .el o
546 \fISID name\fR (for example, \fBjoe.smith@mydomain\fR)
547 .RE
548 .RS +4
549 .TP
550 .ie t \(bu
551 .el o
552 \fISID numeric ID\fR (for example, \fBS-1-123-456-789\fR)
553 .RE
554 .RE
555
556 .sp
557 .ne 2
558 .mk
559 .na
560 \fB\fBuserrefs\fR\fR
561 .ad
562 .sp .6
563 .RS 4n
564 This property is set to the number of user holds on this snapshot. User holds are set by using the \fBzfs hold\fR command.
565 .RE
566
567 .sp
568 .ne 2
569 .mk
570 .na
571 \fB\fBgroupused@\fR\fIgroup\fR\fR
572 .ad
573 .sp .6
574 .RS 4n
575 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.
576 .sp
577 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.
578 .RE
579
580 .sp
581 .ne 2
582 .mk
583 .na
584 \fB\fBvolblocksize\fR=\fIblocksize\fR\fR
585 .ad
586 .sp .6
587 .RS 4n
588 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.
589 .sp
590 This property can also be referred to by its shortened column name, \fBvolblock\fR.
591 .RE
592
593 .sp
594 .LP
595 The following native properties can be used to change the behavior of a \fBZFS\fR dataset.
596 .sp
597 .ne 2
598 .mk
599 .na
600 \fB\fBaclinherit\fR=\fBdiscard\fR | \fBnoallow\fR | \fBrestricted\fR | \fBpassthrough\fR | \fBpassthrough-x\fR\fR
601 .ad
602 .sp .6
603 .RS 4n
604 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.
605 .sp
606 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.
607 .RE
608
609 .sp
610 .ne 2
611 .mk
612 .na
613 \fB\fBaclmode\fR=\fBdiscard\fR | \fBgroupmask\fR | \fBpassthrough\fR\fR
614 .ad
615 .sp .6
616 .RS 4n
617 Controls how an \fBACL\fR is modified during \fBchmod\fR(2). A file system with an \fBaclmode\fR property of \fBdiscard\fR deletes all \fBACL\fR entries that do not represent the mode of the file. An \fBaclmode\fR property of \fBgroupmask\fR (the default) reduces user or group permissions. The permissions are reduced, such that they are no greater than the group permission bits, unless it is a user entry that has the same \fBUID\fR as the owner of the file or directory. In this case, the \fBACL\fR permissions are reduced so that they are no greater than owner permission bits. A file system with an \fBaclmode\fR property of \fBpassthrough\fR indicates that no changes are made to the \fBACL\fR other than generating the necessary \fBACL\fR entries to represent the new mode of the file or directory.
618 .RE
619
620 .sp
621 .ne 2
622 .mk
623 .na
624 \fB\fBatime\fR=\fBon\fR | \fBoff\fR\fR
625 .ad
626 .sp .6
627 .RS 4n
628 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.
629 .RE
630
631 .sp
632 .ne 2
633 .mk
634 .na
635 \fB\fBcanmount\fR=\fBon\fR | \fBoff\fR | \fBnoauto\fR\fR
636 .ad
637 .sp .6
638 .RS 4n
639 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.
640 .sp
641 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.
642 .sp
643 This property is not inherited.
644 .RE
645
646 .sp
647 .ne 2
648 .mk
649 .na
650 \fB\fBchecksum\fR=\fBon\fR | \fBoff\fR | \fBfletcher2,\fR| \fBfletcher4\fR | \fBsha256\fR\fR
651 .ad
652 .sp .6
653 .RS 4n
654 Controls the checksum used to verify data integrity. The default value is \fBon\fR, which automatically selects an appropriate algorithm (currently, \fBfletcher2\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.
655 .sp
656 Changing this property affects only newly-written data.
657 .RE
658
659 .sp
660 .ne 2
661 .mk
662 .na
663 \fB\fBcompression\fR=\fBon\fR | \fBoff\fR | \fBlzjb\fR | \fBgzip\fR | \fBgzip-\fR\fIN\fR\fR
664 .ad
665 .sp .6
666 .RS 4n
667 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. 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)).
668 .sp
669 This property can also be referred to by its shortened column name \fBcompress\fR. Changing this property affects only newly-written data.
670 .RE
671
672 .sp
673 .ne 2
674 .mk
675 .na
676 \fB\fBcopies\fR=\fB1\fR | \fB2\fR | \fB3\fR\fR
677 .ad
678 .sp .6
679 .RS 4n
680 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.
681 .sp
682 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.
683 .RE
684
685 .sp
686 .ne 2
687 .mk
688 .na
689 \fB\fBdevices\fR=\fBon\fR | \fBoff\fR\fR
690 .ad
691 .sp .6
692 .RS 4n
693 Controls whether device nodes can be opened on this file system. The default value is \fBon\fR.
694 .RE
695
696 .sp
697 .ne 2
698 .mk
699 .na
700 \fB\fBexec\fR=\fBon\fR | \fBoff\fR\fR
701 .ad
702 .sp .6
703 .RS 4n
704 Controls whether processes can be executed from within this file system. The default value is \fBon\fR.
705 .RE
706
707 .sp
708 .ne 2
709 .mk
710 .na
711 \fB\fBmountpoint\fR=\fIpath\fR | \fBnone\fR | \fBlegacy\fR\fR
712 .ad
713 .sp .6
714 .RS 4n
715 Controls the mount point used for this file system. See the "Mount Points" section for more information on how this property is used. 
716 .sp
717 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.
718 .RE
719
720 .sp
721 .ne 2
722 .mk
723 .na
724 \fB\fBnbmand\fR=\fBon\fR | \fBoff\fR\fR
725 .ad
726 .sp .6
727 .RS 4n
728 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.
729 .RE
730
731 .sp
732 .ne 2
733 .mk
734 .na
735 \fB\fBprimarycache\fR=\fBall\fR | \fBnone\fR | \fBmetadata\fR\fR
736 .ad
737 .sp .6
738 .RS 4n
739 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.
740 .RE
741
742 .sp
743 .ne 2
744 .mk
745 .na
746 \fB\fBquota\fR=\fIsize\fR | \fBnone\fR\fR
747 .ad
748 .sp .6
749 .RS 4n
750 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.
751 .sp
752 Quotas cannot be set on volumes, as the \fBvolsize\fR property acts as an implicit quota.
753 .RE
754
755 .sp
756 .ne 2
757 .mk
758 .na
759 \fB\fBuserquota@\fR\fIuser\fR=\fIsize\fR | \fBnone\fR\fR
760 .ad
761 .sp .6
762 .RS 4n
763 Limits the amount of space consumed by the specified user. User space consumption is identified by the \fBuserspace@\fR\fIuser\fR property.
764 .sp
765 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.
766 .sp
767 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.
768 .sp
769 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:
770 .RS +4
771 .TP
772 .ie t \(bu
773 .el o
774 \fIPOSIX name\fR (for example, \fBjoe\fR)
775 .RE
776 .RS +4
777 .TP
778 .ie t \(bu
779 .el o
780 \fIPOSIX numeric ID\fR (for example, \fB789\fR)
781 .RE
782 .RS +4
783 .TP
784 .ie t \(bu
785 .el o
786 \fISID name\fR (for example, \fBjoe.smith@mydomain\fR)
787 .RE
788 .RS +4
789 .TP
790 .ie t \(bu
791 .el o
792 \fISID numeric ID\fR (for example, \fBS-1-123-456-789\fR)
793 .RE
794 .RE
795
796 .sp
797 .ne 2
798 .mk
799 .na
800 \fB\fBgroupquota@\fR\fIgroup\fR=\fIsize\fR | \fBnone\fR\fR
801 .ad
802 .sp .6
803 .RS 4n
804 Limits the amount of space consumed by the specified group. Group space consumption is identified by the \fBuserquota@\fR\fIuser\fR property.
805 .sp
806 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.
807 .RE
808
809 .sp
810 .ne 2
811 .mk
812 .na
813 \fB\fBreadonly\fR=\fBon\fR | \fBoff\fR\fR
814 .ad
815 .sp .6
816 .RS 4n
817 Controls whether this dataset can be modified. The default value is \fBoff\fR.
818 .sp
819 This property can also be referred to by its shortened column name, \fBrdonly\fR.
820 .RE
821
822 .sp
823 .ne 2
824 .mk
825 .na
826 \fB\fBrecordsize\fR=\fIsize\fR\fR
827 .ad
828 .sp .6
829 .RS 4n
830 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. 
831 .sp
832 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.
833 .sp
834 The size specified must be a power of two greater than or equal to 512 and less than or equal to 128 Kbytes.
835 .sp
836 Changing the file system's \fBrecordsize\fR affects only files created afterward; existing files are unaffected.
837 .sp
838 This property can also be referred to by its shortened column name, \fBrecsize\fR.
839 .RE
840
841 .sp
842 .ne 2
843 .mk
844 .na
845 \fB\fBrefquota\fR=\fIsize\fR | \fBnone\fR\fR
846 .ad
847 .sp .6
848 .RS 4n
849 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.
850 .RE
851
852 .sp
853 .ne 2
854 .mk
855 .na
856 \fB\fBrefreservation\fR=\fIsize\fR | \fBnone\fR\fR
857 .ad
858 .sp .6
859 .RS 4n
860 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.
861 .sp
862 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.
863 .sp
864 This property can also be referred to by its shortened column name, \fBrefreserv\fR.
865 .RE
866
867 .sp
868 .ne 2
869 .mk
870 .na
871 \fB\fBreservation\fR=\fIsize\fR | \fBnone\fR\fR
872 .ad
873 .sp .6
874 .RS 4n
875 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.
876 .sp
877 This property can also be referred to by its shortened column name, \fBreserv\fR.
878 .RE
879
880 .sp
881 .ne 2
882 .mk
883 .na
884 \fB\fBsecondarycache\fR=\fBall\fR | \fBnone\fR | \fBmetadata\fR\fR
885 .ad
886 .sp .6
887 .RS 4n
888 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.
889 .RE
890
891 .sp
892 .ne 2
893 .mk
894 .na
895 \fB\fBsetuid\fR=\fBon\fR | \fBoff\fR\fR
896 .ad
897 .sp .6
898 .RS 4n
899 Controls whether the set-\fBUID\fR bit is respected for the file system. The default value is \fBon\fR.
900 .RE
901
902 .sp
903 .ne 2
904 .mk
905 .na
906 \fB\fBshareiscsi\fR=\fBon\fR | \fBoff\fR\fR
907 .ad
908 .sp .6
909 .RS 4n
910 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.
911 .sp
912 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.
913 .RE
914
915 .sp
916 .ne 2
917 .mk
918 .na
919 \fB\fBsharesmb\fR=\fBon\fR | \fBoff\fR | \fIopts\fR\fR
920 .ad
921 .sp .6
922 .RS 4n
923 Controls whether the file system is shared by using the Solaris \fBCIFS\fR service, and what options are to be used. A file system with the \fBsharesmb\fR property set to \fBoff\fR is managed through traditional tools such as \fBsharemgr\fR(1M). 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 \fBsharemgr\fR(1M) command is invoked with no options. Otherwise, the \fBsharemgr\fR(1M) command is invoked with options equivalent to the contents of this property.
924 .sp
925 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. A pseudo property "name" is also supported that allows you to replace the data set name with a specified name. The specified name is then used to replace the prefix dataset in the case of inheritance. For example, if the dataset \fBdata/home/john\fR is set to \fBname=john\fR, then \fBdata/home/john\fR has a resource name of \fBjohn\fR. If a child dataset of \fBdata/home/john/backups\fR, it has a resource name of \fBjohn_backups\fR.
926 .sp
927 When SMB shares are created, the SMB share name appears as an entry in the \fB\&.zfs/shares\fR directory. You can use the \fBls\fR or \fBchmod\fR command to display the share-level ACLs on the entries in this directory.
928 .sp
929 When the \fBsharesmb\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 set to \fBoff\fR, or if they were shared before the property was changed. If the new property is set to \fBoff\fR, the file systems are unshared.
930 .RE
931
932 .sp
933 .ne 2
934 .mk
935 .na
936 \fB\fBsharenfs\fR=\fBon\fR | \fBoff\fR | \fIopts\fR\fR
937 .ad
938 .sp .6
939 .RS 4n
940 Controls whether the file system is shared via \fBNFS\fR, and what options are used. A file system with a \fBsharenfs\fR property of \fBoff\fR is managed through traditional tools such as \fBshare\fR(1M), \fBunshare\fR(1M), and \fBdfstab\fR(4). Otherwise, the file system is automatically shared and unshared with the \fBzfs share\fR and \fBzfs unshare\fR commands. If the property is set to \fBon\fR, the \fBshare\fR(1M) command is invoked with no options. Otherwise, the \fBshare\fR(1M) command is invoked with options equivalent to the contents of this property.
941 .sp
942 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.
943 .RE
944
945 .sp
946 .ne 2
947 .mk
948 .na
949 \fB\fBlogbias\fR = \fBlatency\fR | \fBthroughput\fR\fR
950 .ad
951 .sp .6
952 .RS 4n
953 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.
954 .RE
955
956 .sp
957 .ne 2
958 .mk
959 .na
960 \fB\fBsnapdir\fR=\fBhidden\fR | \fBvisible\fR\fR
961 .ad
962 .sp .6
963 .RS 4n
964 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.
965 .RE
966
967 .sp
968 .ne 2
969 .mk
970 .na
971 \fB\fBversion\fR=\fB1\fR | \fB2\fR | \fBcurrent\fR\fR
972 .ad
973 .sp .6
974 .RS 4n
975 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.
976 .RE
977
978 .sp
979 .ne 2
980 .mk
981 .na
982 \fB\fBvolsize\fR=\fIsize\fR\fR
983 .ad
984 .sp .6
985 .RS 4n
986 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.
987 .sp
988 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.
989 .sp
990 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.
991 .RE
992
993 .sp
994 .ne 2
995 .mk
996 .na
997 \fB\fBvscan\fR=\fBon\fR | \fBoff\fR\fR
998 .ad
999 .sp .6
1000 .RS 4n
1001 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.
1002 .RE
1003
1004 .sp
1005 .ne 2
1006 .mk
1007 .na
1008 \fB\fBxattr\fR=\fBon\fR | \fBoff\fR\fR
1009 .ad
1010 .sp .6
1011 .RS 4n
1012 Controls whether extended attributes are enabled for this file system. The default value is \fBon\fR.
1013 .RE
1014
1015 .sp
1016 .ne 2
1017 .mk
1018 .na
1019 \fB\fBzoned\fR=\fBon\fR | \fBoff\fR\fR
1020 .ad
1021 .sp .6
1022 .RS 4n
1023 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.
1024 .RE
1025
1026 .sp
1027 .LP
1028 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.
1029 .sp
1030 .ne 2
1031 .mk
1032 .na
1033 \fB\fBcasesensitivity\fR=\fBsensitive\fR | \fBinsensitive\fR | \fBmixed\fR\fR
1034 .ad
1035 .sp .6
1036 .RS 4n
1037 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.
1038 .sp
1039 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.
1040 .RE
1041
1042 .sp
1043 .ne 2
1044 .mk
1045 .na
1046 \fB\fBnormalization\fR = \fBnone\fR | \fBformC\fR | \fBformD\fR | \fBformKC\fR | \fBformKD\fR\fR
1047 .ad
1048 .sp .6
1049 .RS 4n
1050 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.
1051 .RE
1052
1053 .sp
1054 .ne 2
1055 .mk
1056 .na
1057 \fB\fButf8only\fR=\fBon\fR | \fBoff\fR\fR
1058 .ad
1059 .sp .6
1060 .RS 4n
1061 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.
1062 .RE
1063
1064 .sp
1065 .LP
1066 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.
1067 .SS "Temporary Mount Point Properties"
1068 .sp
1069 .LP
1070 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:
1071 .sp
1072 .in +2
1073 .nf
1074     PROPERTY                MOUNT OPTION
1075      devices                 devices/nodevices
1076      exec                    exec/noexec
1077      readonly                ro/rw
1078      setuid                  setuid/nosetuid
1079      xattr                   xattr/noxattr
1080 .fi
1081 .in -2
1082 .sp
1083
1084 .sp
1085 .LP
1086 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.
1087 .SS "User Properties"
1088 .sp
1089 .LP
1090 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).
1091 .sp
1092 .LP
1093 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).
1094 .sp
1095 .LP
1096 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).
1097 .sp
1098 .LP
1099 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.
1100 .SS "ZFS Volumes as Swap"
1101 .sp
1102 .LP
1103 Do not swap to a file on a \fBZFS\fR file system. A \fBZFS\fR swap file configuration is not supported.
1104 .SH SUBCOMMANDS
1105 .sp
1106 .LP
1107 All subcommands that modify state are logged persistently to the pool in their original form.
1108 .sp
1109 .ne 2
1110 .mk
1111 .na
1112 \fB\fBzfs ?\fR\fR
1113 .ad
1114 .sp .6
1115 .RS 4n
1116 Displays a help message.
1117 .RE
1118
1119 .sp
1120 .ne 2
1121 .mk
1122 .na
1123 \fB\fBzfs create\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem\fR\fR
1124 .ad
1125 .sp .6
1126 .RS 4n
1127 Creates a new \fBZFS\fR file system. The file system is automatically mounted according to the \fBmountpoint\fR property inherited from the parent.
1128 .sp
1129 .ne 2
1130 .mk
1131 .na
1132 \fB\fB-p\fR\fR
1133 .ad
1134 .sp .6
1135 .RS 4n
1136 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.
1137 .RE
1138
1139 .sp
1140 .ne 2
1141 .mk
1142 .na
1143 \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1144 .ad
1145 .sp .6
1146 .RS 4n
1147 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.
1148 .RE
1149
1150 .RE
1151
1152 .sp
1153 .ne 2
1154 .mk
1155 .na
1156 \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
1157 .ad
1158 .sp .6
1159 .RS 4n
1160 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.
1161 .sp
1162 \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.
1163 .sp
1164 .ne 2
1165 .mk
1166 .na
1167 \fB\fB-p\fR\fR
1168 .ad
1169 .sp .6
1170 .RS 4n
1171 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.
1172 .RE
1173
1174 .sp
1175 .ne 2
1176 .mk
1177 .na
1178 \fB\fB-s\fR\fR
1179 .ad
1180 .sp .6
1181 .RS 4n
1182 Creates a sparse volume with no reservation. See \fBvolsize\fR in the Native Properties section for more information about sparse volumes.
1183 .RE
1184
1185 .sp
1186 .ne 2
1187 .mk
1188 .na
1189 \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1190 .ad
1191 .sp .6
1192 .RS 4n
1193 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.
1194 .RE
1195
1196 .sp
1197 .ne 2
1198 .mk
1199 .na
1200 \fB\fB-b\fR \fIblocksize\fR\fR
1201 .ad
1202 .sp .6
1203 .RS 4n
1204 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.
1205 .RE
1206
1207 .RE
1208
1209 .sp
1210 .ne 2
1211 .mk
1212 .na
1213 \fB\fBzfs destroy\fR [\fB-rRf\fR] \fIfilesystem\fR|\fIvolume\fR\fR
1214 .ad
1215 .sp .6
1216 .RS 4n
1217 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).
1218 .sp
1219 .ne 2
1220 .mk
1221 .na
1222 \fB\fB-r\fR\fR
1223 .ad
1224 .sp .6
1225 .RS 4n
1226 Recursively destroy all children.
1227 .RE
1228
1229 .sp
1230 .ne 2
1231 .mk
1232 .na
1233 \fB\fB-R\fR\fR
1234 .ad
1235 .sp .6
1236 .RS 4n
1237 Recursively destroy all dependents, including cloned file systems outside the target hierarchy.
1238 .RE
1239
1240 .sp
1241 .ne 2
1242 .mk
1243 .na
1244 \fB\fB-f\fR\fR
1245 .ad
1246 .sp .6
1247 .RS 4n
1248 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.
1249 .RE
1250
1251 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.
1252 .RE
1253
1254 .sp
1255 .ne 2
1256 .mk
1257 .na
1258 \fB\fBzfs destroy\fR [\fB-rRd\fR] \fIsnapshot\fR\fR
1259 .ad
1260 .sp .6
1261 .RS 4n
1262 The given snapshot is 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.
1263 .sp
1264 If the 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.
1265 .sp
1266 .ne 2
1267 .mk
1268 .na
1269 \fB\fB-d\fR\fR
1270 .ad
1271 .sp .6
1272 .RS 4n
1273 Defer snapshot deletion.
1274 .RE
1275
1276 .sp
1277 .ne 2
1278 .mk
1279 .na
1280 \fB\fB-r\fR\fR
1281 .ad
1282 .sp .6
1283 .RS 4n
1284 Destroy (or mark for deferred destruction) all snapshots with this name in descendent file systems.
1285 .RE
1286
1287 .sp
1288 .ne 2
1289 .mk
1290 .na
1291 \fB\fB-R\fR\fR
1292 .ad
1293 .sp .6
1294 .RS 4n
1295 Recursively destroy all dependents.
1296 .RE
1297
1298 .RE
1299
1300 .sp
1301 .ne 2
1302 .mk
1303 .na
1304 \fB\fBzfs snapshot\fR [\fB-r\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem@snapname\fR|\fIvolume@snapname\fR\fR
1305 .ad
1306 .sp .6
1307 .RS 4n
1308 Creates a snapshot with the given name. All previous modifications by successful system calls to the file system are part of the snapshot. See the "Snapshots" section for details.
1309 .sp
1310 .ne 2
1311 .mk
1312 .na
1313 \fB\fB-r\fR\fR
1314 .ad
1315 .sp .6
1316 .RS 4n
1317 Recursively create snapshots of all descendent datasets. Snapshots are taken atomically, so that all recursive snapshots correspond to the same moment in time.
1318 .RE
1319
1320 .sp
1321 .ne 2
1322 .mk
1323 .na
1324 \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1325 .ad
1326 .sp .6
1327 .RS 4n
1328 Sets the specified property; see \fBzfs create\fR for details.
1329 .RE
1330
1331 .RE
1332
1333 .sp
1334 .ne 2
1335 .mk
1336 .na
1337 \fB\fBzfs rollback\fR [\fB-rRf\fR] \fIsnapshot\fR\fR
1338 .ad
1339 .sp .6
1340 .RS 4n
1341 Roll back the given dataset to a previous snapshot. When a dataset is rolled back, all data that has changed since the snapshot is discarded, and the dataset reverts to the state at the time of the snapshot. By default, the command refuses to roll back to a snapshot other than the most recent one. In order to do so, all intermediate snapshots must be destroyed by specifying the \fB-r\fR option.
1342 .sp
1343 The \fB-rR\fR options do not recursively destroy the child snapshots of a recursive snapshot. Only the top-level recursive snapshot is destroyed by either of these options. To completely roll back a recursive snapshot, you must rollback the individual child snapshots.
1344 .sp
1345 .ne 2
1346 .mk
1347 .na
1348 \fB\fB-r\fR\fR
1349 .ad
1350 .sp .6
1351 .RS 4n
1352 Recursively destroy any snapshots more recent than the one specified.
1353 .RE
1354
1355 .sp
1356 .ne 2
1357 .mk
1358 .na
1359 \fB\fB-R\fR\fR
1360 .ad
1361 .sp .6
1362 .RS 4n
1363 Recursively destroy any more recent snapshots, as well as any clones of those snapshots.
1364 .RE
1365
1366 .sp
1367 .ne 2
1368 .mk
1369 .na
1370 \fB\fB-f\fR\fR
1371 .ad
1372 .sp .6
1373 .RS 4n
1374 Used with the \fB-R\fR option to force an unmount of any clone file systems that are to be destroyed.
1375 .RE
1376
1377 .RE
1378
1379 .sp
1380 .ne 2
1381 .mk
1382 .na
1383 \fB\fBzfs clone\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIsnapshot\fR \fIfilesystem\fR|\fIvolume\fR\fR
1384 .ad
1385 .sp .6
1386 .RS 4n
1387 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.
1388 .sp
1389 .ne 2
1390 .mk
1391 .na
1392 \fB\fB-p\fR\fR
1393 .ad
1394 .sp .6
1395 .RS 4n
1396 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.
1397 .RE
1398
1399 .sp
1400 .ne 2
1401 .mk
1402 .na
1403 \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1404 .ad
1405 .sp .6
1406 .RS 4n
1407 Sets the specified property; see \fBzfs create\fR for details.
1408 .RE
1409
1410 .RE
1411
1412 .sp
1413 .ne 2
1414 .mk
1415 .na
1416 \fB\fBzfs promote\fR \fIclone-filesystem\fR\fR
1417 .ad
1418 .sp .6
1419 .RS 4n
1420 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. 
1421 .sp
1422 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.
1423 .RE
1424
1425 .sp
1426 .ne 2
1427 .mk
1428 .na
1429 \fB\fBzfs rename\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
1430 .ad
1431 .br
1432 .na
1433 \fB\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
1434 .ad
1435 .br
1436 .na
1437 \fB\fBzfs rename\fR [\fB-p\fR] \fIfilesystem\fR|\fIvolume\fR \fIfilesystem\fR|\fIvolume\fR\fR
1438 .ad
1439 .sp .6
1440 .RS 4n
1441 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.
1442 .sp
1443 .ne 2
1444 .mk
1445 .na
1446 \fB\fB-p\fR\fR
1447 .ad
1448 .sp .6
1449 .RS 4n
1450 Creates all the nonexistent parent datasets. Datasets created in this manner are automatically mounted according to the \fBmountpoint\fR property inherited from their parent.
1451 .RE
1452
1453 .RE
1454
1455 .sp
1456 .ne 2
1457 .mk
1458 .na
1459 \fB\fBzfs rename\fR \fB-r\fR \fIsnapshot\fR \fIsnapshot\fR\fR
1460 .ad
1461 .sp .6
1462 .RS 4n
1463 Recursively rename the snapshots of all descendent datasets. Snapshots are the only dataset that can be renamed recursively.
1464 .RE
1465
1466 .sp
1467 .ne 2
1468 .mk
1469 .na
1470 \fB\fBzfs\fR \fBlist\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR] [\fB-H\fR] [\fB-o\fR \fIproperty\fR[,\fI\&...\fR]] [ \fB-t\fR \fItype\fR[,\fI\&...\fR]] [ \fB-s\fR \fIproperty\fR ] ... [ \fB-S\fR \fIproperty\fR ] ... [\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR] ...\fR
1471 .ad
1472 .sp .6
1473 .RS 4n
1474 Lists the property information for the given datasets in tabular form. If specified, you can list property information by the absolute pathname or the relative pathname. By default, all file systems and volumes are displayed. Snapshots are displayed if the \fBlistsnaps\fR property is \fBon\fR (the default is \fBoff\fR) . The following fields are displayed, \fBname,used,available,referenced,mountpoint\fR.
1475 .sp
1476 .ne 2
1477 .mk
1478 .na
1479 \fB\fB-H\fR\fR
1480 .ad
1481 .sp .6
1482 .RS 4n
1483 Used for scripting mode. Do not print headers and separate fields by a single tab instead of arbitrary white space.
1484 .RE
1485
1486 .sp
1487 .ne 2
1488 .mk
1489 .na
1490 \fB\fB-r\fR\fR
1491 .ad
1492 .sp .6
1493 .RS 4n
1494 Recursively display any children of the dataset on the command line. 
1495 .RE
1496
1497 .sp
1498 .ne 2
1499 .mk
1500 .na
1501 \fB\fB-d\fR \fIdepth\fR\fR
1502 .ad
1503 .sp .6
1504 .RS 4n
1505 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.
1506 .RE
1507
1508 .sp
1509 .ne 2
1510 .mk
1511 .na
1512 \fB\fB-o\fR \fIproperty\fR\fR
1513 .ad
1514 .sp .6
1515 .RS 4n
1516 A comma-separated list of properties to display. The property must be:
1517 .RS +4
1518 .TP
1519 .ie t \(bu
1520 .el o
1521 One of the properties described in the "Native Properties" section
1522 .RE
1523 .RS +4
1524 .TP
1525 .ie t \(bu
1526 .el o
1527 A user property
1528 .RE
1529 .RS +4
1530 .TP
1531 .ie t \(bu
1532 .el o
1533 The value \fBname\fR to display the dataset name
1534 .RE
1535 .RS +4
1536 .TP
1537 .ie t \(bu
1538 .el o
1539 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.
1540 .RE
1541 .RE
1542
1543 .sp
1544 .ne 2
1545 .mk
1546 .na
1547 \fB\fB-s\fR \fIproperty\fR\fR
1548 .ad
1549 .sp .6
1550 .RS 4n
1551 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.
1552 .sp
1553 The following is a list of sorting criteria:
1554 .RS +4
1555 .TP
1556 .ie t \(bu
1557 .el o
1558 Numeric types sort in numeric order.
1559 .RE
1560 .RS +4
1561 .TP
1562 .ie t \(bu
1563 .el o
1564 String types sort in alphabetical order.
1565 .RE
1566 .RS +4
1567 .TP
1568 .ie t \(bu
1569 .el o
1570 Types inappropriate for a row sort that row to the literal bottom, regardless of the specified ordering.
1571 .RE
1572 .RS +4
1573 .TP
1574 .ie t \(bu
1575 .el o
1576 If no sorting options are specified the existing behavior of \fBzfs list\fR is preserved.
1577 .RE
1578 .RE
1579
1580 .sp
1581 .ne 2
1582 .mk
1583 .na
1584 \fB\fB-S\fR \fIproperty\fR\fR
1585 .ad
1586 .sp .6
1587 .RS 4n
1588 Same as the \fB-s\fR option, but sorts by property in descending order. 
1589 .RE
1590
1591 .sp
1592 .ne 2
1593 .mk
1594 .na
1595 \fB\fB-t\fR \fItype\fR\fR
1596 .ad
1597 .sp .6
1598 .RS 4n
1599 A comma-separated list of types to display, where \fItype\fR is one of \fBfilesystem\fR, \fBsnapshot\fR , \fBvolume\fR, or \fBall\fR. For example, specifying \fB-t snapshot\fR displays only snapshots.
1600 .RE
1601
1602 .RE
1603
1604 .sp
1605 .ne 2
1606 .mk
1607 .na
1608 \fB\fBzfs set\fR \fIproperty\fR=\fIvalue\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
1609 .ad
1610 .sp .6
1611 .RS 4n
1612 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.
1613 .RE
1614
1615 .sp
1616 .ne 2
1617 .mk
1618 .na
1619 \fB\fBzfs get\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR] [\fB-Hp\fR] [\fB-o\fR \fIfield\fR[,...] [\fB-s\fR \fIsource\fR[,...] "\fIall\fR" | \fIproperty\fR[,...] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
1620 .ad
1621 .sp .6
1622 .RS 4n
1623 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:
1624 .sp
1625 .in +2
1626 .nf
1627     name      Dataset name
1628      property  Property name
1629      value     Property value
1630      source    Property source. Can either be local, default,
1631                temporary, inherited, or none (-).
1632 .fi
1633 .in -2
1634 .sp
1635
1636 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.
1637 .sp
1638 The special value \fBall\fR can be used to display all properties that apply to the given dataset's type (filesystem, volume, or snapshot).
1639 .sp
1640 .ne 2
1641 .mk
1642 .na
1643 \fB\fB-r\fR\fR
1644 .ad
1645 .sp .6
1646 .RS 4n
1647 Recursively display properties for any children.
1648 .RE
1649
1650 .sp
1651 .ne 2
1652 .mk
1653 .na
1654 \fB\fB-d\fR \fIdepth\fR\fR
1655 .ad
1656 .sp .6
1657 .RS 4n
1658 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.
1659 .RE
1660
1661 .sp
1662 .ne 2
1663 .mk
1664 .na
1665 \fB\fB-H\fR\fR
1666 .ad
1667 .sp .6
1668 .RS 4n
1669 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.
1670 .RE
1671
1672 .sp
1673 .ne 2
1674 .mk
1675 .na
1676 \fB\fB-o\fR \fIfield\fR\fR
1677 .ad
1678 .sp .6
1679 .RS 4n
1680 A comma-separated list of columns to display. \fBname,property,value,source\fR is the default value. 
1681 .RE
1682
1683 .sp
1684 .ne 2
1685 .mk
1686 .na
1687 \fB\fB-s\fR \fIsource\fR\fR
1688 .ad
1689 .sp .6
1690 .RS 4n
1691 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.
1692 .RE
1693
1694 .sp
1695 .ne 2
1696 .mk
1697 .na
1698 \fB\fB-p\fR\fR
1699 .ad
1700 .sp .6
1701 .RS 4n
1702 Display numbers in parseable (exact) values.
1703 .RE
1704
1705 .RE
1706
1707 .sp
1708 .ne 2
1709 .mk
1710 .na
1711 \fB\fBzfs inherit\fR [\fB-r\fR] \fIproperty\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
1712 .ad
1713 .sp .6
1714 .RS 4n
1715 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.
1716 .sp
1717 .ne 2
1718 .mk
1719 .na
1720 \fB\fB-r\fR\fR
1721 .ad
1722 .sp .6
1723 .RS 4n
1724 Recursively inherit the given property for all children.
1725 .RE
1726
1727 .RE
1728
1729 .sp
1730 .ne 2
1731 .mk
1732 .na
1733 \fB\fBzfs upgrade\fR [\fB-v\fR]\fR
1734 .ad
1735 .sp .6
1736 .RS 4n
1737 Displays a list of file systems that are not the most recent version.
1738 .RE
1739
1740 .sp
1741 .ne 2
1742 .mk
1743 .na
1744 \fB\fBzfs upgrade\fR [\fB-r\fR] [\fB-V\fR \fIversion\fR] [\fB-a\fR | \fIfilesystem\fR]\fR
1745 .ad
1746 .sp .6
1747 .RS 4n
1748 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.
1749 .sp
1750 In general, the file system version is independent of the pool version. See \fBzpool\fR(8) for information on the \fBzpool upgrade\fR command. 
1751 .sp
1752 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.
1753 .sp
1754 .ne 2
1755 .mk
1756 .na
1757 \fB\fB-a\fR\fR
1758 .ad
1759 .sp .6
1760 .RS 4n
1761 Upgrade all file systems on all imported pools.
1762 .RE
1763
1764 .sp
1765 .ne 2
1766 .mk
1767 .na
1768 \fB\fIfilesystem\fR\fR
1769 .ad
1770 .sp .6
1771 .RS 4n
1772 Upgrade the specified file system. 
1773 .RE
1774
1775 .sp
1776 .ne 2
1777 .mk
1778 .na
1779 \fB\fB-r\fR\fR
1780 .ad
1781 .sp .6
1782 .RS 4n
1783 Upgrade the specified file system and all descendent file systems 
1784 .RE
1785
1786 .sp
1787 .ne 2
1788 .mk
1789 .na
1790 \fB\fB-V\fR \fIversion\fR\fR
1791 .ad
1792 .sp .6
1793 .RS 4n
1794 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.
1795 .RE
1796
1797 .RE
1798
1799 .sp
1800 .ne 2
1801 .mk
1802 .na
1803 \fB\fBzfs userspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR]... [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR | \fIsnapshot\fR\fR
1804 .ad
1805 .sp .6
1806 .RS 4n
1807 Displays space consumed by, and quotas on, each user in the specified filesystem or snapshot. This corresponds to the \fBuserused@\fR\fIuser\fR and \fBuserquota@\fR\fIuser\fR properties.
1808 .sp
1809 .ne 2
1810 .mk
1811 .na
1812 \fB\fB-n\fR\fR
1813 .ad
1814 .sp .6
1815 .RS 4n
1816 Print numeric ID instead of user/group name.
1817 .RE
1818
1819 .sp
1820 .ne 2
1821 .mk
1822 .na
1823 \fB\fB-H\fR\fR
1824 .ad
1825 .sp .6
1826 .RS 4n
1827 Do not print headers, use tab-delimited output.
1828 .RE
1829
1830 .sp
1831 .ne 2
1832 .mk
1833 .na
1834 \fB\fB-p\fR\fR
1835 .ad
1836 .sp .6
1837 .RS 4n
1838 Use exact (parseable) numeric output.
1839 .RE
1840
1841 .sp
1842 .ne 2
1843 .mk
1844 .na
1845 \fB\fB-o\fR \fIfield\fR[,...]\fR
1846 .ad
1847 .sp .6
1848 .RS 4n
1849 Display only the specified fields from the following set, \fBtype,name,used,quota\fR.The default is to display all fields.
1850 .RE
1851
1852 .sp
1853 .ne 2
1854 .mk
1855 .na
1856 \fB\fB-s\fR \fIfield\fR\fR
1857 .ad
1858 .sp .6
1859 .RS 4n
1860 Sort output by this field. The \fIs\fR and \fIS\fR flags may be specified multiple times to sort first by one field, then by another. The default is \fB-s type\fR \fB-s name\fR.
1861 .RE
1862
1863 .sp
1864 .ne 2
1865 .mk
1866 .na
1867 \fB\fB-S\fR \fIfield\fR\fR
1868 .ad
1869 .sp .6
1870 .RS 4n
1871 Sort by this field in reverse order. See \fB-s\fR.
1872 .RE
1873
1874 .sp
1875 .ne 2
1876 .mk
1877 .na
1878 \fB\fB-t\fR \fItype\fR[,...]\fR
1879 .ad
1880 .sp .6
1881 .RS 4n
1882 Print only the specified types from the following set, \fBall,posixuser,smbuser,posixgroup,smbgroup\fR.
1883 .sp
1884 The default is \fB-t posixuser,smbuser\fR
1885 .sp
1886 The default can be changed to include group types.
1887 .RE
1888
1889 .sp
1890 .ne 2
1891 .mk
1892 .na
1893 \fB\fB-i\fR\fR
1894 .ad
1895 .sp .6
1896 .RS 4n
1897 Translate SID to POSIX ID. The POSIX ID may be ephemeral if no mapping exists. Normal POSIX interfaces (for example, \fBstat\fR(2), \fBls\fR \fB-l\fR) perform this translation, so the \fB-i\fR option allows the output from \fBzfs userspace\fR to be compared directly with those utilities. However, \fB-i\fR may lead to confusion if some files were created by an SMB user before a SMB-to-POSIX name mapping was established. In such a case, some files are owned by the SMB entity and some by the POSIX entity. However, the \fB-i\fR option will report that the POSIX entity has the total usage and quota for both.
1898 .RE
1899
1900 .RE
1901
1902 .sp
1903 .ne 2
1904 .mk
1905 .na
1906 \fB\fBzfs groupspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR \fIfield\fR]... [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR | \fIsnapshot\fR\fR
1907 .ad
1908 .sp .6
1909 .RS 4n
1910 Displays space consumed by, and quotas on, each group in the specified filesystem or snapshot. This subcommand is identical to \fBzfs userspace\fR, except that the default types to display are \fB-t posixgroup,smbgroup\fR.
1911 .sp
1912 .in +2
1913 .nf
1914 -
1915 .fi
1916 .in -2
1917 .sp
1918
1919 .RE
1920
1921 .sp
1922 .ne 2
1923 .mk
1924 .na
1925 \fB\fBzfs mount\fR\fR
1926 .ad
1927 .sp .6
1928 .RS 4n
1929 Displays all \fBZFS\fR file systems currently mounted.
1930 .RE
1931
1932 .sp
1933 .ne 2
1934 .mk
1935 .na
1936 \fB\fBzfs mount\fR [\fB-vO\fR] [\fB-o\fR \fIoptions\fR] \fB-a\fR | \fIfilesystem\fR\fR
1937 .ad
1938 .sp .6
1939 .RS 4n
1940 Mounts \fBZFS\fR file systems. Invoked automatically as part of the boot process.
1941 .sp
1942 .ne 2
1943 .mk
1944 .na
1945 \fB\fB-o\fR \fIoptions\fR\fR
1946 .ad
1947 .sp .6
1948 .RS 4n
1949 An optional, comma-separated list of mount options to use temporarily for the duration of the mount. See the "Temporary Mount Point Properties" section for details.
1950 .RE
1951
1952 .sp
1953 .ne 2
1954 .mk
1955 .na
1956 \fB\fB-O\fR\fR
1957 .ad
1958 .sp .6
1959 .RS 4n
1960 Perform an overlay mount. See \fBmount\fR(8) for more information.
1961 .RE
1962
1963 .sp
1964 .ne 2
1965 .mk
1966 .na
1967 \fB\fB-v\fR\fR
1968 .ad
1969 .sp .6
1970 .RS 4n
1971 Report mount progress.
1972 .RE
1973
1974 .sp
1975 .ne 2
1976 .mk
1977 .na
1978 \fB\fB-a\fR\fR
1979 .ad
1980 .sp .6
1981 .RS 4n
1982 Mount all available \fBZFS\fR file systems. Invoked automatically as part of the boot process. 
1983 .RE
1984
1985 .sp
1986 .ne 2
1987 .mk
1988 .na
1989 \fB\fIfilesystem\fR\fR
1990 .ad
1991 .sp .6
1992 .RS 4n
1993 Mount the specified filesystem.
1994 .RE
1995
1996 .RE
1997
1998 .sp
1999 .ne 2
2000 .mk
2001 .na
2002 \fB\fBzfs unmount\fR [\fB-f\fR] \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR\fR
2003 .ad
2004 .sp .6
2005 .RS 4n
2006 Unmounts currently mounted \fBZFS\fR file systems. Invoked automatically as part of the shutdown process.
2007 .sp
2008 .ne 2
2009 .mk
2010 .na
2011 \fB\fB-f\fR\fR
2012 .ad
2013 .sp .6
2014 .RS 4n
2015 Forcefully unmount the file system, even if it is currently in use.
2016 .RE
2017
2018 .sp
2019 .ne 2
2020 .mk
2021 .na
2022 \fB\fB-a\fR\fR
2023 .ad
2024 .sp .6
2025 .RS 4n
2026 Unmount all available \fBZFS\fR file systems. Invoked automatically as part of the boot process. 
2027 .RE
2028
2029 .sp
2030 .ne 2
2031 .mk
2032 .na
2033 \fB\fIfilesystem\fR|\fImountpoint\fR\fR
2034 .ad
2035 .sp .6
2036 .RS 4n
2037 Unmount the specified filesystem. The command can also be given a path to a \fBZFS\fR file system mount point on the system.
2038 .RE
2039
2040 .RE
2041
2042 .sp
2043 .ne 2
2044 .mk
2045 .na
2046 \fB\fBzfs share\fR \fB-a\fR | \fIfilesystem\fR\fR
2047 .ad
2048 .sp .6
2049 .RS 4n
2050 Shares available \fBZFS\fR file systems. 
2051 .sp
2052 .ne 2
2053 .mk
2054 .na
2055 \fB\fB-a\fR\fR
2056 .ad
2057 .sp .6
2058 .RS 4n
2059 Share all available \fBZFS\fR file systems. Invoked automatically as part of the boot process. 
2060 .RE
2061
2062 .sp
2063 .ne 2
2064 .mk
2065 .na
2066 \fB\fIfilesystem\fR\fR
2067 .ad
2068 .sp .6
2069 .RS 4n
2070 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.
2071 .RE
2072
2073 .RE
2074
2075 .sp
2076 .ne 2
2077 .mk
2078 .na
2079 \fB\fBzfs unshare\fR \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR\fR
2080 .ad
2081 .sp .6
2082 .RS 4n
2083 Unshares currently shared \fBZFS\fR file systems. This is invoked automatically as part of the shutdown process.
2084 .sp
2085 .ne 2
2086 .mk
2087 .na
2088 \fB\fB-a\fR\fR
2089 .ad
2090 .sp .6
2091 .RS 4n
2092 Unshare all available \fBZFS\fR file systems. Invoked automatically as part of the boot process. 
2093 .RE
2094
2095 .sp
2096 .ne 2
2097 .mk
2098 .na
2099 \fB\fIfilesystem\fR|\fImountpoint\fR\fR
2100 .ad
2101 .sp .6
2102 .RS 4n
2103 Unshare the specified filesystem. The command can also be given a path to a \fBZFS\fR file system shared on the system.
2104 .RE
2105
2106 .RE
2107
2108 .sp
2109 .ne 2
2110 .mk
2111 .na
2112 \fB\fBzfs send\fR [\fB-vRDp\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR] \fIsnapshot\fR\fR
2113 .ad
2114 .sp .6
2115 .RS 4n
2116 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.
2117 .sp
2118 .ne 2
2119 .mk
2120 .na
2121 \fB\fB-i\fR \fIsnapshot\fR\fR
2122 .ad
2123 .sp .6
2124 .RS 4n
2125 Generate an incremental stream from the first \fIsnapshot\fR to the second \fIsnapshot\fR. The incremental source (the first \fIsnapshot\fR) can be specified as the last component of the snapshot name (for example, the part after the \fB@\fR), and it is assumed to be from the same file system as the second \fIsnapshot\fR.
2126 .sp
2127 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).
2128 .RE
2129
2130 .sp
2131 .ne 2
2132 .mk
2133 .na
2134 \fB\fB-I\fR \fIsnapshot\fR\fR
2135 .ad
2136 .sp .6
2137 .RS 4n
2138 Generate a stream package that sends all intermediary snapshots from the first snapshot to the second snapshot. For example, \fB-I @a fs@d\fR is similar to \fB-i @a fs@b; -i @b fs@c; -i @c fs@d\fR. The incremental source snapshot may be specified as with the \fB-i\fR option.
2139 .RE
2140
2141 .sp
2142 .ne 2
2143 .mk
2144 .na
2145 \fB\fB-v\fR\fR
2146 .ad
2147 .sp .6
2148 .RS 4n
2149 Print verbose information about the stream package generated.
2150 .RE
2151
2152 .sp
2153 .ne 2
2154 .mk
2155 .na
2156 \fB\fB-R\fR\fR
2157 .ad
2158 .sp .6
2159 .RS 4n
2160 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.
2161 .sp
2162 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. 
2163 .RE
2164
2165 .sp
2166 .ne 2
2167 .mk
2168 .na
2169 \fB\fB-D\fR\fR
2170 .ad
2171 .sp .6
2172 .RS 4n
2173 This option will cause dedup processing to be performed on the data being written to a send stream.  Dedup processing is optional because it isn't always appropriate (some kinds of data have very little duplication) and it has significant costs:  the checksumming required to detect duplicate blocks is CPU-intensive and the data that must be maintained while the stream is being processed can occupy a very large amount of memory.
2174 .sp
2175 Duplicate blocks are detected by calculating a cryptographically strong checksum on each data block.  Blocks that have the same checksum are presumed to be identical.  The checksum type used at this time is SHA256.  However, the stream format contains a field which identifies the checksum type, permitting other checksums to be used in the future.
2176 .RE
2177
2178 .sp
2179 .ne 2
2180 .mk
2181 .na
2182 \fB\fB-p\fR\fR
2183 .ad
2184 .sp .6
2185 .RS 4n
2186 Include properties in the send stream without the -R option.
2187 .RE
2188
2189 The format of the stream is committed. You will be able to receive your streams on future versions of \fBZFS\fR.
2190 .RE
2191
2192 .sp
2193 .ne 2
2194 .mk
2195 .na
2196 \fB\fBzfs receive\fR [\fB-vnFu\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
2197 .ad
2198 .br
2199 .na
2200 \fB\fBzfs receive\fR [\fB-vnFu\fR] \fB-d\fR \fIfilesystem\fR\fR
2201 .ad
2202 .sp .6
2203 .RS 4n
2204 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.
2205 .sp
2206 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.
2207 .sp
2208 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.
2209 .sp
2210 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 \fB-d\fR option.
2211 .sp
2212 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 the \fB-d\fR option is specified, the snapshot name is determined by appending the sent snapshot's name to the specified \fIfilesystem\fR. If the \fB-d\fR option is specified, any required file systems within the specified one are created.
2213 .sp
2214 .ne 2
2215 .mk
2216 .na
2217 \fB\fB-d\fR\fR
2218 .ad
2219 .sp .6
2220 .RS 4n
2221 Use the name of the sent snapshot to determine the name of the new snapshot as described in the paragraph above.
2222 .RE
2223
2224 .sp
2225 .ne 2
2226 .mk
2227 .na
2228 \fB\fB-u\fR\fR
2229 .ad
2230 .sp .6
2231 .RS 4n
2232 File system that is associated with the received stream is not mounted.
2233 .RE
2234
2235 .sp
2236 .ne 2
2237 .mk
2238 .na
2239 \fB\fB-v\fR\fR
2240 .ad
2241 .sp .6
2242 .RS 4n
2243 Print verbose information about the stream and the time required to perform the receive operation.
2244 .RE
2245
2246 .sp
2247 .ne 2
2248 .mk
2249 .na
2250 \fB\fB-n\fR\fR
2251 .ad
2252 .sp .6
2253 .RS 4n
2254 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.
2255 .RE
2256
2257 .sp
2258 .ne 2
2259 .mk
2260 .na
2261 \fB\fB-F\fR\fR
2262 .ad
2263 .sp .6
2264 .RS 4n
2265 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.
2266 .RE
2267
2268 .RE
2269
2270 .sp
2271 .ne 2
2272 .mk
2273 .na
2274 \fB\fBzfs allow\fR \fIfilesystem\fR | \fIvolume\fR\fR
2275 .ad
2276 .sp .6
2277 .RS 4n
2278 Displays permissions that have been delegated on the specified filesystem or volume. See the other forms of \fBzfs allow\fR for more information.
2279 .RE
2280
2281 .sp
2282 .ne 2
2283 .mk
2284 .na
2285 \fB\fBzfs allow\fR [\fB-ldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR| \fIvolume\fR\fR
2286 .ad
2287 .br
2288 .na
2289 \fB\fBzfs allow\fR [\fB-ld\fR] \fB-e\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR | \fIvolume\fR\fR
2290 .ad
2291 .sp .6
2292 .RS 4n
2293 Delegates \fBZFS\fR administration permission for the file systems to non-privileged users.
2294 .sp
2295 .ne 2
2296 .mk
2297 .na
2298 \fB[\fB-ug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...]\fR
2299 .ad
2300 .sp .6
2301 .RS 4n
2302 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.
2303 .RE
2304
2305 .sp
2306 .ne 2
2307 .mk
2308 .na
2309 \fB[\fB-e\fR] \fIperm\fR|@\fIsetname\fR[,...]\fR
2310 .ad
2311 .sp .6
2312 .RS 4n
2313 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.
2314 .RE
2315
2316 .sp
2317 .ne 2
2318 .mk
2319 .na
2320 \fB[\fB-ld\fR] \fIfilesystem\fR|\fIvolume\fR\fR
2321 .ad
2322 .sp .6
2323 .RS 4n
2324 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.
2325 .RE
2326
2327 .RE
2328
2329 .sp
2330 .LP
2331 Permissions are generally the ability to use a \fBZFS\fR subcommand or change a \fBZFS\fR property. The following permissions are available:
2332 .sp
2333 .in +2
2334 .nf
2335 NAME             TYPE           NOTES
2336 allow            subcommand     Must also have the permission that is being
2337                                 allowed
2338 clone            subcommand     Must also have the 'create' ability and 'mount'
2339                                 ability in the origin file system
2340 create           subcommand     Must also have the 'mount' ability
2341 destroy          subcommand     Must also have the 'mount' ability
2342 mount            subcommand     Allows mount/umount of ZFS datasets
2343 promote          subcommand     Must also have the 'mount'
2344                                 and 'promote' ability in the origin file system
2345 receive          subcommand     Must also have the 'mount' and 'create' ability
2346 rename           subcommand     Must also have the 'mount' and 'create'
2347                                 ability in the new parent
2348 rollback         subcommand     Must also have the 'mount' ability
2349 send             subcommand     
2350 share            subcommand     Allows sharing file systems over NFS or SMB
2351                                 protocols
2352 snapshot         subcommand     Must also have the 'mount' ability
2353 groupquota       other          Allows accessing any groupquota@... property
2354 groupused        other          Allows reading any groupused@... property
2355 userprop         other          Allows changing any user property
2356 userquota        other          Allows accessing any userquota@... property
2357 userused         other          Allows reading any userused@... property
2358
2359 aclinherit       property       
2360 aclmode          property       
2361 atime            property       
2362 canmount         property       
2363 casesensitivity  property       
2364 checksum         property       
2365 compression      property       
2366 copies           property       
2367 devices          property       
2368 exec             property       
2369 mountpoint       property       
2370 nbmand           property       
2371 normalization    property       
2372 primarycache     property       
2373 quota            property       
2374 readonly         property       
2375 recordsize       property       
2376 refquota         property       
2377 refreservation   property       
2378 reservation      property       
2379 secondarycache   property       
2380 setuid           property       
2381 shareiscsi       property       
2382 sharenfs         property       
2383 sharesmb         property       
2384 snapdir          property       
2385 utf8only         property       
2386 version          property       
2387 volblocksize     property       
2388 volsize          property       
2389 vscan            property       
2390 xattr            property       
2391 zoned            property       
2392 .fi
2393 .in -2
2394 .sp
2395
2396 .sp
2397 .ne 2
2398 .mk
2399 .na
2400 \fB\fBzfs allow\fR \fB-c\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR\fR
2401 .ad
2402 .sp .6
2403 .RS 4n
2404 Sets "create time" permissions. These permissions are granted (locally) to the creator of any newly-created descendent file system.
2405 .RE
2406
2407 .sp
2408 .ne 2
2409 .mk
2410 .na
2411 \fB\fBzfs allow\fR \fB-s\fR @\fIsetname\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR\fR
2412 .ad
2413 .sp .6
2414 .RS 4n
2415 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.
2416 .RE
2417
2418 .sp
2419 .ne 2
2420 .mk
2421 .na
2422 \fB\fBzfs unallow\fR [\fB-rldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] [\fIperm\fR|@\fIsetname\fR[, ...]] \fIfilesystem\fR|\fIvolume\fR\fR
2423 .ad
2424 .br
2425 .na
2426 \fB\fBzfs unallow\fR [\fB-rld\fR] \fB-e\fR [\fIperm\fR|@\fIsetname\fR [,...]] \fIfilesystem\fR|\fIvolume\fR\fR
2427 .ad
2428 .br
2429 .na
2430 \fB\fBzfs unallow\fR [\fB-r\fR] \fB-c\fR [\fIperm\fR|@\fIsetname\fR[,...]]\fR
2431 .ad
2432 .br
2433 .na
2434 \fB\fIfilesystem\fR|\fIvolume\fR\fR
2435 .ad
2436 .sp .6
2437 .RS 4n
2438 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.
2439 .sp
2440 .ne 2
2441 .mk
2442 .na
2443 \fB\fB-r\fR\fR
2444 .ad
2445 .sp .6
2446 .RS 4n
2447 Recursively remove the permissions from this file system and all descendents.
2448 .RE
2449
2450 .RE
2451
2452 .sp
2453 .ne 2
2454 .mk
2455 .na
2456 \fB\fBzfs unallow\fR [\fB-r\fR] \fB-s\fR @\fIsetname\fR [\fIperm\fR|@\fIsetname\fR[,...]]\fR
2457 .ad
2458 .br
2459 .na
2460 \fB\fIfilesystem\fR|\fIvolume\fR\fR
2461 .ad
2462 .sp .6
2463 .RS 4n
2464 Removes permissions from a permission set. If no permissions are specified, then all permissions are removed, thus removing the set entirely.
2465 .RE
2466
2467 .sp
2468 .ne 2
2469 .mk
2470 .na
2471 \fB\fBzfs hold\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
2472 .ad
2473 .sp .6
2474 .RS 4n
2475 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.
2476 .sp
2477 If a hold exists on a snapshot, attempts to destroy that snapshot by using the \fBzfs destroy\fR command return \fBEBUSY\fR.
2478 .sp
2479 .ne 2
2480 .mk
2481 .na
2482 \fB\fB-r\fR\fR
2483 .ad
2484 .sp .6
2485 .RS 4n
2486 Specifies that a hold with the given tag is applied recursively to the snapshots of all descendent file systems.
2487 .RE
2488
2489 .RE
2490
2491 .sp
2492 .ne 2
2493 .mk
2494 .na
2495 \fB\fBzfs holds\fR [\fB-r\fR] \fIsnapshot\fR...\fR
2496 .ad
2497 .sp .6
2498 .RS 4n
2499 Lists all existing user references for the given snapshot or snapshots.
2500 .sp
2501 .ne 2
2502 .mk
2503 .na
2504 \fB\fB-r\fR\fR
2505 .ad
2506 .sp .6
2507 .RS 4n
2508 Lists the holds that are set on the named descendent snapshots, in addition to listing the holds on the named snapshot.
2509 .RE
2510
2511 .RE
2512
2513 .sp
2514 .ne 2
2515 .mk
2516 .na
2517 \fB\fBzfs release\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
2518 .ad
2519 .sp .6
2520 .RS 4n
2521 Removes a single reference, named with the \fItag\fR argument, from the specified snapshot or snapshots. The tag must already exist for each snapshot.
2522 .sp
2523 If a hold exists on a snapshot, attempts to destroy that snapshot by using the \fBzfs destroy\fR command return \fBEBUSY\fR.
2524 .sp
2525 .ne 2
2526 .mk
2527 .na
2528 \fB\fB-r\fR\fR
2529 .ad
2530 .sp .6
2531 .RS 4n
2532 Recursively releases a hold with the given tag on the snapshots of all descendent file systems.
2533 .RE
2534
2535 .RE
2536
2537 .SH EXAMPLES
2538 .LP
2539 \fBExample 1 \fRCreating a ZFS File System Hierarchy
2540 .sp
2541 .LP
2542 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.
2543
2544 .sp
2545 .in +2
2546 .nf
2547 # \fBzfs create pool/home\fR
2548 # \fBzfs set mountpoint=/export/home pool/home\fR
2549 # \fBzfs create pool/home/bob\fR
2550 .fi
2551 .in -2
2552 .sp
2553
2554 .LP
2555 \fBExample 2 \fRCreating a ZFS Snapshot
2556 .sp
2557 .LP
2558 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.
2559
2560 .sp
2561 .in +2
2562 .nf
2563 # \fBzfs snapshot pool/home/bob@yesterday\fR
2564 .fi
2565 .in -2
2566 .sp
2567
2568 .LP
2569 \fBExample 3 \fRCreating and Destroying Multiple Snapshots
2570 .sp
2571 .LP
2572 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.
2573
2574 .sp
2575 .in +2
2576 .nf
2577 # \fBzfs snapshot -r pool/home@yesterday\fR
2578 # \fBzfs destroy -r pool/home@yesterday\fR
2579 .fi
2580 .in -2
2581 .sp
2582
2583 .LP
2584 \fBExample 4 \fRDisabling and Enabling File System Compression
2585 .sp
2586 .LP
2587 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.
2588
2589 .sp
2590 .in +2
2591 .nf
2592 # \fBzfs set compression=off pool/home\fR
2593 # \fBzfs set compression=on pool/home/anne\fR
2594 .fi
2595 .in -2
2596 .sp
2597
2598 .LP
2599 \fBExample 5 \fRListing ZFS Datasets
2600 .sp
2601 .LP
2602 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.
2603
2604 .sp
2605 .in +2
2606 .nf
2607 # \fBzfs list\fR
2608    NAME                      USED  AVAIL  REFER  MOUNTPOINT
2609    pool                      450K   457G    18K  /pool
2610    pool/home                 315K   457G    21K  /export/home
2611    pool/home/anne             18K   457G    18K  /export/home/anne
2612    pool/home/bob             276K   457G   276K  /export/home/bob
2613 .fi
2614 .in -2
2615 .sp
2616
2617 .LP
2618 \fBExample 6 \fRSetting a Quota on a ZFS File System
2619 .sp
2620 .LP
2621 The following command sets a quota of 50 Gbytes for \fBpool/home/bob\fR.
2622
2623 .sp
2624 .in +2
2625 .nf
2626 # \fBzfs set quota=50G pool/home/bob\fR
2627 .fi
2628 .in -2
2629 .sp
2630
2631 .LP
2632 \fBExample 7 \fRListing ZFS Properties
2633 .sp
2634 .LP
2635 The following command lists all properties for \fBpool/home/bob\fR.
2636
2637 .sp
2638 .in +2
2639 .nf
2640 # \fBzfs get all pool/home/bob\fR
2641 NAME           PROPERTY              VALUE                  SOURCE
2642 pool/home/bob  type                  filesystem             -
2643 pool/home/bob  creation              Tue Jul 21 15:53 2009  -
2644 pool/home/bob  used                  21K                    -
2645 pool/home/bob  available             20.0G                  -
2646 pool/home/bob  referenced            21K                    -
2647 pool/home/bob  compressratio         1.00x                  -
2648 pool/home/bob  mounted               yes                    -
2649 pool/home/bob  quota                 20G                    local
2650 pool/home/bob  reservation           none                   default
2651 pool/home/bob  recordsize            128K                   default
2652 pool/home/bob  mountpoint            /pool/home/bob         default
2653 pool/home/bob  sharenfs              off                    default
2654 pool/home/bob  checksum              on                     default
2655 pool/home/bob  compression           on                     local
2656 pool/home/bob  atime                 on                     default
2657 pool/home/bob  devices               on                     default
2658 pool/home/bob  exec                  on                     default
2659 pool/home/bob  setuid                on                     default
2660 pool/home/bob  readonly              off                    default
2661 pool/home/bob  zoned                 off                    default
2662 pool/home/bob  snapdir               hidden                 default
2663 pool/home/bob  aclmode               groupmask              default
2664 pool/home/bob  aclinherit            restricted             default
2665 pool/home/bob  canmount              on                     default
2666 pool/home/bob  shareiscsi            off                    default
2667 pool/home/bob  xattr                 on                     default
2668 pool/home/bob  copies                1                      default
2669 pool/home/bob  version               4                      -
2670 pool/home/bob  utf8only              off                    -
2671 pool/home/bob  normalization         none                   -
2672 pool/home/bob  casesensitivity       sensitive              -
2673 pool/home/bob  vscan                 off                    default
2674 pool/home/bob  nbmand                off                    default
2675 pool/home/bob  sharesmb              off                    default
2676 pool/home/bob  refquota              none                   default
2677 pool/home/bob  refreservation        none                   default
2678 pool/home/bob  primarycache          all                    default
2679 pool/home/bob  secondarycache        all                    default
2680 pool/home/bob  usedbysnapshots       0                      -
2681 pool/home/bob  usedbydataset         21K                    -
2682 pool/home/bob  usedbychildren        0                      -
2683 pool/home/bob  usedbyrefreservation  0                      -
2684 .fi
2685 .in -2
2686 .sp
2687
2688 .sp
2689 .LP
2690 The following command gets a single property value.
2691
2692 .sp
2693 .in +2
2694 .nf
2695 # \fBzfs get -H -o value compression pool/home/bob\fR
2696 on
2697 .fi
2698 .in -2
2699 .sp
2700
2701 .sp
2702 .LP
2703 The following command lists all properties with local settings for \fBpool/home/bob\fR.
2704
2705 .sp
2706 .in +2
2707 .nf
2708 # \fBzfs get -r -s local -o name,property,value all pool/home/bob\fR
2709 NAME           PROPERTY              VALUE
2710 pool/home/bob  quota                 20G
2711 pool/home/bob  compression           on
2712 .fi
2713 .in -2
2714 .sp
2715
2716 .LP
2717 \fBExample 8 \fRRolling Back a ZFS File System
2718 .sp
2719 .LP
2720 The following command reverts the contents of \fBpool/home/anne\fR to the snapshot named \fByesterday\fR, deleting all intermediate snapshots.
2721
2722 .sp
2723 .in +2
2724 .nf
2725 # \fBzfs rollback -r pool/home/anne@yesterday\fR
2726 .fi
2727 .in -2
2728 .sp
2729
2730 .LP
2731 \fBExample 9 \fRCreating a ZFS Clone
2732 .sp
2733 .LP
2734 The following command creates a writable file system whose initial contents are the same as \fBpool/home/bob@yesterday\fR.
2735
2736 .sp
2737 .in +2
2738 .nf
2739 # \fBzfs clone pool/home/bob@yesterday pool/clone\fR
2740 .fi
2741 .in -2
2742 .sp
2743
2744 .LP
2745 \fBExample 10 \fRPromoting a ZFS Clone
2746 .sp
2747 .LP
2748 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:
2749
2750 .sp
2751 .in +2
2752 .nf
2753 # \fBzfs create pool/project/production\fR
2754   populate /pool/project/production with data
2755 # \fBzfs snapshot pool/project/production@today\fR
2756 # \fBzfs clone pool/project/production@today pool/project/beta\fR
2757 make changes to /pool/project/beta and test them
2758 # \fBzfs promote pool/project/beta\fR
2759 # \fBzfs rename pool/project/production pool/project/legacy\fR
2760 # \fBzfs rename pool/project/beta pool/project/production\fR
2761 once the legacy version is no longer needed, it can be destroyed
2762 # \fBzfs destroy pool/project/legacy\fR
2763 .fi
2764 .in -2
2765 .sp
2766
2767 .LP
2768 \fBExample 11 \fRInheriting ZFS Properties
2769 .sp
2770 .LP
2771 The following command causes \fBpool/home/bob\fR and \fBpool/home/anne\fR to inherit the \fBchecksum\fR property from their parent.
2772
2773 .sp
2774 .in +2
2775 .nf
2776 # \fBzfs inherit checksum pool/home/bob pool/home/anne\fR
2777 .fi
2778 .in -2
2779 .sp
2780
2781 .LP
2782 \fBExample 12 \fRRemotely Replicating ZFS Data
2783 .sp
2784 .LP
2785 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.
2786
2787 .sp
2788 .in +2
2789 .nf
2790 # \fBzfs send pool/fs@a | \e\fR
2791    \fBssh host zfs receive poolB/received/fs@a\fR
2792 # \fBzfs send -i a pool/fs@b | ssh host \e\fR
2793    \fBzfs receive poolB/received/fs\fR
2794 .fi
2795 .in -2
2796 .sp
2797
2798 .LP
2799 \fBExample 13 \fRUsing the \fBzfs receive\fR \fB-d\fR Option
2800 .sp
2801 .LP
2802 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.
2803
2804 .sp
2805 .in +2
2806 .nf
2807 # \fBzfs send poolA/fsA/fsB@snap | \e
2808    ssh host zfs receive -d poolB/received\fR
2809 .fi
2810 .in -2
2811 .sp
2812
2813 .LP
2814 \fBExample 14 \fRSetting User Properties
2815 .sp
2816 .LP
2817 The following example sets the user-defined \fBcom.example:department\fR property for a dataset.
2818
2819 .sp
2820 .in +2
2821 .nf
2822 # \fBzfs set com.example:department=12345 tank/accounting\fR
2823 .fi
2824 .in -2
2825 .sp
2826
2827 .LP
2828 \fBExample 15 \fRCreating a ZFS Volume as an iSCSI Target Device
2829 .sp
2830 .LP
2831 The following example shows how to create a \fBZFS\fR volume as an \fBiSCSI\fR target. 
2832
2833 .sp
2834 .in +2
2835 .nf
2836 # \fBzfs create -V 2g pool/volumes/vol1\fR
2837 # \fBzfs set shareiscsi=on pool/volumes/vol1\fR
2838 # \fBiscsitadm list target\fR
2839 Target: pool/volumes/vol1
2840  iSCSI Name: 
2841  iqn.1986-03.com.sun:02:7b4b02a6-3277-eb1b-e686-a24762c52a8c
2842  Connections: 0
2843 .fi
2844 .in -2
2845 .sp
2846
2847 .sp
2848 .LP
2849 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).
2850 .LP
2851 \fBExample 16 \fRPerforming a Rolling Snapshot
2852 .sp
2853 .LP
2854 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:
2855
2856 .sp
2857 .in +2
2858 .nf
2859 # \fBzfs destroy -r pool/users@7daysago\fR
2860 # \fBzfs rename -r pool/users@6daysago @7daysago\fR
2861 # \fBzfs rename -r pool/users@5daysago @6daysago\fR
2862 # \fBzfs rename -r pool/users@yesterday @5daysago\fR
2863 # \fBzfs rename -r pool/users@yesterday @4daysago\fR
2864 # \fBzfs rename -r pool/users@yesterday @3daysago\fR
2865 # \fBzfs rename -r pool/users@yesterday @2daysago\fR
2866 # \fBzfs rename -r pool/users@today @yesterday\fR
2867 # \fBzfs snapshot -r pool/users@today\fR
2868 .fi
2869 .in -2
2870 .sp
2871
2872 .LP
2873 \fBExample 17 \fRSetting \fBsharenfs\fR Property Options on a ZFS File System
2874 .sp
2875 .LP
2876 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.
2877
2878 .sp
2879 .in +2
2880 .nf
2881 # \fB# zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home\fR
2882 .fi
2883 .in -2
2884 .sp
2885
2886 .sp
2887 .LP
2888 If you are using \fBDNS\fR for host name resolution, specify the fully qualified hostname.
2889
2890 .LP
2891 \fBExample 18 \fRDelegating ZFS Administration Permissions on a ZFS Dataset
2892 .sp
2893 .LP
2894 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.
2895
2896 .sp
2897 .in +2
2898 .nf
2899 # \fBzfs allow cindys create,destroy,mount,snapshot tank/cindys\fR
2900 # \fBzfs allow tank/cindys\fR
2901 -------------------------------------------------------------
2902 Local+Descendent permissions on (tank/cindys)
2903           user cindys create,destroy,mount,snapshot
2904 -------------------------------------------------------------
2905 .fi
2906 .in -2
2907 .sp
2908
2909 .sp
2910 .LP
2911 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:
2912 .sp
2913 .in +2
2914 .nf
2915 # \fBchmod A+user:cindys:add_subdirectory:allow /tank/cindys\fR
2916 .fi
2917 .in -2
2918 .sp
2919
2920 .LP
2921 \fBExample 19 \fRDelegating Create Time Permissions on a ZFS Dataset
2922 .sp
2923 .LP
2924 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.
2925
2926 .sp
2927 .in +2
2928 .nf
2929 # \fB# zfs allow staff create,mount tank/users\fR
2930 # \fBzfs allow -c destroy tank/users\fR
2931 # \fBzfs allow tank/users\fR
2932 -------------------------------------------------------------
2933 Create time permissions on (tank/users)
2934           create,destroy
2935 Local+Descendent permissions on (tank/users)
2936           group staff create,mount
2937 ------------------------------------------------------------- 
2938 .fi
2939 .in -2
2940 .sp
2941
2942 .LP
2943 \fBExample 20 \fRDefining and Granting a Permission Set on a ZFS Dataset
2944 .sp
2945 .LP
2946 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.
2947
2948 .sp
2949 .in +2
2950 .nf
2951 # \fBzfs allow -s @pset create,destroy,snapshot,mount tank/users\fR
2952 # \fBzfs allow staff @pset tank/users\fR
2953 # \fBzfs allow tank/users\fR
2954 -------------------------------------------------------------
2955 Permission sets on (tank/users)
2956         @pset create,destroy,mount,snapshot
2957 Create time permissions on (tank/users)
2958         create,destroy
2959 Local+Descendent permissions on (tank/users)
2960         group staff @pset,create,mount
2961 -------------------------------------------------------------
2962 .fi
2963 .in -2
2964 .sp
2965
2966 .LP
2967 \fBExample 21 \fRDelegating Property Permissions on a ZFS Dataset
2968 .sp
2969 .LP
2970 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.
2971
2972 .sp
2973 .in +2
2974 .nf
2975 # \fBzfs allow cindys quota,reservation users/home\fR
2976 # \fBzfs allow users/home\fR
2977 -------------------------------------------------------------
2978 Local+Descendent permissions on (users/home)
2979         user cindys quota,reservation
2980 -------------------------------------------------------------
2981 cindys% \fBzfs set quota=10G users/home/marks\fR
2982 cindys% \fBzfs get quota users/home/marks\fR
2983 NAME              PROPERTY  VALUE             SOURCE
2984 users/home/marks  quota     10G               local 
2985 .fi
2986 .in -2
2987 .sp
2988
2989 .LP
2990 \fBExample 22 \fRRemoving ZFS Delegated Permissions on a ZFS Dataset
2991 .sp
2992 .LP
2993 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.
2994
2995 .sp
2996 .in +2
2997 .nf
2998 # \fBzfs unallow staff snapshot tank/users\fR
2999 # \fBzfs allow tank/users\fR
3000 -------------------------------------------------------------
3001 Permission sets on (tank/users)
3002         @pset create,destroy,mount,snapshot
3003 Create time permissions on (tank/users)
3004         create,destroy
3005 Local+Descendent permissions on (tank/users)
3006         group staff @pset,create,mount
3007 ------------------------------------------------------------- 
3008 .fi
3009 .in -2
3010 .sp
3011
3012 .SH EXIT STATUS
3013 .sp
3014 .LP
3015 The following exit values are returned:
3016 .sp
3017 .ne 2
3018 .mk
3019 .na
3020 \fB\fB0\fR\fR
3021 .ad
3022 .sp .6
3023 .RS 4n
3024 Successful completion. 
3025 .RE
3026
3027 .sp
3028 .ne 2
3029 .mk
3030 .na
3031 \fB\fB1\fR\fR
3032 .ad
3033 .sp .6
3034 .RS 4n
3035 An error occurred.
3036 .RE
3037
3038 .sp
3039 .ne 2
3040 .mk
3041 .na
3042 \fB\fB2\fR\fR
3043 .ad
3044 .sp .6
3045 .RS 4n
3046 Invalid command line options were specified.
3047 .RE
3048
3049 .SH SEE ALSO
3050 .sp
3051 .LP
3052 \fBchmod\fR(2), \fBfsync\fR(2), \fBgzip\fR(1), \fBmount\fR(8), \fBssh\fR(1), \fBstat\fR(2), \fBwrite\fR(2), \fBzpool\fR(8)