]> git.proxmox.com Git - mirror_zfs.git/blob - man/man8/zfs.8
zfs.8 & zpool.8: Various documentation edits
[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) 2011, 2014 by Delphix. All rights reserved.
26 .\" Copyright (c) 2014, 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 .\" Copyright 2016 Richard Laager. All rights reserved.
30 .\"
31 .TH zfs 8 "May 11, 2016" "ZFS pool 28, filesystem 5" "System Administration Commands"
32 .SH NAME
33 zfs \- configures ZFS file systems
34 .SH SYNOPSIS
35 .LP
36 .nf
37 \fBzfs\fR [\fB-?\fR]
38 .fi
39
40 .LP
41 .nf
42 \fBzfs\fR \fBcreate\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem\fR
43 .fi
44
45 .LP
46 .nf
47 \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
48 .fi
49
50 .LP
51 .nf
52 \fBzfs\fR \fBdestroy\fR [\fB-fnpRrv\fR] \fIfilesystem\fR|\fIvolume\fR
53 .fi
54
55 .LP
56 .nf
57 \fBzfs\fR \fBdestroy\fR [\fB-dnpRrv\fR] \fIfilesystem\fR|\fIvolume\fR@\fIsnap\fR[%\fIsnap\fR][,...]
58 .fi
59
60 .LP
61 .nf
62 \fBzfs\fR \fBdestroy\fR \fIfilesystem\fR|\fIvolume\fR#\fIbookmark\fR
63 .fi
64
65 .LP
66 .nf
67 \fBzfs\fR \fBsnapshot | snap\fR [\fB-r\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ...
68 \fIfilesystem@snapname\fR|\fIvolume@snapname\fR ...
69 .fi
70
71 .LP
72 .nf
73 \fBzfs\fR \fBrollback\fR [\fB-rRf\fR] \fIsnapshot\fR
74 .fi
75
76 .LP
77 .nf
78 \fBzfs\fR \fBclone\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIsnapshot\fR \fIfilesystem\fR|\fIvolume\fR
79 .fi
80
81 .LP
82 .nf
83 \fBzfs\fR \fBpromote\fR \fIclone-filesystem\fR
84 .fi
85
86 .LP
87 .nf
88 \fBzfs\fR \fBrename\fR [\fB-f\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR
89 \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR
90 .fi
91
92 .LP
93 .nf
94 \fBzfs\fR \fBrename\fR [\fB-fp\fR] \fIfilesystem\fR|\fIvolume\fR \fIfilesystem\fR|\fIvolume\fR
95 .fi
96
97 .LP
98 .nf
99 \fBzfs\fR \fBrename\fR \fB-r\fR \fIsnapshot\fR \fIsnapshot\fR
100 .fi
101
102 .LP
103 .nf
104 \fBzfs\fR \fBlist\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-Hp\fR][\fB-o\fR \fIproperty\fR[,\fIproperty\fR]...] [\fB-t\fR \fItype\fR[,\fItype\fR]..]
105 [\fB-s\fR \fIproperty\fR] ... [\fB-S\fR \fIproperty\fR] ... [\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR|\fImountpoint\fR] ...
106 .fi
107
108 .LP
109 .nf
110 +\fBzfs\fR \fBset\fR \fIproperty\fR=\fIvalue\fR... \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR...
111 .fi
112
113 .LP
114 .nf
115 \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[,...]]
116 [\fB-s\fR \fIsource\fR[,...]] "\fIall\fR" | \fIproperty\fR[,...] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR|\fImountpoint\fR ...
117 .fi
118
119 .LP
120 .nf
121 \fBzfs\fR \fBinherit\fR [\fB-rS\fR] \fIproperty\fR \fIfilesystem\fR|\fIvolume|snapshot\fR ...
122 .fi
123
124 .LP
125 .nf
126 \fBzfs\fR \fBupgrade\fR [\fB-v\fR]
127 .fi
128
129 .LP
130 .nf
131 \fBzfs\fR \fBupgrade\fR [\fB-r\fR] [\fB-V\fR \fIversion\fR] \fB-a\fR | \fIfilesystem\fR
132 .fi
133
134 .LP
135 .nf
136 \fBzfs\fR \fBuserspace\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 \fBgroupspace\fR [\fB-Hinp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-s\fR \fIfield\fR] ...
143 [\fB-S\fR \fIfield\fR] ... [\fB-t\fR \fItype\fR[,...]] \fIfilesystem\fR|\fIsnapshot\fR
144 .fi
145
146 .LP
147 .nf
148 \fBzfs\fR \fBmount\fR
149 .fi
150
151 .LP
152 .nf
153 \fBzfs\fR \fBmount\fR [\fB-vO\fR] [\fB-o \fIoptions\fR\fR] \fB-a\fR | \fIfilesystem\fR
154 .fi
155
156 .LP
157 .nf
158 \fBzfs\fR \fBunmount | umount\fR [\fB-f\fR] \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR
159 .fi
160
161 .LP
162 .nf
163 \fBzfs\fR \fBshare\fR \fB-a\fR | \fIfilesystem\fR
164 .fi
165
166 .LP
167 .nf
168 \fBzfs\fR \fBunshare\fR \fB-a\fR \fIfilesystem\fR|\fImountpoint\fR
169 .fi
170
171 .LP
172 .nf
173 \fBzfs\fR \fBbookmark\fR \fIsnapshot\fR \fIbookmark\fR
174 .fi
175
176 .LP
177 .nf
178 \fBzfs\fR \fBsend\fR [\fB-DnPpRveL\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR] \fIsnapshot\fR
179 .fi
180
181 .LP
182 .nf
183 \fBzfs\fR \fBsend\fR [\fB-eL\fR] [\fB-i \fIsnapshot\fR|\fIbookmark\fR]\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR
184 .fi
185
186 .LP
187 .nf
188 \fBzfs\fR \fBreceive\fR [\fB-vnFu\fR] [\fB-o origin\fR=\fIsnapshot\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR
189 .fi
190
191 .LP
192 .nf
193 \fBzfs\fR \fBreceive\fR [\fB-vnFu\fR] [\fB-d\fR|\fB-e\fR] [\fB-o origin\fR=\fIsnapshot\fR] \fIfilesystem\fR
194 .fi
195
196 .LP
197 .nf
198 \fBzfs\fR \fBallow\fR \fIfilesystem\fR|\fIvolume\fR
199 .fi
200
201 .LP
202 .nf
203 \fBzfs\fR \fBallow\fR [\fB-ldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] \fIperm\fR|\fI@setname\fR[,...]
204 \fIfilesystem\fR|\fIvolume\fR
205 .fi
206
207 .LP
208 .nf
209 \fBzfs\fR \fBallow\fR [\fB-ld\fR] \fB-e\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR
210 .fi
211
212 .LP
213 .nf
214 \fBzfs\fR \fBallow\fR \fB-c\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR
215 .fi
216
217 .LP
218 .nf
219 \fBzfs\fR \fBallow\fR \fB-s\fR @\fIsetname\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR
220 .fi
221
222 .LP
223 .nf
224 \fBzfs\fR \fBunallow\fR [\fB-rldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] [\fIperm\fR|@\fIsetname\fR[,... ]]
225 \fIfilesystem\fR|\fIvolume\fR
226 .fi
227
228 .LP
229 .nf
230 \fBzfs\fR \fBunallow\fR [\fB-rld\fR] \fB-e\fR [\fIperm\fR|@\fIsetname\fR[,... ]] \fIfilesystem\fR|\fIvolume\fR
231 .fi
232
233 .LP
234 .nf
235 \fBzfs\fR \fBunallow\fR [\fB-r\fR] \fB-c\fR [\fIperm\fR|@\fIsetname\fR[ ... ]] \fIfilesystem\fR|\fIvolume\fR
236 .fi
237
238 .LP
239 .nf
240 \fBzfs\fR \fBunallow\fR [\fB-r\fR] \fB-s\fR @\fIsetname\fR [\fIperm\fR|@\fIsetname\fR[,... ]] \fIfilesystem\fR|\fIvolume\fR
241 .fi
242
243 .LP
244 .nf
245 \fBzfs\fR \fBhold\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...
246 .fi
247
248 .LP
249 .nf
250 \fBzfs\fR \fBholds\fR [\fB-r\fR] \fIsnapshot\fR...
251 .fi
252
253 .LP
254 .nf
255 \fBzfs\fR \fBrelease\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...
256 .fi
257
258 .LP
259 .nf
260 \fBzfs\fR \fBdiff\fR [\fB-FHt\fR] \fIsnapshot\fR \fIsnapshot|filesystem\fR
261
262 .SH DESCRIPTION
263 .LP
264 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:
265 .sp
266 .in +2
267 .nf
268 pool/{filesystem,volume,snapshot}
269 .fi
270 .in -2
271 .sp
272
273 .sp
274 .LP
275 where the maximum length of a dataset name is \fBMAXNAMELEN\fR (256 bytes).
276 .sp
277 .LP
278 A dataset can be one of the following:
279 .sp
280 .ne 2
281 .mk
282 .na
283 \fB\fIfilesystem\fR\fR
284 .ad
285 .sp .6
286 .RS 4n
287 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.
288 .RE
289
290 .sp
291 .ne 2
292 .mk
293 .na
294 \fB\fIvolume\fR\fR
295 .ad
296 .sp .6
297 .RS 4n
298 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.
299 .RE
300
301 .sp
302 .ne 2
303 .mk
304 .na
305 \fB\fIsnapshot\fR\fR
306 .ad
307 .sp .6
308 .RS 4n
309 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.
310 .RE
311
312 .sp
313 .ne 2
314 .mk
315 .na
316 \fB\fIbookmark\fR\fR
317 .ad
318 .sp .6
319 .RS 4n
320 Much like a \fIsnapshot\fR, but without the hold on on-disk data. It can be used as the source of a send (but not for a receive).
321 It is specified as \fIfilesystem#name\fR or \fIvolume#name\fR.
322 .RE
323
324 .SS "ZFS File System Hierarchy"
325 .LP
326 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.
327 .sp
328 .LP
329 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.
330 .sp
331 .LP
332 See \fBzpool\fR(8) for more information on creating and administering pools.
333 .SS "Snapshots"
334 .LP
335 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.
336 .sp
337 .LP
338 Snapshots can have arbitrary names. Snapshots of volumes can be cloned or rolled back. Visibility is determined by the \fBsnapdev\fR property of the parent volume.
339 .sp
340 .LP
341 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.
342 .SS "Bookmarks"
343 .LP
344 A bookmark is like a snapshot, a read-only copy of a file system or volume. Bookmarks can be created extremely quickly, compared to snapshots, and they consume no additional space within the pool. Bookmarks can also have arbitrary names, much like snapshots.
345 .sp
346 .LP
347 Unlike snapshots, bookmarks can not be accessed through the filesystem in any way. From a storage standpoint a bookmark just provides a way to reference when a snapshot was created as a distinct object. Bookmarks are initially tied to a snapshot, not the filesystem/volume, and they will survive if the snapshot itself is destroyed. Since they are very light weight there's little incentive to destroy them.
348 .SS "Clones"
349 .LP
350 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.
351 .sp
352 .LP
353 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.
354 .sp
355 .LP
356 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.
357 .SS "Mount Points"
358 .LP
359 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.
360 .sp
361 .LP
362 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.
363 .sp
364 .LP
365 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.
366 .sp
367 .LP
368 A file system \fBmountpoint\fR property of \fBnone\fR prevents the file system from being mounted.
369 .sp
370 .LP
371 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.
372 .SS "Deduplication"
373 .LP
374 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.
375 .sp
376 \fBWARNING: DO NOT ENABLE DEDUPLICATION UNLESS YOU NEED IT AND KNOW EXACTLY WHAT YOU ARE DOING!\fR
377 .sp
378 Deduplicating data is a very resource-intensive operation. It is generally recommended that you have \fIat least\fR 1.25 GiB of RAM per 1 TiB of storage when you enable deduplication. But calculating the exact requirements is a somewhat complicated affair.
379 .sp
380 Enabling deduplication on an improperly-designed system will result in extreme performance issues (extremely slow filesystem and snapshot deletions etc.) and can potentially lead to data loss (i.e. unimportable pool due to memory exhaustion) if your system is not built for this purpose. Deduplication affects the processing power (CPU), disks (and the controller) as well as primary (real) memory.
381 .sp
382 Before creating a pool with deduplication enabled, ensure that you have planned your hardware requirements appropriately and implemented appropriate recovery practices, such as regular backups.
383 .sp
384 Unless necessary, deduplication should NOT be enabled on a system. Instead, consider using \fIcompression=lz4\fR, as a less resource-intensive alternative.
385 .SS "Properties"
386 .sp
387 .LP
388 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. User properties have no effect on \fBZFS\fR behavior, but you can use them to annotate datasets and snapshots in a way that is meaningful in your environment.
389 .sp
390 .LP
391 Properties are generally inherited from the parent unless overridden by the child. See the documentation below for exceptions.
392 .sp
393 .LP
394 .SS "Native Properties"
395 Native properties apply to all dataset types unless otherwise noted. However, native properties cannot be edited on snapshots.
396 .sp
397 .LP
398 The values of numeric native properties can be specified using human-readable abbreviations (\fBK\fR, \fBM\fR, \fBG\fR, \fBT\fR, \fBP\fR, \fBE\fR, and \fBZ\fR). These abbreviations can optionally use the IEC binary prefixes (e.g. GiB) or SI decimal prefixes (e.g. GB), though the SI prefixes are treated as binary prefixes. Abbreviations are case-insensitive. The following are all valid (and equal) specifications:
399 .sp
400 .in +2
401 .nf
402 1536M, 1.5g, 1.50GB, 1.5GiB
403 .fi
404 .in -2
405 .sp
406
407 .sp
408 .LP
409 The values of non-numeric native properties are case-sensitive and must be lowercase, except for \fBmountpoint\fR, \fBsharenfs\fR, and \fBsharesmb\fR.
410 .sp
411 .LP
412 The following native properties consist of read-only statistics about the dataset. These properties can be neither set, nor inherited.
413 .sp
414 .ne 2
415 .mk
416 .na
417 \fB\fBavailable\fR\fR
418 .ad
419 .sp .6
420 .RS 4n
421 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.
422 .sp
423 This property can also be referred to by its shortened column name, \fBavail\fR.
424 .RE
425
426 .sp
427 .ne 2
428 .mk
429 .na
430 \fB\fBcompressratio\fR\fR
431 .ad
432 .sp .6
433 .RS 4n
434 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. The \fBcompression\fR property controls whether compression is enabled on a dataset.
435 .RE
436
437 .sp
438 .ne 2
439 .mk
440 .na
441 \fB\fBcreation\fR\fR
442 .ad
443 .sp .6
444 .RS 4n
445 The time this dataset was created.
446 .RE
447
448 .sp
449 .ne 2
450 .mk
451 .na
452 \fB\fBclones\fR\fR
453 .ad
454 .sp .6
455 .RS 4n
456 For snapshots, this property is a comma-separated list of filesystems or
457 volumes which are clones of this snapshot. The clones' \fBorigin\fR property
458 is this snapshot. If the \fBclones\fR property is not empty, then this
459 snapshot can not be destroyed (even with the \fB-r\fR or \fB-f\fR options). The
460 roles of origin and clone can be swapped by promoting the clone with the
461 \fBzfs promote\fR command.
462 .RE
463
464 .sp
465 .ne 2
466 .na
467 \fB\fBdefer_destroy\fR\fR
468 .ad
469 .sp .6
470 .RS 4n
471 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.
472 .RE
473
474 .sp
475 .ne 2
476 .mk
477 .na
478 \fB\fBfilesystem_count\fR
479 .ad
480 .sp .6
481 .RS 4n
482 The total number of filesystems and volumes that exist under this location in the
483 dataset tree. This value is only available when a \fBfilesystem_limit\fR has
484 been set somewhere in the tree under which the dataset resides.
485 .RE
486
487 .sp
488 .ne 2
489 .na
490 \fB\fBlogicalreferenced\fR\fR
491 .ad
492 .sp .6
493 .RS 4n
494 The amount of space that is "logically" accessible by this dataset. See
495 the \fBreferenced\fR property. The logical space ignores the effect of
496 the \fBcompression\fR and \fBcopies\fR properties, giving a quantity
497 closer to the amount of data that applications see. However, it does
498 include space consumed by metadata.
499 .sp
500 This property can also be referred to by its shortened column name,
501 \fBlrefer\fR.
502 .RE
503
504 .sp
505 .ne 2
506 .na
507 \fB\fBlogicalused\fR\fR
508 .ad
509 .sp .6
510 .RS 4n
511 The amount of space that is "logically" consumed by this dataset and all
512 its descendents. See the \fBused\fR property. The logical space
513 ignores the effect of the \fBcompression\fR and \fBcopies\fR properties,
514 giving a quantity closer to the amount of data that applications see.
515 However, it does include space consumed by metadata.
516 .sp
517 This property can also be referred to by its shortened column name,
518 \fBlused\fR.
519 .RE
520
521 .sp
522 .ne 2
523 .na
524 \fB\fBmounted\fR\fR
525 .ad
526 .sp .6
527 .RS 4n
528 For file systems, indicates whether the file system is currently mounted. This property can be either \fByes\fR or \fBno\fR.
529 .RE
530
531 .sp
532 .ne 2
533 .mk
534 .na
535 \fB\fBorigin\fR\fR
536 .ad
537 .sp .6
538 .RS 4n
539 For cloned file systems or volumes, the snapshot from which the clone was created. See also the \fBclones\fR property.
540 .RE
541
542 .sp
543 .ne 2
544 .mk
545 .na
546 \fB\fBreferenced\fR\fR
547 .ad
548 .sp .6
549 .RS 4n
550 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.
551 .sp
552 This property can also be referred to by its shortened column name, \fBrefer\fR.
553 .RE
554
555 .sp
556 .ne 2
557 .mk
558 .na
559 \fB\fBrefcompressratio\fR\fR
560 .ad
561 .sp .6
562 .RS 4n
563 The compression ratio achieved for the \fBreferenced\fR space of this
564 dataset, expressed as a multiplier. See also the \fBcompressratio\fR
565 property.
566 .RE
567
568 .sp
569 .ne 2
570 .mk
571 .na
572 \fB\fBsnapshot_count\fR
573 .ad
574 .sp .6
575 .RS 4n
576 The total number of snapshots that exist under this location in the dataset tree.
577 This value is only available when a \fBsnapshot_limit\fR has been set somewhere
578 in the tree under which the dataset resides.
579 .RE
580
581 .sp
582 .ne 2
583 .na
584 \fB\fBtype\fR\fR
585 .ad
586 .sp .6
587 .RS 4n
588 The type of dataset: \fBfilesystem\fR, \fBvolume\fR, or \fBsnapshot\fR.
589 .RE
590
591 .sp
592 .ne 2
593 .mk
594 .na
595 \fB\fBused\fR\fR
596 .ad
597 .sp .6
598 .RS 4n
599 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.
600 .sp
601 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.
602 .sp
603 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 (see \fBopen\fR(2)) does not necessarily guarantee that the space usage information is updated immediately.
604 .RE
605
606 .sp
607 .ne 2
608 .mk
609 .na
610 \fB\fBusedby*\fR\fR
611 .ad
612 .sp .6
613 .RS 4n
614 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 or higher pools.
615 .RE
616
617 .sp
618 .ne 2
619 .mk
620 .na
621 \fB\fBusedbychildren\fR\fR
622 .ad
623 .sp .6
624 .RS 4n
625 The amount of space used by children of this dataset, which would be freed if all the dataset's children were destroyed.
626 .RE
627
628 .sp
629 .ne 2
630 .mk
631 .na
632 \fB\fBusedbydataset\fR\fR
633 .ad
634 .sp .6
635 .RS 4n
636 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).
637 .RE
638
639 .sp
640 .ne 2
641 .mk
642 .na
643 \fB\fBusedbyrefreservation\fR\fR
644 .ad
645 .sp .6
646 .RS 4n
647 The amount of space used by a \fBrefreservation\fR set on this dataset, which would be freed if the \fBrefreservation\fR was removed.
648 .RE
649
650 .sp
651 .ne 2
652 .mk
653 .na
654 \fB\fBusedbysnapshots\fR\fR
655 .ad
656 .sp .6
657 .RS 4n
658 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.
659 .RE
660
661 .sp
662 .ne 2
663 .mk
664 .na
665 \fB\fBuserused@\fR\fIuser\fR\fR
666 .ad
667 .sp .6
668 .RS 4n
669 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.
670 .sp
671 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.
672 .sp
673 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:
674 .RS +4
675 .TP
676 .ie t \(bu
677 .el o
678 \fIPOSIX name\fR (for example, \fBjoe\fR)
679 .RE
680 .RS +4
681 .TP
682 .ie t \(bu
683 .el o
684 \fIPOSIX numeric ID\fR (for example, \fB789\fR)
685 .RE
686 .RS +4
687 .TP
688 .ie t \(bu
689 .el o
690 \fISID name\fR (for example, \fBjoe.smith@mydomain\fR)
691 .RE
692 .RS +4
693 .TP
694 .ie t \(bu
695 .el o
696 \fISID numeric ID\fR (for example, \fBS-1-123-456-789\fR)
697 .RE
698 .RE
699 Files created on Linux always have POSIX owners.
700
701 .sp
702 .ne 2
703 .mk
704 .na
705 \fB\fBuserrefs\fR\fR
706 .ad
707 .sp .6
708 .RS 4n
709 This property is set to the number of user holds on this snapshot. User holds are set by using the \fBzfs hold\fR command.
710 .RE
711
712 .sp
713 .ne 2
714 .mk
715 .na
716 \fB\fBgroupused@\fR\fIgroup\fR\fR
717 .ad
718 .sp .6
719 .RS 4n
720 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.
721 .sp
722 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.
723 .RE
724
725 .sp
726 .ne 2
727 .mk
728 .na
729 \fB\fBvolblocksize\fR=\fIblocksize\fR\fR
730 .ad
731 .sp .6
732 .RS 4n
733 This property, which is only valid on volumes, specifies the block size of the volume. Any power of two from 512B to 128KiB is valid. The default is 8KiB.
734 .sp
735 This property cannot be changed after the volume is created.
736 .sp
737 This property can also be referred to by its shortened column name, \fBvolblock\fR.
738 .RE
739
740 .sp
741 .ne 2
742 .na
743 \fB\fBwritten\fR\fR
744 .ad
745 .sp .6
746 .RS 4n
747 The amount of \fBreferenced\fR space written to this dataset since the
748 previous snapshot.
749 .RE
750
751 .sp
752 .ne 2
753 .na
754 \fB\fBwritten@\fR\fIsnapshot\fR\fR
755 .ad
756 .sp .6
757 .RS 4n
758 The amount of \fBreferenced\fR space written to this dataset since the
759 specified snapshot. This is the space that is referenced by this dataset
760 but was not referenced by the specified snapshot.
761 .sp
762 The \fIsnapshot\fR may be specified as a short snapshot name (just the part
763 after the \fB@\fR), in which case it will be interpreted as a snapshot in
764 the same filesystem as this dataset.
765 The \fIsnapshot\fR be a full snapshot name (\fIfilesystem\fR@\fIsnapshot\fR),
766 which for clones may be a snapshot in the origin's filesystem (or the origin
767 of the origin's filesystem, etc).
768 .RE
769
770 .sp
771 .LP
772 The following native properties can be used to change the behavior of a \fBZFS\fR dataset.
773 .sp
774 .ne 2
775 .mk
776 .na
777 \fB\fBaclinherit\fR=\fBdiscard\fR | \fBnoallow\fR | \fBrestricted\fR | \fBpassthrough\fR | \fBpassthrough-x\fR\fR
778 .ad
779 .sp .6
780 .RS 4n
781 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.
782 .sp
783 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.
784 .sp
785 The \fBaclinherit\fR property does not apply to Posix ACLs.
786 .RE
787
788 .sp
789 .ne 2
790 .mk
791 .na
792 \fB\fBacltype\fR=\fBoff\fR | \fBnoacl\fR | \fBposixacl\fR \fR
793 .ad
794 .sp .6
795 .RS 4n
796 Controls whether ACLs are enabled and if so what type of ACL to use. When
797 a file system has the \fBacltype\fR property set to \fBoff\fR (the default)
798 then ACLs are disabled. Setting the \fBacltype\fR property to \fBposixacl\fR
799 indicates Posix ACLs should be used. Posix ACLs are specific to Linux and
800 are not functional on other platforms. Posix ACLs are stored as an xattr and
801 therefore will not overwrite any existing ZFS/NFSv4 ACLs which may be set.
802 Currently only \fBposixacls\fR are supported on Linux.
803 .sp
804 To obtain the best performance when setting \fBposixacl\fR users are strongly
805 encouraged to set the \fBxattr=sa\fR property. This will result in the
806 Posix ACL being stored more efficiently on disk. But as a consequence of this
807 all new xattrs will only be accessible from ZFS implementations which support
808 the \fBxattr=sa\fR property. See the \fBxattr\fR property for more details.
809 .sp
810 The value \fBnoacl\fR is an alias for \fBoff\fR.
811 .RE
812
813 .sp
814 .ne 2
815 .mk
816 .na
817 \fB\fBatime\fR=\fBon\fR | \fBoff\fR\fR
818 .ad
819 .sp .6
820 .RS 4n
821 Controls whether the access time for files is updated when they are read. Setting this property to \fBoff\fR avoids producing write traffic when reading files and can result in significant performance gains, though it might confuse mailers and other similar utilities. The default value is \fBon\fR. See also \fBrelatime\fR below.
822 .sp
823 The values \fBon\fR and \fBoff\fR are equivalent to the \fBatime\fR and \fBnoatime\fR mount options.
824 .RE
825
826 .sp
827 .ne 2
828 .mk
829 .na
830 \fB\fBcanmount\fR=\fBon\fR | \fBoff\fR | \fBnoauto\fR\fR
831 .ad
832 .sp .6
833 .RS 4n
834 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.
835 .sp
836 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.
837 .sp
838 This property is not inherited. Every dataset defaults to \fBon\fR independently.
839 .sp
840 The values \fBon\fR and \fBnoauto\fR are equivalent to the \fBauto\fR and \fBnoauto\fR mount options.
841 .RE
842
843 .sp
844 .ne 2
845 .mk
846 .na
847 \fB\fBchecksum\fR=\fBon\fR | \fBoff\fR | \fBfletcher2\fR | \fBfletcher4\fR | \fBsha256\fR\fR
848 .ad
849 .sp .6
850 .RS 4n
851 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.
852 .sp
853 Changing this property affects only newly-written data.
854 .RE
855
856 .sp
857 .ne 2
858 .mk
859 .na
860 \fB\fBcompression\fR=\fBon\fR | \fBoff\fR | \fBlzjb\fR | \fBlz4\fR |
861 \fBgzip\fR | \fBgzip-\fR\fIN\fR | \fBzle\fR\fR
862 .ad
863 .sp .6
864 .RS 4n
865 Controls the compression algorithm used for this dataset.
866 .sp
867 Setting compression to \fBon\fR indicates that the current default
868 compression algorithm should be used. The default balances compression
869 and decompression speed, with compression ratio and is expected to
870 work well on a wide variety of workloads. Unlike all other settings for
871 this property, \fBon\fR does not select a fixed compression type. As
872 new compression algorithms are added to ZFS and enabled on a pool, the
873 default compression algorithm may change. The current default compression
874 algorithm is either \fBlzjb\fR or, if the \fBlz4_compress\fR feature is
875 enabled, \fBlz4\fR.
876 .sp
877 The \fBlzjb\fR compression algorithm is optimized for performance while
878 providing decent data compression.
879 .sp
880 The \fBlz4\fR compression algorithm is a high-performance replacement
881 for the \fBlzjb\fR algorithm. It features significantly faster
882 compression and decompression, as well as a moderately higher
883 compression ratio than \fBlzjb\fR, but can only be used on pools with
884 the \fBlz4_compress\fR feature set to \fIenabled\fR. See
885 \fBzpool-features\fR(5) for details on ZFS feature flags and the
886 \fBlz4_compress\fR feature.
887 .sp
888 The \fBgzip\fR compression algorithm uses the same compression as
889 the \fBgzip\fR(1) command. You can specify the \fBgzip\fR level by using the
890 value \fBgzip-\fR\fIN\fR where \fIN\fR is an integer from 1 (fastest) to 9
891 (best compression ratio). Currently, \fBgzip\fR is equivalent to \fBgzip-6\fR
892 (which is also the default for \fBgzip\fR(1)). The \fBzle\fR compression
893 algorithm compresses runs of zeros.
894 .sp
895 This property can also be referred to by its shortened column name
896 \fBcompress\fR. Changing this property affects only newly-written data.
897 .RE
898
899 .sp
900 .ne 2
901 .mk
902 .na
903 \fB\fBcopies\fR=\fB1\fR | \fB2\fR | \fB3\fR\fR
904 .ad
905 .sp .6
906 .RS 4n
907 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.
908 .sp
909 Changing this property only affects newly-written data.
910 .sp
911 Remember that \fBZFS\fR will not import a pool with a missing top-level vdev. Do NOT create, for example, a two-disk, striped pool and set \fBcopies=\fR\fI2\fR on some datasets thinking you have setup redundancy for them. When one disk dies, you will not be able to import the pool and will have lost all of your data.
912 .RE
913
914 .sp
915 .ne 2
916 .mk
917 .na
918 \fB\fBdedup\fR=\fBon\fR | \fBoff\fR | \fBverify\fR | \fBsha256\fR[,\fBverify\fR]\fR
919 .ad
920 .sp .6
921 .RS 4n
922 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.
923 .sp
924 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.
925 .sp
926 Unless necessary, deduplication should NOT be enabled on a system. See \fBDeduplication\fR above.
927 .RE
928
929 .sp
930 .ne 2
931 .mk
932 .na
933 \fB\fBdevices\fR=\fBon\fR | \fBoff\fR\fR
934 .ad
935 .sp .6
936 .RS 4n
937 Controls whether device nodes can be opened on this file system. The default value is \fBon\fR.
938 .sp
939 The values \fBon\fR and \fBoff\fR are equivalent to the \fBdev\fR and \fBnodev\fR mount options.
940 .RE
941
942 .sp
943 .ne 2
944 .mk
945 .na
946 \fB\fBexec\fR=\fBon\fR | \fBoff\fR\fR
947 .ad
948 .sp .6
949 .RS 4n
950 Controls whether processes can be executed from within this file system. The default value is \fBon\fR.
951 .sp
952 The values \fBon\fR and \fBoff\fR are equivalent to the \fBexec\fR and \fBnoexec\fR mount options.
953 .RE
954
955 .sp
956 .ne 2
957 .mk
958 .na
959 \fB\fBmlslabel\fR=\fIlabel\fR | \fBnone\fR\fR
960 .ad
961 .sp .6
962 .RS 4n
963 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.
964 .sp
965 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.
966 .sp
967 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.
968 .sp
969 When Trusted Extensions is \fBnot\fR enabled, only datasets with the default label (\fBnone\fR) can be mounted.
970 .sp
971 Zones are a Solaris feature and are not relevant on Linux.
972 .RE
973
974 .sp
975 .ne 2
976 .mk
977 .na
978 \fB\fBfilesystem_limit\fR=\fIcount\fR | \fBnone\fR\fR
979 .ad
980 .sp .6
981 .RS 4n
982 Limits the number of filesystems and volumes that can exist under this point in
983 the dataset tree. The limit is not enforced if the user is allowed to change
984 the limit. Setting a filesystem_limit on a descendent of a filesystem that
985 already has a filesystem_limit does not override the ancestor's filesystem_limit,
986 but rather imposes an additional limit. This feature must be enabled to be used
987 (see \fBzpool-features\fR(5)).
988 .RE
989
990 .sp
991 .ne 2
992 .na
993 \fB\fBmountpoint\fR=\fIpath\fR | \fBnone\fR | \fBlegacy\fR\fR
994 .ad
995 .sp .6
996 .RS 4n
997 Controls the mount point used for this file system. See the "Mount Points" section for more information on how this property is used.
998 .sp
999 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.
1000 .RE
1001
1002 .sp
1003 .ne 2
1004 .mk
1005 .na
1006 \fB\fBnbmand\fR=\fBon\fR | \fBoff\fR\fR
1007 .ad
1008 .sp .6
1009 .RS 4n
1010 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(1M) on a Solaris system for more information on \fBnbmand\fR mounts.
1011 .sp
1012 The values \fBon\fR and \fBoff\fR are equivalent to the \fBnbmand\fR and \fBnonbmand\fR mount options.
1013 .sp
1014 This property is not used on Linux.
1015 .RE
1016
1017 .sp
1018 .ne 2
1019 .mk
1020 .na
1021 \fB\fBprimarycache\fR=\fBall\fR | \fBnone\fR | \fBmetadata\fR\fR
1022 .ad
1023 .sp .6
1024 .RS 4n
1025 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.
1026 .RE
1027
1028 .sp
1029 .ne 2
1030 .mk
1031 .na
1032 \fB\fBquota\fR=\fIsize\fR | \fBnone\fR\fR
1033 .ad
1034 .sp .6
1035 .RS 4n
1036 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.
1037 .sp
1038 Quotas cannot be set on volumes, as the \fBvolsize\fR property acts as an implicit quota.
1039 .RE
1040
1041 .sp
1042 .ne 2
1043 .mk
1044 .na
1045 \fB\fBsnapshot_limit\fR=\fIcount\fR | \fBnone\fR\fR
1046 .ad
1047 .sp .6
1048 .RS 4n
1049 Limits the number of snapshots that can be created on a dataset and its
1050 descendents. Setting a snapshot_limit on a descendent of a dataset that already
1051 has a snapshot_limit does not override the ancestor's snapshot_limit, but
1052 rather imposes an additional limit. The limit is not enforced if the user is
1053 allowed to change the limit. For example, this means that recursive snapshots
1054 taken from the global zone are counted against each delegated dataset within
1055 a zone. This feature must be enabled to be used (see \fBzpool-features\fR(5)).
1056 .RE
1057
1058 .sp
1059 .ne 2
1060 .na
1061 \fB\fBuserquota@\fR\fIuser\fR=\fIsize\fR | \fBnone\fR\fR
1062 .ad
1063 .sp .6
1064 .RS 4n
1065 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. See the \fBzfs userspace\fR subcommand for more information.
1066 .sp
1067 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.
1068 .sp
1069 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.
1070 .sp
1071 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:
1072 .RS +4
1073 .TP
1074 .ie t \(bu
1075 .el o
1076 \fIPOSIX name\fR (for example, \fBjoe\fR)
1077 .RE
1078 .RS +4
1079 .TP
1080 .ie t \(bu
1081 .el o
1082 \fIPOSIX numeric ID\fR (for example, \fB789\fR)
1083 .RE
1084 .RS +4
1085 .TP
1086 .ie t \(bu
1087 .el o
1088 \fISID name\fR (for example, \fBjoe.smith@mydomain\fR)
1089 .RE
1090 .RS +4
1091 .TP
1092 .ie t \(bu
1093 .el o
1094 \fISID numeric ID\fR (for example, \fBS-1-123-456-789\fR)
1095 .RE
1096 .RE
1097 Files created on Linux always have POSIX owners.
1098
1099 .sp
1100 .ne 2
1101 .mk
1102 .na
1103 \fB\fBgroupquota@\fR\fIgroup\fR=\fIsize\fR | \fBnone\fR\fR
1104 .ad
1105 .sp .6
1106 .RS 4n
1107 Limits the amount of space consumed by the specified group. Group space consumption is identified by the \fBuserquota@\fR\fIuser\fR property.
1108 .sp
1109 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.
1110 .RE
1111
1112 .sp
1113 .ne 2
1114 .mk
1115 .na
1116 \fB\fBreadonly\fR=\fBon\fR | \fBoff\fR\fR
1117 .ad
1118 .sp .6
1119 .RS 4n
1120 Controls whether this dataset can be modified. The default value is \fBoff\fR.
1121 .sp
1122 This property can also be referred to by its shortened column name, \fBrdonly\fR.
1123 .sp
1124 The values \fBon\fR and \fBoff\fR are equivalent to the \fBro\fR and \fBrw\fR mount options.
1125 .RE
1126
1127 .sp
1128 .ne 2
1129 .mk
1130 .na
1131 \fB\fBrecordsize\fR=\fIsize\fR\fR
1132 .ad
1133 .sp .6
1134 .RS 4n
1135 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.
1136 .sp
1137 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.
1138 .sp
1139 Any power of two from 512B to 1MiB is valid. The default is 128KiB. Values larger than 128KiB require the pool have the \fBlarge_blocks\fR feature enabled. See \fBzpool-features\fR(5) for details on ZFS feature flags and the \fBlarge_blocks\fR feature.
1140 .sp
1141 Changing the file system's \fBrecordsize\fR affects only files created afterward; existing files are unaffected.
1142 .sp
1143 This property can also be referred to by its shortened column name, \fBrecsize\fR.
1144 .RE
1145
1146 .sp
1147 .ne 2
1148 .mk
1149 .na
1150 \fB\fBredundant_metadata\fR=\fBall\fR | \fBmost\fR\fR
1151 .ad
1152 .sp .6
1153 .RS 4n
1154 Controls what types of metadata are stored redundantly. ZFS stores an
1155 extra copy of metadata, so that if a single block is corrupted, the
1156 amount of user data lost is limited. This extra copy is in addition to
1157 any redundancy provided at the pool level (e.g. by mirroring or RAID-Z),
1158 and is in addition to an extra copy specified by the \fBcopies\fR
1159 property (up to a total of 3 copies). For example if the pool is
1160 mirrored, \fBcopies\fR=2, and \fBredundant_metadata\fR=most, then ZFS
1161 stores 6 copies of most metadata, and 4 copies of data and some
1162 metadata.
1163 .sp
1164 When set to \fBall\fR, ZFS stores an extra copy of all metadata. If a
1165 single on-disk block is corrupt, at worst a single block of user data
1166 (which is \fBrecordsize\fR bytes long) can be lost.
1167 .sp
1168 When set to \fBmost\fR, ZFS stores an extra copy of most types of
1169 metadata. This can improve performance of random writes, because less
1170 metadata must be written. In practice, at worst about 100 blocks (of
1171 \fBrecordsize\fR bytes each) of user data can be lost if a single
1172 on-disk block is corrupt. The exact behavior of which metadata blocks
1173 are stored redundantly may change in future releases.
1174 .sp
1175 The default value is \fBall\fR.
1176 .RE
1177
1178 .sp
1179 .ne 2
1180 .na
1181 \fB\fBrefquota\fR=\fIsize\fR | \fBnone\fR\fR
1182 .ad
1183 .sp .6
1184 .RS 4n
1185 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.
1186 .RE
1187
1188 .sp
1189 .ne 2
1190 .mk
1191 .na
1192 \fB\fBrefreservation\fR=\fIsize\fR | \fBnone\fR\fR
1193 .ad
1194 .sp .6
1195 .RS 4n
1196 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.
1197 .sp
1198 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 \fBreferenced\fR bytes in the dataset (which are the bytes to be referenced by the snapshot). This is necessary to continue to provide the \fBrefreservation\fRguarantee to the dataset.
1199 .sp
1200 For volumes, see also \fBvolsize\fR.
1201 .sp
1202 This property can also be referred to by its shortened column name, \fBrefreserv\fR.
1203 .RE
1204
1205 .sp
1206 .ne 2
1207 .mk
1208 .na
1209 \fB\fBrelatime\fR=\fBon\fR | \fBoff\fR\fR
1210 .ad
1211 .sp .6
1212 .RS 4n
1213 Controls the manner in which the access time is updated when \fBatime=on\fR is set. Turning this property \fBon\fR causes the access time to be updated relative to the modify or change time. Access time is only updated if the previous access time was earlier than the current modify or change time or if the existing access time hasn't been updated within the past 24 hours. The default value is \fBoff\fR.
1214 .sp
1215 The values \fBon\fR and \fBoff\fR are equivalent to the \fBrelatime\fR and \fBnorelatime\fR mount options.
1216 .RE
1217
1218 .sp
1219 .ne 2
1220 .mk
1221 .na
1222 \fB\fBreservation\fR=\fIsize\fR | \fBnone\fR\fR
1223 .ad
1224 .sp .6
1225 .RS 4n
1226 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.
1227 .sp
1228 This property can also be referred to by its shortened column name, \fBreserv\fR.
1229 .RE
1230
1231 .sp
1232 .ne 2
1233 .mk
1234 .na
1235 \fB\fBsecondarycache\fR=\fBall\fR | \fBnone\fR | \fBmetadata\fR\fR
1236 .ad
1237 .sp .6
1238 .RS 4n
1239 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.
1240 .RE
1241
1242 .sp
1243 .ne 2
1244 .mk
1245 .na
1246 \fB\fBsetuid\fR=\fBon\fR | \fBoff\fR\fR
1247 .ad
1248 .sp .6
1249 .RS 4n
1250 Controls whether the setuid bit is respected for the file system. The default value is \fBon\fR.
1251 .sp
1252 The values \fBon\fR and \fBoff\fR are equivalent to the \fBsuid\fR and \fBnosuid\fR mount options.
1253 .RE
1254
1255 .sp
1256 .ne 2
1257 .mk
1258 .na
1259 \fB\fBsharesmb\fR=\fBon\fR | \fBoff\fR
1260 .ad
1261 .sp .6
1262 .RS 4n
1263 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.
1264 .sp
1265 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 invalid in the resource name, are replaced with underscore (\fB_\fR) characters. Linux does not currently support additional options which might be available on Solaris.
1266 .sp
1267 If the \fBsharesmb\fR property is set to \fBoff\fR, the file systems are unshared.
1268 .sp
1269 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 (disallow specific user specific access etc) must be done on the underlaying filesystem.
1270 .sp
1271 .in +2
1272 Example to mount a SMB filesystem shared through ZFS (share/tmp):
1273 .mk
1274 Note that a user and his/her password \fBmust\fR be given!
1275 .sp
1276 .in +2
1277 smbmount //127.0.0.1/share_tmp /mnt/tmp -o user=workgroup/turbo,password=obrut,uid=1000
1278 .in -2
1279 .in -2
1280 .sp
1281 .ne 2
1282 .mk
1283 .na
1284 \fBMinimal /etc/samba/smb.conf configuration\fR
1285 .sp
1286 .in +2
1287 * Samba will need to listen to 'localhost' (127.0.0.1) for the zfs utilities to communicate with Samba. This is the default behavior for most Linux distributions.
1288 .sp
1289 * 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.
1290 .sp
1291 * 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>.
1292 .sp
1293 .in -2
1294 .RE
1295
1296 .sp
1297 .ne 2
1298 .mk
1299 .na
1300 \fB\fBsharenfs\fR=\fBon\fR | \fBoff\fR | \fIopts\fR\fR
1301 .ad
1302 .sp .6
1303 .RS 4n
1304 Controls whether the file system is shared via \fBNFS\fR, and what options are used. A file system with a \fBsharenfs\fR property of \fBoff\fR is managed with the \fBexportfs\fR(8) command and entries in \fB/etc/exports\fR file. Otherwise, the file system is automatically shared and unshared with the \fBzfs share\fR and \fBzfs unshare\fR commands. If the property is set to \fBon\fR, the dataset is shared using the \fBexportfs\fR(8) command in the following manner (see \fBexportfs\fR(8) for the meaning of the different options):
1305 .sp
1306 .in +4
1307 .nf
1308 /usr/sbin/exportfs -i -o sec=sys,rw,no_subtree_check,no_root_squash,mountpoint *:<mountpoint of dataset>
1309 .fi
1310 .in -4
1311 .sp
1312 Otherwise, the \fBexportfs\fR(8) command is invoked with options equivalent to the contents of this property.
1313 .sp
1314 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.
1315 .RE
1316
1317 .sp
1318 .ne 2
1319 .mk
1320 .na
1321 \fB\fBlogbias\fR=\fBlatency\fR | \fBthroughput\fR\fR
1322 .ad
1323 .sp .6
1324 .RS 4n
1325 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.
1326 .RE
1327
1328 .sp
1329 .ne 2
1330 .mk
1331 .na
1332 \fB\fBsnapdev\fR=\fBhidden\fR | \fBvisible\fR\fR
1333 .ad
1334 .sp .6
1335 .RS 4n
1336 Controls whether the snapshots devices of zvol's are hidden or visible. The default value is \fBhidden\fR.
1337 .sp
1338 In this context, hidden does not refer to the concept of hiding files or directories by starting their name with a "." character. Even with \fBvisible\fR, the directory is still named \fB\&.zfs\fR. Instead, \fBhidden\fR means that the directory is not returned by \fBreaddir\fR(3), so it doesn't show up in directory listings done by any program, including \fBls\fR \fB-a\fR. It is still possible to chdir(2) into the directory, so \fBcd\fR \fB\&.zfs\fR works even with \fBhidden\fR. This unusual behavior is to protect against unwanted effects from applications recursing into the special \fB\&.zfs\fR directory.
1339 .RE
1340
1341 .sp
1342 .ne 2
1343 .mk
1344 .na
1345 \fB\fBsnapdir\fR=\fBhidden\fR | \fBvisible\fR\fR
1346 .ad
1347 .sp .6
1348 .RS 4n
1349 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.
1350 .RE
1351
1352 .sp
1353 .ne 2
1354 .mk
1355 .na
1356 \fB\fBsync\fR=\fBstandard\fR | \fBalways\fR | \fBdisabled\fR\fR
1357 .ad
1358 .sp .6
1359 .RS 4n
1360 Controls the behavior of synchronous requests (e.g. fsync, O_DSYNC).
1361 \fBstandard\fR is the POSIX specified behavior of ensuring all synchronous
1362 requests are written to stable storage and all devices are flushed to ensure
1363 data is not cached by device controllers (this is the default). \fBalways\fR
1364 causes every file system transaction to be written and flushed before its
1365 system call returns. This has a large performance penalty. \fBdisabled\fR
1366 disables synchronous requests. File system transactions are only committed to
1367 stable storage periodically. This option will give the highest performance.
1368 However, it is very dangerous as ZFS would be ignoring the synchronous
1369 transaction demands of applications such as databases or NFS. Administrators
1370 should only use this option when the risks are understood.
1371 .RE
1372
1373 .sp
1374 .ne 2
1375 .na
1376 \fB\fBversion\fR=\fB1\fR | \fB2\fR | \fBcurrent\fR\fR
1377 .ad
1378 .sp .6
1379 .RS 4n
1380 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. The value \fBcurrent\fR automatically selects the latest supported version. See the \fBzfs upgrade\fR command.
1381 .RE
1382
1383 .sp
1384 .ne 2
1385 .mk
1386 .na
1387 \fB\fBvolsize\fR=\fIsize\fR\fR
1388 .ad
1389 .sp .6
1390 .RS 4n
1391 For volumes, specifies the logical size of the volume. By default, creating a volume establishes a \fBrefreservation\fR equal to the volume size plus the metadata required for a fully-written volume. (For pool version 8 or lower, a \fBreservation\fR is set instead.) Any changes to \fBvolsize\fR are reflected in an equivalent change to the \fBrefreservation\fR. The \fBvolsize\fR can only be set to a multiple of \fBvolblocksize\fR, and cannot be zero.
1392 .sp
1393 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.
1394 .sp
1395 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 removing (or changing) the \fBrefreservation\fR after the volume has been created. A "sparse volume" is a volume where the \fBrefreservation\fR is unset or 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.
1396 .RE
1397
1398 .sp
1399 .ne 2
1400 .mk
1401 .na
1402 \fB\fBvscan\fR=\fBon\fR | \fBoff\fR\fR
1403 .ad
1404 .sp .6
1405 .RS 4n
1406 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.
1407 .sp
1408 This property is not used on Linux.
1409 .RE
1410
1411 .sp
1412 .ne 2
1413 .mk
1414 .na
1415 \fB\fBxattr\fR=\fBon\fR | \fBoff\fR | \fBsa\fR\fR
1416 .ad
1417 .sp .6
1418 .RS 4n
1419 Controls whether extended attributes are enabled for this file system. Two
1420 styles of extended attributes are supported either directory based or system
1421 attribute based.
1422 .sp
1423 The default value of \fBon\fR enables directory based extended attributes.
1424 This style of xattr imposes no practical limit on either the size or number of
1425 xattrs which may be set on a file. Although under Linux the \fBgetxattr\fR(2)
1426 and \fBsetxattr\fR(2) system calls limit the maximum xattr size to 64K. This
1427 is the most compatible style of xattr and it is supported by the majority of
1428 ZFS implementations.
1429 .sp
1430 System attribute based xattrs may be enabled by setting the value to \fBsa\fR.
1431 The key advantage of this type of xattr is improved performance. Storing
1432 xattrs as system attributes significantly decreases the amount of disk IO
1433 required. Up to 64K of xattr data may be stored per file in the space reserved
1434 for system attributes. If there is not enough space available for an xattr then
1435 it will be automatically written as a directory based xattr. System attribute
1436 based xattrs are not accessible on platforms which do not support the
1437 \fBxattr=sa\fR feature.
1438 .sp
1439 The use of system attribute based xattrs is strongly encouraged for users of
1440 SELinux or Posix ACLs. Both of these features heavily rely of xattrs and
1441 benefit significantly from the reduced xattr access time.
1442 .sp
1443 The values \fBon\fR and \fBoff\fR are equivalent to the \fBxattr\fR and \fBnoxattr\fR mount options.
1444 .RE
1445
1446 .sp
1447 .ne 2
1448 .mk
1449 .na
1450 \fB\fBzoned\fR=\fBon\fR | \fBoff\fR\fR
1451 .ad
1452 .sp .6
1453 .RS 4n
1454 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.
1455 .RE
1456
1457 .sp
1458 .LP
1459 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.
1460 .sp
1461 .ne 2
1462 .mk
1463 .na
1464 \fB\fBcasesensitivity\fR=\fBsensitive\fR | \fBinsensitive\fR | \fBmixed\fR\fR
1465 .ad
1466 .sp .6
1467 .RS 4n
1468 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.
1469 .sp
1470 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.
1471 .RE
1472
1473 .sp
1474 .ne 2
1475 .mk
1476 .na
1477 \fB\fBnormalization\fR = \fBnone\fR | \fBformC\fR | \fBformD\fR | \fBformKC\fR | \fBformKD\fR\fR
1478 .ad
1479 .sp .6
1480 .RS 4n
1481 Indicates whether the file system should perform a Unicode normalization of file names whenever two file names are compared, and which normalization algorithm should be used.
1482 .sp
1483 If this property is set to a value other than \fBnone\fR (the default), and the \fButf8only\fR property was left unspecified, the \fButf8only\fR property is automatically set to \fBon\fR. See the cautionary note in the \fButf8only\fR section before modifying \fBnormalization\fR.
1484 .sp
1485 File names are always stored unmodified; names are normalized as part of any comparison process. Thus, \fBformC\fR and \fBformD\fR are equivalent, as are \fBformKC\fR and \fBformKD\fR. Given that, only \fBformD\fR and \fBformKD\fR make sense, as they are slightly faster because they avoid the additional canonical composition step.
1486 .\" unicode.org says it's possible to quickly detect if a string is already in a given form. Since most text (basically everything but OS X) is already in NFC, this means formC could potentially be made faster. But the additional complexity probably isn't worth the likely undetectable in practice speed improvement.
1487 .sp
1488 The practical impact of this property is: \fBnone\fR (like traditional filesystems) allows a directory to contain two files that appear (to humans) to have the same name. The other options solve this problem, for different definitions of "the same". If you need to solve this problem and are not sure what to choose,\fBformD\fR.
1489 .sp
1490 This property cannot be changed after the file system is created.
1491 .RE
1492
1493 .sp
1494 .ne 2
1495 .mk
1496 .na
1497 \fB\fButf8only\fR=\fBon\fR | \fBoff\fR\fR
1498 .ad
1499 .sp .6
1500 .RS 4n
1501 Indicates whether the file system should reject file names that include characters that are not present in the \fBUTF-8\fR character set. If this property is explicitly set to \fBoff\fR, the \fBnormalization\fR property must either not be explicitly set or be set to \fBnone\fR. The default value for the \fButf8only\fR property is \fBoff\fR.
1502 .sp
1503 Note that forcing the use of \fBUTF-8\fR filenames may cause pain for users. For example, extracting files from an archive will fail if the filenames within the archive are encoded in another character set.
1504 .sp
1505 If you are thinking of setting this (to \fBon\fR), you probably want to set \fBnormalization\fR=\fBformD\fR which will set this property to \fBon\fR implicitly.
1506 .sp
1507 This property cannot be changed after the file system is created.
1508 .RE
1509
1510 .sp
1511 .LP
1512 The \fBcasesensitivity\fR, \fBnormalization\fR, and \fButf8only\fR properties are also permissions that can be assigned to non-privileged users by using the \fBZFS\fR delegated administration feature.
1513 .RE
1514
1515 .sp
1516 .ne 2
1517 .mk
1518 .na
1519 \fB\fBcontext\fR=\fBSELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level\fR\fR
1520 .ad
1521 .sp .6
1522 .RS 4n
1523 This flag sets the SELinux context for all files in the filesytem under the mountpoint for that filesystem. See \fBselinux\fR(8) for more information.
1524 .RE
1525
1526 .sp
1527 .ne 2
1528 .mk
1529 .na
1530 \fB\fBfscontext\fR=\fBSELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level\fR\fR
1531 .ad
1532 .sp .6
1533 .RS 4n
1534 This flag sets the SELinux context for the filesytem being mounted. See \fBselinux\fR(8) for more information.
1535 .RE
1536
1537 .sp
1538 .ne 2
1539 .mk
1540 .na
1541 \fB\fBdefntext\fR=\fBSELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level\fR\fR
1542 .ad
1543 .sp .6
1544 .RS 4n
1545 This flag sets the SELinux context for unlabeled files. See \fBselinux\fR(8) for more information.
1546 .RE
1547
1548 .sp
1549 .ne 2
1550 .mk
1551 .na
1552 \fB\fBrootcontext\fR=\fBSELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level\fR\fR
1553 .ad
1554 .sp .6
1555 .RS 4n
1556 This flag sets the SELinux context for the root inode of the filesystem. See \fBselinux\fR(8) for more information.
1557 .RE
1558
1559 .sp
1560 .ne 2
1561 .mk
1562 .na
1563 \fB\fBoverlay\fR=\fBon\fR | \fBoff\fR\fR
1564 .ad
1565 .sp .6
1566 .RS 4n
1567 Allow mounting on a busy directory or a directory which already contains files/directories. This is the default mount behavior for Linux filesystems. However, for consistency with ZFS on other platforms overlay mounts are disabled by default. Set \fBoverlay=on\fR to enable overlay mounts.
1568 .RE
1569
1570 .SS "Temporary Mount Point Properties"
1571 .LP
1572 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:
1573 .sp
1574 .in +2
1575 .nf
1576 PROPERTY MOUNT OPTION
1577 atime atime/noatime
1578 canmount auto/noauto
1579 devices devices/nodevices
1580 exec exec/noexec
1581 readonly ro/rw
1582 relatime relatime/norelatime
1583 setuid suid/nosuid
1584 xattr xattr/noxattr
1585 nbmand nbmand/nonbmand (Solaris)
1586 .fi
1587 .in -2
1588 .sp
1589
1590 .sp
1591 .LP
1592 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.
1593 .SS "User Properties"
1594 .LP
1595 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). Unlike native properties, user properties are editable on snapshots.
1596 .sp
1597 .LP
1598 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).
1599 .sp
1600 .LP
1601 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 definition by Oracle Corporation (which acquired Sun Microsystems).
1602 .sp
1603 .LP
1604 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.
1605 .SS "ZFS Volumes as Swap"
1606 .LP
1607 \fBZFS\fR volumes may be used as Linux swap devices. After creating the volume
1608 with the \fBzfs create\fR command set up and enable the swap area using the
1609 \fBmkswap\fR(8) and \fBswapon\fR(8) commands. Do not swap to a file on a
1610 \fBZFS\fR file system. A \fBZFS\fR swap file configuration is not supported.
1611 .SH SUBCOMMANDS
1612 .LP
1613 All subcommands that modify state are logged persistently to the pool in their original form. The log can be viewed with \fBzpool history\fR.
1614 .sp
1615 .ne 2
1616 .mk
1617 .na
1618 \fB\fBzfs ?\fR\fR
1619 .ad
1620 .sp .6
1621 .RS 4n
1622 Displays a help message.
1623 .RE
1624
1625 .sp
1626 .ne 2
1627 .mk
1628 .na
1629 \fB\fBzfs create\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem\fR\fR
1630 .ad
1631 .sp .6
1632 .RS 4n
1633 Creates a new \fBZFS\fR file system. The file system is automatically mounted according to the \fBmountpoint\fR and \fBcanmount\fR properties.
1634 .sp
1635 .ne 2
1636 .mk
1637 .na
1638 \fB\fB-p\fR\fR
1639 .ad
1640 .sp .6
1641 .RS 4n
1642 Creates all the non-existing parent datasets. Datasets created in this manner inherit their properties; any property specified on the command line using the \fB-o\fR option applies only to the final child file system. If the target filesystem already exists, the operation completes successfully and no properties are changed.
1643 .RE
1644
1645 .sp
1646 .ne 2
1647 .mk
1648 .na
1649 \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1650 .ad
1651 .sp .6
1652 .RS 4n
1653 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.
1654 .RE
1655
1656 .RE
1657
1658 .sp
1659 .ne 2
1660 .mk
1661 .na
1662 \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
1663 .ad
1664 .sp .6
1665 .RS 4n
1666 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 \fBrefreservation\fR is created.
1667 .sp
1668 \fIsize\fR is automatically rounded up to the nearest 128KiB to ensure that the volume has an integral number of blocks regardless of \fIblocksize\fR.
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 as file systems. Datasets created in this manner inherit their properties; any property specified on the command line using the \fB-o\fR option applies only to the final child volume. If the target volume already exists, the operation completes successfully and no properties are changed.
1678 .RE
1679
1680 .sp
1681 .ne 2
1682 .mk
1683 .na
1684 \fB\fB-s\fR\fR
1685 .ad
1686 .sp .6
1687 .RS 4n
1688 Creates a sparse volume by omitting the automatic creation of a \fBrefreservation\fR. See \fBvolsize\fR in the Native Properties section for more information about sparse volumes. If this option is specified in conjunction with \fB-o\fR \fBrefreservation\fR, the \fBrefreservation\fR will be honored; this allows for a partial reservation on a sparse volume.
1689 .RE
1690
1691 .sp
1692 .ne 2
1693 .mk
1694 .na
1695 \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1696 .ad
1697 .sp .6
1698 .RS 4n
1699 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.
1700 .sp
1701 If \fB-o\fR \fBvolsize\fR is provided, the resulting behavior is undefined; it conflicts with the -V option, which is required in this mode.
1702 .RE
1703
1704 .sp
1705 .ne 2
1706 .mk
1707 .na
1708 \fB\fB-b\fR \fIblocksize\fR\fR
1709 .ad
1710 .sp .6
1711 .RS 4n
1712 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.
1713 .RE
1714
1715 .RE
1716
1717 .sp
1718 .ne 2
1719 .mk
1720 .na
1721 \fBzfs destroy\fR [\fB-fnpRrv\fR] \fIfilesystem\fR|\fIvolume\fR
1722 .ad
1723 .sp .6
1724 .RS 4n
1725 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).
1726 .sp
1727 .ne 2
1728 .mk
1729 .na
1730 \fB\fB-r\fR\fR
1731 .ad
1732 .sp .6
1733 .RS 4n
1734 Recursively destroy all children.
1735 .RE
1736
1737 .sp
1738 .ne 2
1739 .mk
1740 .na
1741 \fB\fB-R\fR\fR
1742 .ad
1743 .sp .6
1744 .RS 4n
1745 Recursively destroy all dependents, including cloned file systems outside the target hierarchy.
1746 .RE
1747
1748 .sp
1749 .ne 2
1750 .mk
1751 .na
1752 \fB\fB-f\fR\fR
1753 .ad
1754 .sp .6
1755 .RS 4n
1756 Force an unmount of any file systems using the \fBzfs unmount -f\fR command. This option has no effect on non-file systems or unmounted file systems.
1757 .RE
1758
1759 .sp
1760 .ne 2
1761 .na
1762 \fB\fB-n\fR\fR
1763 .ad
1764 .sp .6
1765 .RS 4n
1766 Do a dry-run ("No-op") deletion. No data will be deleted. This is
1767 useful in conjunction with the \fB-v\fR or \fB-p\fR flags to determine what
1768 data would be deleted.
1769 .RE
1770
1771 .sp
1772 .ne 2
1773 .na
1774 \fB\fB-p\fR\fR
1775 .ad
1776 .sp .6
1777 .RS 4n
1778 Print machine-parsable verbose information about the deleted data.
1779 .RE
1780
1781 .sp
1782 .ne 2
1783 .na
1784 \fB\fB-v\fR\fR
1785 .ad
1786 .sp .6
1787 .RS 4n
1788 Print verbose information about the deleted data.
1789 .RE
1790 .sp
1791
1792 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.
1793 .RE
1794
1795 .sp
1796 .ne 2
1797 .mk
1798 .na
1799 \fBzfs destroy\fR [\fB-dnpRrv\fR] \fIfilesystem\fR|\fIvolume\fR@\fIsnap\fR[%\fIsnap\fR][,...]
1800 .ad
1801 .sp .6
1802 .RS 4n
1803 The specified snapshots are destroyed immediately if they have no clones and the user-initiated reference count is zero (i.e. there are no holds set with \fBzfs hold\fR). If these conditions are not met, this command returns an error, unless \fB-d\fR is supplied.
1804 .sp
1805 An inclusive range of snapshots may be specified by separating the
1806 first and last snapshots with a percent sign.
1807 The first and/or last snapshots may be left blank, in which case the
1808 filesystem's oldest or newest snapshot will be implied.
1809 .sp
1810 Multiple snapshots
1811 (or ranges of snapshots) of the same filesystem or volume may be specified
1812 in a comma-separated list of snapshots.
1813 Only the snapshot's short name (the
1814 part after the \fB@\fR) should be specified when using a range or
1815 comma-separated list to identify multiple snapshots.
1816 .sp
1817 .ne 2
1818 .mk
1819 .na
1820 \fB\fB-d\fR\fR
1821 .ad
1822 .sp .6
1823 .RS 4n
1824 If the snapshot does not qualify for immediate destruction, rather than returning an error, 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.
1825 .RE
1826
1827 .sp
1828 .ne 2
1829 .mk
1830 .na
1831 \fB\fB-r\fR\fR
1832 .ad
1833 .sp .6
1834 .RS 4n
1835 Destroy (or mark for deferred destruction) all snapshots with this name in descendent file systems.
1836 .RE
1837
1838 .sp
1839 .ne 2
1840 .mk
1841 .na
1842 \fB\fB-R\fR\fR
1843 .ad
1844 .sp .6
1845 .RS 4n
1846 Recursively destroy all clones of these snapshots, including the clones,
1847 snapshots, and children. If this flag is specified, the \fB-d\fR flag will
1848 have no effect.
1849 .RE
1850
1851 .sp
1852 .ne 2
1853 .na
1854 \fB\fB-n\fR\fR
1855 .ad
1856 .sp .6
1857 .RS 4n
1858 Do a dry-run ("No-op") deletion. No data will be deleted. This is
1859 useful in conjunction with the \fB-v\fR or \fB-p\fR flags to determine what
1860 data would be deleted.
1861 .RE
1862
1863 .sp
1864 .ne 2
1865 .na
1866 \fB\fB-p\fR\fR
1867 .ad
1868 .sp .6
1869 .RS 4n
1870 Print machine-parsable verbose information about the deleted data.
1871 .RE
1872
1873 .sp
1874 .ne 2
1875 .na
1876 \fB\fB-v\fR\fR
1877 .ad
1878 .sp .6
1879 .RS 4n
1880 Print verbose information about the deleted data.
1881 .RE
1882
1883 .sp
1884 Extreme care should be taken when applying either the \fB-r\fR or the \fB-R\fR
1885 options, as they can destroy large portions of a pool and cause unexpected
1886 behavior for mounted file systems in use.
1887 .RE
1888
1889 .RE
1890
1891 .sp
1892 .ne 2
1893 .mk
1894 .na
1895 \fBzfs destroy\fR \fIfilesystem\fR|\fIvolume\fR#\fIbookmark\fR
1896 .ad
1897 .sp .6
1898 .RS 4n
1899 The given bookmark is destroyed.
1900
1901 .RE
1902
1903 .sp
1904 .ne 2
1905 .na
1906 \fB\fBzfs snapshot\fR [\fB-r\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem@snapname\fR|\fIvolume@snapname\fR\fR ...
1907 .ad
1908 .sp .6
1909 .RS 4n
1910 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.
1911 .sp
1912 .ne 2
1913 .mk
1914 .na
1915 \fB\fB-r\fR\fR
1916 .ad
1917 .sp .6
1918 .RS 4n
1919 Recursively create snapshots of all descendent datasets.
1920 .RE
1921
1922 .sp
1923 .ne 2
1924 .mk
1925 .na
1926 \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1927 .ad
1928 .sp .6
1929 .RS 4n
1930 Sets the specified property; see \fBzfs set\fR for details.
1931 .RE
1932
1933 .RE
1934
1935 .sp
1936 .ne 2
1937 .mk
1938 .na
1939 \fB\fBzfs rollback\fR [\fB-rRf\fR] \fIsnapshot\fR\fR
1940 .ad
1941 .sp .6
1942 .RS 4n
1943 Roll back the given dataset to a previous snapshot. When a dataset is rolled back, all data that has changed since the snapshot is discarded, and the dataset reverts to the state at the time of the snapshot. By default, the command refuses to roll back to a snapshot other than the most recent one. In order to do so, all intermediate snapshots and bookmarks must be destroyed by specifying the \fB-r\fR option.
1944 .sp
1945 The \fB-rR\fR options do not recursively destroy the child snapshots of a recursive snapshot. Only direct snapshots of the specified filesystem are destroyed by either of these options. To completely roll back a recursive snapshot, you must rollback the individual child snapshots.
1946 .sp
1947 .ne 2
1948 .mk
1949 .na
1950 \fB\fB-r\fR\fR
1951 .ad
1952 .sp .6
1953 .RS 4n
1954 Destroy any snapshots and bookmarks more recent than the one specified.
1955 .RE
1956
1957 .sp
1958 .ne 2
1959 .mk
1960 .na
1961 \fB\fB-R\fR\fR
1962 .ad
1963 .sp .6
1964 .RS 4n
1965 Recursively destroy any more recent snapshots and bookmarks, as well as any clones of those snapshots.
1966 .RE
1967
1968 .sp
1969 .ne 2
1970 .mk
1971 .na
1972 \fB\fB-f\fR\fR
1973 .ad
1974 .sp .6
1975 .RS 4n
1976 Used with the \fB-R\fR option to force an unmount (see \fBzfs unmount -f\fR) of any clone file systems that are to be destroyed.
1977 .RE
1978
1979 .RE
1980
1981 .sp
1982 .ne 2
1983 .mk
1984 .na
1985 \fB\fBzfs clone\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIsnapshot\fR \fIfilesystem\fR|\fIvolume\fR\fR
1986 .ad
1987 .sp .6
1988 .RS 4n
1989 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.
1990 .sp
1991 .ne 2
1992 .mk
1993 .na
1994 \fB\fB-p\fR\fR
1995 .ad
1996 .sp .6
1997 .RS 4n
1998 Creates all the non-existing parent datasets; see \fBzfs create\fR for details.
1999 .RE
2000
2001 .sp
2002 .ne 2
2003 .mk
2004 .na
2005 \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
2006 .ad
2007 .sp .6
2008 .RS 4n
2009 Sets the specified property; see \fBzfs set\fR for details.
2010 .RE
2011
2012 .RE
2013
2014 .sp
2015 .ne 2
2016 .mk
2017 .na
2018 \fB\fBzfs promote\fR \fIclone-filesystem\fR\fR
2019 .ad
2020 .sp .6
2021 .RS 4n
2022 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.
2023 .sp
2024 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 \fBzfs rename\fR command can be used to rename any conflicting snapshots.
2025 .RE
2026
2027 .sp
2028 .ne 2
2029 .mk
2030 .na
2031 \fB\fBzfs rename\fR [\fB-f\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
2032 .ad
2033 .br
2034 .na
2035 \fB\fBzfs rename\fR [\fB-fp\fR] \fIfilesystem\fR|\fIvolume\fR \fIfilesystem\fR|\fIvolume\fR\fR
2036 .ad
2037 .sp .6
2038 .RS 4n
2039 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.
2040 .sp
2041 .ne 2
2042 .mk
2043 .na
2044 \fB\fB-p\fR\fR
2045 .ad
2046 .sp .6
2047 .RS 4n
2048 Creates all the nonexistent parent datasets; see \fBzfs create\fR for details.
2049 .RE
2050
2051 .sp
2052 .ne 2
2053 .na
2054 \fB\fB-f\fR\fR
2055 .ad
2056 .sp .6
2057 .RS 4n
2058 Force unmount any filesystems that need to be unmounted in the process.
2059 .RE
2060
2061 .RE
2062
2063 .sp
2064 .ne 2
2065 .mk
2066 .na
2067 \fB\fBzfs rename\fR \fB-r\fR \fIsnapshot\fR \fIsnapshot\fR\fR
2068 .ad
2069 .sp .6
2070 .RS 4n
2071 Recursively rename the snapshots of all descendent datasets. Snapshots are the only dataset that can be renamed recursively.
2072 .RE
2073
2074 .sp
2075 .ne 2
2076 .mk
2077 .na
2078 \fB\fBzfs\fR \fBlist\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR] [\fB-Hp\fR] [\fB-o\fR \fIproperty\fR[,\fI\&...\fR]] [ \fB-t\fR \fItype\fR[,\fI\&...\fR]] [ \fB-s\fR \fIproperty\fR ] ... [ \fB-S\fR \fIproperty\fR ] ... [\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR|\fImountpoint\fR] ...\fR
2079 .ad
2080 .sp .6
2081 .RS 4n
2082 Lists the property information for the given datasets in tabular form. If a mount point is specified, it can be an absolute pathname or a relative pathname as long as it contains a slash (e.g. \fBzfs list ./\fR). By default, all file systems and volumes are displayed. Snapshots are displayed if the pool's \fBlistsnapshots\fR property is \fBon\fR (the default is \fBoff\fR). When listing hundreds or thousands of snapshots performance can be improved by restricting the output to only the name. In that case, it is recommended to use \fB-o name -s name\fR. The following fields are displayed by default: \fBname, used, available, referenced, mountpoint\fR
2083 .sp
2084 .ne 2
2085 .mk
2086 .na
2087 \fB\fB-H\fR\fR
2088 .ad
2089 .sp .6
2090 .RS 4n
2091 Used for scripting mode. Do not print headers and separate fields by a single tab instead of arbitrary white space.
2092 .RE
2093
2094 .sp
2095 .ne 2
2096 .mk
2097 .na
2098 \fB\fB-p\fR\fR
2099 .sp .6
2100 .RS 4n
2101 Display numbers in parsable (exact) values.
2102 .RE
2103
2104 .sp
2105 .ne 2
2106 .mk
2107 .na
2108 \fB\fB-r\fR\fR
2109 .ad
2110 .sp .6
2111 .RS 4n
2112 Recursively display any children of the dataset on the command line.
2113 .RE
2114
2115 .sp
2116 .ne 2
2117 .mk
2118 .na
2119 \fB\fB-d\fR \fIdepth\fR\fR
2120 .ad
2121 .sp .6
2122 .RS 4n
2123 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.
2124 .RE
2125
2126 .sp
2127 .ne 2
2128 .mk
2129 .na
2130 \fB\fB-o\fR \fIproperty\fR\fR
2131 .ad
2132 .sp .6
2133 .RS 4n
2134 A comma-separated list of properties to display. The property must be:
2135 .RS +4
2136 .TP
2137 .ie t \(bu
2138 .el o
2139 One of the properties described in the "Native Properties" section
2140 .RE
2141 .RS +4
2142 .TP
2143 .ie t \(bu
2144 .el o
2145 A user property
2146 .RE
2147 .RS +4
2148 .TP
2149 .ie t \(bu
2150 .el o
2151 The value \fBname\fR to display the dataset name
2152 .RE
2153 .RS +4
2154 .TP
2155 .ie t \(bu
2156 .el o
2157 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.
2158 .RE
2159 .RE
2160
2161 .sp
2162 .ne 2
2163 .mk
2164 .na
2165 \fB\fB-s\fR \fIproperty\fR\fR
2166 .ad
2167 .sp .6
2168 .RS 4n
2169 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.
2170 .sp
2171 The following is a list of sorting criteria:
2172 .RS +4
2173 .TP
2174 .ie t \(bu
2175 .el o
2176 Numeric types sort in numeric order.
2177 .RE
2178 .RS +4
2179 .TP
2180 .ie t \(bu
2181 .el o
2182 String types sort in alphabetical order.
2183 .RE
2184 .RS +4
2185 .TP
2186 .ie t \(bu
2187 .el o
2188 Types inappropriate for a row sort that row to the literal bottom, regardless of the specified ordering.
2189 .RE
2190 .RS +4
2191 .TP
2192 .ie t \(bu
2193 .el o
2194 If no sorting options are specified the existing behavior of \fBzfs list\fR is preserved.
2195 .RE
2196 .RE
2197
2198 .sp
2199 .ne 2
2200 .mk
2201 .na
2202 \fB\fB-S\fR \fIproperty\fR\fR
2203 .ad
2204 .sp .6
2205 .RS 4n
2206 Same as the \fB-s\fR option, but sorts by property in descending order.
2207 .RE
2208
2209 .sp
2210 .ne 2
2211 .mk
2212 .na
2213 \fB\fB-t\fR \fItype\fR\fR
2214 .ad
2215 .sp .6
2216 .RS 4n
2217 A comma-separated list of types to display, where \fItype\fR is one of \fBfilesystem\fR, \fBsnapshot\fR, \fBsnap\fR, \fBvolume\fR, \fBbookmark\fR, or \fBall\fR. For example, specifying \fB-t snapshot\fR displays only snapshots.
2218 .RE
2219
2220 .RE
2221
2222 .sp
2223 .ne 2
2224 .mk
2225 .na
2226 \fB\fBzfs set\fR \fIproperty\fR=\fIvalue\fR[ \fIproperty\fR=\fIvalue\fR]...
2227 \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
2228 .ad
2229 .sp .6
2230 .RS 4n
2231 Sets the property or list of properties to the given value(s) for each dataset.
2232 Only some properties can be edited. See the "Properties" section for more
2233 information on which properties can be set and acceptable values. User properties
2234 can be set on snapshots. For more information, see the "User Properties" section.
2235 .RE
2236
2237 .sp
2238 .ne 2
2239 .mk .na
2240 \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
2241 .ad
2242 .sp .6
2243 .RS 4n
2244 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:
2245 .sp
2246 .in +2
2247 .nf
2248 name Dataset name
2249 property Property name
2250 value Property value
2251 source Property source. Can either be local, default,
2252 temporary, inherited, received, or none (-).
2253 .fi
2254 .in -2
2255 .sp
2256
2257 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.
2258 .sp
2259 The special value \fBall\fR can be used to display all properties that apply to the given dataset's type (filesystem, volume snapshot, or bookmark).
2260 .sp
2261 .ne 2
2262 .mk
2263 .na
2264 \fB\fB-r\fR\fR
2265 .ad
2266 .sp .6
2267 .RS 4n
2268 Recursively display properties for any children.
2269 .RE
2270
2271 .sp
2272 .ne 2
2273 .mk
2274 .na
2275 \fB\fB-d\fR \fIdepth\fR\fR
2276 .ad
2277 .sp .6
2278 .RS 4n
2279 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.
2280 .RE
2281
2282 .sp
2283 .ne 2
2284 .mk
2285 .na
2286 \fB\fB-H\fR\fR
2287 .ad
2288 .sp .6
2289 .RS 4n
2290 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.
2291 .RE
2292
2293 .sp
2294 .ne 2
2295 .mk
2296 .na
2297 \fB\fB-o\fR \fIfield\fR\fR
2298 .ad
2299 .sp .6
2300 .RS 4n
2301 A comma-separated list of columns to display. \fBname,property,value,source\fR is the default value.
2302 .RE
2303
2304 .sp
2305 .ne 2
2306 .mk
2307 .na
2308 \fB\fB-s\fR \fIsource\fR\fR
2309 .ad
2310 .sp .6
2311 .RS 4n
2312 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,received,temporary,none\fR. The default value is all sources.
2313 .RE
2314
2315 .sp
2316 .ne 2
2317 .mk
2318 .na
2319 \fB\fB-p\fR\fR
2320 .ad
2321 .sp .6
2322 .RS 4n
2323 Display numbers in parsable (exact) values.
2324 .RE
2325
2326 .RE
2327
2328 .sp
2329 .ne 2
2330 .mk
2331 .na
2332 \fB\fBzfs inherit\fR [\fB-rS\fR] \fIproperty\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
2333 .ad
2334 .sp .6
2335 .RS 4n
2336 Clears the specified property, causing it to be inherited from an ancestor, restored to default if no ancestor has the property set, or with the \fB-S\fR option reverted to the received value if one exists. See the "Properties" section for a listing of default values, and details on which properties can be inherited.
2337 .sp
2338 .ne 2
2339 .mk
2340 .na
2341 \fB\fB-r\fR\fR
2342 .ad
2343 .sp .6
2344 .RS 4n
2345 Recursively inherit the given property for all children.
2346 .RE
2347 .sp
2348 .ne 2
2349 .na
2350 \fB\fB-S\fR\fR
2351 .ad
2352 .sp .6
2353 .RS 4n
2354 Revert the property to the received value if one exists; otherwise operate as
2355 if the \fB-S\fR option was not specified.
2356 .RE
2357
2358 .RE
2359
2360 .sp
2361 .ne 2
2362 .mk
2363 .na
2364 \fB\fBzfs upgrade\fR
2365 .ad
2366 .sp .6
2367 .RS 4n
2368 Displays a list of file systems that are not the most recent version.
2369 .RE
2370
2371 .sp
2372 .ne 2
2373 .mk
2374 .na
2375 \fB\fBzfs upgrade\fR \fB-v\fR\fR
2376 .ad
2377 .sp .6
2378 .RS 4n
2379 Displays a list of file system versions.
2380 .RE
2381
2382
2383 .sp
2384 .ne 2
2385 .mk
2386 .na
2387 \fB\fBzfs upgrade\fR [\fB-r\fR] [\fB-V\fR \fIversion\fR] [\fB-a\fR | \fIfilesystem\fR]\fR
2388 .ad
2389 .sp .6
2390 .RS 4n
2391 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.
2392 .sp
2393 In general, the file system version is independent of the pool version. See \fBzpool\fR(8) for information on the \fBzpool upgrade\fR command.
2394 .sp
2395 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.
2396 .sp
2397 .ne 2
2398 .mk
2399 .na
2400 \fB\fB-a\fR\fR
2401 .ad
2402 .sp .6
2403 .RS 4n
2404 Upgrades all file systems on all imported pools.
2405 .RE
2406
2407 .sp
2408 .ne 2
2409 .mk
2410 .na
2411 \fB\fIfilesystem\fR\fR
2412 .ad
2413 .sp .6
2414 .RS 4n
2415 Upgrades the specified file system.
2416 .RE
2417
2418 .sp
2419 .ne 2
2420 .mk
2421 .na
2422 \fB\fB-r\fR\fR
2423 .ad
2424 .sp .6
2425 .RS 4n
2426 Upgrades the specified file system and all descendent file systems
2427 .RE
2428
2429 .sp
2430 .ne 2
2431 .mk
2432 .na
2433 \fB\fB-V\fR \fIversion\fR\fR
2434 .ad
2435 .sp .6
2436 .RS 4n
2437 Upgrades 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.
2438 .RE
2439
2440 .RE
2441
2442 .sp
2443 .ne 2
2444 .mk
2445 .na
2446 \fBzfs\fR \fBuserspace\fR [\fB-Hinp\fR] [\fB-o\fR \fIfield\fR[,...]]
2447 [\fB-s\fR \fIfield\fR] ...
2448 [\fB-S\fR \fIfield\fR] ...
2449 [\fB-t\fR \fItype\fR[,...]] \fIfilesystem\fR|\fIsnapshot\fR
2450 .ad
2451 .sp .6
2452 .RS 4n
2453 Displays space consumed by, and quotas on, each user in the specified
2454 filesystem or snapshot. This corresponds to the \fBuserused@\fR\fIuser\fR and
2455 \fBuserquota@\fR\fIuser\fR properties.
2456 .sp
2457 .ne 2
2458 .mk
2459 .na
2460 \fB\fB-n\fR\fR
2461 .ad
2462 .sp .6
2463 .RS 4n
2464 Print numeric ID instead of user/group name.
2465 .RE
2466
2467 .sp
2468 .ne 2
2469 .mk
2470 .na
2471 \fB\fB-H\fR\fR
2472 .ad
2473 .sp .6
2474 .RS 4n
2475 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.
2476 .RE
2477
2478 .sp
2479 .ne 2
2480 .mk
2481 .na
2482 \fB\fB-p\fR\fR
2483 .ad
2484 .sp .6
2485 .RS 4n
2486 Use exact (parsable) numeric output.
2487 .RE
2488
2489 .sp
2490 .ne 2
2491 .mk
2492 .na
2493 \fB\fB-o\fR \fIfield\fR[,...]\fR
2494 .ad
2495 .sp .6
2496 .RS 4n
2497 Display only the specified fields from the following
2498 set: \fBtype, name, used, quota\fR. The default is to display all fields.
2499 .RE
2500
2501 .sp
2502 .ne 2
2503 .mk
2504 .na
2505 \fB\fB-s\fR \fIfield\fR\fR
2506 .ad
2507 .sp .6
2508 .RS 4n
2509 Sort output by this field. The \fIs\fR and \fIS\fR flags may be specified
2510 multiple times to sort first by one field, then by another. The default is
2511 \fB-s type\fR \fB-s name\fR.
2512 .RE
2513
2514 .sp
2515 .ne 2
2516 .mk
2517 .na
2518 \fB\fB-S\fR \fIfield\fR\fR
2519 .ad
2520 .sp .6
2521 .RS 4n
2522 Sort by this field in reverse order. See \fB-s\fR.
2523 .RE
2524
2525 .sp
2526 .ne 2
2527 .mk
2528 .na
2529 \fB\fB-t\fR \fItype\fR[,...]\fR
2530 .ad
2531 .sp .6
2532 .RS 4n
2533 Print only the specified types from the following
2534 set: \fBall, posixuser, smbuser, posixgroup, smbgroup\fR. The default
2535 is \fB-t posixuser,smbuser\fR. The default can be changed to include group
2536 types.
2537 .RE
2538
2539 .sp
2540 .ne 2
2541 .mk
2542 .na
2543 \fB\fB-i\fR\fR
2544 .ad
2545 .sp .6
2546 .RS 4n
2547 Translate SID to POSIX ID. The POSIX ID may be ephemeral if no mapping exists.
2548 Normal POSIX interfaces (for example, \fBstat\fR(2), \fBls\fR(1) \fB-l\fR) perform
2549 this translation, so the \fB-i\fR option allows the output from \fBzfs
2550 userspace\fR to be compared directly with those utilities. However, \fB-i\fR
2551 may lead to confusion if some files were created by an SMB user before a
2552 SMB-to-POSIX name mapping was established. In such a case, some files will be owned
2553 by the SMB entity and some by the POSIX entity. However, the \fB-i\fR option
2554 will report that the POSIX entity has the total usage and quota for both.
2555 .sp
2556 This option is not useful on Linux.
2557 .RE
2558
2559 .RE
2560
2561 .sp
2562 .ne 2
2563 .mk
2564 .na
2565 \fBzfs\fR \fBgroupspace\fR [\fB-Hinp\fR] [\fB-o\fR \fIfield\fR[,...]]
2566 [\fB-s\fR \fIfield\fR] ...
2567 [\fB-S\fR \fIfield\fR] ...
2568 [\fB-t\fR \fItype\fR[,...]] \fIfilesystem\fR|\fIsnapshot\fR
2569 .ad
2570 .sp .6
2571 .RS 4n
2572 Displays space consumed by, and quotas on, each group in the specified
2573 filesystem or snapshot. This subcommand is identical to \fBzfs userspace\fR,
2574 except that the default types to display are \fB-t posixgroup,smbgroup\fR.
2575 .RE
2576
2577 .sp
2578 .ne 2
2579 .mk
2580 .na
2581 \fB\fBzfs mount\fR\fR
2582 .ad
2583 .sp .6
2584 .RS 4n
2585 Displays all \fBZFS\fR file systems currently mounted.
2586 .RE
2587
2588 .sp
2589 .ne 2
2590 .mk
2591 .na
2592 \fB\fBzfs mount\fR [\fB-vO\fR] [\fB-o\fR \fIoptions\fR] \fB-a\fR | \fIfilesystem\fR\fR
2593 .ad
2594 .sp .6
2595 .RS 4n
2596 Mounts \fBZFS\fR file systems. This is invoked automatically as part of the boot process.
2597 .sp
2598 .ne 2
2599 .mk
2600 .na
2601 \fB\fB-o\fR \fIoptions\fR\fR
2602 .ad
2603 .sp .6
2604 .RS 4n
2605 An optional, comma-separated list of mount options to use temporarily for the
2606 duration of the mount. See the "Temporary Mount Point Properties" section for
2607 details.
2608 .RE
2609
2610 .sp
2611 .ne 2
2612 .mk
2613 .na
2614 \fB\fB-O\fR\fR
2615 .ad
2616 .sp .6
2617 .RS 4n
2618 Allow mounting the filesystem even if the target directory is not empty.
2619 .sp
2620 On Solaris, the behavior of \fBzfs mount\fR matches \fBmount\fR and \fBzfs mount -O\fR matches \fBmount -O\fR. See \fBmount\fR(1M).
2621 .sp
2622 On Linux, this is the default for \fBmount\fR(8). In other words, \fBzfs mount -O\fR matches \fBmount\fR and there is no \fBmount\fR equivalent to a plain \fBzfs mount\fR.
2623 .RE
2624
2625 .sp
2626 .ne 2
2627 .mk
2628 .na
2629 \fB\fB-v\fR\fR
2630 .ad
2631 .sp .6
2632 .RS 4n
2633 Report mount progress. This is intended for use with \fBzfs mount -a\fR on a system with a significant number of filesystems.
2634 .RE
2635
2636 .sp
2637 .ne 2
2638 .mk
2639 .na
2640 \fB\fB-a\fR\fR
2641 .ad
2642 .sp .6
2643 .RS 4n
2644 Mount all available \fBZFS\fR file systems. Invoked automatically as part of
2645 the boot process.
2646 .RE
2647
2648 .sp
2649 .ne 2
2650 .mk
2651 .na
2652 \fB\fIfilesystem\fR\fR
2653 .ad
2654 .sp .6
2655 .RS 4n
2656 Mount the specified filesystem.
2657 .RE
2658
2659 .RE
2660
2661 .sp
2662 .ne 2
2663 .mk
2664 .na
2665 \fB\fBzfs unmount\fR [\fB-f\fR] \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR\fR
2666 .ad
2667 .sp .6
2668 .RS 4n
2669 Unmounts currently mounted \fBZFS\fR file systems. Invoked automatically as part of the shutdown process.
2670 .sp
2671 .ne 2
2672 .mk
2673 .na
2674 \fB\fB-f\fR\fR
2675 .ad
2676 .sp .6
2677 .RS 4n
2678 Forcefully unmount the file system, even if it is currently in use.
2679 .RE
2680
2681 .sp
2682 .ne 2
2683 .mk
2684 .na
2685 \fB\fB-a\fR\fR
2686 .ad
2687 .sp .6
2688 .RS 4n
2689 Unmount all available \fBZFS\fR file systems. Invoked automatically as part of the shutdown process.
2690 .RE
2691
2692 .sp
2693 .ne 2
2694 .mk
2695 .na
2696 \fIfilesystem\fR|\fImountpoint\fR
2697 .ad
2698 .sp .6
2699 .RS 4n
2700 Unmount the specified filesystem. The command can also be given a path to a \fBZFS\fR file system mount point on the system.
2701 .RE
2702
2703 .RE
2704
2705 .sp
2706 .ne 2
2707 .mk
2708 .na
2709 \fB\fBzfs share\fR \fB-a\fR | \fIfilesystem\fR\fR
2710 .ad
2711 .sp .6
2712 .RS 4n
2713 Shares available \fBZFS\fR file systems.
2714 .sp
2715 .ne 2
2716 .mk
2717 .na
2718 \fB\fB-a\fR\fR
2719 .ad
2720 .sp .6
2721 .RS 4n
2722 Share all available \fBZFS\fR file systems. Invoked automatically as part of the boot process.
2723 .RE
2724
2725 .sp
2726 .ne 2
2727 .mk
2728 .na
2729 \fB\fIfilesystem\fR\fR
2730 .ad
2731 .sp .6
2732 .RS 4n
2733 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.
2734 .RE
2735
2736 .RE
2737
2738 .sp
2739 .ne 2
2740 .mk
2741 .na
2742 \fB\fBzfs unshare\fR \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR\fR
2743 .ad
2744 .sp .6
2745 .RS 4n
2746 Unshares currently shared \fBZFS\fR file systems. This is invoked automatically as part of the shutdown process.
2747 .sp
2748 .ne 2
2749 .mk
2750 .na
2751 \fB\fB-a\fR\fR
2752 .ad
2753 .sp .6
2754 .RS 4n
2755 Unshare all available \fBZFS\fR file systems. Invoked automatically as part of the boot process.
2756 .RE
2757
2758 .sp
2759 .ne 2
2760 .mk
2761 .na
2762 \fB\fIfilesystem\fR|\fImountpoint\fR\fR
2763 .ad
2764 .sp .6
2765 .RS 4n
2766 Unshare the specified filesystem. The command can also be given a path to a \fBZFS\fR file system shared on the system.
2767 .RE
2768
2769 .RE
2770
2771 .sp
2772 .ne 2
2773 .mk
2774 .na
2775 \fB\fBzfs bookmark\fR \fIsnapshot\fR \fIbookmark\fR\fR
2776 .ad
2777 .sp .6
2778 .RS 4n
2779 Creates a bookmark of the given snapshot. Bookmarks mark the point in time
2780 when the snapshot was created, and can be used as the incremental source for
2781 a \fBzfs send\fR command.
2782 .sp
2783 This feature must be enabled to be used.
2784 See \fBzpool-features\fR(5) for details on ZFS feature flags and the
2785 \fBbookmarks\fR feature.
2786 .RE
2787
2788
2789 .RE
2790 .sp
2791 .ne 2
2792 .na
2793 \fBzfs send\fR [\fB-DnPpRveL\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR] \fIsnapshot\fR
2794 .ad
2795 .sp .6
2796 .RS 4n
2797 Creates a stream representation of the (second, if \fB-i\fR is specified) \fIsnapshot\fR, which is written to standard output. The output can be redirected to a file or to a pipe (for example, using \fBssh\fR(1) to send it to a different system with \fBzfs receive\fR). By default, a full stream is generated; specifying \fB-i\fR or \fB-I\fR changes this behavior.
2798 .sp
2799 .ne 2
2800 .mk
2801 .na
2802 \fB\fB-i\fR \fIsnapshot\fR\fR
2803 .ad
2804 .sp .6
2805 .RS 4n
2806 Generate an incremental stream from the first \fIsnapshot\fR (the incremental source) to the second \fIsnapshot\fR (the incremental target). The incremental source can be specified as the last component of the snapshot name (the \fB@\fR character and following) and it is assumed to be from the same file system as the incremental target.
2807 .sp
2808 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).
2809 .RE
2810
2811 .sp
2812 .ne 2
2813 .mk
2814 .na
2815 \fB\fB-I\fR \fIsnapshot\fR\fR
2816 .ad
2817 .sp .6
2818 .RS 4n
2819 Generate a stream package that sends all intermediary snapshots from the first snapshot to the second snapshot. For example, \fB-I @a fs@d\fR is similar to \fB-i @a fs@b; -i @b fs@c; -i @c fs@d\fR. The incremental source may be specified as with the \fB-i\fR option.
2820 .RE
2821
2822 .sp
2823 .ne 2
2824 .mk
2825 .na
2826 \fB\fB-R\fR\fR
2827 .ad
2828 .sp .6
2829 .RS 4n
2830 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.
2831 .sp
2832 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.
2833 .RE
2834
2835 .sp
2836 .ne 2
2837 .mk
2838 .na
2839 \fB\fB-D\fR\fR
2840 .ad
2841 .sp .6
2842 .RS 4n
2843 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 receive 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).
2844 .RE
2845
2846 .sp
2847 .ne 2
2848 .mk
2849 .na
2850 \fB\fB-L\fR\fR
2851 .ad
2852 .sp .6
2853 .RS 4n
2854 Generate a stream which may contain blocks larger than 128KiB. This flag
2855 has no effect if the \fBlarge_blocks\fR pool feature is disabled, or if
2856 the \fRrecordsize\fR property of this filesystem has never been set above
2857 128KiB. The receiving system must have the \fBlarge_blocks\fR pool feature
2858 enabled as well. See \fBzpool-features\fR(5) for details on ZFS feature
2859 flags and the \fBlarge_blocks\fR feature.
2860 .RE
2861
2862 .sp
2863 .ne 2
2864 .mk
2865 .na
2866 \fB\fB-e\fR\fR
2867 .ad
2868 .sp .6
2869 .RS 4n
2870 Generate a more compact stream by using WRITE_EMBEDDED records for blocks
2871 which are stored more compactly on disk by the \fBembedded_data\fR pool
2872 feature. This flag has no effect if the \fBembedded_data\fR feature is
2873 disabled. The receiving system must have the \fBembedded_data\fR feature
2874 enabled. If the \fBlz4_compress\fR feature is active on the sending system,
2875 then the receiving system must have that feature enabled as well. See
2876 \fBzpool-features\fR(5) for details on ZFS feature flags and the
2877 \fBembedded_data\fR feature.
2878 .RE
2879
2880 .sp
2881 .ne 2
2882 .na
2883 \fB\fB-p\fR\fR
2884 .ad
2885 .sp .6
2886 .RS 4n
2887 Include the dataset's properties in the stream. This flag is implicit when -R is specified. The receiving system must also support this feature.
2888 .RE
2889
2890 .sp
2891 .ne 2
2892 .na
2893 \fB\fB-n\fR\fR
2894 .ad
2895 .sp .6
2896 .RS 4n
2897 Do a dry-run ("No-op") send. Do not generate any actual send data. This is
2898 useful in conjunction with the \fB-v\fR or \fB-P\fR flags to determine what
2899 data will be sent. In this case, the verbose output will be written to
2900 standard output (contrast with a non-dry-run, where the stream is written
2901 to standard output and the verbose output goes to standard error).
2902 .RE
2903
2904 .sp
2905 .ne 2
2906 .na
2907 \fB\fB-P\fR\fR
2908 .ad
2909 .sp .6
2910 .RS 4n
2911 Print machine-parsable verbose information about the stream package generated.
2912 .RE
2913
2914 .sp
2915 .ne 2
2916 .mk
2917 .na
2918 \fB\fB-v\fR\fR
2919 .ad
2920 .sp .6
2921 .RS 4n
2922 Print verbose information about the stream package generated. This information
2923 includes a per-second report of how much data has been sent.
2924 .RE
2925
2926 The format of the stream is committed. You will be able to receive your streams on future versions of \fBZFS\fR.
2927 .RE
2928
2929 .RE
2930 .sp
2931 .ne 2
2932 .na
2933 \fBzfs send\fR [\fB-eL\fR] [\fB-i\fR \fIsnapshot\fR|\fIbookmark\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR
2934 .ad
2935 .sp .6
2936 .RS 4n
2937 Generate a send stream, which may be of a filesystem, and may be
2938 incremental from a bookmark. If the destination is a filesystem or volume,
2939 the pool must be read-only, or the filesystem must not be mounted. When the
2940 stream generated from a filesystem or volume is received, the default snapshot
2941 name will be "--head--".
2942
2943 .sp
2944 .ne 2
2945 .na
2946 \fB-i\fR \fIsnapshot\fR|\fIbookmark\fR
2947 .ad
2948 .sp .6
2949 .RS 4n
2950 Generate an incremental send stream. The incremental source must be an earlier
2951 snapshot in the destination's history. It will commonly be an earlier
2952 snapshot in the destination's filesystem, in which case it can be
2953 specified as the last component of the name (the \fB#\fR or \fB@\fR character
2954 and following).
2955 .sp
2956 If the incremental target is a clone, the incremental source can
2957 be the origin snapshot, or an earlier snapshot in the origin's filesystem,
2958 or the origin's origin, etc.
2959 .RE
2960
2961 .sp
2962 .ne 2
2963 .mk
2964 .na
2965 \fB\fB-L\fR\fR
2966 .ad
2967 .sp .6
2968 .RS 4n
2969 Generate a stream which may contain blocks larger than 128KiB. This flag
2970 has no effect if the \fBlarge_blocks\fR pool feature is disabled, or if
2971 the \fRrecordsize\fR property of this filesystem has never been set above
2972 128KiB. The receiving system must have the \fBlarge_blocks\fR pool feature
2973 enabled as well. See \fBzpool-features\fR(5) for details on ZFS feature
2974 flags and the \fBlarge_blocks\fR feature.
2975 .RE
2976
2977 .sp
2978 .ne 2
2979 .mk
2980 .na
2981 \fB\fB-e\fR\fR
2982 .ad
2983 .sp .6
2984 .RS 4n
2985 Generate a more compact stream by using WRITE_EMBEDDED records for blocks
2986 which are stored more compactly on disk by the \fBembedded_data\fR pool
2987 feature. This flag has no effect if the \fBembedded_data\fR feature is
2988 disabled. The receiving system must have the \fBembedded_data\fR feature
2989 enabled. If the \fBlz4_compress\fR feature is active on the sending system,
2990 then the receiving system must have that feature enabled as well. See
2991 \fBzpool-features\fR(5) for details on ZFS feature flags and the
2992 \fBembedded_data\fR feature.
2993 .RE
2994
2995 .RE
2996 .sp
2997 .ne 2
2998 .mk
2999 .na
3000 \fB\fBzfs receive\fR [\fB-vnFu\fR] [\fB-o origin\fR=\fIsnapshot\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
3001 .ad
3002 .br
3003 .na
3004 \fB\fBzfs receive\fR [\fB-vnFu\fR] [\fB-d\fR|\fB-e\fR] [\fB-o origin\fR=\fIsnapshot\fR] \fIfilesystem\fR\fR
3005 .ad
3006 .sp .6
3007 .RS 4n
3008 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.
3009 .sp
3010 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.
3011 .sp
3012 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.
3013 .sp
3014 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.
3015 .sp
3016 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.
3017 .sp
3018 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.
3019 .sp
3020 .ne 2
3021 .mk
3022 .na
3023 \fB\fB-d\fR\fR
3024 .ad
3025 .sp .6
3026 .RS 4n
3027 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.
3028 .RE
3029
3030 .sp
3031 .ne 2
3032 .na
3033 \fB\fB-e\fR\fR
3034 .ad
3035 .sp .6
3036 .RS 4n
3037 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.
3038 .RE
3039
3040 .sp
3041 .ne 2
3042 .mk
3043 .na
3044 \fB\fB-u\fR\fR
3045 .ad
3046 .sp .6
3047 .RS 4n
3048 Do not mount the file system that is associated with the received stream.
3049 .RE
3050
3051 .sp
3052 .ne 2
3053 .na
3054 \fB\fB-v\fR\fR
3055 .ad
3056 .sp .6
3057 .RS 4n
3058 Print verbose information about the stream and the time required to perform the receive operation.
3059 .RE
3060
3061 .sp
3062 .ne 2
3063 .mk
3064 .na
3065 \fB\fB-n\fR\fR
3066 .ad
3067 .sp .6
3068 .RS 4n
3069 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.
3070 .RE
3071
3072 .sp
3073 .ne 2
3074 .mk
3075 .na
3076 \fB\fB-o\fR \fBorigin\fR=\fIsnapshot\fR
3077 .ad
3078 .sp .6
3079 .RS 4n
3080 Forces the stream to be received as a clone of the given snapshot. This is only valid if the stream is an incremental stream whose source is the same as the provided origin.
3081 .RE
3082
3083 .sp
3084 .ne 2
3085 .mk
3086 .na
3087 \fB\fB-F\fR\fR
3088 .ad
3089 .sp .6
3090 .RS 4n
3091 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.
3092 .RE
3093
3094 .RE
3095
3096 .sp
3097 .ne 2
3098 .mk
3099 .na
3100 \fB\fBzfs allow\fR \fIfilesystem\fR | \fIvolume\fR\fR
3101 .ad
3102 .sp .6
3103 .RS 4n
3104 Displays permissions that have been delegated on the specified filesystem or volume. See the other forms of \fBzfs allow\fR for more information.
3105 .RE
3106
3107 .sp
3108 .ne 2
3109 .mk
3110 .na
3111 \fB\fBzfs allow\fR [\fB-ldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR| \fIvolume\fR\fR
3112 .ad
3113 .br
3114 .na
3115 \fB\fBzfs allow\fR [\fB-ld\fR] \fB-e\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR | \fIvolume\fR\fR
3116 .ad
3117 .sp .6
3118 .RS 4n
3119 Delegates \fBZFS\fR administration permission for the file systems to non-privileged users.
3120 .sp
3121 .ne 2
3122 .mk
3123 .na
3124 \fB[\fB-ug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...]\fR
3125 .ad
3126 .sp .6
3127 .RS 4n
3128 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.
3129 .RE
3130
3131 .sp
3132 .ne 2
3133 .mk
3134 .na
3135 \fB[\fB-e\fR] \fIperm\fR|@\fIsetname\fR[,...]\fR
3136 .ad
3137 .sp .6
3138 .RS 4n
3139 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.
3140 .RE
3141
3142 .sp
3143 .ne 2
3144 .mk
3145 .na
3146 \fB[\fB-ld\fR] \fIfilesystem\fR|\fIvolume\fR\fR
3147 .ad
3148 .sp .6
3149 .RS 4n
3150 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.
3151 .RE
3152
3153 .RE
3154
3155 .sp
3156 .LP
3157 Permissions are generally the ability to use a \fBzfs\fR subcommand or change a property. The following permissions are available:
3158 .sp
3159 .in +2
3160 .nf
3161 NAME TYPE NOTES
3162 allow subcommand Must also have the permission that is being
3163 allowed
3164 clone subcommand Must also have the 'create' ability and 'mount'
3165 ability in the origin file system
3166 create subcommand Must also have the 'mount' ability
3167 destroy subcommand Must also have the 'mount' ability
3168 diff subcommand Allows lookup of paths within a dataset
3169 given an object number, and the ability to
3170 create snapshots necessary to 'zfs diff'.
3171 mount subcommand Allows mount/umount of ZFS datasets
3172 promote subcommand Must also have the 'mount'
3173 and 'promote' ability in the origin file system
3174 receive subcommand Must also have the 'mount' and 'create' ability
3175 rename subcommand Must also have the 'mount' and 'create'
3176 ability in the new parent
3177 rollback subcommand Must also have the 'mount' ability
3178 send subcommand
3179 share subcommand Allows sharing file systems over NFS or SMB
3180 protocols
3181 snapshot subcommand Must also have the 'mount' ability
3182 groupquota other Allows accessing any groupquota@... property
3183 groupused other Allows reading any groupused@... property
3184 userprop other Allows changing any user property
3185 userquota other Allows accessing any userquota@... property
3186 userused other Allows reading any userused@... property
3187
3188 acltype property
3189 aclinherit property
3190 atime property
3191 canmount property
3192 casesensitivity property
3193 checksum property
3194 compression property
3195 copies property
3196 dedup property
3197 devices property
3198 exec property
3199 filesystem_limit property
3200 logbias property
3201 mlslabel property
3202 mountpoint property
3203 nbmand property
3204 normalization property
3205 primarycache property
3206 quota property
3207 readonly property
3208 recordsize property
3209 refquota property
3210 refreservation property
3211 reservation property
3212 secondarycache property
3213 setuid property
3214 sharenfs property
3215 sharesmb property
3216 snapdir property
3217 snapshot_limit property
3218 utf8only property
3219 version property
3220 volblocksize property
3221 volsize property
3222 vscan property
3223 xattr property
3224 zoned property
3225 .fi
3226 .in -2
3227 .sp
3228
3229 .sp
3230 .ne 2
3231 .mk
3232 .na
3233 \fB\fBzfs allow\fR \fB-c\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR\fR
3234 .ad
3235 .sp .6
3236 .RS 4n
3237 Sets "create time" permissions. These permissions are granted (locally) to the creator of any newly-created descendent file system.
3238 .RE
3239
3240 .sp
3241 .ne 2
3242 .mk
3243 .na
3244 \fB\fBzfs allow\fR \fB-s\fR @\fIsetname\fR \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR|\fIvolume\fR\fR
3245 .ad
3246 .sp .6
3247 .RS 4n
3248 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.
3249 .RE
3250
3251 .sp
3252 .ne 2
3253 .mk
3254 .na
3255 \fB\fBzfs unallow\fR [\fB-rldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] [\fIperm\fR|@\fIsetname\fR[, ...]] \fIfilesystem\fR|\fIvolume\fR\fR
3256 .ad
3257 .br
3258 .na
3259 \fB\fBzfs unallow\fR [\fB-rld\fR] \fB-e\fR [\fIperm\fR|@\fIsetname\fR [,...]] \fIfilesystem\fR|\fIvolume\fR\fR
3260 .ad
3261 .br
3262 .na
3263 \fB\fBzfs unallow\fR [\fB-r\fR] \fB-c\fR [\fIperm\fR|@\fIsetname\fR[,...]]\fR \fB\fIfilesystem\fR|\fIvolume\fR\fR
3264 .ad
3265 .sp .6
3266 .RS 4n
3267 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.
3268 .sp
3269 .ne 2
3270 .mk
3271 .na
3272 \fB\fB-r\fR\fR
3273 .ad
3274 .sp .6
3275 .RS 4n
3276 Recursively remove the permissions from this file system and all descendents.
3277 .RE
3278
3279 .RE
3280
3281 .sp
3282 .ne 2
3283 .mk
3284 .na
3285 \fB\fBzfs unallow\fR [\fB-r\fR] \fB-s\fR @\fIsetname\fR [\fIperm\fR|@\fIsetname\fR[,...]]\fR \fB\fIfilesystem\fR|\fIvolume\fR\fR
3286 .ad
3287 .sp .6
3288 .RS 4n
3289 Removes permissions from a permission set. If no permissions are specified, then all permissions are removed, thus removing the set entirely.
3290 .RE
3291
3292 .sp
3293 .ne 2
3294 .mk
3295 .na
3296 \fB\fBzfs hold\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
3297 .ad
3298 .sp .6
3299 .RS 4n
3300 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.
3301 .sp
3302 If a hold exists on a snapshot, attempts to destroy that snapshot by using the \fBzfs destroy\fR command return \fBEBUSY\fR.
3303 .sp
3304 .ne 2
3305 .mk
3306 .na
3307 \fB\fB-r\fR\fR
3308 .ad
3309 .sp .6
3310 .RS 4n
3311 Specifies that a hold with the given tag is applied recursively to the snapshots of all descendent file systems.
3312 .RE
3313
3314 .RE
3315
3316 .sp
3317 .ne 2
3318 .mk
3319 .na
3320 \fB\fBzfs holds\fR [\fB-r\fR] \fIsnapshot\fR...\fR
3321 .ad
3322 .sp .6
3323 .RS 4n
3324 Lists all existing user references for the given snapshot or snapshots.
3325 .sp
3326 .ne 2
3327 .mk
3328 .na
3329 \fB\fB-r\fR\fR
3330 .ad
3331 .sp .6
3332 .RS 4n
3333 Lists the holds that are set on the named descendent snapshots, in addition to listing the holds on the named snapshot.
3334 .RE
3335
3336 .RE
3337
3338 .sp
3339 .ne 2
3340 .mk
3341 .na
3342 \fB\fBzfs release\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
3343 .ad
3344 .sp .6
3345 .RS 4n
3346 Removes a single reference, named with the \fItag\fR argument, from the specified snapshot or snapshots. The tag must already exist for each snapshot.
3347 .sp
3348 .ne 2
3349 .mk
3350 .na
3351 \fB\fB-r\fR\fR
3352 .ad
3353 .sp .6
3354 .RS 4n
3355 Recursively releases a hold with the given tag on the snapshots of all descendent file systems.
3356 .RE
3357
3358 .RE
3359
3360 .sp
3361 .ne 2
3362 .mk
3363 .na
3364 \fB\fBzfs diff\fR [\fB-FHt\fR] \fIsnapshot\fR \fIsnapshot|filesystem\fR
3365 .ad
3366 .sp .6
3367 .RS 4n
3368 Display the difference between a snapshot of a given filesystem and another
3369 snapshot of that filesystem from a later time or the current contents of the
3370 filesystem. The first column is a character indicating the type of change,
3371 the other columns indicate pathname, new pathname (in case of rename), change
3372 in link count, and optionally file type and/or change time.
3373
3374 The types of change are:
3375 .in +2
3376 .nf
3377 - The path has been removed
3378 + The path has been created
3379 M The path has been modified
3380 R The path has been renamed
3381 .fi
3382 .in -2
3383 .sp
3384 .ne 2
3385 .na
3386 \fB-F\fR
3387 .ad
3388 .sp .6
3389 .RS 4n
3390 Display an indication of the type of file, in a manner similar to the \fB-F\fR
3391 option of \fBls\fR(1).
3392 .in +2
3393 .nf
3394 B Block device
3395 C Character device
3396 / Directory
3397 > Door
3398 | Named pipe
3399 @ Symbolic link
3400 P Event port
3401 = Socket
3402 F Regular file
3403 .fi
3404 .in -2
3405 .RE
3406 .sp
3407 .ne 2
3408 .na
3409 \fB-H\fR
3410 .ad
3411 .sp .6
3412 .RS 4n
3413 Give more parsable tab-separated output, without header lines and without arrows.
3414 .RE
3415 .sp
3416 .ne 2
3417 .na
3418 \fB-t\fR
3419 .ad
3420 .sp .6
3421 .RS 4n
3422 Display the path's inode change time as the first column of output.
3423 .RE
3424
3425 .SH EXAMPLES
3426 .LP
3427 \fBExample 1 \fRCreating a ZFS File System Hierarchy
3428 .sp
3429 .LP
3430 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.
3431
3432 .sp
3433 .in +2
3434 .nf
3435 # \fBzfs create pool/home\fR
3436 # \fBzfs set mountpoint=/export/home pool/home\fR
3437 # \fBzfs create pool/home/bob\fR
3438 .fi
3439 .in -2
3440 .sp
3441
3442 .LP
3443 \fBExample 2 \fRCreating a ZFS Snapshot
3444 .sp
3445 .LP
3446 The following command creates a snapshot named \fBbackup\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.
3447
3448 .sp
3449 .in +2
3450 .nf
3451 # \fBzfs snapshot pool/home/bob@backup\fR
3452 .fi
3453 .in -2
3454 .sp
3455
3456 .LP
3457 \fBExample 3 \fRCreating and Destroying Multiple Snapshots
3458 .sp
3459 .LP
3460 The following command creates snapshots named \fBbackup\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.
3461
3462 .sp
3463 .in +2
3464 .nf
3465 # \fBzfs snapshot -r pool/home@backup\fR
3466 # \fBzfs destroy -r pool/home@backup\fR
3467 .fi
3468 .in -2
3469 .sp
3470
3471 .LP
3472 \fBExample 4 \fRDisabling and Enabling File System Compression
3473 .sp
3474 .LP
3475 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.
3476
3477 .sp
3478 .in +2
3479 .nf
3480 # \fBzfs set compression=off pool/home\fR
3481 # \fBzfs set compression=on pool/home/anne\fR
3482 .fi
3483 .in -2
3484 .sp
3485
3486 .LP
3487 \fBExample 5 \fRListing ZFS Datasets
3488 .sp
3489 .LP
3490 The following command lists all active file systems and volumes in the system. Snapshots are displayed if the pool's \fBlistsnapshots\fR property is \fBon\fR (the default is \fBoff\fR). See \fBzpool\fR(8) for more information on pool properties.
3491
3492 .sp
3493 .in +2
3494 .nf
3495 # \fBzfs list\fR
3496 NAME USED AVAIL REFER MOUNTPOINT
3497 pool 450K 457G 18K /pool
3498 pool/home 315K 457G 21K /export/home
3499 pool/home/anne 18K 457G 18K /export/home/anne
3500 pool/home/bob 276K 457G 276K /export/home/bob
3501 .fi
3502 .in -2
3503 .sp
3504
3505 .LP
3506 \fBExample 6 \fRSetting a Quota on a ZFS File System
3507 .sp
3508 .LP
3509 The following command sets a quota of 50 GiB for \fBpool/home/bob\fR.
3510
3511 .sp
3512 .in +2
3513 .nf
3514 # \fBzfs set quota=50G pool/home/bob\fR
3515 .fi
3516 .in -2
3517 .sp
3518
3519 .LP
3520 \fBExample 7 \fRListing ZFS Properties
3521 .sp
3522 .LP
3523 The following command lists all properties for \fBpool/home/bob\fR.
3524
3525 .sp
3526 .in +2
3527 .nf
3528 # \fBzfs get all pool/home/bob\fR
3529 NAME PROPERTY VALUE SOURCE
3530 pool/home/bob type filesystem -
3531 pool/home/bob creation Tue Jul 21 15:53 2009 -
3532 pool/home/bob used 21K -
3533 pool/home/bob available 20.0G -
3534 pool/home/bob referenced 21K -
3535 pool/home/bob compressratio 1.00x -
3536 pool/home/bob mounted yes -
3537 pool/home/bob quota 20G local
3538 pool/home/bob reservation none default
3539 pool/home/bob recordsize 128K default
3540 pool/home/bob mountpoint /pool/home/bob default
3541 pool/home/bob sharenfs off default
3542 pool/home/bob checksum on default
3543 pool/home/bob compression on local
3544 pool/home/bob atime on default
3545 pool/home/bob devices on default
3546 pool/home/bob exec on default
3547 pool/home/bob setuid on default
3548 pool/home/bob readonly off default
3549 pool/home/bob zoned off default
3550 pool/home/bob snapdir hidden default
3551 pool/home/bob acltype off default
3552 pool/home/bob aclinherit restricted default
3553 pool/home/bob canmount on default
3554 pool/home/bob xattr on default
3555 pool/home/bob copies 1 default
3556 pool/home/bob version 4 -
3557 pool/home/bob utf8only off -
3558 pool/home/bob normalization none -
3559 pool/home/bob casesensitivity sensitive -
3560 pool/home/bob vscan off default
3561 pool/home/bob nbmand off default
3562 pool/home/bob sharesmb off default
3563 pool/home/bob refquota none default
3564 pool/home/bob refreservation none default
3565 pool/home/bob primarycache all default
3566 pool/home/bob secondarycache all default
3567 pool/home/bob usedbysnapshots 0 -
3568 pool/home/bob usedbydataset 21K -
3569 pool/home/bob usedbychildren 0 -
3570 pool/home/bob usedbyrefreservation 0 -
3571 pool/home/bob logbias latency default
3572 pool/home/bob dedup off default
3573 pool/home/bob mlslabel none default
3574 pool/home/bob relatime off default
3575 .fi
3576 .in -2
3577 .sp
3578
3579 .sp
3580 .LP
3581 The following command gets a single property value.
3582
3583 .sp
3584 .in +2
3585 .nf
3586 # \fBzfs get -H -o value compression pool/home/bob\fR
3587 on
3588 .fi
3589 .in -2
3590 .sp
3591
3592 .sp
3593 .LP
3594 The following command lists all properties with local settings for \fBpool/home/bob\fR.
3595
3596 .sp
3597 .in +2
3598 .nf
3599 # \fBzfs get -r -s local -o name,property,value all pool/home/bob\fR
3600 NAME PROPERTY VALUE
3601 pool/home/bob quota 20G
3602 pool/home/bob compression on
3603 .fi
3604 .in -2
3605 .sp
3606
3607 .LP
3608 \fBExample 8 \fRRolling Back a ZFS File System
3609 .sp
3610 .LP
3611 The following command reverts the contents of \fBpool/home/anne\fR to the snapshot named \fByesterday\fR, deleting all intermediate snapshots.
3612
3613 .sp
3614 .in +2
3615 .nf
3616 # \fBzfs rollback -r pool/home/anne@yesterday\fR
3617 .fi
3618 .in -2
3619 .sp
3620
3621 .LP
3622 \fBExample 9 \fRCreating a ZFS Clone
3623 .sp
3624 .LP
3625 The following command creates a writable file system whose initial contents are the same as \fBpool/home/bob@yesterday\fR.
3626
3627 .sp
3628 .in +2
3629 .nf
3630 # \fBzfs clone pool/home/bob@yesterday pool/clone\fR
3631 .fi
3632 .in -2
3633 .sp
3634
3635 .LP
3636 \fBExample 10 \fRPromoting a ZFS Clone
3637 .sp
3638 .LP
3639 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:
3640
3641 .sp
3642 .in +2
3643 .nf
3644 # \fBzfs create pool/project/production\fR
3645 populate /pool/project/production with data
3646 # \fBzfs snapshot pool/project/production@today\fR
3647 # \fBzfs clone pool/project/production@today pool/project/beta\fR
3648 make changes to /pool/project/beta and test them
3649 # \fBzfs promote pool/project/beta\fR
3650 # \fBzfs rename pool/project/production pool/project/legacy\fR
3651 # \fBzfs rename pool/project/beta pool/project/production\fR
3652 once the legacy version is no longer needed, it can be destroyed
3653 # \fBzfs destroy pool/project/legacy\fR
3654 .fi
3655 .in -2
3656 .sp
3657
3658 .LP
3659 \fBExample 11 \fRInheriting ZFS Properties
3660 .sp
3661 .LP
3662 The following command causes \fBpool/home/bob\fR and \fBpool/home/anne\fR to inherit the \fBchecksum\fR property from their parent.
3663
3664 .sp
3665 .in +2
3666 .nf
3667 # \fBzfs inherit checksum pool/home/bob pool/home/anne\fR
3668 .fi
3669 .in -2
3670 .sp
3671 .LP
3672 The following command causes \fBpool/home/bob\fR to revert to the received
3673 value for the \fBquota\fR property if it exists.
3674
3675 .sp
3676 .in +2
3677 .nf
3678 # \fBzfs inherit -S quota pool/home/bob
3679 .fi
3680 .in -2
3681 .sp
3682
3683 .LP
3684 \fBExample 12 \fRRemotely Replicating ZFS Data
3685 .sp
3686 .LP
3687 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.
3688
3689 .sp
3690 .in +2
3691 .nf
3692 # \fBzfs send pool/fs@a | \e\fR
3693 \fBssh host zfs receive poolB/received/fs@a\fR
3694 # \fBzfs send -i a pool/fs@b | ssh host \e\fR
3695 \fBzfs receive poolB/received/fs\fR
3696 .fi
3697 .in -2
3698 .sp
3699
3700 .LP
3701 \fBExample 13 \fRUsing the \fBzfs receive\fR \fB-d\fR Option
3702 .sp
3703 .LP
3704 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.
3705
3706 .sp
3707 .in +2
3708 .nf
3709 # \fBzfs send poolA/fsA/fsB@snap | \e
3710 ssh host zfs receive -d poolB/received\fR
3711 .fi
3712 .in -2
3713 .sp
3714
3715 .LP
3716 \fBExample 14 \fRSetting User Properties
3717 .sp
3718 .LP
3719 The following example sets the user-defined \fBcom.example:department\fR property for a dataset.
3720
3721 .sp
3722 .in +2
3723 .nf
3724 # \fBzfs set com.example:department=12345 tank/accounting\fR
3725 .fi
3726 .in -2
3727 .sp
3728
3729 .LP
3730 \fBExample 15 \fRPerforming a Rolling Snapshot
3731 .sp
3732 .LP
3733 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:
3734
3735 .sp
3736 .in +2
3737 .nf
3738 # \fBzfs destroy -r pool/users@7daysago\fR
3739 # \fBzfs rename -r pool/users@6daysago @7daysago\fR
3740 # \fBzfs rename -r pool/users@5daysago @6daysago\fR
3741 # \fBzfs rename -r pool/users@4daysago @5daysago\fR
3742 # \fBzfs rename -r pool/users@3daysago @4daysago\fR
3743 # \fBzfs rename -r pool/users@2daysago @3daysago\fR
3744 # \fBzfs rename -r pool/users@yesterday @2daysago\fR
3745 # \fBzfs rename -r pool/users@today @yesterday\fR
3746 # \fBzfs snapshot -r pool/users@today\fR
3747 .fi
3748 .in -2
3749 .sp
3750
3751 .LP
3752 \fBExample 16 \fRSetting \fBsharenfs\fR Property Options on a ZFS File System
3753 .sp
3754 .LP
3755 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.
3756
3757 .sp
3758 .in +2
3759 .nf
3760 # \fBzfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home\fR
3761 .fi
3762 .in -2
3763 .sp
3764
3765 .sp
3766 .LP
3767 If you are using \fBDNS\fR for host name resolution, specify the fully qualified hostname.
3768
3769 .LP
3770 \fBExample 17 \fRDelegating ZFS Administration Permissions on a ZFS Dataset
3771 .sp
3772 .LP
3773 This is not currently supported on Linux.
3774 .sp
3775 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.
3776
3777 .sp
3778 .in +2
3779 .nf
3780 # \fBzfs allow cindys create,destroy,mount,snapshot tank/cindys\fR
3781 # \fBzfs allow tank/cindys\fR
3782 -------------------------------------------------------------
3783 Local+Descendent permissions on (tank/cindys)
3784 user cindys create,destroy,mount,snapshot
3785 -------------------------------------------------------------
3786 .fi
3787 .in -2
3788 .sp
3789
3790 .sp
3791 .LP
3792 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:
3793 .sp
3794 .in +2
3795 .nf
3796 # \fBchmod A+user:cindys:add_subdirectory:allow /tank/cindys\fR
3797 .fi
3798 .in -2
3799 .sp
3800
3801 .LP
3802 \fBExample 18 \fRDelegating Create Time Permissions on a ZFS Dataset
3803 .sp
3804 .LP
3805 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.
3806
3807 .sp
3808 .in +2
3809 .nf
3810 # \fBzfs allow staff create,mount tank/users\fR
3811 # \fBzfs allow -c destroy tank/users\fR
3812 # \fBzfs allow tank/users\fR
3813 -------------------------------------------------------------
3814 Create time permissions on (tank/users)
3815 create,destroy
3816 Local+Descendent permissions on (tank/users)
3817 group staff create,mount
3818 -------------------------------------------------------------
3819 .fi
3820 .in -2
3821 .sp
3822
3823 .LP
3824 \fBExample 19 \fRDefining and Granting a Permission Set on a ZFS Dataset
3825 .sp
3826 .LP
3827 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.
3828
3829 .sp
3830 .in +2
3831 .nf
3832 # \fBzfs allow -s @pset create,destroy,snapshot,mount tank/users\fR
3833 # \fBzfs allow staff @pset tank/users\fR
3834 # \fBzfs allow tank/users\fR
3835 -------------------------------------------------------------
3836 Permission sets on (tank/users)
3837 @pset create,destroy,mount,snapshot
3838 Create time permissions on (tank/users)
3839 create,destroy
3840 Local+Descendent permissions on (tank/users)
3841 group staff @pset,create,mount
3842 -------------------------------------------------------------
3843 .fi
3844 .in -2
3845 .sp
3846
3847 .LP
3848 \fBExample 20 \fRDelegating Property Permissions on a ZFS Dataset
3849 .sp
3850 .LP
3851 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.
3852
3853 .sp
3854 .in +2
3855 .nf
3856 # \fBzfs allow cindys quota,reservation users/home\fR
3857 # \fBzfs allow users/home\fR
3858 -------------------------------------------------------------
3859 Local+Descendent permissions on (users/home)
3860 user cindys quota,reservation
3861 -------------------------------------------------------------
3862 cindys% \fBzfs set quota=10G users/home/marks\fR
3863 cindys% \fBzfs get quota users/home/marks\fR
3864 NAME PROPERTY VALUE SOURCE
3865 users/home/marks quota 10G local
3866 .fi
3867 .in -2
3868 .sp
3869
3870 .LP
3871 \fBExample 21 \fRRemoving ZFS Delegated Permissions on a ZFS Dataset
3872 .sp
3873 .LP
3874 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.
3875
3876 .sp
3877 .in +2
3878 .nf
3879 # \fBzfs unallow staff snapshot tank/users\fR
3880 # \fBzfs allow tank/users\fR
3881 -------------------------------------------------------------
3882 Permission sets on (tank/users)
3883 @pset create,destroy,mount,snapshot
3884 Create time permissions on (tank/users)
3885 create,destroy
3886 Local+Descendent permissions on (tank/users)
3887 group staff @pset,create,mount
3888 -------------------------------------------------------------
3889 .fi
3890 .in -2
3891 .sp
3892
3893 .LP
3894 \fBExample 22\fR Showing the differences between a snapshot and a ZFS Dataset
3895 .sp
3896 .LP
3897 The following example shows how to see what has changed between a prior
3898 snapshot of a ZFS Dataset and its current state. The \fB-F\fR option is used
3899 to indicate type information for the files affected.
3900
3901 .sp
3902 .in +2
3903 .nf
3904 # zfs diff -F tank/test@before tank/test
3905 M / /tank/test/
3906 M F /tank/test/linked (+1)
3907 R F /tank/test/oldname -> /tank/test/newname
3908 - F /tank/test/deleted
3909 + F /tank/test/created
3910 M F /tank/test/modified
3911 .fi
3912 .in -2
3913 .sp
3914
3915 .LP
3916 \fBExample 23\fR Creating a bookmark
3917 .sp
3918 .LP
3919 The following example create a bookmark to a snapshot. This bookmark can then
3920 be used instead of snapshot in send streams.
3921
3922 .sp
3923 .in +2
3924 .nf
3925 # zfs bookmark rpool@snapshot rpool#bookmark
3926 .fi
3927 .in -2
3928 .sp
3929
3930 .SH "ENVIRONMENT VARIABLES"
3931 .TP
3932 .B "ZFS_ABORT
3933 Cause \fBzfs\fR to dump core on exit for the purposes of running \fB::findleaks\fR.
3934
3935 .SH EXIT STATUS
3936 .LP
3937 The following exit values are returned:
3938 .sp
3939 .ne 2
3940 .mk
3941 .na
3942 \fB\fB0\fR\fR
3943 .ad
3944 .sp .6
3945 .RS 4n
3946 Successful completion.
3947 .RE
3948
3949 .sp
3950 .ne 2
3951 .mk
3952 .na
3953 \fB\fB1\fR\fR
3954 .ad
3955 .sp .6
3956 .RS 4n
3957 An error occurred.
3958 .RE
3959
3960 .sp
3961 .ne 2
3962 .mk
3963 .na
3964 \fB\fB2\fR\fR
3965 .ad
3966 .sp .6
3967 .RS 4n
3968 Invalid command line options were specified.
3969 .RE
3970
3971 .SH SEE ALSO
3972 .LP
3973 \fBchmod\fR(2), \fBfsync\fR(2), \fBgzip\fR(1), \fBls\fR(1), \fBmount\fR(8), \fBopen\fR(2), \fBreaddir\fR(3), \fBssh\fR(1), \fBstat\fR(2), \fBwrite\fR(2), \fBzpool\fR(8)
3974 .sp
3975 On Solaris: \fBdfstab(4)\fR, \fBiscsitadm(1M)\fR, \fBmount(1M)\fR, \fBshare(1M)\fR, \fBsharemgr(1M)\fR, \fBunshare(1M)\fR