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