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