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