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