Print this page
blah
2897 "zpool split" documentation missing from manpage
Reviewed by: Dan McDonald <danmcd@omniti.com>
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/man/man1m/zpool.1m
+++ new/usr/src/man/man1m/zpool.1m
1 1 '\" te
2 2 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
3 3 .\" Copyright 2011, Nexenta Systems, Inc. All Rights Reserved.
4 4 .\" Copyright (c) 2013 by Delphix. All rights reserved.
5 5 .\" The contents of this file are subject to the terms of the Common Development
6 6 .\" and Distribution License (the "License"). You may not use this file except
7 7 .\" in compliance with the License. You can obtain a copy of the license at
8 8 .\" usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
9 9 .\"
10 10 .\" See the License for the specific language governing permissions and
11 11 .\" limitations under the License. When distributing Covered Code, include this
12 12 .\" CDDL HEADER in each file and include the License file at
13 13 .\" usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this
14 14 .\" CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your
15 15 .\" own identifying information:
16 16 .\" Portions Copyright [yyyy] [name of copyright owner]
17 17 .TH ZPOOL 1M "Mar 6, 2014"
18 18 .SH NAME
19 19 zpool \- configures ZFS storage pools
20 20 .SH SYNOPSIS
21 21 .LP
22 22 .nf
23 23 \fBzpool\fR [\fB-?\fR]
24 24 .fi
25 25
26 26 .LP
27 27 .nf
28 28 \fBzpool add\fR [\fB-fn\fR] \fIpool\fR \fIvdev\fR ...
29 29 .fi
30 30
31 31 .LP
32 32 .nf
33 33 \fBzpool attach\fR [\fB-f\fR] \fIpool\fR \fIdevice\fR \fInew_device\fR
34 34 .fi
35 35
36 36 .LP
37 37 .nf
38 38 \fBzpool clear\fR \fIpool\fR [\fIdevice\fR]
39 39 .fi
40 40
41 41 .LP
42 42 .nf
43 43 \fBzpool create\fR [\fB-fnd\fR] [\fB-o\fR \fIproperty=value\fR] ... [\fB-O\fR \fIfile-system-property=value\fR]
44 44 ... [\fB-m\fR \fImountpoint\fR] [\fB-R\fR \fIroot\fR] \fIpool\fR \fIvdev\fR ...
45 45 .fi
46 46
47 47 .LP
48 48 .nf
49 49 \fBzpool destroy\fR [\fB-f\fR] \fIpool\fR
50 50 .fi
51 51
52 52 .LP
53 53 .nf
54 54 \fBzpool detach\fR \fIpool\fR \fIdevice\fR
55 55 .fi
56 56
57 57 .LP
58 58 .nf
59 59 \fBzpool export\fR [\fB-f\fR] \fIpool\fR ...
60 60 .fi
61 61
62 62 .LP
63 63 .nf
64 64 \fBzpool get\fR [\fB-Hp\fR] [\fB-o \fR\fIfield\fR[,...]] "\fIall\fR" | \fIproperty\fR[,...] \fIpool\fR ...
65 65 .fi
66 66
67 67 .LP
68 68 .nf
69 69 \fBzpool history\fR [\fB-il\fR] [\fIpool\fR] ...
70 70 .fi
71 71
72 72 .LP
73 73 .nf
74 74 \fBzpool import\fR [\fB-d\fR \fIdir\fR] [\fB-D\fR]
75 75 .fi
76 76
77 77 .LP
78 78 .nf
79 79 \fBzpool import\fR [\fB-o \fImntopts\fR\fR] [\fB-o\fR \fIproperty=value\fR] ... [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR]
80 80 [\fB-D\fR] [\fB-f\fR] [\fB-m\fR] [\fB-N\fR] [\fB-R\fR \fIroot\fR] [\fB-F\fR [\fB-n\fR]] \fB-a\fR
81 81 .fi
82 82
83 83 .LP
84 84 .nf
85 85 \fBzpool import\fR [\fB-o \fImntopts\fR\fR] [\fB-o\fR \fIproperty=value\fR] ... [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR]
86 86 [\fB-D\fR] [\fB-f\fR] [\fB-m\fR] [\fB-R\fR \fIroot\fR] [\fB-F\fR [\fB-n\fR]] \fIpool\fR |\fIid\fR [\fInewpool\fR]
87 87 .fi
88 88
89 89 .LP
90 90 .nf
91 91 \fBzpool iostat\fR [\fB-T\fR \fBu\fR | \fBd\fR ] [\fB-v\fR] [\fIpool\fR] ... [\fIinterval\fR[\fIcount\fR]]
92 92 .fi
93 93
94 94 .LP
95 95 .nf
96 96 \fBzpool list\fR [\fB-T\fR \fBu\fR | \fBd\fR ] [\fB-Hpv\fR] [\fB-o\fR \fIproperty\fR[,...]] [\fIpool\fR] ... [\fIinterval\fR[\fIcount\fR]]
97 97 .fi
98 98
99 99 .LP
100 100 .nf
101 101 \fBzpool offline\fR [\fB-t\fR] \fIpool\fR \fIdevice\fR ...
102 102 .fi
103 103
104 104 .LP
105 105 .nf
106 106 \fBzpool online\fR \fIpool\fR \fIdevice\fR ...
107 107 .fi
108 108
109 109 .LP
110 110 .nf
111 111 \fBzpool reguid\fR \fIpool\fR
112 112 .fi
113 113
114 114 .LP
115 115 .nf
116 116 \fBzpool reopen\fR \fIpool\fR
117 117 .fi
118 118
119 119 .LP
120 120 .nf
121 121 \fBzpool remove\fR \fIpool\fR \fIdevice\fR ...
122 122 .fi
123 123
124 124 .LP
125 125 .nf
126 126 \fBzpool replace\fR [\fB-f\fR] \fIpool\fR \fIdevice\fR [\fInew_device\fR]
127 127 .fi
128 128
129 129 .LP
130 130 .nf
|
↓ open down ↓ |
130 lines elided |
↑ open up ↑ |
131 131 \fBzpool scrub\fR [\fB-s\fR] \fIpool\fR ...
132 132 .fi
133 133
134 134 .LP
135 135 .nf
136 136 \fBzpool set\fR \fIproperty\fR=\fIvalue\fR \fIpool\fR
137 137 .fi
138 138
139 139 .LP
140 140 .nf
141 +\fBzpool split\fR [\fB-n\fR] [\fB-R\fR \fIaltroot\fR] [\fB-o\fR \fImntopts\fR] [\fB-o\fR \fIproperty=value\fR] \fIpool\fR \fInewpool\fR [\fIdevice\fR ... ]
142 +.fi
143 +
144 +.LP
145 +.nf
141 146 \fBzpool status\fR [\fB-xvD\fR] [\fB-T\fR \fBu\fR | \fBd\fR ] [\fIpool\fR] ... [\fIinterval\fR [\fIcount\fR]]
142 147 .fi
143 148
144 149 .LP
145 150 .nf
146 151 \fBzpool upgrade\fR
147 152 .fi
148 153
149 154 .LP
150 155 .nf
151 156 \fBzpool upgrade\fR \fB-v\fR
152 157 .fi
153 158
154 159 .LP
155 160 .nf
156 161 \fBzpool upgrade\fR [\fB-V\fR \fIversion\fR] \fB-a\fR | \fIpool\fR ...
157 162 .fi
158 163
159 164 .SH DESCRIPTION
160 -.sp
161 165 .LP
162 166 The \fBzpool\fR command configures \fBZFS\fR storage pools. A storage pool is a
163 167 collection of devices that provides physical storage and data replication for
164 168 \fBZFS\fR datasets.
165 169 .sp
166 170 .LP
167 171 All datasets within a storage pool share the same space. See \fBzfs\fR(1M) for
168 172 information on managing datasets.
169 173 .SS "Virtual Devices (\fBvdev\fRs)"
170 -.sp
171 174 .LP
172 175 A "virtual device" describes a single device or a collection of devices
173 176 organized according to certain performance and fault characteristics. The
174 177 following virtual devices are supported:
175 178 .sp
176 179 .ne 2
177 180 .na
178 181 \fB\fBdisk\fR\fR
179 182 .ad
180 183 .RS 10n
181 184 A block device, typically located under \fB/dev/dsk\fR. \fBZFS\fR can use
182 185 individual slices or partitions, though the recommended mode of operation is to
183 186 use whole disks. A disk can be specified by a full path, or it can be a
184 187 shorthand name (the relative portion of the path under "/dev/dsk"). A whole
185 188 disk can be specified by omitting the slice or partition designation. For
186 189 example, "c0t0d0" is equivalent to "/dev/dsk/c0t0d0s2". When given a whole
187 190 disk, \fBZFS\fR automatically labels the disk, if necessary.
188 191 .RE
189 192
190 193 .sp
191 194 .ne 2
192 195 .na
193 196 \fB\fBfile\fR\fR
194 197 .ad
195 198 .RS 10n
196 199 A regular file. The use of files as a backing store is strongly discouraged. It
197 200 is designed primarily for experimental purposes, as the fault tolerance of a
198 201 file is only as good as the file system of which it is a part. A file must be
199 202 specified by a full path.
200 203 .RE
201 204
202 205 .sp
203 206 .ne 2
204 207 .na
205 208 \fB\fBmirror\fR\fR
206 209 .ad
207 210 .RS 10n
208 211 A mirror of two or more devices. Data is replicated in an identical fashion
209 212 across all components of a mirror. A mirror with \fIN\fR disks of size \fIX\fR
210 213 can hold \fIX\fR bytes and can withstand (\fIN-1\fR) devices failing before
211 214 data integrity is compromised.
212 215 .RE
213 216
214 217 .sp
215 218 .ne 2
216 219 .na
217 220 \fB\fBraidz\fR\fR
218 221 .ad
219 222 .br
220 223 .na
221 224 \fB\fBraidz1\fR\fR
222 225 .ad
223 226 .br
224 227 .na
225 228 \fB\fBraidz2\fR\fR
226 229 .ad
227 230 .br
228 231 .na
229 232 \fB\fBraidz3\fR\fR
230 233 .ad
231 234 .RS 10n
232 235 A variation on \fBRAID-5\fR that allows for better distribution of parity and
233 236 eliminates the "\fBRAID-5\fR write hole" (in which data and parity become
234 237 inconsistent after a power loss). Data and parity is striped across all disks
235 238 within a \fBraidz\fR group.
236 239 .sp
237 240 A \fBraidz\fR group can have single-, double- , or triple parity, meaning that
238 241 the \fBraidz\fR group can sustain one, two, or three failures, respectively,
239 242 without losing any data. The \fBraidz1\fR \fBvdev\fR type specifies a
240 243 single-parity \fBraidz\fR group; the \fBraidz2\fR \fBvdev\fR type specifies a
241 244 double-parity \fBraidz\fR group; and the \fBraidz3\fR \fBvdev\fR type specifies
242 245 a triple-parity \fBraidz\fR group. The \fBraidz\fR \fBvdev\fR type is an alias
243 246 for \fBraidz1\fR.
244 247 .sp
245 248 A \fBraidz\fR group with \fIN\fR disks of size \fIX\fR with \fIP\fR parity
246 249 disks can hold approximately (\fIN-P\fR)*\fIX\fR bytes and can withstand
247 250 \fIP\fR device(s) failing before data integrity is compromised. The minimum
248 251 number of devices in a \fBraidz\fR group is one more than the number of parity
249 252 disks. The recommended number is between 3 and 9 to help increase performance.
250 253 .RE
251 254
252 255 .sp
253 256 .ne 2
254 257 .na
255 258 \fB\fBspare\fR\fR
256 259 .ad
257 260 .RS 10n
258 261 A special pseudo-\fBvdev\fR which keeps track of available hot spares for a
259 262 pool. For more information, see the "Hot Spares" section.
260 263 .RE
261 264
262 265 .sp
263 266 .ne 2
264 267 .na
265 268 \fB\fBlog\fR\fR
266 269 .ad
267 270 .RS 10n
268 271 A separate-intent log device. If more than one log device is specified, then
269 272 writes are load-balanced between devices. Log devices can be mirrored. However,
270 273 \fBraidz\fR \fBvdev\fR types are not supported for the intent log. For more
271 274 information, see the "Intent Log" section.
272 275 .RE
273 276
274 277 .sp
275 278 .ne 2
276 279 .na
277 280 \fB\fBcache\fR\fR
278 281 .ad
279 282 .RS 10n
280 283 A device used to cache storage pool data. A cache device cannot be cannot be
281 284 configured as a mirror or \fBraidz\fR group. For more information, see the
282 285 "Cache Devices" section.
283 286 .RE
284 287
285 288 .sp
286 289 .LP
287 290 Virtual devices cannot be nested, so a mirror or \fBraidz\fR virtual device can
288 291 only contain files or disks. Mirrors of mirrors (or other combinations) are not
289 292 allowed.
290 293 .sp
291 294 .LP
292 295 A pool can have any number of virtual devices at the top of the configuration
293 296 (known as "root vdevs"). Data is dynamically distributed across all top-level
294 297 devices to balance data among devices. As new virtual devices are added,
295 298 \fBZFS\fR automatically places data on the newly available devices.
296 299 .sp
297 300 .LP
298 301 Virtual devices are specified one at a time on the command line, separated by
299 302 whitespace. The keywords "mirror" and "raidz" are used to distinguish where a
300 303 group ends and another begins. For example, the following creates two root
|
↓ open down ↓ |
120 lines elided |
↑ open up ↑ |
301 304 vdevs, each a mirror of two disks:
302 305 .sp
303 306 .in +2
304 307 .nf
305 308 # \fBzpool create mypool mirror c0t0d0 c0t1d0 mirror c1t0d0 c1t1d0\fR
306 309 .fi
307 310 .in -2
308 311 .sp
309 312
310 313 .SS "Device Failure and Recovery"
311 -.sp
312 314 .LP
313 315 \fBZFS\fR supports a rich set of mechanisms for handling device failure and
314 316 data corruption. All metadata and data is checksummed, and \fBZFS\fR
315 317 automatically repairs bad data from a good copy when corruption is detected.
316 318 .sp
317 319 .LP
318 320 In order to take advantage of these features, a pool must make use of some form
319 321 of redundancy, using either mirrored or \fBraidz\fR groups. While \fBZFS\fR
320 322 supports running in a non-redundant configuration, where each root vdev is
321 323 simply a disk or file, this is strongly discouraged. A single case of bit
322 324 corruption can render some or all of your data unavailable.
323 325 .sp
324 326 .LP
325 327 A pool's health status is described by one of three states: online, degraded,
326 328 or faulted. An online pool has all devices operating normally. A degraded pool
327 329 is one in which one or more devices have failed, but the data is still
328 330 available due to a redundant configuration. A faulted pool has corrupted
329 331 metadata, or one or more faulted devices, and insufficient replicas to continue
330 332 functioning.
331 333 .sp
332 334 .LP
333 335 The health of the top-level vdev, such as mirror or \fBraidz\fR device, is
334 336 potentially impacted by the state of its associated vdevs, or component
335 337 devices. A top-level vdev or component device is in one of the following
336 338 states:
337 339 .sp
338 340 .ne 2
339 341 .na
340 342 \fB\fBDEGRADED\fR\fR
341 343 .ad
342 344 .RS 12n
343 345 One or more top-level vdevs is in the degraded state because one or more
344 346 component devices are offline. Sufficient replicas exist to continue
345 347 functioning.
346 348 .sp
347 349 One or more component devices is in the degraded or faulted state, but
348 350 sufficient replicas exist to continue functioning. The underlying conditions
349 351 are as follows:
350 352 .RS +4
351 353 .TP
352 354 .ie t \(bu
353 355 .el o
354 356 The number of checksum errors exceeds acceptable levels and the device is
355 357 degraded as an indication that something may be wrong. \fBZFS\fR continues to
356 358 use the device as necessary.
357 359 .RE
358 360 .RS +4
359 361 .TP
360 362 .ie t \(bu
361 363 .el o
362 364 The number of I/O errors exceeds acceptable levels. The device could not be
363 365 marked as faulted because there are insufficient replicas to continue
364 366 functioning.
365 367 .RE
366 368 .RE
367 369
368 370 .sp
369 371 .ne 2
370 372 .na
371 373 \fB\fBFAULTED\fR\fR
372 374 .ad
373 375 .RS 12n
374 376 One or more top-level vdevs is in the faulted state because one or more
375 377 component devices are offline. Insufficient replicas exist to continue
376 378 functioning.
377 379 .sp
378 380 One or more component devices is in the faulted state, and insufficient
379 381 replicas exist to continue functioning. The underlying conditions are as
380 382 follows:
381 383 .RS +4
382 384 .TP
383 385 .ie t \(bu
384 386 .el o
385 387 The device could be opened, but the contents did not match expected values.
386 388 .RE
387 389 .RS +4
388 390 .TP
389 391 .ie t \(bu
390 392 .el o
391 393 The number of I/O errors exceeds acceptable levels and the device is faulted to
392 394 prevent further use of the device.
393 395 .RE
394 396 .RE
395 397
396 398 .sp
397 399 .ne 2
398 400 .na
399 401 \fB\fBOFFLINE\fR\fR
400 402 .ad
401 403 .RS 12n
402 404 The device was explicitly taken offline by the "\fBzpool offline\fR" command.
403 405 .RE
404 406
405 407 .sp
406 408 .ne 2
407 409 .na
408 410 \fB\fBONLINE\fR\fR
409 411 .ad
410 412 .RS 12n
411 413 The device is online and functioning.
412 414 .RE
413 415
414 416 .sp
415 417 .ne 2
416 418 .na
417 419 \fB\fBREMOVED\fR\fR
418 420 .ad
419 421 .RS 12n
420 422 The device was physically removed while the system was running. Device removal
421 423 detection is hardware-dependent and may not be supported on all platforms.
422 424 .RE
423 425
424 426 .sp
425 427 .ne 2
426 428 .na
427 429 \fB\fBUNAVAIL\fR\fR
428 430 .ad
429 431 .RS 12n
430 432 The device could not be opened. If a pool is imported when a device was
|
↓ open down ↓ |
109 lines elided |
↑ open up ↑ |
431 433 unavailable, then the device will be identified by a unique identifier instead
432 434 of its path since the path was never correct in the first place.
433 435 .RE
434 436
435 437 .sp
436 438 .LP
437 439 If a device is removed and later re-attached to the system, \fBZFS\fR attempts
438 440 to put the device online automatically. Device attach detection is
439 441 hardware-dependent and might not be supported on all platforms.
440 442 .SS "Hot Spares"
441 -.sp
442 443 .LP
443 444 \fBZFS\fR allows devices to be associated with pools as "hot spares". These
444 445 devices are not actively used in the pool, but when an active device fails, it
445 446 is automatically replaced by a hot spare. To create a pool with hot spares,
446 447 specify a "spare" \fBvdev\fR with any number of devices. For example,
447 448 .sp
448 449 .in +2
449 450 .nf
450 451 # zpool create pool mirror c0d0 c1d0 spare c2d0 c3d0
451 452 .fi
452 453 .in -2
453 454 .sp
454 455
455 456 .sp
456 457 .LP
457 458 Spares can be shared across multiple pools, and can be added with the "\fBzpool
458 459 add\fR" command and removed with the "\fBzpool remove\fR" command. Once a spare
459 460 replacement is initiated, a new "spare" \fBvdev\fR is created within the
460 461 configuration that will remain there until the original device is replaced. At
461 462 this point, the hot spare becomes available again if another device fails.
462 463 .sp
463 464 .LP
464 465 If a pool has a shared spare that is currently being used, the pool can not be
465 466 exported since other pools may use this shared spare, which may lead to
466 467 potential data corruption.
|
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
467 468 .sp
468 469 .LP
469 470 An in-progress spare replacement can be cancelled by detaching the hot spare.
470 471 If the original faulted device is detached, then the hot spare assumes its
471 472 place in the configuration, and is removed from the spare list of all active
472 473 pools.
473 474 .sp
474 475 .LP
475 476 Spares cannot replace log devices.
476 477 .SS "Intent Log"
477 -.sp
478 478 .LP
479 479 The \fBZFS\fR Intent Log (\fBZIL\fR) satisfies \fBPOSIX\fR requirements for
480 480 synchronous transactions. For instance, databases often require their
481 481 transactions to be on stable storage devices when returning from a system call.
482 482 \fBNFS\fR and other applications can also use \fBfsync\fR() to ensure data
483 483 stability. By default, the intent log is allocated from blocks within the main
484 484 pool. However, it might be possible to get better performance using separate
485 485 intent log devices such as \fBNVRAM\fR or a dedicated disk. For example:
486 486 .sp
487 487 .in +2
488 488 .nf
489 489 \fB# zpool create pool c0d0 c1d0 log c2d0\fR
490 490 .fi
491 491 .in -2
492 492 .sp
493 493
|
↓ open down ↓ |
6 lines elided |
↑ open up ↑ |
494 494 .sp
495 495 .LP
496 496 Multiple log devices can also be specified, and they can be mirrored. See the
497 497 EXAMPLES section for an example of mirroring multiple log devices.
498 498 .sp
499 499 .LP
500 500 Log devices can be added, replaced, attached, detached, and imported and
501 501 exported as part of the larger pool. Mirrored log devices can be removed by
502 502 specifying the top-level mirror for the log.
503 503 .SS "Cache Devices"
504 -.sp
505 504 .LP
506 505 Devices can be added to a storage pool as "cache devices." These devices
507 506 provide an additional layer of caching between main memory and disk. For
508 507 read-heavy workloads, where the working set size is much larger than what can
509 508 be cached in main memory, using cache devices allow much more of this working
510 509 set to be served from low latency media. Using cache devices provides the
511 510 greatest performance improvement for random read-workloads of mostly static
512 511 content.
513 512 .sp
514 513 .LP
515 514 To create a pool with cache devices, specify a "cache" \fBvdev\fR with any
516 515 number of devices. For example:
517 516 .sp
518 517 .in +2
519 518 .nf
520 519 \fB# zpool create pool c0d0 c1d0 cache c2d0 c3d0\fR
521 520 .fi
522 521 .in -2
523 522 .sp
524 523
525 524 .sp
|
↓ open down ↓ |
11 lines elided |
↑ open up ↑ |
526 525 .LP
527 526 Cache devices cannot be mirrored or part of a \fBraidz\fR configuration. If a
528 527 read error is encountered on a cache device, that read \fBI/O\fR is reissued to
529 528 the original storage pool device, which might be part of a mirrored or
530 529 \fBraidz\fR configuration.
531 530 .sp
532 531 .LP
533 532 The content of the cache devices is considered volatile, as is the case with
534 533 other system caches.
535 534 .SS "Properties"
536 -.sp
537 535 .LP
538 536 Each pool has several properties associated with it. Some properties are
539 537 read-only statistics while others are configurable and change the behavior of
540 538 the pool. The following are read-only properties:
541 539 .sp
542 540 .ne 2
543 541 .na
544 542 \fB\fBavailable\fR\fR
545 543 .ad
546 544 .RS 20n
547 545 Amount of storage available within the pool. This property can also be referred
548 546 to by its shortened column name, "avail".
549 547 .RE
550 548
551 549 .sp
552 550 .ne 2
553 551 .na
554 552 \fB\fBcapacity\fR\fR
555 553 .ad
556 554 .RS 20n
557 555 Percentage of pool space used. This property can also be referred to by its
558 556 shortened column name, "cap".
559 557 .RE
560 558
561 559 .sp
562 560 .ne 2
563 561 .na
564 562 \fB\fBexpandsize\fR\fR
565 563 .ad
566 564 .RS 20n
567 565 Amount of uninitialized space within the pool or device that can be used to
568 566 increase the total capacity of the pool. Uninitialized space consists of
569 567 any space on an EFI labeled vdev which has not been brought online
570 568 (i.e. zpool online -e). This space occurs when a LUN is dynamically expanded.
571 569 .RE
572 570
573 571 .sp
574 572 .ne 2
575 573 .na
576 574 \fB\fBfragmentation\fR\fR
577 575 .ad
578 576 .RS 20n
579 577 The amount of fragmentation in the pool.
580 578 .RE
581 579
582 580 .sp
583 581 .ne 2
584 582 .na
585 583 \fB\fBfree\fR\fR
586 584 .ad
587 585 .RS 20n
588 586 The amount of free space available in the pool.
589 587 .RE
590 588
591 589 .sp
592 590 .ne 2
593 591 .na
594 592 \fB\fBfreeing\fR\fR
595 593 .ad
596 594 .RS 20n
597 595 After a file system or snapshot is destroyed, the space it was using is
598 596 returned to the pool asynchronously. \fB\fBfreeing\fR\fR is the amount of
599 597 space remaining to be reclaimed. Over time \fB\fBfreeing\fR\fR will decrease
600 598 while \fB\fBfree\fR\fR increases.
601 599 .RE
602 600
603 601 .sp
604 602 .ne 2
605 603 .na
606 604 \fB\fBhealth\fR\fR
607 605 .ad
608 606 .RS 20n
609 607 The current health of the pool. Health can be "\fBONLINE\fR", "\fBDEGRADED\fR",
610 608 "\fBFAULTED\fR", " \fBOFFLINE\fR", "\fBREMOVED\fR", or "\fBUNAVAIL\fR".
611 609 .RE
612 610
613 611 .sp
614 612 .ne 2
615 613 .na
616 614 \fB\fBguid\fR\fR
617 615 .ad
618 616 .RS 20n
619 617 A unique identifier for the pool.
620 618 .RE
621 619
622 620 .sp
623 621 .ne 2
624 622 .na
625 623 \fB\fBsize\fR\fR
626 624 .ad
627 625 .RS 20n
628 626 Total size of the storage pool.
629 627 .RE
630 628
631 629 .sp
632 630 .ne 2
633 631 .na
634 632 \fB\fBunsupported@\fR\fIfeature_guid\fR\fR
635 633 .ad
636 634 .RS 20n
637 635 Information about unsupported features that are enabled on the pool. See
638 636 \fBzpool-features\fR(5) for details.
639 637 .RE
640 638
641 639 .sp
642 640 .ne 2
643 641 .na
644 642 \fB\fBused\fR\fR
645 643 .ad
646 644 .RS 20n
647 645 Amount of storage space used within the pool.
648 646 .RE
649 647
650 648 .sp
651 649 .LP
652 650 The space usage properties report actual physical space available to the
653 651 storage pool. The physical space can be different from the total amount of
654 652 space that any contained datasets can actually use. The amount of space used in
655 653 a \fBraidz\fR configuration depends on the characteristics of the data being
656 654 written. In addition, \fBZFS\fR reserves some space for internal accounting
657 655 that the \fBzfs\fR(1M) command takes into account, but the \fBzpool\fR command
658 656 does not. For non-full pools of a reasonable size, these effects should be
659 657 invisible. For small pools, or pools that are close to being completely full,
660 658 these discrepancies may become more noticeable.
661 659 .sp
662 660 .LP
663 661 The following property can be set at creation time and import time:
664 662 .sp
665 663 .ne 2
666 664 .na
667 665 \fB\fBaltroot\fR\fR
668 666 .ad
669 667 .sp .6
670 668 .RS 4n
671 669 Alternate root directory. If set, this directory is prepended to any mount
672 670 points within the pool. This can be used when examining an unknown pool where
673 671 the mount points cannot be trusted, or in an alternate boot environment, where
674 672 the typical paths are not valid. \fBaltroot\fR is not a persistent property. It
675 673 is valid only while the system is up. Setting \fBaltroot\fR defaults to using
676 674 \fBcachefile\fR=none, though this may be overridden using an explicit setting.
677 675 .RE
678 676
679 677 .sp
680 678 .LP
681 679 The following property can be set only at import time:
682 680 .sp
683 681 .ne 2
684 682 .na
685 683 \fB\fBreadonly\fR=\fBon\fR | \fBoff\fR\fR
686 684 .ad
687 685 .sp .6
688 686 .RS 4n
689 687 If set to \fBon\fR, the pool will be imported in read-only mode. This
690 688 property can also be referred to by its shortened column name, \fBrdonly\fR.
691 689 .RE
692 690
693 691 .sp
694 692 .LP
695 693 The following properties can be set at creation time and import time, and later
696 694 changed with the \fBzpool set\fR command:
697 695 .sp
698 696 .ne 2
699 697 .na
700 698 \fB\fBautoexpand\fR=\fBon\fR | \fBoff\fR\fR
701 699 .ad
702 700 .sp .6
703 701 .RS 4n
704 702 Controls automatic pool expansion when the underlying LUN is grown. If set to
705 703 \fBon\fR, the pool will be resized according to the size of the expanded
706 704 device. If the device is part of a mirror or \fBraidz\fR then all devices
707 705 within that mirror/\fBraidz\fR group must be expanded before the new space is
708 706 made available to the pool. The default behavior is \fBoff\fR. This property
709 707 can also be referred to by its shortened column name, \fBexpand\fR.
710 708 .RE
711 709
712 710 .sp
713 711 .ne 2
714 712 .na
715 713 \fB\fBautoreplace\fR=\fBon\fR | \fBoff\fR\fR
716 714 .ad
717 715 .sp .6
718 716 .RS 4n
719 717 Controls automatic device replacement. If set to "\fBoff\fR", device
720 718 replacement must be initiated by the administrator by using the "\fBzpool
721 719 replace\fR" command. If set to "\fBon\fR", any new device, found in the same
722 720 physical location as a device that previously belonged to the pool, is
723 721 automatically formatted and replaced. The default behavior is "\fBoff\fR". This
724 722 property can also be referred to by its shortened column name, "replace".
725 723 .RE
726 724
727 725 .sp
728 726 .ne 2
729 727 .na
730 728 \fB\fBbootfs\fR=\fIpool\fR/\fIdataset\fR\fR
731 729 .ad
732 730 .sp .6
733 731 .RS 4n
734 732 Identifies the default bootable dataset for the root pool. This property is
735 733 expected to be set mainly by the installation and upgrade programs.
736 734 .RE
737 735
738 736 .sp
739 737 .ne 2
740 738 .na
741 739 \fB\fBcachefile\fR=\fIpath\fR | \fBnone\fR\fR
742 740 .ad
743 741 .sp .6
744 742 .RS 4n
745 743 Controls the location of where the pool configuration is cached. Discovering
746 744 all pools on system startup requires a cached copy of the configuration data
747 745 that is stored on the root file system. All pools in this cache are
748 746 automatically imported when the system boots. Some environments, such as
749 747 install and clustering, need to cache this information in a different location
750 748 so that pools are not automatically imported. Setting this property caches the
751 749 pool configuration in a different location that can later be imported with
752 750 "\fBzpool import -c\fR". Setting it to the special value "\fBnone\fR" creates a
753 751 temporary pool that is never cached, and the special value \fB\&''\fR (empty
754 752 string) uses the default location.
755 753 .sp
756 754 Multiple pools can share the same cache file. Because the kernel destroys and
757 755 recreates this file when pools are added and removed, care should be taken when
758 756 attempting to access this file. When the last pool using a \fBcachefile\fR is
759 757 exported or destroyed, the file is removed.
760 758 .RE
761 759
762 760 .sp
763 761 .ne 2
764 762 .na
765 763 \fB\fBcomment\fR=\fB\fItext\fR\fR
766 764 .ad
767 765 .RS 4n
768 766 A text string consisting of printable ASCII characters that will be stored
769 767 such that it is available even if the pool becomes faulted. An administrator
770 768 can provide additional information about a pool using this property.
771 769 .RE
772 770
773 771 .sp
774 772 .ne 2
775 773 .na
776 774 \fB\fBdedupditto\fR=\fB\fInumber\fR\fR
777 775 .ad
778 776 .sp .6
779 777 .RS 4n
780 778 Threshold for the number of block ditto copies. If the reference count for a
781 779 deduplicated block increases above this number, a new ditto copy of this block
782 780 is automatically stored. The default setting is 0 which causes no ditto copies
783 781 to be created for deduplicated blocks. The miniumum legal nonzero setting is 100.
784 782 .RE
785 783
786 784 .sp
787 785 .ne 2
788 786 .na
789 787 \fB\fBdelegation\fR=\fBon\fR | \fBoff\fR\fR
790 788 .ad
791 789 .sp .6
792 790 .RS 4n
793 791 Controls whether a non-privileged user is granted access based on the dataset
794 792 permissions defined on the dataset. See \fBzfs\fR(1M) for more information on
795 793 \fBZFS\fR delegated administration.
796 794 .RE
797 795
798 796 .sp
799 797 .ne 2
800 798 .na
801 799 \fB\fBfailmode\fR=\fBwait\fR | \fBcontinue\fR | \fBpanic\fR\fR
802 800 .ad
803 801 .sp .6
804 802 .RS 4n
805 803 Controls the system behavior in the event of catastrophic pool failure. This
806 804 condition is typically a result of a loss of connectivity to the underlying
807 805 storage device(s) or a failure of all devices within the pool. The behavior of
808 806 such an event is determined as follows:
809 807 .sp
810 808 .ne 2
811 809 .na
812 810 \fB\fBwait\fR\fR
813 811 .ad
814 812 .RS 12n
815 813 Blocks all \fBI/O\fR access until the device connectivity is recovered and the
816 814 errors are cleared. This is the default behavior.
817 815 .RE
818 816
819 817 .sp
820 818 .ne 2
821 819 .na
822 820 \fB\fBcontinue\fR\fR
823 821 .ad
824 822 .RS 12n
825 823 Returns \fBEIO\fR to any new write \fBI/O\fR requests but allows reads to any
826 824 of the remaining healthy devices. Any write requests that have yet to be
827 825 committed to disk would be blocked.
828 826 .RE
829 827
830 828 .sp
831 829 .ne 2
832 830 .na
833 831 \fB\fBpanic\fR\fR
834 832 .ad
835 833 .RS 12n
836 834 Prints out a message to the console and generates a system crash dump.
837 835 .RE
838 836
839 837 .RE
840 838
841 839 .sp
842 840 .ne 2
843 841 .na
844 842 \fB\fBfeature@\fR\fIfeature_name\fR=\fBenabled\fR\fR
845 843 .ad
846 844 .RS 4n
847 845 The value of this property is the current state of \fIfeature_name\fR. The
848 846 only valid value when setting this property is \fBenabled\fR which moves
849 847 \fIfeature_name\fR to the enabled state. See \fBzpool-features\fR(5) for
850 848 details on feature states.
851 849 .RE
852 850
853 851 .sp
854 852 .ne 2
855 853 .na
856 854 \fB\fBlistsnaps\fR=on | off\fR
857 855 .ad
858 856 .sp .6
859 857 .RS 4n
860 858 Controls whether information about snapshots associated with this pool is
861 859 output when "\fBzfs list\fR" is run without the \fB-t\fR option. The default
862 860 value is "off".
863 861 .RE
864 862
865 863 .sp
866 864 .ne 2
867 865 .na
868 866 \fB\fBversion\fR=\fIversion\fR\fR
869 867 .ad
|
↓ open down ↓ |
323 lines elided |
↑ open up ↑ |
870 868 .sp .6
871 869 .RS 4n
872 870 The current on-disk version of the pool. This can be increased, but never
873 871 decreased. The preferred method of updating pools is with the "\fBzpool
874 872 upgrade\fR" command, though this property can be used when a specific version
875 873 is needed for backwards compatibility. Once feature flags is enabled on a
876 874 pool this property will no longer have a value.
877 875 .RE
878 876
879 877 .SS "Subcommands"
880 -.sp
881 878 .LP
882 879 All subcommands that modify state are logged persistently to the pool in their
883 880 original form.
884 881 .sp
885 882 .LP
886 883 The \fBzpool\fR command provides subcommands to create and destroy storage
887 884 pools, add capacity to storage pools, and provide information about the storage
888 885 pools. The following subcommands are supported:
889 886 .sp
890 887 .ne 2
891 888 .na
892 889 \fB\fBzpool\fR \fB-?\fR\fR
893 890 .ad
894 891 .sp .6
895 892 .RS 4n
896 893 Displays a help message.
897 894 .RE
898 895
899 896 .sp
900 897 .ne 2
901 898 .na
902 899 \fB\fBzpool add\fR [\fB-fn\fR] \fIpool\fR \fIvdev\fR ...\fR
903 900 .ad
904 901 .sp .6
905 902 .RS 4n
906 903 Adds the specified virtual devices to the given pool. The \fIvdev\fR
907 904 specification is described in the "Virtual Devices" section. The behavior of
908 905 the \fB-f\fR option, and the device checks performed are described in the
909 906 "zpool create" subcommand.
910 907 .sp
911 908 .ne 2
912 909 .na
913 910 \fB\fB-f\fR\fR
914 911 .ad
915 912 .RS 6n
916 913 Forces use of \fBvdev\fRs, even if they appear in use or specify a conflicting
917 914 replication level. Not all devices can be overridden in this manner.
918 915 .RE
919 916
920 917 .sp
921 918 .ne 2
922 919 .na
923 920 \fB\fB-n\fR\fR
924 921 .ad
925 922 .RS 6n
926 923 Displays the configuration that would be used without actually adding the
927 924 \fBvdev\fRs. The actual pool creation can still fail due to insufficient
928 925 privileges or device sharing.
929 926 .RE
930 927
931 928 Do not add a disk that is currently configured as a quorum device to a zpool.
932 929 After a disk is in the pool, that disk can then be configured as a quorum
933 930 device.
934 931 .RE
935 932
936 933 .sp
937 934 .ne 2
938 935 .na
939 936 \fB\fBzpool attach\fR [\fB-f\fR] \fIpool\fR \fIdevice\fR \fInew_device\fR\fR
940 937 .ad
941 938 .sp .6
942 939 .RS 4n
943 940 Attaches \fInew_device\fR to an existing \fBzpool\fR device. The existing
944 941 device cannot be part of a \fBraidz\fR configuration. If \fIdevice\fR is not
945 942 currently part of a mirrored configuration, \fIdevice\fR automatically
946 943 transforms into a two-way mirror of \fIdevice\fR and \fInew_device\fR. If
947 944 \fIdevice\fR is part of a two-way mirror, attaching \fInew_device\fR creates a
948 945 three-way mirror, and so on. In either case, \fInew_device\fR begins to
949 946 resilver immediately.
950 947 .sp
951 948 .ne 2
952 949 .na
953 950 \fB\fB-f\fR\fR
954 951 .ad
955 952 .RS 6n
956 953 Forces use of \fInew_device\fR, even if its appears to be in use. Not all
957 954 devices can be overridden in this manner.
958 955 .RE
959 956
960 957 .RE
961 958
962 959 .sp
963 960 .ne 2
964 961 .na
965 962 \fB\fBzpool clear\fR \fIpool\fR [\fIdevice\fR] ...\fR
966 963 .ad
967 964 .sp .6
968 965 .RS 4n
969 966 Clears device errors in a pool. If no arguments are specified, all device
970 967 errors within the pool are cleared. If one or more devices is specified, only
971 968 those errors associated with the specified device or devices are cleared.
972 969 .RE
973 970
974 971 .sp
975 972 .ne 2
976 973 .na
977 974 \fB\fBzpool create\fR [\fB-fnd\fR] [\fB-o\fR \fIproperty=value\fR] ... [\fB-O\fR
978 975 \fIfile-system-property=value\fR] ... [\fB-m\fR \fImountpoint\fR] [\fB-R\fR
979 976 \fIroot\fR] \fIpool\fR \fIvdev\fR ...\fR
980 977 .ad
981 978 .sp .6
982 979 .RS 4n
983 980 Creates a new storage pool containing the virtual devices specified on the
984 981 command line. The pool name must begin with a letter, and can only contain
985 982 alphanumeric characters as well as underscore ("_"), dash ("-"), and period
986 983 ("."). The pool names "mirror", "raidz", "spare" and "log" are reserved, as are
987 984 names beginning with the pattern "c[0-9]". The \fBvdev\fR specification is
988 985 described in the "Virtual Devices" section.
989 986 .sp
990 987 The command verifies that each device specified is accessible and not currently
991 988 in use by another subsystem. There are some uses, such as being currently
992 989 mounted, or specified as the dedicated dump device, that prevents a device from
993 990 ever being used by \fBZFS\fR. Other uses, such as having a preexisting
994 991 \fBUFS\fR file system, can be overridden with the \fB-f\fR option.
995 992 .sp
996 993 The command also checks that the replication strategy for the pool is
997 994 consistent. An attempt to combine redundant and non-redundant storage in a
998 995 single pool, or to mix disks and files, results in an error unless \fB-f\fR is
999 996 specified. The use of differently sized devices within a single \fBraidz\fR or
1000 997 mirror group is also flagged as an error unless \fB-f\fR is specified.
1001 998 .sp
1002 999 Unless the \fB-R\fR option is specified, the default mount point is
1003 1000 "/\fIpool\fR". The mount point must not exist or must be empty, or else the
1004 1001 root dataset cannot be mounted. This can be overridden with the \fB-m\fR
1005 1002 option.
1006 1003 .sp
1007 1004 By default all supported features are enabled on the new pool unless the
1008 1005 \fB-d\fR option is specified.
1009 1006 .sp
1010 1007 .ne 2
1011 1008 .na
1012 1009 \fB\fB-f\fR\fR
1013 1010 .ad
1014 1011 .sp .6
1015 1012 .RS 4n
1016 1013 Forces use of \fBvdev\fRs, even if they appear in use or specify a conflicting
1017 1014 replication level. Not all devices can be overridden in this manner.
1018 1015 .RE
1019 1016
1020 1017 .sp
1021 1018 .ne 2
1022 1019 .na
1023 1020 \fB\fB-n\fR\fR
1024 1021 .ad
1025 1022 .sp .6
1026 1023 .RS 4n
1027 1024 Displays the configuration that would be used without actually creating the
1028 1025 pool. The actual pool creation can still fail due to insufficient privileges or
1029 1026 device sharing.
1030 1027 .RE
1031 1028
1032 1029 .sp
1033 1030 .ne 2
1034 1031 .na
1035 1032 \fB\fB-d\fR\fR
1036 1033 .ad
1037 1034 .sp .6
1038 1035 .RS 4n
1039 1036 Do not enable any features on the new pool. Individual features can be enabled
1040 1037 by setting their corresponding properties to \fBenabled\fR with the \fB-o\fR
1041 1038 option. See \fBzpool-features\fR(5) for details about feature properties.
1042 1039 .RE
1043 1040
1044 1041 .sp
1045 1042 .ne 2
1046 1043 .na
1047 1044 \fB\fB-o\fR \fIproperty=value\fR [\fB-o\fR \fIproperty=value\fR] ...\fR
1048 1045 .ad
1049 1046 .sp .6
1050 1047 .RS 4n
1051 1048 Sets the given pool properties. See the "Properties" section for a list of
1052 1049 valid properties that can be set.
1053 1050 .RE
1054 1051
1055 1052 .sp
1056 1053 .ne 2
1057 1054 .na
1058 1055 \fB\fB-O\fR \fIfile-system-property=value\fR\fR
1059 1056 .ad
1060 1057 .br
1061 1058 .na
1062 1059 \fB[\fB-O\fR \fIfile-system-property=value\fR] ...\fR
1063 1060 .ad
1064 1061 .sp .6
1065 1062 .RS 4n
1066 1063 Sets the given file system properties in the root file system of the pool. See
1067 1064 the "Properties" section of \fBzfs\fR(1M) for a list of valid properties that
1068 1065 can be set.
1069 1066 .RE
1070 1067
1071 1068 .sp
1072 1069 .ne 2
1073 1070 .na
1074 1071 \fB\fB-R\fR \fIroot\fR\fR
1075 1072 .ad
1076 1073 .sp .6
1077 1074 .RS 4n
1078 1075 Equivalent to "-o cachefile=none,altroot=\fIroot\fR"
1079 1076 .RE
1080 1077
1081 1078 .sp
1082 1079 .ne 2
1083 1080 .na
1084 1081 \fB\fB-m\fR \fImountpoint\fR\fR
1085 1082 .ad
1086 1083 .sp .6
1087 1084 .RS 4n
1088 1085 Sets the mount point for the root dataset. The default mount point is
1089 1086 "/\fIpool\fR" or "\fBaltroot\fR/\fIpool\fR" if \fBaltroot\fR is specified. The
1090 1087 mount point must be an absolute path, "\fBlegacy\fR", or "\fBnone\fR". For more
1091 1088 information on dataset mount points, see \fBzfs\fR(1M).
1092 1089 .RE
1093 1090
1094 1091 .RE
1095 1092
1096 1093 .sp
1097 1094 .ne 2
1098 1095 .na
1099 1096 \fB\fBzpool destroy\fR [\fB-f\fR] \fIpool\fR\fR
1100 1097 .ad
1101 1098 .sp .6
1102 1099 .RS 4n
1103 1100 Destroys the given pool, freeing up any devices for other use. This command
1104 1101 tries to unmount any active datasets before destroying the pool.
1105 1102 .sp
1106 1103 .ne 2
1107 1104 .na
1108 1105 \fB\fB-f\fR\fR
1109 1106 .ad
1110 1107 .RS 6n
1111 1108 Forces any active datasets contained within the pool to be unmounted.
1112 1109 .RE
1113 1110
1114 1111 .RE
1115 1112
1116 1113 .sp
1117 1114 .ne 2
1118 1115 .na
1119 1116 \fB\fBzpool detach\fR \fIpool\fR \fIdevice\fR\fR
1120 1117 .ad
1121 1118 .sp .6
1122 1119 .RS 4n
1123 1120 Detaches \fIdevice\fR from a mirror. The operation is refused if there are no
1124 1121 other valid replicas of the data.
1125 1122 .RE
1126 1123
1127 1124 .sp
1128 1125 .ne 2
1129 1126 .na
1130 1127 \fB\fBzpool export\fR [\fB-f\fR] \fIpool\fR ...\fR
1131 1128 .ad
1132 1129 .sp .6
1133 1130 .RS 4n
1134 1131 Exports the given pools from the system. All devices are marked as exported,
1135 1132 but are still considered in use by other subsystems. The devices can be moved
1136 1133 between systems (even those of different endianness) and imported as long as a
1137 1134 sufficient number of devices are present.
1138 1135 .sp
1139 1136 Before exporting the pool, all datasets within the pool are unmounted. A pool
1140 1137 can not be exported if it has a shared spare that is currently being used.
1141 1138 .sp
1142 1139 For pools to be portable, you must give the \fBzpool\fR command whole disks,
1143 1140 not just slices, so that \fBZFS\fR can label the disks with portable \fBEFI\fR
1144 1141 labels. Otherwise, disk drivers on platforms of different endianness will not
1145 1142 recognize the disks.
1146 1143 .sp
1147 1144 .ne 2
1148 1145 .na
1149 1146 \fB\fB-f\fR\fR
1150 1147 .ad
1151 1148 .RS 6n
1152 1149 Forcefully unmount all datasets, using the "\fBunmount -f\fR" command.
1153 1150 .sp
1154 1151 This command will forcefully export the pool even if it has a shared spare that
1155 1152 is currently being used. This may lead to potential data corruption.
1156 1153 .RE
1157 1154
1158 1155 .RE
1159 1156
1160 1157 .sp
1161 1158 .ne 2
1162 1159 .na
1163 1160 \fB\fBzpool get\fR [\fB-Hp\fR] [\fB-o \fR\fIfield\fR[,...]] "\fIall\fR" | \fIproperty\fR[,...]
1164 1161 \fIpool\fR ...\fR
1165 1162 .ad
1166 1163 .sp .6
1167 1164 .RS 4n
1168 1165 Retrieves the given list of properties (or all properties if "\fBall\fR" is
1169 1166 used) for the specified storage pool(s). These properties are displayed with
1170 1167 the following fields:
1171 1168 .sp
1172 1169 .in +2
1173 1170 .nf
1174 1171 name Name of storage pool
1175 1172 property Property name
1176 1173 value Property value
1177 1174 source Property source, either 'default' or 'local'.
1178 1175 .fi
1179 1176 .in -2
1180 1177 .sp
1181 1178
1182 1179 See the "Properties" section for more information on the available pool
1183 1180 properties.
1184 1181
1185 1182 .sp
1186 1183 .ne 2
1187 1184 .na
1188 1185 \fB\fB-H\fR\fR
1189 1186 .ad
1190 1187 .RS 12n
1191 1188 Scripted mode. Do not display headers, and separate fields by a single tab
1192 1189 instead of arbitrary space.
1193 1190 .RE
1194 1191
1195 1192 .sp
1196 1193 .ne 2
1197 1194 .na
1198 1195 \fB\fB-p\fR\fR
1199 1196 .ad
1200 1197 .RS 6n
1201 1198 Display numbers in parsable (exact) values.
1202 1199 .RE
1203 1200
1204 1201 .sp
1205 1202 .ne 2
1206 1203 .na
1207 1204 \fB\fB-o\fR \fIfield\fR\fR
1208 1205 .ad
1209 1206 .RS 6n
1210 1207 A comma-separated list of columns to display. \fBname,property,value,source\fR
1211 1208 is the default value.
1212 1209 .RE
1213 1210 .RE
1214 1211
1215 1212 .sp
1216 1213 .ne 2
1217 1214 .na
1218 1215 \fB\fBzpool history\fR [\fB-il\fR] [\fIpool\fR] ...\fR
1219 1216 .ad
1220 1217 .sp .6
1221 1218 .RS 4n
1222 1219 Displays the command history of the specified pools or all pools if no pool is
1223 1220 specified.
1224 1221 .sp
1225 1222 .ne 2
1226 1223 .na
1227 1224 \fB\fB-i\fR\fR
1228 1225 .ad
1229 1226 .RS 6n
1230 1227 Displays internally logged \fBZFS\fR events in addition to user initiated
1231 1228 events.
1232 1229 .RE
1233 1230
1234 1231 .sp
1235 1232 .ne 2
1236 1233 .na
1237 1234 \fB\fB-l\fR\fR
1238 1235 .ad
1239 1236 .RS 6n
1240 1237 Displays log records in long format, which in addition to standard format
1241 1238 includes, the user name, the hostname, and the zone in which the operation was
1242 1239 performed.
1243 1240 .RE
1244 1241
1245 1242 .RE
1246 1243
1247 1244 .sp
1248 1245 .ne 2
1249 1246 .na
1250 1247 \fB\fBzpool import\fR [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR]
1251 1248 [\fB-D\fR]\fR
1252 1249 .ad
1253 1250 .sp .6
1254 1251 .RS 4n
1255 1252 Lists pools available to import. If the \fB-d\fR option is not specified, this
1256 1253 command searches for devices in "/dev/dsk". The \fB-d\fR option can be
1257 1254 specified multiple times, and all directories are searched. If the device
1258 1255 appears to be part of an exported pool, this command displays a summary of the
1259 1256 pool with the name of the pool, a numeric identifier, as well as the \fIvdev\fR
1260 1257 layout and current health of the device for each device or file. Destroyed
1261 1258 pools, pools that were previously destroyed with the "\fBzpool destroy\fR"
1262 1259 command, are not listed unless the \fB-D\fR option is specified.
1263 1260 .sp
1264 1261 The numeric identifier is unique, and can be used instead of the pool name when
1265 1262 multiple exported pools of the same name are available.
1266 1263 .sp
1267 1264 .ne 2
1268 1265 .na
1269 1266 \fB\fB-c\fR \fIcachefile\fR\fR
1270 1267 .ad
1271 1268 .RS 16n
1272 1269 Reads configuration from the given \fBcachefile\fR that was created with the
1273 1270 "\fBcachefile\fR" pool property. This \fBcachefile\fR is used instead of
1274 1271 searching for devices.
1275 1272 .RE
1276 1273
1277 1274 .sp
1278 1275 .ne 2
1279 1276 .na
1280 1277 \fB\fB-d\fR \fIdir\fR\fR
1281 1278 .ad
1282 1279 .RS 16n
1283 1280 Searches for devices or files in \fIdir\fR. The \fB-d\fR option can be
1284 1281 specified multiple times.
1285 1282 .RE
1286 1283
1287 1284 .sp
1288 1285 .ne 2
1289 1286 .na
1290 1287 \fB\fB-D\fR\fR
1291 1288 .ad
1292 1289 .RS 16n
1293 1290 Lists destroyed pools only.
1294 1291 .RE
1295 1292
1296 1293 .RE
1297 1294
1298 1295 .sp
1299 1296 .ne 2
1300 1297 .na
1301 1298 \fB\fBzpool import\fR [\fB-o\fR \fImntopts\fR] [ \fB-o\fR
1302 1299 \fIproperty\fR=\fIvalue\fR] ... [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR]
1303 1300 [\fB-D\fR] [\fB-f\fR] [\fB-m\fR] [\fB-R\fR \fIroot\fR] [\fB-F\fR [\fB-n\fR]] \fB-a\fR\fR
1304 1301 .ad
1305 1302 .sp .6
1306 1303 .RS 4n
1307 1304 Imports all pools found in the search directories. Identical to the previous
1308 1305 command, except that all pools with a sufficient number of devices available
1309 1306 are imported. Destroyed pools, pools that were previously destroyed with the
1310 1307 "\fBzpool destroy\fR" command, will not be imported unless the \fB-D\fR option
1311 1308 is specified.
1312 1309 .sp
1313 1310 .ne 2
1314 1311 .na
1315 1312 \fB\fB-o\fR \fImntopts\fR\fR
1316 1313 .ad
1317 1314 .RS 21n
1318 1315 Comma-separated list of mount options to use when mounting datasets within the
1319 1316 pool. See \fBzfs\fR(1M) for a description of dataset properties and mount
1320 1317 options.
1321 1318 .RE
1322 1319
1323 1320 .sp
1324 1321 .ne 2
1325 1322 .na
1326 1323 \fB\fB-o\fR \fIproperty=value\fR\fR
1327 1324 .ad
1328 1325 .RS 21n
1329 1326 Sets the specified property on the imported pool. See the "Properties" section
1330 1327 for more information on the available pool properties.
1331 1328 .RE
1332 1329
1333 1330 .sp
1334 1331 .ne 2
1335 1332 .na
1336 1333 \fB\fB-c\fR \fIcachefile\fR\fR
1337 1334 .ad
1338 1335 .RS 21n
1339 1336 Reads configuration from the given \fBcachefile\fR that was created with the
1340 1337 "\fBcachefile\fR" pool property. This \fBcachefile\fR is used instead of
1341 1338 searching for devices.
1342 1339 .RE
1343 1340
1344 1341 .sp
1345 1342 .ne 2
1346 1343 .na
1347 1344 \fB\fB-d\fR \fIdir\fR\fR
1348 1345 .ad
1349 1346 .RS 21n
1350 1347 Searches for devices or files in \fIdir\fR. The \fB-d\fR option can be
1351 1348 specified multiple times. This option is incompatible with the \fB-c\fR option.
1352 1349 .RE
1353 1350
1354 1351 .sp
1355 1352 .ne 2
1356 1353 .na
1357 1354 \fB\fB-D\fR\fR
1358 1355 .ad
1359 1356 .RS 21n
1360 1357 Imports destroyed pools only. The \fB-f\fR option is also required.
1361 1358 .RE
1362 1359
1363 1360 .sp
1364 1361 .ne 2
1365 1362 .na
1366 1363 \fB\fB-f\fR\fR
1367 1364 .ad
1368 1365 .RS 21n
1369 1366 Forces import, even if the pool appears to be potentially active.
1370 1367 .RE
1371 1368
1372 1369 .sp
1373 1370 .ne 2
1374 1371 .na
1375 1372 \fB\fB-F\fR\fR
1376 1373 .ad
1377 1374 .RS 21n
1378 1375 Recovery mode for a non-importable pool. Attempt to return the pool to an importable
1379 1376 state by discarding the last few transactions. Not all damaged pools can be recovered
1380 1377 by using this option. If successful, the data from the discarded transactions is
1381 1378 irretrievably lost. This option is ignored if the pool is importable or already
1382 1379 imported.
1383 1380 .RE
1384 1381
1385 1382 .sp
1386 1383 .ne 2
1387 1384 .na
1388 1385 \fB\fB-a\fR\fR
1389 1386 .ad
1390 1387 .RS 21n
1391 1388 Searches for and imports all pools found.
1392 1389 .RE
1393 1390
1394 1391 .sp
1395 1392 .ne 2
1396 1393 .na
1397 1394 \fB\fB-m\fR\fR
1398 1395 .ad
1399 1396 .RS 21n
1400 1397 Allows a pool to import when there is a missing log device. Recent transactions
1401 1398 can be lost because the log device will be discarded.
1402 1399 .RE
1403 1400
1404 1401 .sp
1405 1402 .ne 2
1406 1403 .na
1407 1404 \fB\fB-R\fR \fIroot\fR\fR
1408 1405 .ad
1409 1406 .RS 21n
1410 1407 Sets the "\fBcachefile\fR" property to "\fBnone\fR" and the "\fIaltroot\fR"
1411 1408 property to "\fIroot\fR".
1412 1409 .RE
1413 1410
1414 1411 .sp
1415 1412 .ne 2
1416 1413 .na
1417 1414 \fB\fB-N\fR\fR
1418 1415 .ad
1419 1416 .RS 21n
1420 1417 Import the pool without mounting any file systems.
1421 1418 .RE
1422 1419
1423 1420 .sp
1424 1421 .ne 2
1425 1422 .na
1426 1423 \fB\fB-n\fR\fR
1427 1424 .ad
1428 1425 .RS 21n
1429 1426 Used with the \fB-F\fR recovery option. Determines whether a non-importable pool can be made
1430 1427 importable again, but does not actually perform the pool recovery. For more details about pool
1431 1428 recovery mode, see the \fB-F\fR option, above.
1432 1429 .RE
1433 1430
1434 1431 .RE
1435 1432
1436 1433 .sp
1437 1434 .ne 2
1438 1435 .na
1439 1436 \fB\fBzpool import\fR [\fB-o\fR \fImntopts\fR] [ \fB-o\fR
1440 1437 \fIproperty\fR=\fIvalue\fR] ... [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR]
1441 1438 [\fB-D\fR] [\fB-f\fR] [\fB-m\fR] [\fB-R\fR \fIroot\fR] [\fB-F\fR [\fB-n\fR]] \fIpool\fR | \fIid\fR
1442 1439 [\fInewpool\fR]\fR
1443 1440 .ad
1444 1441 .sp .6
1445 1442 .RS 4n
1446 1443 Imports a specific pool. A pool can be identified by its name or the numeric
1447 1444 identifier. If \fInewpool\fR is specified, the pool is imported using the name
1448 1445 \fInewpool\fR. Otherwise, it is imported with the same name as its exported
1449 1446 name.
1450 1447 .sp
1451 1448 If a device is removed from a system without running "\fBzpool export\fR"
1452 1449 first, the device appears as potentially active. It cannot be determined if
1453 1450 this was a failed export, or whether the device is really in use from another
1454 1451 host. To import a pool in this state, the \fB-f\fR option is required.
1455 1452 .sp
1456 1453 .ne 2
1457 1454 .na
1458 1455 \fB\fB-o\fR \fImntopts\fR\fR
1459 1456 .ad
1460 1457 .sp .6
1461 1458 .RS 4n
1462 1459 Comma-separated list of mount options to use when mounting datasets within the
1463 1460 pool. See \fBzfs\fR(1M) for a description of dataset properties and mount
1464 1461 options.
1465 1462 .RE
1466 1463
1467 1464 .sp
1468 1465 .ne 2
1469 1466 .na
1470 1467 \fB\fB-o\fR \fIproperty=value\fR\fR
1471 1468 .ad
1472 1469 .sp .6
1473 1470 .RS 4n
1474 1471 Sets the specified property on the imported pool. See the "Properties" section
1475 1472 for more information on the available pool properties.
1476 1473 .RE
1477 1474
1478 1475 .sp
1479 1476 .ne 2
1480 1477 .na
1481 1478 \fB\fB-c\fR \fIcachefile\fR\fR
1482 1479 .ad
1483 1480 .sp .6
1484 1481 .RS 4n
1485 1482 Reads configuration from the given \fBcachefile\fR that was created with the
1486 1483 "\fBcachefile\fR" pool property. This \fBcachefile\fR is used instead of
1487 1484 searching for devices.
1488 1485 .RE
1489 1486
1490 1487 .sp
1491 1488 .ne 2
1492 1489 .na
1493 1490 \fB\fB-d\fR \fIdir\fR\fR
1494 1491 .ad
1495 1492 .sp .6
1496 1493 .RS 4n
1497 1494 Searches for devices or files in \fIdir\fR. The \fB-d\fR option can be
1498 1495 specified multiple times. This option is incompatible with the \fB-c\fR option.
1499 1496 .RE
1500 1497
1501 1498 .sp
1502 1499 .ne 2
1503 1500 .na
1504 1501 \fB\fB-D\fR\fR
1505 1502 .ad
1506 1503 .sp .6
1507 1504 .RS 4n
1508 1505 Imports destroyed pool. The \fB-f\fR option is also required.
1509 1506 .RE
1510 1507
1511 1508 .sp
1512 1509 .ne 2
1513 1510 .na
1514 1511 \fB\fB-f\fR\fR
1515 1512 .ad
1516 1513 .sp .6
1517 1514 .RS 4n
1518 1515 Forces import, even if the pool appears to be potentially active.
1519 1516 .RE
1520 1517
1521 1518 .sp
1522 1519 .ne 2
1523 1520 .na
1524 1521 \fB\fB-F\fR\fR
1525 1522 .ad
1526 1523 .sp .6
1527 1524 .RS 4n
1528 1525 Recovery mode for a non-importable pool. Attempt to return the pool to an importable
1529 1526 state by discarding the last few transactions. Not all damaged pools can be recovered
1530 1527 by using this option. If successful, the data from the discarded transactions is
1531 1528 irretrievably lost. This option is ignored if the pool is importable or already imported.
1532 1529 .RE
1533 1530
1534 1531 .sp
1535 1532 .ne 2
1536 1533 .na
1537 1534 \fB\fB-R\fR \fIroot\fR\fR
1538 1535 .ad
1539 1536 .sp .6
1540 1537 .RS 4n
1541 1538 Sets the "\fBcachefile\fR" property to "\fBnone\fR" and the "\fIaltroot\fR"
1542 1539 property to "\fIroot\fR".
1543 1540 .RE
1544 1541
1545 1542 .sp
1546 1543 .ne 2
1547 1544 .na
1548 1545 \fB\fB-n\fR\fR
1549 1546 .ad
1550 1547 .sp .6
1551 1548 .RS 4n
1552 1549 Used with the \fB-F\fR recovery option. Determines whether a non-importable pool can be made
1553 1550 importable again, but does not actually perform the pool recovery. For more details about pool
1554 1551 recovery mode, see the \fB-F\fR option, above.
1555 1552 .RE
1556 1553
1557 1554 .sp
1558 1555 .ne 2
1559 1556 .na
1560 1557 \fB\fB-m\fR\fR
1561 1558 .ad
1562 1559 .sp .6
1563 1560 .RS 4n
1564 1561 Allows a pool to import when there is a missing log device. Recent transactions
1565 1562 can be lost because the log device will be discarded.
1566 1563 .RE
1567 1564
1568 1565 .RE
1569 1566
1570 1567 .sp
1571 1568 .ne 2
1572 1569 .na
1573 1570 \fB\fBzpool iostat\fR [\fB-T\fR \fBu\fR | \fBd\fR] [\fB-v\fR] [\fIpool\fR] ...
1574 1571 [\fIinterval\fR[\fIcount\fR]]\fR
1575 1572 .ad
1576 1573 .sp .6
1577 1574 .RS 4n
1578 1575 Displays \fBI/O\fR statistics for the given pools. When given an interval, the
1579 1576 statistics are printed every \fIinterval\fR seconds until \fBCtrl-C\fR is
1580 1577 pressed. If no \fIpools\fR are specified, statistics for every pool in the
1581 1578 system is shown. If \fIcount\fR is specified, the command exits after
1582 1579 \fIcount\fR reports are printed.
1583 1580 .sp
1584 1581 .ne 2
1585 1582 .na
1586 1583 \fB\fB-T\fR \fBu\fR | \fBd\fR\fR
1587 1584 .ad
1588 1585 .RS 12n
1589 1586 Display a time stamp.
1590 1587 .sp
1591 1588 Specify \fBu\fR for a printed representation of the internal representation of
1592 1589 time. See \fBtime\fR(2). Specify \fBd\fR for standard date format. See
1593 1590 \fBdate\fR(1).
1594 1591 .RE
1595 1592
1596 1593 .sp
1597 1594 .ne 2
1598 1595 .na
1599 1596 \fB\fB-v\fR\fR
1600 1597 .ad
1601 1598 .RS 12n
1602 1599 Verbose statistics. Reports usage statistics for individual \fIvdevs\fR within
1603 1600 the pool, in addition to the pool-wide statistics.
1604 1601 .RE
1605 1602
1606 1603 .RE
1607 1604
1608 1605 .sp
1609 1606 .ne 2
1610 1607 .na
1611 1608 \fB\fBzpool list\fR [\fB-T\fR \fBu\fR | \fBd\fR] [\fB-Hv\fR] [\fB-o\fR \fIprops\fR[,...]] [\fIpool\fR] ...
1612 1609 [\fIinterval\fR[\fIcount\fR]]\fR
1613 1610 .ad
1614 1611 .sp .6
1615 1612 .RS 4n
1616 1613 Lists the given pools along with a health status and space usage. If no \fIpools\fR are specified,
1617 1614 all pools in the system are listed. When given an \fIinterval\fR, the information is printed every
1618 1615 \fIinterval\fR seconds until \fBCtrl-C\fR is pressed. If \fIcount\fR is specified, the command exits
1619 1616 after \fIcount\fR reports are printed.
1620 1617 .sp
1621 1618 .ne 2
1622 1619 .na
1623 1620 \fB\fB-T\fR \fBu\fR | \fBd\fR\fR
1624 1621 .ad
1625 1622 .RS 12n
1626 1623 Display a time stamp.
1627 1624 .sp
1628 1625 Specify \fBu\fR for a printed representation of the internal representation of
1629 1626 time. See \fBtime\fR(2). Specify \fBd\fR for standard date format. See
1630 1627 \fBdate\fR(1).
1631 1628 .RE
1632 1629
1633 1630 .sp
1634 1631 .ne 2
1635 1632 .na
1636 1633 \fB\fB-H\fR\fR
1637 1634 .ad
1638 1635 .RS 12n
1639 1636 Scripted mode. Do not display headers, and separate fields by a single tab
1640 1637 instead of arbitrary space.
1641 1638 .RE
1642 1639
1643 1640 .sp
1644 1641 .ne 2
1645 1642 .na
1646 1643 \fB\fB-p\fR\fR
1647 1644 .ad
1648 1645 .RS 12n
1649 1646 Display numbers in parsable (exact) values.
1650 1647 .RE
1651 1648
1652 1649 .sp
1653 1650 .ne 2
1654 1651 .na
1655 1652 \fB\fB-o\fR \fIprops\fR\fR
1656 1653 .ad
1657 1654 .RS 12n
1658 1655 Comma-separated list of properties to display. See the "Properties" section for
1659 1656 a list of valid properties. The default list is "name, size, used, available,
1660 1657 fragmentation, expandsize, capacity, dedupratio, health, altroot"
1661 1658 .RE
1662 1659
1663 1660 .sp
1664 1661 .ne 2
1665 1662 .na
1666 1663 \fB\fB-v\fR\fR
1667 1664 .ad
1668 1665 .RS 12n
1669 1666 Verbose statistics. Reports usage statistics for individual \fIvdevs\fR within
1670 1667 the pool, in addition to the pool-wise statistics.
1671 1668 .RE
1672 1669
1673 1670 .RE
1674 1671
1675 1672 .sp
1676 1673 .ne 2
1677 1674 .na
1678 1675 \fB\fBzpool offline\fR [\fB-t\fR] \fIpool\fR \fIdevice\fR ...\fR
1679 1676 .ad
1680 1677 .sp .6
1681 1678 .RS 4n
1682 1679 Takes the specified physical device offline. While the \fIdevice\fR is offline,
1683 1680 no attempt is made to read or write to the device.
1684 1681 .sp
1685 1682 This command is not applicable to spares or cache devices.
1686 1683 .sp
1687 1684 .ne 2
1688 1685 .na
1689 1686 \fB\fB-t\fR\fR
1690 1687 .ad
1691 1688 .RS 6n
1692 1689 Temporary. Upon reboot, the specified physical device reverts to its previous
1693 1690 state.
1694 1691 .RE
1695 1692
1696 1693 .RE
1697 1694
1698 1695 .sp
1699 1696 .ne 2
1700 1697 .na
1701 1698 \fB\fBzpool online\fR [\fB-e\fR] \fIpool\fR \fIdevice\fR...\fR
1702 1699 .ad
1703 1700 .sp .6
1704 1701 .RS 4n
1705 1702 Brings the specified physical device online.
1706 1703 .sp
1707 1704 This command is not applicable to spares or cache devices.
1708 1705 .sp
1709 1706 .ne 2
1710 1707 .na
1711 1708 \fB\fB-e\fR\fR
1712 1709 .ad
1713 1710 .RS 6n
1714 1711 Expand the device to use all available space. If the device is part of a mirror
1715 1712 or \fBraidz\fR then all devices must be expanded before the new space will
1716 1713 become available to the pool.
1717 1714 .RE
1718 1715
1719 1716 .RE
1720 1717
1721 1718 .sp
1722 1719 .ne 2
1723 1720 .na
1724 1721 \fB\fBzpool reguid\fR \fIpool\fR
1725 1722 .ad
1726 1723 .sp .6
1727 1724 .RS 4n
1728 1725 Generates a new unique identifier for the pool. You must ensure that all
1729 1726 devices in this pool are online and healthy before performing this action.
1730 1727 .RE
1731 1728
1732 1729 .sp
1733 1730 .ne 2
1734 1731 .na
1735 1732 \fB\fBzpool reopen\fR \fIpool\fR
1736 1733 .ad
1737 1734 .sp .6
1738 1735 .RS 4n
1739 1736 Reopen all the vdevs associated with the pool.
1740 1737 .RE
1741 1738
1742 1739 .sp
1743 1740 .ne 2
1744 1741 .na
1745 1742 \fB\fBzpool remove\fR \fIpool\fR \fIdevice\fR ...\fR
1746 1743 .ad
1747 1744 .sp .6
1748 1745 .RS 4n
1749 1746 Removes the specified device from the pool. This command currently only
1750 1747 supports removing hot spares, cache, and log devices. A mirrored log device can
1751 1748 be removed by specifying the top-level mirror for the log. Non-log devices that
1752 1749 are part of a mirrored configuration can be removed using the \fBzpool
1753 1750 detach\fR command. Non-redundant and \fBraidz\fR devices cannot be removed from
1754 1751 a pool.
1755 1752 .RE
1756 1753
1757 1754 .sp
1758 1755 .ne 2
1759 1756 .na
1760 1757 \fB\fBzpool replace\fR [\fB-f\fR] \fIpool\fR \fIold_device\fR
1761 1758 [\fInew_device\fR]\fR
1762 1759 .ad
1763 1760 .sp .6
1764 1761 .RS 4n
1765 1762 Replaces \fIold_device\fR with \fInew_device\fR. This is equivalent to
1766 1763 attaching \fInew_device\fR, waiting for it to resilver, and then detaching
1767 1764 \fIold_device\fR.
1768 1765 .sp
1769 1766 The size of \fInew_device\fR must be greater than or equal to the minimum size
1770 1767 of all the devices in a mirror or \fBraidz\fR configuration.
1771 1768 .sp
1772 1769 \fInew_device\fR is required if the pool is not redundant. If \fInew_device\fR
1773 1770 is not specified, it defaults to \fIold_device\fR. This form of replacement is
1774 1771 useful after an existing disk has failed and has been physically replaced. In
1775 1772 this case, the new disk may have the same \fB/dev/dsk\fR path as the old
1776 1773 device, even though it is actually a different disk. \fBZFS\fR recognizes this.
1777 1774 .sp
1778 1775 .ne 2
1779 1776 .na
1780 1777 \fB\fB-f\fR\fR
1781 1778 .ad
1782 1779 .RS 6n
1783 1780 Forces use of \fInew_device\fR, even if its appears to be in use. Not all
1784 1781 devices can be overridden in this manner.
1785 1782 .RE
1786 1783
1787 1784 .RE
1788 1785
1789 1786 .sp
1790 1787 .ne 2
1791 1788 .na
1792 1789 \fB\fBzpool scrub\fR [\fB-s\fR] \fIpool\fR ...\fR
1793 1790 .ad
1794 1791 .sp .6
1795 1792 .RS 4n
1796 1793 Begins a scrub. The scrub examines all data in the specified pools to verify
1797 1794 that it checksums correctly. For replicated (mirror or \fBraidz\fR) devices,
1798 1795 \fBZFS\fR automatically repairs any damage discovered during the scrub. The
1799 1796 "\fBzpool status\fR" command reports the progress of the scrub and summarizes
1800 1797 the results of the scrub upon completion.
1801 1798 .sp
1802 1799 Scrubbing and resilvering are very similar operations. The difference is that
1803 1800 resilvering only examines data that \fBZFS\fR knows to be out of date (for
1804 1801 example, when attaching a new device to a mirror or replacing an existing
1805 1802 device), whereas scrubbing examines all data to discover silent errors due to
1806 1803 hardware faults or disk failure.
1807 1804 .sp
1808 1805 Because scrubbing and resilvering are \fBI/O\fR-intensive operations, \fBZFS\fR
1809 1806 only allows one at a time. If a scrub is already in progress, the "\fBzpool
1810 1807 scrub\fR" command terminates it and starts a new scrub. If a resilver is in
1811 1808 progress, \fBZFS\fR does not allow a scrub to be started until the resilver
1812 1809 completes.
1813 1810 .sp
1814 1811 .ne 2
1815 1812 .na
1816 1813 \fB\fB-s\fR\fR
1817 1814 .ad
1818 1815 .RS 6n
1819 1816 Stop scrubbing.
1820 1817 .RE
1821 1818
1822 1819 .RE
1823 1820
1824 1821 .sp
1825 1822 .ne 2
1826 1823 .na
1827 1824 \fB\fBzpool set\fR \fIproperty\fR=\fIvalue\fR \fIpool\fR\fR
|
↓ open down ↓ |
937 lines elided |
↑ open up ↑ |
1828 1825 .ad
1829 1826 .sp .6
1830 1827 .RS 4n
1831 1828 Sets the given property on the specified pool. See the "Properties" section for
1832 1829 more information on what properties can be set and acceptable values.
1833 1830 .RE
1834 1831
1835 1832 .sp
1836 1833 .ne 2
1837 1834 .na
1835 +\fBzpool split\fR [\fB-n\fR] [\fB-R\fR \fIaltroot\fR] [\fB-o\fR \fImntopts\fR] [\fB-o\fR \fIproperty=value\fR] \fIpool\fR \fInewpool\fR [\fIdevice\fR ... ]
1836 +.ad
1837 +.sp .6
1838 +.RS 4n
1839 +
1840 +Splits off one disk from each mirrored top-level vdev in a pool and creates a
1841 +new pool from the split-off disks. The original pool must be made up of one
1842 +or more mirrors and must not be in the process of resilvering. The \fBsplit\fR
1843 +subcommand chooses the last device in each mirror vdev unless overridden by a
1844 +device specification on the command line.
1845 +
1846 +When using a \fIdevice\fR argument, \fBsplit\fR includes the specified
1847 +device(s) in a new pool and, should any devices remain unspecified, assigns
1848 +the last device in each mirror vdev to that pool, as it does normally. If you
1849 +are uncertain about the outcome of a \fBsplit\fR command, use the \fI-n\fR
1850 +("dry-run") option to ensure your command will have the effect you intend.
1851 +
1852 +.sp
1853 +.ne 2
1854 +.na
1855 +\fB\fB-n\fR \fR
1856 +.ad
1857 +.sp .6
1858 +.RS 4n
1859 +Displays the configuration that would be created without actually splitting
1860 +the pool. The actual pool split could still fail due to insufficient
1861 +privileges or device status.
1862 +.RE
1863 +
1864 +.sp
1865 +.ne 2
1866 +.na
1867 +\fB\fB-R\fR \fIaltroot\fR \fR
1868 +.ad
1869 +.sp .6
1870 +.RS 4n
1871 +Automatically import the newly created pool after splitting, using the
1872 +specified \fIaltroot\fR parameter for the new pool's alternate root. See the
1873 +\fBaltroot\fR description in the "Properties" section, above.
1874 +.RE
1875 +
1876 +.sp
1877 +.ne 2
1878 +.na
1879 +\fB\fB-o\fR \fImntopts\fR \fR
1880 +.ad
1881 +.sp .6
1882 +.RS 4n
1883 +Comma-separated list of mount options to use when mounting datasets within
1884 +the pool. See \fBzfs\fR(1M) for a description of dataset properties and mount
1885 +options. Valid only in conjunction with the \fB-R\fR option.
1886 +.RE
1887 +
1888 +.sp
1889 +.ne 2
1890 +.na
1891 +\fB\fB-o\fR \fIproperty=value\fR \fR
1892 +.ad
1893 +.sp .6
1894 +.RS 4n
1895 +Sets the specified property on the new pool. See the "Properties" section,
1896 +above, for more information on the available pool properties.
1897 +.RE
1898 +
1899 +.RE
1900 +
1901 +.sp
1902 +.ne 2
1903 +.na
1838 1904 \fBzpool status\fR [\fB-xvD\fR] [\fB-T\fR \fBu\fR | \fBd\fR ] [\fIpool\fR] ... [\fIinterval\fR [\fIcount\fR]]
1839 1905 .ad
1840 1906 .sp .6
1841 1907 .RS 4n
1842 1908 Displays the detailed health status for the given pools. If no \fIpool\fR is
1843 1909 specified, then the status of each pool in the system is displayed. For more
1844 1910 information on pool and device health, see the "Device Failure and Recovery"
1845 1911 section.
1846 1912 .sp
1847 1913 If a scrub or resilver is in progress, this command reports the percentage done
1848 1914 and the estimated time to completion. Both of these are only approximate,
1849 1915 because the amount of data in the pool and the other workloads on the system
1850 1916 can change.
1851 1917 .sp
1852 1918 .ne 2
1853 1919 .na
1854 1920 \fB\fB-x\fR\fR
1855 1921 .ad
1856 1922 .RS 6n
1857 1923 Only display status for pools that are exhibiting errors or are otherwise
1858 1924 unavailable. Warnings about pools not using the latest on-disk format will
1859 1925 not be included.
1860 1926 .RE
1861 1927
1862 1928 .sp
1863 1929 .ne 2
1864 1930 .na
1865 1931 \fB\fB-v\fR\fR
1866 1932 .ad
1867 1933 .RS 6n
1868 1934 Displays verbose data error information, printing out a complete list of all
1869 1935 data errors since the last complete pool scrub.
1870 1936 .RE
1871 1937
1872 1938 .sp
1873 1939 .ne 2
1874 1940 .na
1875 1941 \fB\fB-D\fR\fR
1876 1942 .ad
1877 1943 .RS 6n
1878 1944 Display a histogram of deduplication statistics, showing the allocated (physically present on disk) and
1879 1945 referenced (logically referenced in the pool) block counts and sizes by reference count.
1880 1946 .RE
1881 1947
1882 1948 .sp
1883 1949 .ne 2
1884 1950 .na
1885 1951 \fB\fB-T\fR \fBu\fR | \fBd\fR\fR
1886 1952 .ad
1887 1953 .RS 12n
1888 1954 Display a time stamp.
1889 1955 .sp
1890 1956 Specify \fBu\fR for a printed representation of the internal representation of
1891 1957 time. See \fBtime\fR(2). Specify \fBd\fR for standard date format. See
1892 1958 \fBdate\fR(1).
1893 1959 .RE
1894 1960
1895 1961 .RE
1896 1962
1897 1963 .sp
1898 1964 .ne 2
1899 1965 .na
1900 1966 \fB\fBzpool upgrade\fR\fR
1901 1967 .ad
1902 1968 .sp .6
1903 1969 .RS 4n
1904 1970 Displays pools which do not have all supported features enabled and pools
1905 1971 formatted using a legacy ZFS version number. These pools can continue to be
1906 1972 used, but some features may not be available. Use "\fBzpool upgrade -a\fR"
1907 1973 to enable all features on all pools.
1908 1974 .RE
1909 1975
1910 1976 .sp
1911 1977 .ne 2
1912 1978 .na
1913 1979 \fB\fBzpool upgrade\fR \fB-v\fR\fR
1914 1980 .ad
1915 1981 .sp .6
1916 1982 .RS 4n
1917 1983 Displays legacy \fBZFS\fR versions supported by the current software. See
1918 1984 \fBzpool-features\fR(5) for a description of feature flags features supported
1919 1985 by the current software.
1920 1986 .RE
1921 1987
1922 1988 .sp
1923 1989 .ne 2
1924 1990 .na
1925 1991 \fB\fBzpool upgrade\fR [\fB-V\fR \fIversion\fR] \fB-a\fR | \fIpool\fR ...\fR
1926 1992 .ad
1927 1993 .sp .6
1928 1994 .RS 4n
1929 1995 Enables all supported features on the given pool. Once this is done, the
1930 1996 pool will no longer be accessible on systems that do not support feature
1931 1997 flags. See \fBzpool-features\fR(5) for details on compatibility with systems
1932 1998 that support feature flags, but do not support all features enabled on the
1933 1999 pool.
1934 2000 .sp
1935 2001 .ne 2
1936 2002 .na
1937 2003 \fB\fB-a\fR\fR
1938 2004 .ad
1939 2005 .RS 14n
1940 2006 Enables all supported features on all pools.
1941 2007 .RE
1942 2008
1943 2009 .sp
1944 2010 .ne 2
1945 2011 .na
1946 2012 \fB\fB-V\fR \fIversion\fR\fR
1947 2013 .ad
1948 2014 .RS 14n
1949 2015 Upgrade to the specified legacy version. If the \fB-V\fR flag is specified, no
1950 2016 features will be enabled on the pool. This option can only be used to increase
1951 2017 the version number up to the last supported legacy version number.
1952 2018 .RE
1953 2019
1954 2020 .RE
1955 2021
1956 2022 .SH EXAMPLES
1957 2023 .LP
1958 2024 \fBExample 1 \fRCreating a RAID-Z Storage Pool
1959 2025 .sp
1960 2026 .LP
1961 2027 The following command creates a pool with a single \fBraidz\fR root \fIvdev\fR
1962 2028 that consists of six disks.
1963 2029
1964 2030 .sp
1965 2031 .in +2
1966 2032 .nf
1967 2033 # \fBzpool create tank raidz c0t0d0 c0t1d0 c0t2d0 c0t3d0 c0t4d0 c0t5d0\fR
1968 2034 .fi
1969 2035 .in -2
1970 2036 .sp
1971 2037
1972 2038 .LP
1973 2039 \fBExample 2 \fRCreating a Mirrored Storage Pool
1974 2040 .sp
1975 2041 .LP
1976 2042 The following command creates a pool with two mirrors, where each mirror
1977 2043 contains two disks.
1978 2044
1979 2045 .sp
1980 2046 .in +2
1981 2047 .nf
1982 2048 # \fBzpool create tank mirror c0t0d0 c0t1d0 mirror c0t2d0 c0t3d0\fR
1983 2049 .fi
1984 2050 .in -2
1985 2051 .sp
1986 2052
1987 2053 .LP
1988 2054 \fBExample 3 \fRCreating a ZFS Storage Pool by Using Slices
1989 2055 .sp
1990 2056 .LP
1991 2057 The following command creates an unmirrored pool using two disk slices.
1992 2058
1993 2059 .sp
1994 2060 .in +2
1995 2061 .nf
1996 2062 # \fBzpool create tank /dev/dsk/c0t0d0s1 c0t1d0s4\fR
1997 2063 .fi
1998 2064 .in -2
1999 2065 .sp
2000 2066
2001 2067 .LP
2002 2068 \fBExample 4 \fRCreating a ZFS Storage Pool by Using Files
2003 2069 .sp
2004 2070 .LP
2005 2071 The following command creates an unmirrored pool using files. While not
2006 2072 recommended, a pool based on files can be useful for experimental purposes.
2007 2073
2008 2074 .sp
2009 2075 .in +2
2010 2076 .nf
2011 2077 # \fBzpool create tank /path/to/file/a /path/to/file/b\fR
2012 2078 .fi
2013 2079 .in -2
2014 2080 .sp
2015 2081
2016 2082 .LP
2017 2083 \fBExample 5 \fRAdding a Mirror to a ZFS Storage Pool
2018 2084 .sp
2019 2085 .LP
2020 2086 The following command adds two mirrored disks to the pool "\fItank\fR",
2021 2087 assuming the pool is already made up of two-way mirrors. The additional space
2022 2088 is immediately available to any datasets within the pool.
2023 2089
2024 2090 .sp
2025 2091 .in +2
2026 2092 .nf
2027 2093 # \fBzpool add tank mirror c1t0d0 c1t1d0\fR
2028 2094 .fi
2029 2095 .in -2
2030 2096 .sp
2031 2097
2032 2098 .LP
2033 2099 \fBExample 6 \fRListing Available ZFS Storage Pools
2034 2100 .sp
2035 2101 .LP
2036 2102 The following command lists all available pools on the system. In this case,
2037 2103 the pool \fIzion\fR is faulted due to a missing device.
2038 2104
2039 2105 .sp
2040 2106 .LP
2041 2107 The results from this command are similar to the following:
2042 2108
2043 2109 .sp
2044 2110 .in +2
2045 2111 .nf
2046 2112 # \fBzpool list\fR
2047 2113 NAME SIZE ALLOC FREE FRAG EXPANDSZ CAP DEDUP HEALTH ALTROOT
2048 2114 rpool 19.9G 8.43G 11.4G 33% - 42% 1.00x ONLINE -
2049 2115 tank 61.5G 20.0G 41.5G 48% - 32% 1.00x ONLINE -
2050 2116 zion - - - - - - - FAULTED -
2051 2117 .fi
2052 2118 .in -2
2053 2119 .sp
2054 2120
2055 2121 .LP
2056 2122 \fBExample 7 \fRDestroying a ZFS Storage Pool
2057 2123 .sp
2058 2124 .LP
2059 2125 The following command destroys the pool "\fItank\fR" and any datasets contained
2060 2126 within.
2061 2127
2062 2128 .sp
2063 2129 .in +2
2064 2130 .nf
2065 2131 # \fBzpool destroy -f tank\fR
2066 2132 .fi
2067 2133 .in -2
2068 2134 .sp
2069 2135
2070 2136 .LP
2071 2137 \fBExample 8 \fRExporting a ZFS Storage Pool
2072 2138 .sp
2073 2139 .LP
2074 2140 The following command exports the devices in pool \fItank\fR so that they can
2075 2141 be relocated or later imported.
2076 2142
2077 2143 .sp
2078 2144 .in +2
2079 2145 .nf
2080 2146 # \fBzpool export tank\fR
2081 2147 .fi
2082 2148 .in -2
2083 2149 .sp
2084 2150
2085 2151 .LP
2086 2152 \fBExample 9 \fRImporting a ZFS Storage Pool
2087 2153 .sp
2088 2154 .LP
2089 2155 The following command displays available pools, and then imports the pool
2090 2156 "tank" for use on the system.
2091 2157
2092 2158 .sp
2093 2159 .LP
2094 2160 The results from this command are similar to the following:
2095 2161
2096 2162 .sp
2097 2163 .in +2
2098 2164 .nf
2099 2165 # \fBzpool import\fR
2100 2166 pool: tank
2101 2167 id: 15451357997522795478
2102 2168 state: ONLINE
2103 2169 action: The pool can be imported using its name or numeric identifier.
2104 2170 config:
2105 2171
2106 2172 tank ONLINE
2107 2173 mirror ONLINE
2108 2174 c1t2d0 ONLINE
2109 2175 c1t3d0 ONLINE
2110 2176
2111 2177 # \fBzpool import tank\fR
2112 2178 .fi
2113 2179 .in -2
2114 2180 .sp
2115 2181
2116 2182 .LP
2117 2183 \fBExample 10 \fRUpgrading All ZFS Storage Pools to the Current Version
2118 2184 .sp
2119 2185 .LP
2120 2186 The following command upgrades all ZFS Storage pools to the current version of
2121 2187 the software.
2122 2188
2123 2189 .sp
2124 2190 .in +2
2125 2191 .nf
2126 2192 # \fBzpool upgrade -a\fR
2127 2193 This system is currently running ZFS version 2.
2128 2194 .fi
2129 2195 .in -2
2130 2196 .sp
2131 2197
2132 2198 .LP
2133 2199 \fBExample 11 \fRManaging Hot Spares
2134 2200 .sp
2135 2201 .LP
2136 2202 The following command creates a new pool with an available hot spare:
2137 2203
2138 2204 .sp
2139 2205 .in +2
2140 2206 .nf
2141 2207 # \fBzpool create tank mirror c0t0d0 c0t1d0 spare c0t2d0\fR
2142 2208 .fi
2143 2209 .in -2
2144 2210 .sp
2145 2211
2146 2212 .sp
2147 2213 .LP
2148 2214 If one of the disks were to fail, the pool would be reduced to the degraded
2149 2215 state. The failed device can be replaced using the following command:
2150 2216
2151 2217 .sp
2152 2218 .in +2
2153 2219 .nf
2154 2220 # \fBzpool replace tank c0t0d0 c0t3d0\fR
2155 2221 .fi
2156 2222 .in -2
2157 2223 .sp
2158 2224
2159 2225 .sp
2160 2226 .LP
2161 2227 Once the data has been resilvered, the spare is automatically removed and is
2162 2228 made available should another device fails. The hot spare can be permanently
2163 2229 removed from the pool using the following command:
2164 2230
2165 2231 .sp
2166 2232 .in +2
2167 2233 .nf
2168 2234 # \fBzpool remove tank c0t2d0\fR
2169 2235 .fi
2170 2236 .in -2
2171 2237 .sp
2172 2238
2173 2239 .LP
2174 2240 \fBExample 12 \fRCreating a ZFS Pool with Mirrored Separate Intent Logs
2175 2241 .sp
2176 2242 .LP
2177 2243 The following command creates a ZFS storage pool consisting of two, two-way
2178 2244 mirrors and mirrored log devices:
2179 2245
2180 2246 .sp
2181 2247 .in +2
2182 2248 .nf
2183 2249 # \fBzpool create pool mirror c0d0 c1d0 mirror c2d0 c3d0 log mirror \e
2184 2250 c4d0 c5d0\fR
2185 2251 .fi
2186 2252 .in -2
2187 2253 .sp
2188 2254
2189 2255 .LP
2190 2256 \fBExample 13 \fRAdding Cache Devices to a ZFS Pool
2191 2257 .sp
2192 2258 .LP
2193 2259 The following command adds two disks for use as cache devices to a ZFS storage
2194 2260 pool:
2195 2261
2196 2262 .sp
2197 2263 .in +2
2198 2264 .nf
2199 2265 # \fBzpool add pool cache c2d0 c3d0\fR
2200 2266 .fi
2201 2267 .in -2
2202 2268 .sp
2203 2269
2204 2270 .sp
2205 2271 .LP
2206 2272 Once added, the cache devices gradually fill with content from main memory.
2207 2273 Depending on the size of your cache devices, it could take over an hour for
2208 2274 them to fill. Capacity and reads can be monitored using the \fBiostat\fR option
2209 2275 as follows:
2210 2276
2211 2277 .sp
2212 2278 .in +2
2213 2279 .nf
2214 2280 # \fBzpool iostat -v pool 5\fR
2215 2281 .fi
2216 2282 .in -2
2217 2283 .sp
2218 2284
2219 2285 .LP
2220 2286 \fBExample 14 \fRRemoving a Mirrored Log Device
2221 2287 .sp
2222 2288 .LP
2223 2289 The following command removes the mirrored log device \fBmirror-2\fR.
2224 2290
2225 2291 .sp
2226 2292 .LP
2227 2293 Given this configuration:
2228 2294
2229 2295 .sp
2230 2296 .in +2
2231 2297 .nf
2232 2298 pool: tank
2233 2299 state: ONLINE
2234 2300 scrub: none requested
2235 2301 config:
2236 2302
2237 2303 NAME STATE READ WRITE CKSUM
2238 2304 tank ONLINE 0 0 0
2239 2305 mirror-0 ONLINE 0 0 0
2240 2306 c6t0d0 ONLINE 0 0 0
2241 2307 c6t1d0 ONLINE 0 0 0
2242 2308 mirror-1 ONLINE 0 0 0
2243 2309 c6t2d0 ONLINE 0 0 0
2244 2310 c6t3d0 ONLINE 0 0 0
2245 2311 logs
2246 2312 mirror-2 ONLINE 0 0 0
2247 2313 c4t0d0 ONLINE 0 0 0
2248 2314 c4t1d0 ONLINE 0 0 0
2249 2315 .fi
2250 2316 .in -2
2251 2317 .sp
2252 2318
2253 2319 .sp
2254 2320 .LP
2255 2321 The command to remove the mirrored log \fBmirror-2\fR is:
2256 2322
2257 2323 .sp
2258 2324 .in +2
2259 2325 .nf
2260 2326 # \fBzpool remove tank mirror-2\fR
2261 2327 .fi
2262 2328 .in -2
2263 2329 .sp
2264 2330
2265 2331 .LP
2266 2332 \fBExample 15 \fRDisplaying expanded space on a device
2267 2333 .sp
2268 2334 .LP
2269 2335 The following command dipslays the detailed information for the \fIdata\fR
2270 2336 pool. This pool is comprised of a single \fIraidz\fR vdev where one of its
2271 2337 devices increased its capacity by 10GB. In this example, the pool will not
2272 2338 be able to utilized this extra capacity until all the devices under the
2273 2339 \fIraidz\fR vdev have been expanded.
2274 2340
2275 2341 .sp
2276 2342 .in +2
2277 2343 .nf
2278 2344 # \fBzpool list -v data\fR
|
↓ open down ↓ |
431 lines elided |
↑ open up ↑ |
2279 2345 NAME SIZE ALLOC FREE FRAG EXPANDSZ CAP DEDUP HEALTH ALTROOT
2280 2346 data 23.9G 14.6G 9.30G 48% - 61% 1.00x ONLINE -
2281 2347 raidz1 23.9G 14.6G 9.30G 48% -
2282 2348 c1t1d0 - - - - -
2283 2349 c1t2d0 - - - - 10G
2284 2350 c1t3d0 - - - - -
2285 2351 .fi
2286 2352 .in -2
2287 2353
2288 2354 .SH EXIT STATUS
2289 -.sp
2290 2355 .LP
2291 2356 The following exit values are returned:
2292 2357 .sp
2293 2358 .ne 2
2294 2359 .na
2295 2360 \fB\fB0\fR\fR
2296 2361 .ad
2297 2362 .RS 5n
2298 2363 Successful completion.
2299 2364 .RE
2300 2365
2301 2366 .sp
2302 2367 .ne 2
2303 2368 .na
2304 2369 \fB\fB1\fR\fR
2305 2370 .ad
2306 2371 .RS 5n
2307 2372 An error occurred.
2308 2373 .RE
2309 2374
|
↓ open down ↓ |
10 lines elided |
↑ open up ↑ |
2310 2375 .sp
2311 2376 .ne 2
2312 2377 .na
2313 2378 \fB\fB2\fR\fR
2314 2379 .ad
2315 2380 .RS 5n
2316 2381 Invalid command line options were specified.
2317 2382 .RE
2318 2383
2319 2384 .SH ATTRIBUTES
2320 -.sp
2321 2385 .LP
2322 2386 See \fBattributes\fR(5) for descriptions of the following attributes:
2323 2387 .sp
2324 2388
2325 2389 .sp
2326 2390 .TS
2327 2391 box;
2328 2392 c | c
2329 2393 l | l .
2330 2394 ATTRIBUTE TYPE ATTRIBUTE VALUE
2331 2395 _
2332 2396 Interface Stability Evolving
2333 2397 .TE
2334 2398
2335 2399 .SH SEE ALSO
2336 -.sp
2337 2400 .LP
2338 2401 \fBzfs\fR(1M), \fBzpool-features\fR(5), \fBattributes\fR(5)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX