Print this page
*** NO COMMENTS ***
| 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 -.\" Copyright (c) 2012 Nexenta Systems, Inc. All Rights Reserved.
4 +.\" Copyright 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
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 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
|
↓ open down ↓ |
122 lines elided |
↑ open up ↑ |
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 -\fBzfs\fR \fBsend\fR [\fB-DnPpRrv\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR] \fIsnapshot\fR
147 +\fBzfs\fR \fBsend\fR [\fB-DnPpRrvs\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
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 1840 \fIfilesystem@snapname\fR|\fIvolume@snapname\fR\fR...
1841 1841 .ad
1842 1842 .sp .6
1843 1843 .RS 4n
1844 1844 Creates snapshots with the given names. All previous modifications by
1845 1845 successful system calls to the file system are part of the snapshots.
1846 1846 Snapshots are taken atomically, so that all snapshots correspond to the same
1847 1847 moment in time. See the "Snapshots" section for details.
1848 1848 .sp
1849 1849 .ne 2
1850 1850 .na
1851 1851 \fB\fB-r\fR\fR
1852 1852 .ad
1853 1853 .sp .6
1854 1854 .RS 4n
1855 1855 Recursively create snapshots of all descendent datasets
1856 1856 .RE
1857 1857
1858 1858 .sp
1859 1859 .ne 2
1860 1860 .na
1861 1861 \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1862 1862 .ad
1863 1863 .sp .6
1864 1864 .RS 4n
1865 1865 Sets the specified property; see \fBzfs create\fR for details.
1866 1866 .RE
1867 1867
1868 1868 .RE
1869 1869
1870 1870 .sp
1871 1871 .ne 2
1872 1872 .na
1873 1873 \fB\fBzfs rollback\fR [\fB-rRf\fR] \fIsnapshot\fR\fR
1874 1874 .ad
1875 1875 .sp .6
1876 1876 .RS 4n
1877 1877 Roll back the given dataset to a previous snapshot. When a dataset is rolled
1878 1878 back, all data that has changed since the snapshot is discarded, and the
1879 1879 dataset reverts to the state at the time of the snapshot. By default, the
1880 1880 command refuses to roll back to a snapshot other than the most recent one. In
1881 1881 order to do so, all intermediate snapshots must be destroyed by specifying the
1882 1882 \fB-r\fR option.
1883 1883 .sp
1884 1884 The \fB-rR\fR options do not recursively destroy the child snapshots of a
1885 1885 recursive snapshot. Only the top-level recursive snapshot is destroyed by
1886 1886 either of these options. To completely roll back a recursive snapshot, you must
1887 1887 rollback the individual child snapshots.
1888 1888 .sp
1889 1889 .ne 2
1890 1890 .na
1891 1891 \fB\fB-r\fR\fR
1892 1892 .ad
1893 1893 .sp .6
1894 1894 .RS 4n
1895 1895 Recursively destroy any snapshots more recent than the one specified.
1896 1896 .RE
1897 1897
1898 1898 .sp
1899 1899 .ne 2
1900 1900 .na
1901 1901 \fB\fB-R\fR\fR
1902 1902 .ad
1903 1903 .sp .6
1904 1904 .RS 4n
1905 1905 Recursively destroy any more recent snapshots, as well as any clones of those
1906 1906 snapshots.
1907 1907 .RE
1908 1908
1909 1909 .sp
1910 1910 .ne 2
1911 1911 .na
1912 1912 \fB\fB-f\fR\fR
1913 1913 .ad
1914 1914 .sp .6
1915 1915 .RS 4n
1916 1916 Used with the \fB-R\fR option to force an unmount of any clone file systems
1917 1917 that are to be destroyed.
1918 1918 .RE
1919 1919
1920 1920 .RE
1921 1921
1922 1922 .sp
1923 1923 .ne 2
1924 1924 .na
1925 1925 \fB\fBzfs clone\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ...
1926 1926 \fIsnapshot\fR \fIfilesystem\fR|\fIvolume\fR\fR
1927 1927 .ad
1928 1928 .sp .6
1929 1929 .RS 4n
1930 1930 Creates a clone of the given snapshot. See the "Clones" section for details.
1931 1931 The target dataset can be located anywhere in the \fBZFS\fR hierarchy, and is
1932 1932 created as the same type as the original.
1933 1933 .sp
1934 1934 .ne 2
1935 1935 .na
1936 1936 \fB\fB-p\fR\fR
1937 1937 .ad
1938 1938 .sp .6
1939 1939 .RS 4n
1940 1940 Creates all the non-existing parent datasets. Datasets created in this manner
1941 1941 are automatically mounted according to the \fBmountpoint\fR property inherited
1942 1942 from their parent. If the target filesystem or volume already exists, the
1943 1943 operation completes successfully.
1944 1944 .RE
1945 1945
1946 1946 .sp
1947 1947 .ne 2
1948 1948 .na
1949 1949 \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1950 1950 .ad
1951 1951 .sp .6
1952 1952 .RS 4n
1953 1953 Sets the specified property; see \fBzfs create\fR for details.
1954 1954 .RE
1955 1955
1956 1956 .RE
1957 1957
1958 1958 .sp
1959 1959 .ne 2
1960 1960 .na
1961 1961 \fB\fBzfs promote\fR \fIclone-filesystem\fR\fR
1962 1962 .ad
1963 1963 .sp .6
1964 1964 .RS 4n
1965 1965 Promotes a clone file system to no longer be dependent on its "origin"
1966 1966 snapshot. This makes it possible to destroy the file system that the clone was
1967 1967 created from. The clone parent-child dependency relationship is reversed, so
1968 1968 that the origin file system becomes a clone of the specified file system.
1969 1969 .sp
1970 1970 The snapshot that was cloned, and any snapshots previous to this snapshot, are
1971 1971 now owned by the promoted clone. The space they use moves from the origin file
1972 1972 system to the promoted clone, so enough space must be available to accommodate
1973 1973 these snapshots. No new space is consumed by this operation, but the space
1974 1974 accounting is adjusted. The promoted clone must not have any conflicting
1975 1975 snapshot names of its own. The \fBrename\fR subcommand can be used to rename
1976 1976 any conflicting snapshots.
1977 1977 .RE
1978 1978
1979 1979 .sp
1980 1980 .ne 2
1981 1981 .na
1982 1982 \fB\fBzfs rename\fR [\fB-f\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
1983 1983 .ad
1984 1984 .br
1985 1985 .na
1986 1986 \fB\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
1987 1987 .ad
1988 1988 .br
1989 1989 .na
1990 1990 \fB\fBzfs rename\fR [\fB-fp\fR] \fIfilesystem\fR|\fIvolume\fR
1991 1991 \fIfilesystem\fR|\fIvolume\fR\fR
1992 1992 .ad
1993 1993 .sp .6
1994 1994 .RS 4n
1995 1995 Renames the given dataset. The new target can be located anywhere in the
1996 1996 \fBZFS\fR hierarchy, with the exception of snapshots. Snapshots can only be
1997 1997 renamed within the parent file system or volume. When renaming a snapshot, the
1998 1998 parent file system of the snapshot does not need to be specified as part of the
1999 1999 second argument. Renamed file systems can inherit new mount points, in which
2000 2000 case they are unmounted and remounted at the new mount point.
2001 2001 .sp
2002 2002 .ne 2
2003 2003 .na
2004 2004 \fB\fB-p\fR\fR
2005 2005 .ad
2006 2006 .sp .6
2007 2007 .RS 4n
2008 2008 Creates all the nonexistent parent datasets. Datasets created in this manner
2009 2009 are automatically mounted according to the \fBmountpoint\fR property inherited
2010 2010 from their parent.
2011 2011 .RE
2012 2012
2013 2013 .sp
2014 2014 .ne 2
2015 2015 .na
2016 2016 \fB\fB-f\fR\fR
2017 2017 .ad
2018 2018 .sp .6
2019 2019 .RS 4n
2020 2020 Force unmount any filesystems that need to be unmounted in the process.
2021 2021 .RE
2022 2022
2023 2023 .RE
2024 2024
2025 2025 .sp
2026 2026 .ne 2
2027 2027 .na
2028 2028 \fB\fBzfs rename\fR \fB-r\fR \fIsnapshot\fR \fIsnapshot\fR\fR
2029 2029 .ad
2030 2030 .sp .6
2031 2031 .RS 4n
2032 2032 Recursively rename the snapshots of all descendent datasets. Snapshots are the
2033 2033 only dataset that can be renamed recursively.
2034 2034 .RE
2035 2035
2036 2036 .sp
2037 2037 .ne 2
2038 2038 .na
2039 2039 \fB\fBzfs\fR \fBlist\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR] [\fB-H\fR] [\fB-o\fR
2040 2040 \fIproperty\fR[,\fI\&...\fR]] [ \fB-t\fR \fItype\fR[,\fI\&...\fR]] [ \fB-s\fR
2041 2041 \fIproperty\fR ] ... [ \fB-S\fR \fIproperty\fR ] ...
2042 2042 [\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR] ...\fR
2043 2043 .ad
2044 2044 .sp .6
2045 2045 .RS 4n
2046 2046 Lists the property information for the given datasets in tabular form. If
2047 2047 specified, you can list property information by the absolute pathname or the
2048 2048 relative pathname. By default, all file systems and volumes are displayed.
2049 2049 Snapshots are displayed if the \fBlistsnaps\fR property is \fBon\fR (the
2050 2050 default is \fBoff\fR) . The following fields are displayed,
2051 2051 \fBname,used,available,referenced,mountpoint\fR.
2052 2052 .sp
2053 2053 .ne 2
2054 2054 .na
2055 2055 \fB\fB-H\fR\fR
2056 2056 .ad
2057 2057 .sp .6
2058 2058 .RS 4n
2059 2059 Used for scripting mode. Do not print headers and separate fields by a single
2060 2060 tab instead of arbitrary white space.
2061 2061 .RE
2062 2062
2063 2063 .sp
2064 2064 .ne 2
2065 2065 .na
2066 2066 \fB\fB-r\fR\fR
2067 2067 .ad
2068 2068 .sp .6
2069 2069 .RS 4n
2070 2070 Recursively display any children of the dataset on the command line.
2071 2071 .RE
2072 2072
2073 2073 .sp
2074 2074 .ne 2
2075 2075 .na
2076 2076 \fB\fB-d\fR \fIdepth\fR\fR
2077 2077 .ad
2078 2078 .sp .6
2079 2079 .RS 4n
2080 2080 Recursively display any children of the dataset, limiting the recursion to
2081 2081 \fIdepth\fR. A depth of \fB1\fR will display only the dataset and its direct
2082 2082 children.
2083 2083 .RE
2084 2084
2085 2085 .sp
2086 2086 .ne 2
2087 2087 .na
2088 2088 \fB\fB-o\fR \fIproperty\fR\fR
2089 2089 .ad
2090 2090 .sp .6
2091 2091 .RS 4n
2092 2092 A comma-separated list of properties to display. The property must be:
2093 2093 .RS +4
2094 2094 .TP
2095 2095 .ie t \(bu
2096 2096 .el o
2097 2097 One of the properties described in the "Native Properties" section
2098 2098 .RE
2099 2099 .RS +4
2100 2100 .TP
2101 2101 .ie t \(bu
2102 2102 .el o
2103 2103 A user property
2104 2104 .RE
2105 2105 .RS +4
2106 2106 .TP
2107 2107 .ie t \(bu
2108 2108 .el o
2109 2109 The value \fBname\fR to display the dataset name
2110 2110 .RE
2111 2111 .RS +4
2112 2112 .TP
2113 2113 .ie t \(bu
2114 2114 .el o
2115 2115 The value \fBspace\fR to display space usage properties on file systems and
2116 2116 volumes. This is a shortcut for specifying \fB-o
2117 2117 name,avail,used,usedsnap,usedds,usedrefreserv,usedchild\fR \fB-t
2118 2118 filesystem,volume\fR syntax.
2119 2119 .RE
2120 2120 .RE
2121 2121
2122 2122 .sp
2123 2123 .ne 2
2124 2124 .na
2125 2125 \fB\fB-s\fR \fIproperty\fR\fR
2126 2126 .ad
2127 2127 .sp .6
2128 2128 .RS 4n
2129 2129 A property for sorting the output by column in ascending order based on the
2130 2130 value of the property. The property must be one of the properties described in
2131 2131 the "Properties" section, or the special value \fBname\fR to sort by the
2132 2132 dataset name. Multiple properties can be specified at one time using multiple
2133 2133 \fB-s\fR property options. Multiple \fB-s\fR options are evaluated from left to
2134 2134 right in decreasing order of importance.
2135 2135 .sp
2136 2136 The following is a list of sorting criteria:
2137 2137 .RS +4
2138 2138 .TP
2139 2139 .ie t \(bu
2140 2140 .el o
2141 2141 Numeric types sort in numeric order.
2142 2142 .RE
2143 2143 .RS +4
2144 2144 .TP
2145 2145 .ie t \(bu
2146 2146 .el o
2147 2147 String types sort in alphabetical order.
2148 2148 .RE
2149 2149 .RS +4
2150 2150 .TP
2151 2151 .ie t \(bu
2152 2152 .el o
2153 2153 Types inappropriate for a row sort that row to the literal bottom, regardless
2154 2154 of the specified ordering.
2155 2155 .RE
2156 2156 .RS +4
2157 2157 .TP
2158 2158 .ie t \(bu
2159 2159 .el o
2160 2160 If no sorting options are specified the existing behavior of \fBzfs list\fR is
2161 2161 preserved.
2162 2162 .RE
2163 2163 .RE
2164 2164
2165 2165 .sp
2166 2166 .ne 2
2167 2167 .na
2168 2168 \fB\fB-S\fR \fIproperty\fR\fR
2169 2169 .ad
2170 2170 .sp .6
2171 2171 .RS 4n
2172 2172 Same as the \fB-s\fR option, but sorts by property in descending order.
2173 2173 .RE
2174 2174
2175 2175 .sp
2176 2176 .ne 2
2177 2177 .na
2178 2178 \fB\fB-t\fR \fItype\fR\fR
2179 2179 .ad
2180 2180 .sp .6
2181 2181 .RS 4n
2182 2182 A comma-separated list of types to display, where \fItype\fR is one of
2183 2183 \fBfilesystem\fR, \fBsnapshot\fR , \fBvolume\fR, or \fBall\fR. For example,
2184 2184 specifying \fB-t snapshot\fR displays only snapshots.
2185 2185 .RE
2186 2186
2187 2187 .RE
2188 2188
2189 2189 .sp
2190 2190 .ne 2
2191 2191 .na
2192 2192 \fB\fBzfs set\fR \fIproperty\fR=\fIvalue\fR
2193 2193 \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
2194 2194 .ad
2195 2195 .sp .6
2196 2196 .RS 4n
2197 2197 Sets the property to the given value for each dataset. Only some properties can
2198 2198 be edited. See the "Properties" section for more information on what properties
2199 2199 can be set and acceptable values. Numeric values can be specified as exact
2200 2200 values, or in a human-readable form with a suffix of \fBB\fR, \fBK\fR, \fBM\fR,
2201 2201 \fBG\fR, \fBT\fR, \fBP\fR, \fBE\fR, \fBZ\fR (for bytes, kilobytes, megabytes,
2202 2202 gigabytes, terabytes, petabytes, exabytes, or zettabytes, respectively). User
2203 2203 properties can be set on snapshots. For more information, see the "User
2204 2204 Properties" section.
2205 2205 .RE
2206 2206
2207 2207 .sp
2208 2208 .ne 2
2209 2209 .na
2210 2210 \fB\fBzfs get\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR] [\fB-Hp\fR] [\fB-o\fR
2211 2211 \fIfield\fR[,...] [\fB-t\fR \fItype\fR[,...]] [\fB-s\fR \fIsource\fR[,...] "\fIall\fR" |
2212 2212 \fIproperty\fR[,...] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
2213 2213 .ad
2214 2214 .sp .6
2215 2215 .RS 4n
2216 2216 Displays properties for the given datasets. If no datasets are specified, then
2217 2217 the command displays properties for all datasets on the system. For each
2218 2218 property, the following columns are displayed:
2219 2219 .sp
2220 2220 .in +2
2221 2221 .nf
2222 2222 name Dataset name
2223 2223 property Property name
2224 2224 value Property value
2225 2225 source Property source. Can either be local, default,
2226 2226 temporary, inherited, or none (-).
2227 2227 .fi
2228 2228 .in -2
2229 2229 .sp
2230 2230
2231 2231 All columns are displayed by default, though this can be controlled by using
2232 2232 the \fB-o\fR option. This command takes a comma-separated list of properties as
2233 2233 described in the "Native Properties" and "User Properties" sections.
2234 2234 .sp
2235 2235 The special value \fBall\fR can be used to display all properties that apply to
2236 2236 the given dataset's type (filesystem, volume, or snapshot).
2237 2237 .sp
2238 2238 .ne 2
2239 2239 .na
2240 2240 \fB\fB-r\fR\fR
2241 2241 .ad
2242 2242 .sp .6
2243 2243 .RS 4n
2244 2244 Recursively display properties for any children.
2245 2245 .RE
2246 2246
2247 2247 .sp
2248 2248 .ne 2
2249 2249 .na
2250 2250 \fB\fB-d\fR \fIdepth\fR\fR
2251 2251 .ad
2252 2252 .sp .6
2253 2253 .RS 4n
2254 2254 Recursively display any children of the dataset, limiting the recursion to
2255 2255 \fIdepth\fR. A depth of \fB1\fR will display only the dataset and its direct
2256 2256 children.
2257 2257 .RE
2258 2258
2259 2259 .sp
2260 2260 .ne 2
2261 2261 .na
2262 2262 \fB\fB-H\fR\fR
2263 2263 .ad
2264 2264 .sp .6
2265 2265 .RS 4n
2266 2266 Display output in a form more easily parsed by scripts. Any headers are
2267 2267 omitted, and fields are explicitly separated by a single tab instead of an
2268 2268 arbitrary amount of space.
2269 2269 .RE
2270 2270
2271 2271 .sp
2272 2272 .ne 2
2273 2273 .na
2274 2274 \fB\fB-o\fR \fIfield\fR\fR
2275 2275 .ad
2276 2276 .sp .6
2277 2277 .RS 4n
2278 2278 A comma-separated list of columns to display. \fBname,property,value,source\fR
2279 2279 is the default value.
2280 2280 .RE
2281 2281
2282 2282 .sp
2283 2283 .ne 2
2284 2284 .na
2285 2285 \fB\fB-s\fR \fIsource\fR\fR
2286 2286 .ad
2287 2287 .sp .6
2288 2288 .RS 4n
2289 2289 A comma-separated list of sources to display. Those properties coming from a
2290 2290 source other than those in this list are ignored. Each source must be one of
2291 2291 the following: \fBlocal,default,inherited,temporary,none\fR. The default value
2292 2292 is all sources.
2293 2293 .RE
2294 2294
2295 2295 .sp
2296 2296 .ne 2
2297 2297 .na
2298 2298 \fB\fB-p\fR\fR
2299 2299 .ad
2300 2300 .sp .6
2301 2301 .RS 4n
2302 2302 Display numbers in parseable (exact) values.
2303 2303 .RE
2304 2304
2305 2305 .RE
2306 2306
2307 2307 .sp
2308 2308 .ne 2
2309 2309 .na
2310 2310 \fB\fBzfs inherit\fR [\fB-r\fR] \fIproperty\fR
2311 2311 \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
2312 2312 .ad
2313 2313 .sp .6
2314 2314 .RS 4n
2315 2315 Clears the specified property, causing it to be inherited from an ancestor. If
2316 2316 no ancestor has the property set, then the default value is used. See the
2317 2317 "Properties" section for a listing of default values, and details on which
2318 2318 properties can be inherited.
2319 2319 .sp
2320 2320 .ne 2
2321 2321 .na
2322 2322 \fB\fB-r\fR\fR
2323 2323 .ad
2324 2324 .sp .6
2325 2325 .RS 4n
2326 2326 Recursively inherit the given property for all children.
2327 2327 .RE
2328 2328
2329 2329 .RE
2330 2330
2331 2331 .sp
2332 2332 .ne 2
2333 2333 .na
2334 2334 \fB\fBzfs upgrade\fR [\fB-v\fR]\fR
2335 2335 .ad
2336 2336 .sp .6
2337 2337 .RS 4n
2338 2338 Displays a list of file systems that are not the most recent version.
2339 2339 .RE
2340 2340
2341 2341 .sp
2342 2342 .ne 2
2343 2343 .na
2344 2344 \fB\fBzfs upgrade\fR [\fB-r\fR] [\fB-V\fR \fIversion\fR] [\fB-a\fR |
2345 2345 \fIfilesystem\fR]\fR
2346 2346 .ad
2347 2347 .sp .6
2348 2348 .RS 4n
2349 2349 Upgrades file systems to a new on-disk version. Once this is done, the file
2350 2350 systems will no longer be accessible on systems running older versions of the
2351 2351 software. \fBzfs send\fR streams generated from new snapshots of these file
2352 2352 systems cannot be accessed on systems running older versions of the software.
2353 2353 .sp
2354 2354 In general, the file system version is independent of the pool version. See
2355 2355 \fBzpool\fR(1M) for information on the \fBzpool upgrade\fR command.
2356 2356 .sp
2357 2357 In some cases, the file system version and the pool version are interrelated
2358 2358 and the pool version must be upgraded before the file system version can be
2359 2359 upgraded.
2360 2360 .sp
2361 2361 .ne 2
2362 2362 .na
2363 2363 \fB\fB-a\fR\fR
2364 2364 .ad
2365 2365 .sp .6
2366 2366 .RS 4n
2367 2367 Upgrade all file systems on all imported pools.
2368 2368 .RE
2369 2369
2370 2370 .sp
2371 2371 .ne 2
2372 2372 .na
2373 2373 \fB\fIfilesystem\fR\fR
2374 2374 .ad
2375 2375 .sp .6
2376 2376 .RS 4n
2377 2377 Upgrade the specified file system.
2378 2378 .RE
2379 2379
2380 2380 .sp
2381 2381 .ne 2
2382 2382 .na
2383 2383 \fB\fB-r\fR\fR
2384 2384 .ad
2385 2385 .sp .6
2386 2386 .RS 4n
2387 2387 Upgrade the specified file system and all descendent file systems
2388 2388 .RE
2389 2389
2390 2390 .sp
2391 2391 .ne 2
2392 2392 .na
2393 2393 \fB\fB-V\fR \fIversion\fR\fR
2394 2394 .ad
2395 2395 .sp .6
2396 2396 .RS 4n
2397 2397 Upgrade to the specified \fIversion\fR. If the \fB-V\fR flag is not specified,
2398 2398 this command upgrades to the most recent version. This option can only be used
2399 2399 to increase the version number, and only up to the most recent version
2400 2400 supported by this software.
2401 2401 .RE
2402 2402
2403 2403 .RE
2404 2404
2405 2405 .sp
2406 2406 .ne 2
2407 2407 .na
2408 2408 \fB\fBzfs userspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR
2409 2409 \fIfield\fR]... [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR |
2410 2410 \fIsnapshot\fR\fR
2411 2411 .ad
2412 2412 .sp .6
2413 2413 .RS 4n
2414 2414 Displays space consumed by, and quotas on, each user in the specified
2415 2415 filesystem or snapshot. This corresponds to the \fBuserused@\fR\fIuser\fR and
2416 2416 \fBuserquota@\fR\fIuser\fR properties.
2417 2417 .sp
2418 2418 .ne 2
2419 2419 .na
2420 2420 \fB\fB-n\fR\fR
2421 2421 .ad
2422 2422 .sp .6
2423 2423 .RS 4n
2424 2424 Print numeric ID instead of user/group name.
2425 2425 .RE
2426 2426
2427 2427 .sp
2428 2428 .ne 2
2429 2429 .na
2430 2430 \fB\fB-H\fR\fR
2431 2431 .ad
2432 2432 .sp .6
2433 2433 .RS 4n
2434 2434 Do not print headers, use tab-delimited output.
2435 2435 .RE
2436 2436
2437 2437 .sp
2438 2438 .ne 2
2439 2439 .na
2440 2440 \fB\fB-p\fR\fR
2441 2441 .ad
2442 2442 .sp .6
2443 2443 .RS 4n
2444 2444 Use exact (parseable) numeric output.
2445 2445 .RE
2446 2446
2447 2447 .sp
2448 2448 .ne 2
2449 2449 .na
2450 2450 \fB\fB-o\fR \fIfield\fR[,...]\fR
2451 2451 .ad
2452 2452 .sp .6
2453 2453 .RS 4n
2454 2454 Display only the specified fields from the following set,
2455 2455 \fBtype,name,used,quota\fR.The default is to display all fields.
2456 2456 .RE
2457 2457
2458 2458 .sp
2459 2459 .ne 2
2460 2460 .na
2461 2461 \fB\fB-s\fR \fIfield\fR\fR
2462 2462 .ad
2463 2463 .sp .6
2464 2464 .RS 4n
2465 2465 Sort output by this field. The \fIs\fR and \fIS\fR flags may be specified
2466 2466 multiple times to sort first by one field, then by another. The default is
2467 2467 \fB-s type\fR \fB-s name\fR.
2468 2468 .RE
2469 2469
2470 2470 .sp
2471 2471 .ne 2
2472 2472 .na
2473 2473 \fB\fB-S\fR \fIfield\fR\fR
2474 2474 .ad
2475 2475 .sp .6
2476 2476 .RS 4n
2477 2477 Sort by this field in reverse order. See \fB-s\fR.
2478 2478 .RE
2479 2479
2480 2480 .sp
2481 2481 .ne 2
2482 2482 .na
2483 2483 \fB\fB-t\fR \fItype\fR[,...]\fR
2484 2484 .ad
2485 2485 .sp .6
2486 2486 .RS 4n
2487 2487 Print only the specified types from the following set,
2488 2488 \fBall,posixuser,smbuser,posixgroup,smbgroup\fR.
2489 2489 .sp
2490 2490 The default is \fB-t posixuser,smbuser\fR
2491 2491 .sp
2492 2492 The default can be changed to include group types.
2493 2493 .RE
2494 2494
2495 2495 .sp
2496 2496 .ne 2
2497 2497 .na
2498 2498 \fB\fB-i\fR\fR
2499 2499 .ad
2500 2500 .sp .6
2501 2501 .RS 4n
2502 2502 Translate SID to POSIX ID. The POSIX ID may be ephemeral if no mapping exists.
2503 2503 Normal POSIX interfaces (for example, \fBstat\fR(2), \fBls\fR \fB-l\fR) perform
2504 2504 this translation, so the \fB-i\fR option allows the output from \fBzfs
2505 2505 userspace\fR to be compared directly with those utilities. However, \fB-i\fR
2506 2506 may lead to confusion if some files were created by an SMB user before a
2507 2507 SMB-to-POSIX name mapping was established. In such a case, some files are owned
2508 2508 by the SMB entity and some by the POSIX entity. However, the \fB-i\fR option
2509 2509 will report that the POSIX entity has the total usage and quota for both.
2510 2510 .RE
2511 2511
2512 2512 .RE
2513 2513
2514 2514 .sp
2515 2515 .ne 2
2516 2516 .na
2517 2517 \fB\fBzfs groupspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR
2518 2518 \fIfield\fR]... [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR |
2519 2519 \fIsnapshot\fR\fR
2520 2520 .ad
2521 2521 .sp .6
2522 2522 .RS 4n
2523 2523 Displays space consumed by, and quotas on, each group in the specified
2524 2524 filesystem or snapshot. This subcommand is identical to \fBzfs userspace\fR,
2525 2525 except that the default types to display are \fB-t posixgroup,smbgroup\fR.
2526 2526 .sp
2527 2527 .in +2
2528 2528 .nf
2529 2529 -
2530 2530 .fi
2531 2531 .in -2
2532 2532 .sp
2533 2533
2534 2534 .RE
2535 2535
2536 2536 .sp
2537 2537 .ne 2
2538 2538 .na
2539 2539 \fB\fBzfs mount\fR\fR
2540 2540 .ad
2541 2541 .sp .6
2542 2542 .RS 4n
2543 2543 Displays all \fBZFS\fR file systems currently mounted.
2544 2544 .RE
2545 2545
2546 2546 .sp
2547 2547 .ne 2
2548 2548 .na
2549 2549 \fB\fBzfs mount\fR [\fB-vO\fR] [\fB-o\fR \fIoptions\fR] \fB-a\fR |
2550 2550 \fIfilesystem\fR\fR
2551 2551 .ad
2552 2552 .sp .6
2553 2553 .RS 4n
2554 2554 Mounts \fBZFS\fR file systems. Invoked automatically as part of the boot
2555 2555 process.
2556 2556 .sp
2557 2557 .ne 2
2558 2558 .na
2559 2559 \fB\fB-o\fR \fIoptions\fR\fR
2560 2560 .ad
2561 2561 .sp .6
2562 2562 .RS 4n
2563 2563 An optional, comma-separated list of mount options to use temporarily for the
2564 2564 duration of the mount. See the "Temporary Mount Point Properties" section for
2565 2565 details.
2566 2566 .RE
2567 2567
2568 2568 .sp
2569 2569 .ne 2
2570 2570 .na
2571 2571 \fB\fB-O\fR\fR
2572 2572 .ad
2573 2573 .sp .6
2574 2574 .RS 4n
2575 2575 Perform an overlay mount. See \fBmount\fR(1M) for more information.
2576 2576 .RE
2577 2577
2578 2578 .sp
2579 2579 .ne 2
2580 2580 .na
2581 2581 \fB\fB-v\fR\fR
2582 2582 .ad
2583 2583 .sp .6
2584 2584 .RS 4n
2585 2585 Report mount progress.
2586 2586 .RE
2587 2587
2588 2588 .sp
2589 2589 .ne 2
2590 2590 .na
2591 2591 \fB\fB-a\fR\fR
2592 2592 .ad
2593 2593 .sp .6
2594 2594 .RS 4n
2595 2595 Mount all available \fBZFS\fR file systems. Invoked automatically as part of
2596 2596 the boot process.
2597 2597 .RE
2598 2598
2599 2599 .sp
2600 2600 .ne 2
2601 2601 .na
2602 2602 \fB\fIfilesystem\fR\fR
2603 2603 .ad
2604 2604 .sp .6
2605 2605 .RS 4n
2606 2606 Mount the specified filesystem.
2607 2607 .RE
2608 2608
2609 2609 .RE
2610 2610
2611 2611 .sp
2612 2612 .ne 2
2613 2613 .na
2614 2614 \fB\fBzfs unmount\fR [\fB-f\fR] \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR\fR
2615 2615 .ad
2616 2616 .sp .6
2617 2617 .RS 4n
2618 2618 Unmounts currently mounted \fBZFS\fR file systems. Invoked automatically as
2619 2619 part of the shutdown process.
2620 2620 .sp
2621 2621 .ne 2
2622 2622 .na
2623 2623 \fB\fB-f\fR\fR
2624 2624 .ad
2625 2625 .sp .6
2626 2626 .RS 4n
2627 2627 Forcefully unmount the file system, even if it is currently in use.
2628 2628 .RE
2629 2629
2630 2630 .sp
2631 2631 .ne 2
2632 2632 .na
2633 2633 \fB\fB-a\fR\fR
2634 2634 .ad
2635 2635 .sp .6
2636 2636 .RS 4n
2637 2637 Unmount all available \fBZFS\fR file systems. Invoked automatically as part of
2638 2638 the boot process.
2639 2639 .RE
2640 2640
2641 2641 .sp
2642 2642 .ne 2
2643 2643 .na
2644 2644 \fB\fIfilesystem\fR|\fImountpoint\fR\fR
2645 2645 .ad
2646 2646 .sp .6
2647 2647 .RS 4n
2648 2648 Unmount the specified filesystem. The command can also be given a path to a
2649 2649 \fBZFS\fR file system mount point on the system.
2650 2650 .RE
2651 2651
2652 2652 .RE
2653 2653
2654 2654 .sp
2655 2655 .ne 2
2656 2656 .na
2657 2657 \fB\fBzfs share\fR \fB-a\fR | \fIfilesystem\fR\fR
2658 2658 .ad
2659 2659 .sp .6
2660 2660 .RS 4n
2661 2661 Shares available \fBZFS\fR file systems.
2662 2662 .sp
2663 2663 .ne 2
2664 2664 .na
2665 2665 \fB\fB-a\fR\fR
2666 2666 .ad
2667 2667 .sp .6
2668 2668 .RS 4n
2669 2669 Share all available \fBZFS\fR file systems. Invoked automatically as part of
2670 2670 the boot process.
2671 2671 .RE
2672 2672
2673 2673 .sp
2674 2674 .ne 2
2675 2675 .na
2676 2676 \fB\fIfilesystem\fR\fR
2677 2677 .ad
2678 2678 .sp .6
2679 2679 .RS 4n
2680 2680 Share the specified filesystem according to the \fBsharenfs\fR and
2681 2681 \fBsharesmb\fR properties. File systems are shared when the \fBsharenfs\fR or
2682 2682 \fBsharesmb\fR property is set.
2683 2683 .RE
2684 2684
2685 2685 .RE
2686 2686
2687 2687 .sp
2688 2688 .ne 2
2689 2689 .na
2690 2690 \fB\fBzfs unshare\fR \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR\fR
2691 2691 .ad
2692 2692 .sp .6
2693 2693 .RS 4n
2694 2694 Unshares currently shared \fBZFS\fR file systems. This is invoked automatically
2695 2695 as part of the shutdown process.
2696 2696 .sp
2697 2697 .ne 2
2698 2698 .na
2699 2699 \fB\fB-a\fR\fR
2700 2700 .ad
2701 2701 .sp .6
2702 2702 .RS 4n
2703 2703 Unshare all available \fBZFS\fR file systems. Invoked automatically as part of
2704 2704 the boot process.
2705 2705 .RE
2706 2706
2707 2707 .sp
2708 2708 .ne 2
2709 2709 .na
2710 2710 \fB\fIfilesystem\fR|\fImountpoint\fR\fR
2711 2711 .ad
2712 2712 .sp .6
|
↓ open down ↓ |
2555 lines elided |
↑ open up ↑ |
2713 2713 .RS 4n
2714 2714 Unshare the specified filesystem. The command can also be given a path to a
2715 2715 \fBZFS\fR file system shared on the system.
2716 2716 .RE
2717 2717
2718 2718 .RE
2719 2719
2720 2720 .sp
2721 2721 .ne 2
2722 2722 .na
2723 -\fBzfs send\fR [\fB-DnPpRrv\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR] \fIsnapshot\fR
2723 +\fBzfs send\fR [\fB-DnPpRrvs\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR] \fIsnapshot\fR
2724 2724 .ad
2725 2725 .sp .6
2726 2726 .RS 4n
2727 2727 Creates a stream representation of the second \fIsnapshot\fR, which is written
2728 2728 to standard output. The output can be redirected to a file or to a different
2729 2729 system (for example, using \fBssh\fR(1). By default, a full stream is
2730 2730 generated.
2731 2731 .sp
2732 2732 .ne 2
2733 2733 .na
2734 2734 \fB\fB-i\fR \fIsnapshot\fR\fR
2735 2735 .ad
2736 2736 .sp .6
2737 2737 .RS 4n
2738 2738 Generate an incremental stream from the first \fIsnapshot\fR to the second
2739 2739 \fIsnapshot\fR. The incremental source (the first \fIsnapshot\fR) can be
2740 2740 specified as the last component of the snapshot name (for example, the part
2741 2741 after the \fB@\fR), and it is assumed to be from the same file system as the
2742 2742 second \fIsnapshot\fR.
2743 2743 .sp
2744 2744 If the destination is a clone, the source may be the origin snapshot, which
2745 2745 must be fully specified (for example, \fBpool/fs@origin\fR, not just
2746 2746 \fB@origin\fR).
2747 2747 .RE
2748 2748
2749 2749 .sp
2750 2750 .ne 2
2751 2751 .na
2752 2752 \fB\fB-I\fR \fIsnapshot\fR\fR
2753 2753 .ad
2754 2754 .sp .6
2755 2755 .RS 4n
2756 2756 Generate a stream package that sends all intermediary snapshots from the first
2757 2757 snapshot to the second snapshot. For example, \fB-I @a fs@d\fR is similar to
2758 2758 \fB-i @a fs@b; -i @b fs@c; -i @c fs@d\fR. The incremental source snapshot may
2759 2759 be specified as with the \fB-i\fR option.
2760 2760 .RE
2761 2761
2762 2762 .sp
2763 2763 .ne 2
2764 2764 .na
2765 2765 \fB\fB-R\fR\fR
2766 2766 .ad
2767 2767 .sp .6
2768 2768 .RS 4n
2769 2769 Generate a replication stream package, which will replicate the specified
2770 2770 filesystem, and all descendent file systems, up to the named snapshot. When
2771 2771 received, all properties, snapshots, descendent file systems, and clones are
2772 2772 preserved.
2773 2773 .sp
2774 2774 If the \fB-i\fR or \fB-I\fR flags are used in conjunction with the \fB-R\fR
2775 2775 flag, an incremental replication stream is generated. The current values of
2776 2776 properties, and current snapshot and file system names are set when the stream
2777 2777 is received. If the \fB-F\fR flag is specified when this stream is received,
2778 2778 snapshots and file systems that do not exist on the sending side are destroyed.
2779 2779 .RE
2780 2780
2781 2781 .sp
2782 2782 .ne 2
2783 2783 .na
2784 2784 \fB\fB-D\fR\fR
2785 2785 .ad
2786 2786 .sp .6
2787 2787 .RS 4n
2788 2788 Generate a deduplicated stream. Blocks which would have been sent multiple
2789 2789 times in the send stream will only be sent once. The receiving system must
2790 2790 also support this feature to recieve a deduplicated stream. This flag can
2791 2791 be used regardless of the dataset's \fBdedup\fR property, but performance
2792 2792 will be much better if the filesystem uses a dedup-capable checksum (eg.
2793 2793 \fBsha256\fR).
2794 2794 .RE
2795 2795
2796 2796 .sp
2797 2797 .ne 2
2798 2798 .na
2799 2799 \fB\fB-r\fR\fR
2800 2800 .ad
2801 2801 .sp .6
2802 2802 .RS 4n
2803 2803 Recursively send all descendant snapshots. This is similar to the \fB-R\fR
2804 2804 flag, but information about deleted and renamed datasets is not included, and
2805 2805 property information is only included if the \fB-p\fR flag is specified.
2806 2806 .RE
2807 2807
2808 2808 .sp
2809 2809 .ne 2
2810 2810 .na
2811 2811 \fB\fB-p\fR\fR
2812 2812 .ad
2813 2813 .sp .6
2814 2814 .RS 4n
2815 2815 Include the dataset's properties in the stream. This flag is implicit when
2816 2816 \fB-R\fR is specified. The receiving system must also support this feature.
2817 2817 .RE
2818 2818
2819 2819 .sp
2820 2820 .ne 2
|
↓ open down ↓ |
87 lines elided |
↑ open up ↑ |
2821 2821 .na
2822 2822 \fB\fB-n\fR\fR
2823 2823 .ad
2824 2824 .sp .6
2825 2825 .RS 4n
2826 2826 Do a dry-run ("No-op") send. Do not generate any actual send data. This is
2827 2827 useful in conjunction with the \fB-v\fR or \fB-P\fR flags to determine what
2828 2828 data will be sent.
2829 2829 .RE
2830 2830
2831 +.sp
2832 +.ne 2
2833 +.na
2834 +\fB\fB-s\fR\fR
2835 +.ad
2836 +.sp .6
2837 +.RS 4n
2838 +Calculate send stream size. Do not generate any actual send data. This is
2839 +useful when one needs to know stream size in order to store the stream externally.
2840 +With \fB-v\fR specified, provides info on stream header and stream data portion
2841 +sizes, in addition to the total stream size.
2842 +.RE
2843 +
2831 2844 .sp
2832 2845 .ne 2
2833 2846 .na
2834 2847 \fB\fB-P\fR\fR
2835 2848 .ad
2836 2849 .sp .6
2837 2850 .RS 4n
2838 2851 Print machine-parsable verbose information about the stream package generated.
2839 2852 .RE
2840 2853
2841 2854 .sp
2842 2855 .ne 2
2843 2856 .na
2844 2857 \fB\fB-v\fR\fR
2845 2858 .ad
2846 2859 .sp .6
2847 2860 .RS 4n
2848 2861 Print verbose information about the stream package generated. This information
2849 2862 includes a per-second report of how much data has been sent.
2850 2863 .RE
2851 2864
2852 2865 The format of the stream is committed. You will be able to receive your streams
2853 2866 on future versions of \fBZFS\fR.
2854 2867 .RE
2855 2868
2856 2869 .sp
2857 2870 .ne 2
2858 2871 .na
2859 2872 \fB\fBzfs receive\fR [\fB-vnFu\fR]
2860 2873 \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
2861 2874 .ad
2862 2875 .br
2863 2876 .na
2864 2877 \fB\fBzfs receive\fR [\fB-vnFu\fR] [\fB-d\fR|\fB-e\fR] \fIfilesystem\fR\fR
2865 2878 .ad
2866 2879 .sp .6
2867 2880 .RS 4n
2868 2881 Creates a snapshot whose contents are as specified in the stream provided on
2869 2882 standard input. If a full stream is received, then a new file system is created
2870 2883 as well. Streams are created using the \fBzfs send\fR subcommand, which by
2871 2884 default creates a full stream. \fBzfs recv\fR can be used as an alias for
2872 2885 \fBzfs receive\fR.
2873 2886 .sp
2874 2887 If an incremental stream is received, then the destination file system must
2875 2888 already exist, and its most recent snapshot must match the incremental stream's
2876 2889 source. For \fBzvols\fR, the destination device link is destroyed and
2877 2890 recreated, which means the \fBzvol\fR cannot be accessed during the
2878 2891 \fBreceive\fR operation.
2879 2892 .sp
2880 2893 When a snapshot replication package stream that is generated by using the
2881 2894 \fBzfs send\fR \fB-R\fR command is received, any snapshots that do not exist
2882 2895 on the sending location are destroyed by using the \fBzfs destroy\fR \fB-d\fR
2883 2896 command.
2884 2897 .sp
2885 2898 The name of the snapshot (and file system, if a full stream is received) that
2886 2899 this subcommand creates depends on the argument type and the use of the
2887 2900 \fB-d\fR or \fB-e\fR options.
2888 2901 .sp
2889 2902 If the argument is a snapshot name, the specified \fIsnapshot\fR is created. If
2890 2903 the argument is a file system or volume name, a snapshot with the same name as
2891 2904 the sent snapshot is created within the specified \fIfilesystem\fR or
2892 2905 \fIvolume\fR. If neither of the \fB-d\fR or \fB-e\fR options are specified,
2893 2906 the provided target snapshot name is used exactly as provided.
2894 2907 .sp
2895 2908 The \fB-d\fR and \fB-e\fR options cause the file system name of the target
2896 2909 snapshot to be determined by appending a portion of the sent snapshot's name to
2897 2910 the specified target \fIfilesystem\fR. If the \fB-d\fR option is specified, all
2898 2911 but the first element of the sent snapshot's file system path (usually the
2899 2912 pool name) is used and any required intermediate file systems within the
2900 2913 specified one are created. If the \fB-e\fR option is specified, then only the
2901 2914 last element of the sent snapshot's file system name (i.e. the name of the
2902 2915 source file system itself) is used as the target file system name.
2903 2916 .sp
2904 2917 .ne 2
2905 2918 .na
2906 2919 \fB\fB-d\fR\fR
2907 2920 .ad
2908 2921 .sp .6
2909 2922 .RS 4n
2910 2923 Discard the first element of the sent snapshot's file system name, using
2911 2924 the remaining elements to determine the name of the target file system for
2912 2925 the new snapshot as described in the paragraph above.
2913 2926 .RE
2914 2927
2915 2928 .sp
2916 2929 .ne 2
2917 2930 .na
2918 2931 \fB\fB-e\fR\fR
2919 2932 .ad
2920 2933 .sp .6
2921 2934 .RS 4n
2922 2935 Discard all but the last element of the sent snapshot's file system name,
2923 2936 using that element to determine the name of the target file system for
2924 2937 the new snapshot as described in the paragraph above.
2925 2938 .RE
2926 2939
2927 2940 .sp
2928 2941 .ne 2
2929 2942 .na
2930 2943 \fB\fB-u\fR\fR
2931 2944 .ad
2932 2945 .sp .6
2933 2946 .RS 4n
2934 2947 File system that is associated with the received stream is not mounted.
2935 2948 .RE
2936 2949
2937 2950 .sp
2938 2951 .ne 2
2939 2952 .na
2940 2953 \fB\fB-v\fR\fR
2941 2954 .ad
2942 2955 .sp .6
2943 2956 .RS 4n
2944 2957 Print verbose information about the stream and the time required to perform the
2945 2958 receive operation.
2946 2959 .RE
2947 2960
2948 2961 .sp
2949 2962 .ne 2
2950 2963 .na
2951 2964 \fB\fB-n\fR\fR
2952 2965 .ad
2953 2966 .sp .6
2954 2967 .RS 4n
2955 2968 Do not actually receive the stream. This can be useful in conjunction with the
2956 2969 \fB-v\fR option to verify the name the receive operation would use.
2957 2970 .RE
2958 2971
2959 2972 .sp
2960 2973 .ne 2
2961 2974 .na
2962 2975 \fB\fB-F\fR\fR
2963 2976 .ad
2964 2977 .sp .6
2965 2978 .RS 4n
2966 2979 Force a rollback of the file system to the most recent snapshot before
2967 2980 performing the receive operation. If receiving an incremental replication
2968 2981 stream (for example, one generated by \fBzfs send -R -[iI]\fR), destroy
2969 2982 snapshots and file systems that do not exist on the sending side.
2970 2983 .RE
2971 2984
2972 2985 .RE
2973 2986
2974 2987 .sp
2975 2988 .ne 2
2976 2989 .na
2977 2990 \fB\fBzfs allow\fR \fIfilesystem\fR | \fIvolume\fR\fR
2978 2991 .ad
2979 2992 .sp .6
2980 2993 .RS 4n
2981 2994 Displays permissions that have been delegated on the specified filesystem or
2982 2995 volume. See the other forms of \fBzfs allow\fR for more information.
2983 2996 .RE
2984 2997
2985 2998 .sp
2986 2999 .ne 2
2987 3000 .na
2988 3001 \fB\fBzfs allow\fR [\fB-ldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...]
2989 3002 \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR| \fIvolume\fR\fR
2990 3003 .ad
2991 3004 .br
2992 3005 .na
2993 3006 \fB\fBzfs allow\fR [\fB-ld\fR] \fB-e\fR \fIperm\fR|@\fIsetname\fR[,...]
2994 3007 \fIfilesystem\fR | \fIvolume\fR\fR
2995 3008 .ad
2996 3009 .sp .6
2997 3010 .RS 4n
2998 3011 Delegates \fBZFS\fR administration permission for the file systems to
2999 3012 non-privileged users.
3000 3013 .sp
3001 3014 .ne 2
3002 3015 .na
3003 3016 \fB[\fB-ug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...]\fR
3004 3017 .ad
3005 3018 .sp .6
3006 3019 .RS 4n
3007 3020 Specifies to whom the permissions are delegated. Multiple entities can be
3008 3021 specified as a comma-separated list. If neither of the \fB-ug\fR options are
3009 3022 specified, then the argument is interpreted preferentially as the keyword
3010 3023 "everyone", then as a user name, and lastly as a group name. To specify a user
3011 3024 or group named "everyone", use the \fB-u\fR or \fB-g\fR options. To specify a
3012 3025 group with the same name as a user, use the \fB-g\fR options.
3013 3026 .RE
3014 3027
3015 3028 .sp
3016 3029 .ne 2
3017 3030 .na
3018 3031 \fB[\fB-e\fR] \fIperm\fR|@\fIsetname\fR[,...]\fR
3019 3032 .ad
3020 3033 .sp .6
3021 3034 .RS 4n
3022 3035 Specifies that the permissions be delegated to "everyone." Multiple permissions
3023 3036 may be specified as a comma-separated list. Permission names are the same as
3024 3037 \fBZFS\fR subcommand and property names. See the property list below. Property
3025 3038 set names, which begin with an at sign (\fB@\fR) , may be specified. See the
3026 3039 \fB-s\fR form below for details.
3027 3040 .RE
3028 3041
3029 3042 .sp
3030 3043 .ne 2
3031 3044 .na
3032 3045 \fB[\fB-ld\fR] \fIfilesystem\fR|\fIvolume\fR\fR
3033 3046 .ad
3034 3047 .sp .6
3035 3048 .RS 4n
3036 3049 Specifies where the permissions are delegated. If neither of the \fB-ld\fR
3037 3050 options are specified, or both are, then the permissions are allowed for the
3038 3051 file system or volume, and all of its descendents. If only the \fB-l\fR option
3039 3052 is used, then is allowed "locally" only for the specified file system. If only
3040 3053 the \fB-d\fR option is used, then is allowed only for the descendent file
3041 3054 systems.
3042 3055 .RE
3043 3056
3044 3057 .RE
3045 3058
3046 3059 .sp
3047 3060 .LP
3048 3061 Permissions are generally the ability to use a \fBZFS\fR subcommand or change a
3049 3062 \fBZFS\fR property. The following permissions are available:
3050 3063 .sp
3051 3064 .in +2
3052 3065 .nf
3053 3066 NAME TYPE NOTES
3054 3067 allow subcommand Must also have the permission that is being
3055 3068 allowed
3056 3069 clone subcommand Must also have the 'create' ability and 'mount'
3057 3070 ability in the origin file system
3058 3071 create subcommand Must also have the 'mount' ability
3059 3072 destroy subcommand Must also have the 'mount' ability
3060 3073 mount subcommand Allows mount/umount of ZFS datasets
3061 3074 promote subcommand Must also have the 'mount'
3062 3075 and 'promote' ability in the origin file system
3063 3076 receive subcommand Must also have the 'mount' and 'create' ability
3064 3077 rename subcommand Must also have the 'mount' and 'create'
3065 3078 ability in the new parent
3066 3079 rollback subcommand Must also have the 'mount' ability
3067 3080 send subcommand
3068 3081 share subcommand Allows sharing file systems over NFS or SMB
3069 3082 protocols
3070 3083 snapshot subcommand Must also have the 'mount' ability
3071 3084 groupquota other Allows accessing any groupquota@... property
3072 3085 groupused other Allows reading any groupused@... property
3073 3086 userprop other Allows changing any user property
3074 3087 userquota other Allows accessing any userquota@... property
3075 3088 userused other Allows reading any userused@... property
3076 3089
3077 3090 aclinherit property
3078 3091 aclmode property
3079 3092 atime property
3080 3093 canmount property
3081 3094 casesensitivity property
3082 3095 checksum property
3083 3096 compression property
3084 3097 copies property
3085 3098 devices property
3086 3099 exec property
3087 3100 mountpoint property
3088 3101 nbmand property
3089 3102 normalization property
3090 3103 primarycache property
3091 3104 quota property
3092 3105 readonly property
3093 3106 recordsize property
3094 3107 refquota property
3095 3108 refreservation property
3096 3109 reservation property
3097 3110 secondarycache property
3098 3111 setuid property
3099 3112 shareiscsi property
3100 3113 sharenfs property
3101 3114 sharesmb property
3102 3115 snapdir property
3103 3116 utf8only property
3104 3117 version property
3105 3118 volblocksize property
3106 3119 volsize property
3107 3120 vscan property
3108 3121 xattr property
3109 3122 zoned property
3110 3123 .fi
3111 3124 .in -2
3112 3125 .sp
3113 3126
3114 3127 .sp
3115 3128 .ne 2
3116 3129 .na
3117 3130 \fB\fBzfs allow\fR \fB-c\fR \fIperm\fR|@\fIsetname\fR[,...]
3118 3131 \fIfilesystem\fR|\fIvolume\fR\fR
3119 3132 .ad
3120 3133 .sp .6
3121 3134 .RS 4n
3122 3135 Sets "create time" permissions. These permissions are granted (locally) to the
3123 3136 creator of any newly-created descendent file system.
3124 3137 .RE
3125 3138
3126 3139 .sp
3127 3140 .ne 2
3128 3141 .na
3129 3142 \fB\fBzfs allow\fR \fB-s\fR @\fIsetname\fR \fIperm\fR|@\fIsetname\fR[,...]
3130 3143 \fIfilesystem\fR|\fIvolume\fR\fR
3131 3144 .ad
3132 3145 .sp .6
3133 3146 .RS 4n
3134 3147 Defines or adds permissions to a permission set. The set can be used by other
3135 3148 \fBzfs allow\fR commands for the specified file system and its descendents.
3136 3149 Sets are evaluated dynamically, so changes to a set are immediately reflected.
3137 3150 Permission sets follow the same naming restrictions as ZFS file systems, but
3138 3151 the name must begin with an "at sign" (\fB@\fR), and can be no more than 64
3139 3152 characters long.
3140 3153 .RE
3141 3154
3142 3155 .sp
3143 3156 .ne 2
3144 3157 .na
3145 3158 \fB\fBzfs unallow\fR [\fB-rldug\fR]
3146 3159 "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...]
3147 3160 [\fIperm\fR|@\fIsetname\fR[, ...]] \fIfilesystem\fR|\fIvolume\fR\fR
3148 3161 .ad
3149 3162 .br
3150 3163 .na
3151 3164 \fB\fBzfs unallow\fR [\fB-rld\fR] \fB-e\fR [\fIperm\fR|@\fIsetname\fR [,...]]
3152 3165 \fIfilesystem\fR|\fIvolume\fR\fR
3153 3166 .ad
3154 3167 .br
3155 3168 .na
3156 3169 \fB\fBzfs unallow\fR [\fB-r\fR] \fB-c\fR [\fIperm\fR|@\fIsetname\fR[,...]]\fR
3157 3170 .ad
3158 3171 .br
3159 3172 .na
3160 3173 \fB\fIfilesystem\fR|\fIvolume\fR\fR
3161 3174 .ad
3162 3175 .sp .6
3163 3176 .RS 4n
3164 3177 Removes permissions that were granted with the \fBzfs allow\fR command. No
3165 3178 permissions are explicitly denied, so other permissions granted are still in
3166 3179 effect. For example, if the permission is granted by an ancestor. If no
3167 3180 permissions are specified, then all permissions for the specified \fIuser\fR,
3168 3181 \fIgroup\fR, or \fIeveryone\fR are removed. Specifying "everyone" (or using the
3169 3182 \fB-e\fR option) only removes the permissions that were granted to "everyone",
3170 3183 not all permissions for every user and group. See the \fBzfs allow\fR command
3171 3184 for a description of the \fB-ldugec\fR options.
3172 3185 .sp
3173 3186 .ne 2
3174 3187 .na
3175 3188 \fB\fB-r\fR\fR
3176 3189 .ad
3177 3190 .sp .6
3178 3191 .RS 4n
3179 3192 Recursively remove the permissions from this file system and all descendents.
3180 3193 .RE
3181 3194
3182 3195 .RE
3183 3196
3184 3197 .sp
3185 3198 .ne 2
3186 3199 .na
3187 3200 \fB\fBzfs unallow\fR [\fB-r\fR] \fB-s\fR @\fIsetname\fR
3188 3201 [\fIperm\fR|@\fIsetname\fR[,...]]\fR
3189 3202 .ad
3190 3203 .br
3191 3204 .na
3192 3205 \fB\fIfilesystem\fR|\fIvolume\fR\fR
3193 3206 .ad
3194 3207 .sp .6
3195 3208 .RS 4n
3196 3209 Removes permissions from a permission set. If no permissions are specified,
3197 3210 then all permissions are removed, thus removing the set entirely.
3198 3211 .RE
3199 3212
3200 3213 .sp
3201 3214 .ne 2
3202 3215 .na
3203 3216 \fB\fBzfs hold\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
3204 3217 .ad
3205 3218 .sp .6
3206 3219 .RS 4n
3207 3220 Adds a single reference, named with the \fItag\fR argument, to the specified
3208 3221 snapshot or snapshots. Each snapshot has its own tag namespace, and tags must
3209 3222 be unique within that space.
3210 3223 .sp
3211 3224 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3212 3225 \fBzfs destroy\fR command return \fBEBUSY\fR.
3213 3226 .sp
3214 3227 .ne 2
3215 3228 .na
3216 3229 \fB\fB-r\fR\fR
3217 3230 .ad
3218 3231 .sp .6
3219 3232 .RS 4n
3220 3233 Specifies that a hold with the given tag is applied recursively to the
3221 3234 snapshots of all descendent file systems.
3222 3235 .RE
3223 3236
3224 3237 .RE
3225 3238
3226 3239 .sp
3227 3240 .ne 2
3228 3241 .na
3229 3242 \fB\fBzfs holds\fR [\fB-r\fR] \fIsnapshot\fR...\fR
3230 3243 .ad
3231 3244 .sp .6
3232 3245 .RS 4n
3233 3246 Lists all existing user references for the given snapshot or snapshots.
3234 3247 .sp
3235 3248 .ne 2
3236 3249 .na
3237 3250 \fB\fB-r\fR\fR
3238 3251 .ad
3239 3252 .sp .6
3240 3253 .RS 4n
3241 3254 Lists the holds that are set on the named descendent snapshots, in addition to
3242 3255 listing the holds on the named snapshot.
3243 3256 .RE
3244 3257
3245 3258 .RE
3246 3259
3247 3260 .sp
3248 3261 .ne 2
3249 3262 .na
3250 3263 \fB\fBzfs release\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
3251 3264 .ad
3252 3265 .sp .6
3253 3266 .RS 4n
3254 3267 Removes a single reference, named with the \fItag\fR argument, from the
3255 3268 specified snapshot or snapshots. The tag must already exist for each snapshot.
3256 3269 .sp
3257 3270 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3258 3271 \fBzfs destroy\fR command return \fBEBUSY\fR.
3259 3272 .sp
3260 3273 .ne 2
3261 3274 .na
3262 3275 \fB\fB-r\fR\fR
3263 3276 .ad
3264 3277 .sp .6
3265 3278 .RS 4n
3266 3279 Recursively releases a hold with the given tag on the snapshots of all
3267 3280 descendent file systems.
3268 3281 .RE
3269 3282
3270 3283 .RE
3271 3284
3272 3285 .SH EXAMPLES
3273 3286 .LP
3274 3287 \fBExample 1 \fRCreating a ZFS File System Hierarchy
3275 3288 .sp
3276 3289 .LP
3277 3290 The following commands create a file system named \fBpool/home\fR and a file
3278 3291 system named \fBpool/home/bob\fR. The mount point \fB/export/home\fR is set for
3279 3292 the parent file system, and is automatically inherited by the child file
3280 3293 system.
3281 3294
3282 3295 .sp
3283 3296 .in +2
3284 3297 .nf
3285 3298 # \fBzfs create pool/home\fR
3286 3299 # \fBzfs set mountpoint=/export/home pool/home\fR
3287 3300 # \fBzfs create pool/home/bob\fR
3288 3301 .fi
3289 3302 .in -2
3290 3303 .sp
3291 3304
3292 3305 .LP
3293 3306 \fBExample 2 \fRCreating a ZFS Snapshot
3294 3307 .sp
3295 3308 .LP
3296 3309 The following command creates a snapshot named \fByesterday\fR. This snapshot
3297 3310 is mounted on demand in the \fB\&.zfs/snapshot\fR directory at the root of the
3298 3311 \fBpool/home/bob\fR file system.
3299 3312
3300 3313 .sp
3301 3314 .in +2
3302 3315 .nf
3303 3316 # \fBzfs snapshot pool/home/bob@yesterday\fR
3304 3317 .fi
3305 3318 .in -2
3306 3319 .sp
3307 3320
3308 3321 .LP
3309 3322 \fBExample 3 \fRCreating and Destroying Multiple Snapshots
3310 3323 .sp
3311 3324 .LP
3312 3325 The following command creates snapshots named \fByesterday\fR of
3313 3326 \fBpool/home\fR and all of its descendent file systems. Each snapshot is
3314 3327 mounted on demand in the \fB\&.zfs/snapshot\fR directory at the root of its
3315 3328 file system. The second command destroys the newly created snapshots.
3316 3329
3317 3330 .sp
3318 3331 .in +2
3319 3332 .nf
3320 3333 # \fBzfs snapshot -r pool/home@yesterday\fR
3321 3334 # \fBzfs destroy -r pool/home@yesterday\fR
3322 3335 .fi
3323 3336 .in -2
3324 3337 .sp
3325 3338
3326 3339 .LP
3327 3340 \fBExample 4 \fRDisabling and Enabling File System Compression
3328 3341 .sp
3329 3342 .LP
3330 3343 The following command disables the \fBcompression\fR property for all file
3331 3344 systems under \fBpool/home\fR. The next command explicitly enables
3332 3345 \fBcompression\fR for \fBpool/home/anne\fR.
3333 3346
3334 3347 .sp
3335 3348 .in +2
3336 3349 .nf
3337 3350 # \fBzfs set compression=off pool/home\fR
3338 3351 # \fBzfs set compression=on pool/home/anne\fR
3339 3352 .fi
3340 3353 .in -2
3341 3354 .sp
3342 3355
3343 3356 .LP
3344 3357 \fBExample 5 \fRListing ZFS Datasets
3345 3358 .sp
3346 3359 .LP
3347 3360 The following command lists all active file systems and volumes in the system.
3348 3361 Snapshots are displayed if the \fBlistsnaps\fR property is \fBon\fR. The
3349 3362 default is \fBoff\fR. See \fBzpool\fR(1M) for more information on pool
3350 3363 properties.
3351 3364
3352 3365 .sp
3353 3366 .in +2
3354 3367 .nf
3355 3368 # \fBzfs list\fR
3356 3369 NAME USED AVAIL REFER MOUNTPOINT
3357 3370 pool 450K 457G 18K /pool
3358 3371 pool/home 315K 457G 21K /export/home
3359 3372 pool/home/anne 18K 457G 18K /export/home/anne
3360 3373 pool/home/bob 276K 457G 276K /export/home/bob
3361 3374 .fi
3362 3375 .in -2
3363 3376 .sp
3364 3377
3365 3378 .LP
3366 3379 \fBExample 6 \fRSetting a Quota on a ZFS File System
3367 3380 .sp
3368 3381 .LP
3369 3382 The following command sets a quota of 50 Gbytes for \fBpool/home/bob\fR.
3370 3383
3371 3384 .sp
3372 3385 .in +2
3373 3386 .nf
3374 3387 # \fBzfs set quota=50G pool/home/bob\fR
3375 3388 .fi
3376 3389 .in -2
3377 3390 .sp
3378 3391
3379 3392 .LP
3380 3393 \fBExample 7 \fRListing ZFS Properties
3381 3394 .sp
3382 3395 .LP
3383 3396 The following command lists all properties for \fBpool/home/bob\fR.
3384 3397
3385 3398 .sp
3386 3399 .in +2
3387 3400 .nf
3388 3401 # \fBzfs get all pool/home/bob\fR
3389 3402 NAME PROPERTY VALUE SOURCE
3390 3403 pool/home/bob type filesystem -
3391 3404 pool/home/bob creation Tue Jul 21 15:53 2009 -
3392 3405 pool/home/bob used 21K -
3393 3406 pool/home/bob available 20.0G -
3394 3407 pool/home/bob referenced 21K -
3395 3408 pool/home/bob compressratio 1.00x -
3396 3409 pool/home/bob mounted yes -
3397 3410 pool/home/bob quota 20G local
3398 3411 pool/home/bob reservation none default
3399 3412 pool/home/bob recordsize 128K default
3400 3413 pool/home/bob mountpoint /pool/home/bob default
3401 3414 pool/home/bob sharenfs off default
3402 3415 pool/home/bob checksum on default
3403 3416 pool/home/bob compression on local
3404 3417 pool/home/bob atime on default
3405 3418 pool/home/bob devices on default
3406 3419 pool/home/bob exec on default
3407 3420 pool/home/bob setuid on default
3408 3421 pool/home/bob readonly off default
3409 3422 pool/home/bob zoned off default
3410 3423 pool/home/bob snapdir hidden default
3411 3424 pool/home/bob aclmode discard default
3412 3425 pool/home/bob aclinherit restricted default
3413 3426 pool/home/bob canmount on default
3414 3427 pool/home/bob shareiscsi off default
3415 3428 pool/home/bob xattr on default
3416 3429 pool/home/bob copies 1 default
3417 3430 pool/home/bob version 4 -
3418 3431 pool/home/bob utf8only off -
3419 3432 pool/home/bob normalization none -
3420 3433 pool/home/bob casesensitivity sensitive -
3421 3434 pool/home/bob vscan off default
3422 3435 pool/home/bob nbmand off default
3423 3436 pool/home/bob sharesmb off default
3424 3437 pool/home/bob refquota none default
3425 3438 pool/home/bob refreservation none default
3426 3439 pool/home/bob primarycache all default
3427 3440 pool/home/bob secondarycache all default
3428 3441 pool/home/bob usedbysnapshots 0 -
3429 3442 pool/home/bob usedbydataset 21K -
3430 3443 pool/home/bob usedbychildren 0 -
3431 3444 pool/home/bob usedbyrefreservation 0 -
3432 3445 .fi
3433 3446 .in -2
3434 3447 .sp
3435 3448
3436 3449 .sp
3437 3450 .LP
3438 3451 The following command gets a single property value.
3439 3452
3440 3453 .sp
3441 3454 .in +2
3442 3455 .nf
3443 3456 # \fBzfs get -H -o value compression pool/home/bob\fR
3444 3457 on
3445 3458 .fi
3446 3459 .in -2
3447 3460 .sp
3448 3461
3449 3462 .sp
3450 3463 .LP
3451 3464 The following command lists all properties with local settings for
3452 3465 \fBpool/home/bob\fR.
3453 3466
3454 3467 .sp
3455 3468 .in +2
3456 3469 .nf
3457 3470 # \fBzfs get -r -s local -o name,property,value all pool/home/bob\fR
3458 3471 NAME PROPERTY VALUE
3459 3472 pool/home/bob quota 20G
3460 3473 pool/home/bob compression on
3461 3474 .fi
3462 3475 .in -2
3463 3476 .sp
3464 3477
3465 3478 .LP
3466 3479 \fBExample 8 \fRRolling Back a ZFS File System
3467 3480 .sp
3468 3481 .LP
3469 3482 The following command reverts the contents of \fBpool/home/anne\fR to the
3470 3483 snapshot named \fByesterday\fR, deleting all intermediate snapshots.
3471 3484
3472 3485 .sp
3473 3486 .in +2
3474 3487 .nf
3475 3488 # \fBzfs rollback -r pool/home/anne@yesterday\fR
3476 3489 .fi
3477 3490 .in -2
3478 3491 .sp
3479 3492
3480 3493 .LP
3481 3494 \fBExample 9 \fRCreating a ZFS Clone
3482 3495 .sp
3483 3496 .LP
3484 3497 The following command creates a writable file system whose initial contents are
3485 3498 the same as \fBpool/home/bob@yesterday\fR.
3486 3499
3487 3500 .sp
3488 3501 .in +2
3489 3502 .nf
3490 3503 # \fBzfs clone pool/home/bob@yesterday pool/clone\fR
3491 3504 .fi
3492 3505 .in -2
3493 3506 .sp
3494 3507
3495 3508 .LP
3496 3509 \fBExample 10 \fRPromoting a ZFS Clone
3497 3510 .sp
3498 3511 .LP
3499 3512 The following commands illustrate how to test out changes to a file system, and
3500 3513 then replace the original file system with the changed one, using clones, clone
3501 3514 promotion, and renaming:
3502 3515
3503 3516 .sp
3504 3517 .in +2
3505 3518 .nf
3506 3519 # \fBzfs create pool/project/production\fR
3507 3520 populate /pool/project/production with data
3508 3521 # \fBzfs snapshot pool/project/production@today\fR
3509 3522 # \fBzfs clone pool/project/production@today pool/project/beta\fR
3510 3523 make changes to /pool/project/beta and test them
3511 3524 # \fBzfs promote pool/project/beta\fR
3512 3525 # \fBzfs rename pool/project/production pool/project/legacy\fR
3513 3526 # \fBzfs rename pool/project/beta pool/project/production\fR
3514 3527 once the legacy version is no longer needed, it can be destroyed
3515 3528 # \fBzfs destroy pool/project/legacy\fR
3516 3529 .fi
3517 3530 .in -2
3518 3531 .sp
3519 3532
3520 3533 .LP
3521 3534 \fBExample 11 \fRInheriting ZFS Properties
3522 3535 .sp
3523 3536 .LP
3524 3537 The following command causes \fBpool/home/bob\fR and \fBpool/home/anne\fR to
3525 3538 inherit the \fBchecksum\fR property from their parent.
3526 3539
3527 3540 .sp
3528 3541 .in +2
3529 3542 .nf
3530 3543 # \fBzfs inherit checksum pool/home/bob pool/home/anne\fR
3531 3544 .fi
3532 3545 .in -2
3533 3546 .sp
3534 3547
3535 3548 .LP
3536 3549 \fBExample 12 \fRRemotely Replicating ZFS Data
3537 3550 .sp
3538 3551 .LP
3539 3552 The following commands send a full stream and then an incremental stream to a
3540 3553 remote machine, restoring them into \fBpoolB/received/fs@a\fRand
3541 3554 \fBpoolB/received/fs@b\fR, respectively. \fBpoolB\fR must contain the file
3542 3555 system \fBpoolB/received\fR, and must not initially contain
3543 3556 \fBpoolB/received/fs\fR.
3544 3557
3545 3558 .sp
3546 3559 .in +2
3547 3560 .nf
3548 3561 # \fBzfs send pool/fs@a | \e\fR
3549 3562 \fBssh host zfs receive poolB/received/fs@a\fR
3550 3563 # \fBzfs send -i a pool/fs@b | ssh host \e\fR
3551 3564 \fBzfs receive poolB/received/fs\fR
3552 3565 .fi
3553 3566 .in -2
3554 3567 .sp
3555 3568
3556 3569 .LP
3557 3570 \fBExample 13 \fRUsing the \fBzfs receive\fR \fB-d\fR Option
3558 3571 .sp
3559 3572 .LP
3560 3573 The following command sends a full stream of \fBpoolA/fsA/fsB@snap\fR to a
3561 3574 remote machine, receiving it into \fBpoolB/received/fsA/fsB@snap\fR. The
3562 3575 \fBfsA/fsB@snap\fR portion of the received snapshot's name is determined from
3563 3576 the name of the sent snapshot. \fBpoolB\fR must contain the file system
3564 3577 \fBpoolB/received\fR. If \fBpoolB/received/fsA\fR does not exist, it is created
3565 3578 as an empty file system.
3566 3579
3567 3580 .sp
3568 3581 .in +2
3569 3582 .nf
3570 3583 # \fBzfs send poolA/fsA/fsB@snap | \e
3571 3584 ssh host zfs receive -d poolB/received\fR
3572 3585 .fi
3573 3586 .in -2
3574 3587 .sp
3575 3588
3576 3589 .LP
3577 3590 \fBExample 14 \fRSetting User Properties
3578 3591 .sp
3579 3592 .LP
3580 3593 The following example sets the user-defined \fBcom.example:department\fR
3581 3594 property for a dataset.
3582 3595
3583 3596 .sp
3584 3597 .in +2
3585 3598 .nf
3586 3599 # \fBzfs set com.example:department=12345 tank/accounting\fR
3587 3600 .fi
3588 3601 .in -2
3589 3602 .sp
3590 3603
3591 3604 .LP
3592 3605 \fBExample 15 \fRCreating a ZFS Volume as an iSCSI Target Device
3593 3606 .sp
3594 3607 .LP
3595 3608 The following example shows how to create a \fBZFS\fR volume as an \fBiSCSI\fR
3596 3609 target.
3597 3610
3598 3611 .sp
3599 3612 .in +2
3600 3613 .nf
3601 3614 # \fBzfs create -V 2g pool/volumes/vol1\fR
3602 3615 # \fBzfs set shareiscsi=on pool/volumes/vol1\fR
3603 3616 # \fBiscsitadm list target\fR
3604 3617 Target: pool/volumes/vol1
3605 3618 iSCSI Name:
3606 3619 iqn.1986-03.com.sun:02:7b4b02a6-3277-eb1b-e686-a24762c52a8c
3607 3620 Connections: 0
3608 3621 .fi
3609 3622 .in -2
3610 3623 .sp
3611 3624
3612 3625 .sp
3613 3626 .LP
3614 3627 After the \fBiSCSI\fR target is created, set up the \fBiSCSI\fR initiator. For
3615 3628 more information about the Solaris \fBiSCSI\fR initiator, see
3616 3629 \fBiscsitadm\fR(1M).
3617 3630 .LP
3618 3631 \fBExample 16 \fRPerforming a Rolling Snapshot
3619 3632 .sp
3620 3633 .LP
3621 3634 The following example shows how to maintain a history of snapshots with a
3622 3635 consistent naming scheme. To keep a week's worth of snapshots, the user
3623 3636 destroys the oldest snapshot, renames the remaining snapshots, and then creates
3624 3637 a new snapshot, as follows:
3625 3638
3626 3639 .sp
3627 3640 .in +2
3628 3641 .nf
3629 3642 # \fBzfs destroy -r pool/users@7daysago\fR
3630 3643 # \fBzfs rename -r pool/users@6daysago @7daysago\fR
3631 3644 # \fBzfs rename -r pool/users@5daysago @6daysago\fR
3632 3645 # \fBzfs rename -r pool/users@yesterday @5daysago\fR
3633 3646 # \fBzfs rename -r pool/users@yesterday @4daysago\fR
3634 3647 # \fBzfs rename -r pool/users@yesterday @3daysago\fR
3635 3648 # \fBzfs rename -r pool/users@yesterday @2daysago\fR
3636 3649 # \fBzfs rename -r pool/users@today @yesterday\fR
3637 3650 # \fBzfs snapshot -r pool/users@today\fR
3638 3651 .fi
3639 3652 .in -2
3640 3653 .sp
3641 3654
3642 3655 .LP
3643 3656 \fBExample 17 \fRSetting \fBsharenfs\fR Property Options on a ZFS File System
3644 3657 .sp
3645 3658 .LP
3646 3659 The following commands show how to set \fBsharenfs\fR property options to
3647 3660 enable \fBrw\fR access for a set of \fBIP\fR addresses and to enable root
3648 3661 access for system \fBneo\fR on the \fBtank/home\fR file system.
3649 3662
3650 3663 .sp
3651 3664 .in +2
3652 3665 .nf
3653 3666 # \fB# zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home\fR
3654 3667 .fi
3655 3668 .in -2
3656 3669 .sp
3657 3670
3658 3671 .sp
3659 3672 .LP
3660 3673 If you are using \fBDNS\fR for host name resolution, specify the fully
3661 3674 qualified hostname.
3662 3675
3663 3676 .LP
3664 3677 \fBExample 18 \fRDelegating ZFS Administration Permissions on a ZFS Dataset
3665 3678 .sp
3666 3679 .LP
3667 3680 The following example shows how to set permissions so that user \fBcindys\fR
3668 3681 can create, destroy, mount, and take snapshots on \fBtank/cindys\fR. The
3669 3682 permissions on \fBtank/cindys\fR are also displayed.
3670 3683
3671 3684 .sp
3672 3685 .in +2
3673 3686 .nf
3674 3687 # \fBzfs allow cindys create,destroy,mount,snapshot tank/cindys\fR
3675 3688 # \fBzfs allow tank/cindys\fR
3676 3689 -------------------------------------------------------------
3677 3690 Local+Descendent permissions on (tank/cindys)
3678 3691 user cindys create,destroy,mount,snapshot
3679 3692 -------------------------------------------------------------
3680 3693 .fi
3681 3694 .in -2
3682 3695 .sp
3683 3696
3684 3697 .sp
3685 3698 .LP
3686 3699 Because the \fBtank/cindys\fR mount point permission is set to 755 by default,
3687 3700 user \fBcindys\fR will be unable to mount file systems under \fBtank/cindys\fR.
3688 3701 Set an \fBACL\fR similar to the following syntax to provide mount point access:
3689 3702 .sp
3690 3703 .in +2
3691 3704 .nf
3692 3705 # \fBchmod A+user:cindys:add_subdirectory:allow /tank/cindys\fR
3693 3706 .fi
3694 3707 .in -2
3695 3708 .sp
3696 3709
3697 3710 .LP
3698 3711 \fBExample 19 \fRDelegating Create Time Permissions on a ZFS Dataset
3699 3712 .sp
3700 3713 .LP
3701 3714 The following example shows how to grant anyone in the group \fBstaff\fR to
3702 3715 create file systems in \fBtank/users\fR. This syntax also allows staff members
3703 3716 to destroy their own file systems, but not destroy anyone else's file system.
3704 3717 The permissions on \fBtank/users\fR are also displayed.
3705 3718
3706 3719 .sp
3707 3720 .in +2
3708 3721 .nf
3709 3722 # \fB# zfs allow staff create,mount tank/users\fR
3710 3723 # \fBzfs allow -c destroy tank/users\fR
3711 3724 # \fBzfs allow tank/users\fR
3712 3725 -------------------------------------------------------------
3713 3726 Create time permissions on (tank/users)
3714 3727 create,destroy
3715 3728 Local+Descendent permissions on (tank/users)
3716 3729 group staff create,mount
3717 3730 -------------------------------------------------------------
3718 3731 .fi
3719 3732 .in -2
3720 3733 .sp
3721 3734
3722 3735 .LP
3723 3736 \fBExample 20 \fRDefining and Granting a Permission Set on a ZFS Dataset
3724 3737 .sp
3725 3738 .LP
3726 3739 The following example shows how to define and grant a permission set on the
3727 3740 \fBtank/users\fR file system. The permissions on \fBtank/users\fR are also
3728 3741 displayed.
3729 3742
3730 3743 .sp
3731 3744 .in +2
3732 3745 .nf
3733 3746 # \fBzfs allow -s @pset create,destroy,snapshot,mount tank/users\fR
3734 3747 # \fBzfs allow staff @pset tank/users\fR
3735 3748 # \fBzfs allow tank/users\fR
3736 3749 -------------------------------------------------------------
3737 3750 Permission sets on (tank/users)
3738 3751 @pset create,destroy,mount,snapshot
3739 3752 Create time permissions on (tank/users)
3740 3753 create,destroy
3741 3754 Local+Descendent permissions on (tank/users)
3742 3755 group staff @pset,create,mount
3743 3756 -------------------------------------------------------------
3744 3757 .fi
3745 3758 .in -2
3746 3759 .sp
3747 3760
3748 3761 .LP
3749 3762 \fBExample 21 \fRDelegating Property Permissions on a ZFS Dataset
3750 3763 .sp
3751 3764 .LP
3752 3765 The following example shows to grant the ability to set quotas and reservations
3753 3766 on the \fBusers/home\fR file system. The permissions on \fBusers/home\fR are
3754 3767 also displayed.
3755 3768
3756 3769 .sp
3757 3770 .in +2
3758 3771 .nf
3759 3772 # \fBzfs allow cindys quota,reservation users/home\fR
3760 3773 # \fBzfs allow users/home\fR
3761 3774 -------------------------------------------------------------
3762 3775 Local+Descendent permissions on (users/home)
3763 3776 user cindys quota,reservation
3764 3777 -------------------------------------------------------------
3765 3778 cindys% \fBzfs set quota=10G users/home/marks\fR
3766 3779 cindys% \fBzfs get quota users/home/marks\fR
3767 3780 NAME PROPERTY VALUE SOURCE
3768 3781 users/home/marks quota 10G local
3769 3782 .fi
3770 3783 .in -2
3771 3784 .sp
3772 3785
3773 3786 .LP
3774 3787 \fBExample 22 \fRRemoving ZFS Delegated Permissions on a ZFS Dataset
3775 3788 .sp
3776 3789 .LP
3777 3790 The following example shows how to remove the snapshot permission from the
3778 3791 \fBstaff\fR group on the \fBtank/users\fR file system. The permissions on
3779 3792 \fBtank/users\fR are also displayed.
3780 3793
3781 3794 .sp
3782 3795 .in +2
3783 3796 .nf
3784 3797 # \fBzfs unallow staff snapshot tank/users\fR
3785 3798 # \fBzfs allow tank/users\fR
3786 3799 -------------------------------------------------------------
3787 3800 Permission sets on (tank/users)
3788 3801 @pset create,destroy,mount,snapshot
3789 3802 Create time permissions on (tank/users)
3790 3803 create,destroy
3791 3804 Local+Descendent permissions on (tank/users)
3792 3805 group staff @pset,create,mount
3793 3806 -------------------------------------------------------------
3794 3807 .fi
3795 3808 .in -2
3796 3809 .sp
3797 3810
3798 3811 .SH EXIT STATUS
3799 3812 .sp
3800 3813 .LP
3801 3814 The following exit values are returned:
3802 3815 .sp
3803 3816 .ne 2
3804 3817 .na
3805 3818 \fB\fB0\fR\fR
3806 3819 .ad
3807 3820 .sp .6
3808 3821 .RS 4n
3809 3822 Successful completion.
3810 3823 .RE
3811 3824
3812 3825 .sp
3813 3826 .ne 2
3814 3827 .na
3815 3828 \fB\fB1\fR\fR
3816 3829 .ad
3817 3830 .sp .6
3818 3831 .RS 4n
3819 3832 An error occurred.
3820 3833 .RE
3821 3834
3822 3835 .sp
3823 3836 .ne 2
3824 3837 .na
3825 3838 \fB\fB2\fR\fR
3826 3839 .ad
3827 3840 .sp .6
3828 3841 .RS 4n
3829 3842 Invalid command line options were specified.
3830 3843 .RE
3831 3844
3832 3845 .SH ATTRIBUTES
3833 3846 .sp
3834 3847 .LP
3835 3848 See \fBattributes\fR(5) for descriptions of the following attributes:
3836 3849 .sp
3837 3850
3838 3851 .sp
3839 3852 .TS
3840 3853 box;
3841 3854 c | c
3842 3855 l | l .
3843 3856 ATTRIBUTE TYPE ATTRIBUTE VALUE
3844 3857 _
3845 3858 Interface Stability Committed
3846 3859 .TE
3847 3860
3848 3861 .SH SEE ALSO
3849 3862 .sp
3850 3863 .LP
3851 3864 \fBssh\fR(1), \fBiscsitadm\fR(1M), \fBmount\fR(1M), \fBshare\fR(1M),
3852 3865 \fBsharemgr\fR(1M), \fBunshare\fR(1M), \fBzonecfg\fR(1M), \fBzpool\fR(1M),
3853 3866 \fBchmod\fR(2), \fBstat\fR(2), \fBwrite\fR(2), \fBfsync\fR(3C),
3854 3867 \fBdfstab\fR(4), \fBattributes\fR(5)
3855 3868 .sp
3856 3869 .LP
3857 3870 See the \fBgzip\fR(1) man page, which is not part of the SunOS man page
3858 3871 collection.
3859 3872 .sp
3860 3873 .LP
3861 3874 For information about using the \fBZFS\fR web-based management tool and other
3862 3875 \fBZFS\fR features, see the \fISolaris ZFS Administration Guide\fR.
|
↓ open down ↓ |
1022 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX