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