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