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