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