]> git.proxmox.com Git - mirror_zfs.git/blob - man/man8/zpool.8
Dedup-related documentation additions for zpool and zdb.
[mirror_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 d | u ] [\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 d | u ] [\fB-Hv\fR] [\fB-o\fR \fIproperty\fR[,...]] [\fIpool\fR] ...
103 [\fIinterval\fR[\fIcount\fR]]
104 .fi
105
106 .LP
107 .nf
108 \fBzpool offline\fR [\fB-t\fR] \fIpool\fR \fIdevice\fR ...
109 .fi
110
111 .LP
112 .nf
113 \fBzpool online\fR \fIpool\fR \fIdevice\fR ...
114 .fi
115
116 .LP
117 .nf
118 \fBzpool reguid\fR \fIpool\fR
119 .fi
120
121 .LP
122 .nf
123 \fBzpool reopen\fR \fIpool\fR
124 .fi
125
126 .LP
127 .nf
128 \fBzpool remove\fR \fIpool\fR \fIdevice\fR ...
129 .fi
130
131 .LP
132 .nf
133 \fBzpool replace\fR [\fB-f\fR] \fIpool\fR \fIdevice\fR [\fInew_device\fR]
134 .fi
135
136 .LP
137 .nf
138 \fBzpool scrub\fR [\fB-s\fR] \fIpool\fR ...
139 .fi
140
141 .LP
142 .nf
143 \fBzpool set\fR \fIproperty\fR=\fIvalue\fR \fIpool\fR
144 .fi
145
146 .LP
147 .nf
148 \fBzpool split\fR [\fB-n\fR] [\fB-R\fR \fIaltroot\fR] [\fB-o\fR \fIproperty=value\fR] \fIpool\fR \fInewpool\fR
149 .fi
150
151 .LP
152 .nf
153 \fBzpool status\fR [\fB-xvD\fR] [\fB-T\fR d | u] [\fIpool\fR] ... [\fIinterval\fR [\fIcount\fR]]
154 .fi
155
156 .LP
157 .nf
158 \fBzpool upgrade\fR
159 .fi
160
161 .LP
162 .nf
163 \fBzpool upgrade\fR \fB-v\fR
164 .fi
165
166 .LP
167 .nf
168 \fBzpool upgrade\fR [\fB-V\fR \fIversion\fR] \fB-a\fR | \fIpool\fR ...
169 .fi
170
171 .SH DESCRIPTION
172 .sp
173 .LP
174 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.
175 .sp
176 .LP
177 All datasets within a storage pool share the same space. See \fBzfs\fR(8) for information on managing datasets.
178 .SS "Virtual Devices (\fBvdev\fRs)"
179 .sp
180 .LP
181 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:
182 .sp
183 .ne 2
184 .mk
185 .na
186 \fB\fBdisk\fR\fR
187 .ad
188 .RS 10n
189 .rt
190 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.
191 .RE
192
193 .sp
194 .ne 2
195 .mk
196 .na
197 \fB\fBfile\fR\fR
198 .ad
199 .RS 10n
200 .rt
201 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.
202 .RE
203
204 .sp
205 .ne 2
206 .mk
207 .na
208 \fB\fBmirror\fR\fR
209 .ad
210 .RS 10n
211 .rt
212 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.
213 .RE
214
215 .sp
216 .ne 2
217 .mk
218 .na
219 \fB\fBraidz\fR\fR
220 .ad
221 .br
222 .na
223 \fB\fBraidz1\fR\fR
224 .ad
225 .br
226 .na
227 \fB\fBraidz2\fR\fR
228 .ad
229 .br
230 .na
231 \fB\fBraidz3\fR\fR
232 .ad
233 .RS 10n
234 .rt
235 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.
236 .sp
237 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.
238 .sp
239 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.
240 .RE
241
242 .sp
243 .ne 2
244 .mk
245 .na
246 \fB\fBspare\fR\fR
247 .ad
248 .RS 10n
249 .rt
250 A special pseudo-\fBvdev\fR which keeps track of available hot spares for a pool. For more information, see the "Hot Spares" section.
251 .RE
252
253 .sp
254 .ne 2
255 .mk
256 .na
257 \fB\fBlog\fR\fR
258 .ad
259 .RS 10n
260 .rt
261 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.
262 .RE
263
264 .sp
265 .ne 2
266 .mk
267 .na
268 \fB\fBcache\fR\fR
269 .ad
270 .RS 10n
271 .rt
272 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.
273 .RE
274
275 .sp
276 .LP
277 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.
278 .sp
279 .LP
280 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.
281 .sp
282 .LP
283 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:
284 .sp
285 .in +2
286 .nf
287 # \fBzpool create mypool mirror sda sdb mirror sdc sdd\fR
288 .fi
289 .in -2
290 .sp
291
292 .SS "Device Failure and Recovery"
293 .sp
294 .LP
295 \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.
296 .sp
297 .LP
298 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.
299 .sp
300 .LP
301 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.
302 .sp
303 .LP
304 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:
305 .sp
306 .ne 2
307 .mk
308 .na
309 \fB\fBDEGRADED\fR\fR
310 .ad
311 .RS 12n
312 .rt
313 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.
314 .sp
315 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:
316 .RS +4
317 .TP
318 .ie t \(bu
319 .el o
320 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.
321 .RE
322 .RS +4
323 .TP
324 .ie t \(bu
325 .el o
326 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.
327 .RE
328 .RE
329
330 .sp
331 .ne 2
332 .mk
333 .na
334 \fB\fBFAULTED\fR\fR
335 .ad
336 .RS 12n
337 .rt
338 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.
339 .sp
340 One or more component devices is in the faulted state, and insufficient replicas exist to continue functioning. The underlying conditions are as follows:
341 .RS +4
342 .TP
343 .ie t \(bu
344 .el o
345 The device could be opened, but the contents did not match expected values.
346 .RE
347 .RS +4
348 .TP
349 .ie t \(bu
350 .el o
351 The number of I/O errors exceeds acceptable levels and the device is faulted to prevent further use of the device.
352 .RE
353 .RE
354
355 .sp
356 .ne 2
357 .mk
358 .na
359 \fB\fBOFFLINE\fR\fR
360 .ad
361 .RS 12n
362 .rt
363 The device was explicitly taken offline by the "\fBzpool offline\fR" command.
364 .RE
365
366 .sp
367 .ne 2
368 .mk
369 .na
370 \fB\fBONLINE\fR\fR
371 .ad
372 .RS 12n
373 .rt
374 The device is online and functioning.
375 .RE
376
377 .sp
378 .ne 2
379 .mk
380 .na
381 \fB\fBREMOVED\fR\fR
382 .ad
383 .RS 12n
384 .rt
385 The device was physically removed while the system was running. Device removal detection is hardware-dependent and may not be supported on all platforms.
386 .RE
387
388 .sp
389 .ne 2
390 .mk
391 .na
392 \fB\fBUNAVAIL\fR\fR
393 .ad
394 .RS 12n
395 .rt
396 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.
397 .RE
398
399 .sp
400 .LP
401 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.
402 .SS "Hot Spares"
403 .sp
404 .LP
405 \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,
406 .sp
407 .in +2
408 .nf
409 # zpool create pool mirror sda sdb spare sdc sdd
410 .fi
411 .in -2
412 .sp
413
414 .sp
415 .LP
416 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.
417 .sp
418 .LP
419 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.
420 .sp
421 .LP
422 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.
423 .sp
424 .LP
425 Spares cannot replace log devices.
426 .SS "Intent Log"
427 .sp
428 .LP
429 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:
430 .sp
431 .in +2
432 .nf
433 \fB# zpool create pool sda sdb log sdc\fR
434 .fi
435 .in -2
436 .sp
437
438 .sp
439 .LP
440 Multiple log devices can also be specified, and they can be mirrored. See the EXAMPLES section for an example of mirroring multiple log devices.
441 .sp
442 .LP
443 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.
444 .SS "Cache Devices"
445 .sp
446 .LP
447 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.
448 .sp
449 .LP
450 To create a pool with cache devices, specify a "cache" \fBvdev\fR with any number of devices. For example:
451 .sp
452 .in +2
453 .nf
454 \fB# zpool create pool sda sdb cache sdc sdd\fR
455 .fi
456 .in -2
457 .sp
458
459 .sp
460 .LP
461 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.
462 .sp
463 .LP
464 The content of the cache devices is considered volatile, as is the case with other system caches.
465 .SS "Properties"
466 .sp
467 .LP
468 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:
469 .sp
470 .ne 2
471 .mk
472 .na
473 \fB\fBavailable\fR\fR
474 .ad
475 .RS 20n
476 .rt
477 Amount of storage available within the pool. This property can also be referred to by its shortened column name, "avail".
478 .RE
479
480 .sp
481 .ne 2
482 .mk
483 .na
484 \fB\fBcapacity\fR\fR
485 .ad
486 .RS 20n
487 .rt
488 Percentage of pool space used. This property can also be referred to by its shortened column name, "cap".
489 .RE
490
491 .sp
492 .ne 2
493 .mk
494 .na
495 \fB\fBexpandsize\fR\fR
496 .ad
497 .RS 20n
498 .rt
499 Amount of uninitialized space within the pool or device that can be used to
500 increase the total capacity of the pool. Uninitialized space consists of
501 any space on an EFI labeled vdev which has not been brought online
502 (i.e. zpool online -e). This space occurs when a LUN is dynamically expanded.
503 .RE
504
505 .sp
506 .ne 2
507 .mk
508 .na
509 \fB\fBfree\fR\fR
510 .ad
511 .RS 20n
512 .rt
513 The amount of free space available in the pool.
514 .RE
515
516 .sp
517 .ne 2
518 .mk
519 .na
520 \fB\fBfreeing\fR\fR
521 .ad
522 .RS 20n
523 .rt
524 After a file system or snapshot is destroyed, the space it was using is
525 returned to the pool asynchronously. \fB\fBfreeing\fR\fR is the amount of
526 space remaining to be reclaimed. Over time \fB\fBfreeing\fR\fR will decrease
527 while \fB\fBfree\fR\fR increases.
528 .RE
529
530 .sp
531 .ne 2
532 .mk
533 .na
534 \fB\fBhealth\fR\fR
535 .ad
536 .RS 20n
537 .rt
538 The current health of the pool. Health can be "\fBONLINE\fR", "\fBDEGRADED\fR", "\fBFAULTED\fR", " \fBOFFLINE\fR", "\fBREMOVED\fR", or "\fBUNAVAIL\fR".
539 .RE
540
541 .sp
542 .ne 2
543 .mk
544 .na
545 \fB\fBguid\fR\fR
546 .ad
547 .RS 20n
548 .rt
549 A unique identifier for the pool.
550 .RE
551
552 .sp
553 .ne 2
554 .mk
555 .na
556 \fB\fBsize\fR\fR
557 .ad
558 .RS 20n
559 .rt
560 Total size of the storage pool.
561 .RE
562
563 .sp
564 .ne 2
565 .mk
566 .na
567 \fB\fBunsupported@\fR\fIfeature_guid\fR\fR
568 .ad
569 .RS 20n
570 .rt
571 Information about unsupported features that are enabled on the pool. See
572 \fBzpool-features\fR(5) for details.
573 .RE
574
575 .sp
576 .ne 2
577 .mk
578 .na
579 \fB\fBused\fR\fR
580 .ad
581 .RS 20n
582 .rt
583 Amount of storage space used within the pool.
584 .RE
585
586 .sp
587 .LP
588 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.
589
590 .sp
591 .LP
592 The following property can be set at creation time:
593 .sp
594 .ne 2
595 .mk
596 .na
597 \fB\fBashift\fR\fR
598 .ad
599 .sp .6
600 .RS 4n
601 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).
602 .LP
603 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.
604 .RE
605
606 .sp
607 .LP
608 The following property can be set at creation time and import time:
609 .sp
610 .ne 2
611 .mk
612 .na
613 \fB\fBaltroot\fR\fR
614 .ad
615 .sp .6
616 .RS 4n
617 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.
618 .RE
619
620 .sp
621 .LP
622 The following properties can be set at creation time and import time, and later changed with the \fBzpool set\fR command:
623 .sp
624 .ne 2
625 .mk
626 .na
627 \fB\fBautoexpand\fR=\fBon\fR | \fBoff\fR\fR
628 .ad
629 .sp .6
630 .RS 4n
631 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.
632 .RE
633
634 .sp
635 .ne 2
636 .mk
637 .na
638 \fB\fBautoreplace\fR=\fBon\fR | \fBoff\fR\fR
639 .ad
640 .sp .6
641 .RS 4n
642 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".
643 .RE
644
645 .sp
646 .ne 2
647 .mk
648 .na
649 \fB\fBbootfs\fR=\fIpool\fR/\fIdataset\fR\fR
650 .ad
651 .sp .6
652 .RS 4n
653 Identifies the default bootable dataset for the root pool. This property is expected to be set mainly by the installation and upgrade programs.
654 .RE
655
656 .sp
657 .ne 2
658 .mk
659 .na
660 \fB\fBcachefile\fR=\fIpath\fR | \fBnone\fR\fR
661 .ad
662 .sp .6
663 .RS 4n
664 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.
665 .sp
666 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.
667 .RE
668
669 .sp
670 .ne 2
671 .mk
672 .na
673 \fB\fBcomment\fR=\fB\fItext\fR\fR
674 .ad
675 .sp .6
676 .RS 4n
677 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.
678 .RE
679
680 .sp
681 .ne 2
682 .mk
683 .na
684 \fB\fBdelegation\fR=\fBon\fR | \fBoff\fR\fR
685 .ad
686 .sp .6
687 .RS 4n
688 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.
689 .RE
690
691 .sp
692 .ne 2
693 .mk
694 .na
695 \fB\fBfailmode\fR=\fBwait\fR | \fBcontinue\fR | \fBpanic\fR\fR
696 .ad
697 .sp .6
698 .RS 4n
699 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:
700 .sp
701 .ne 2
702 .mk
703 .na
704 \fB\fBwait\fR\fR
705 .ad
706 .RS 12n
707 .rt
708 Blocks all \fBI/O\fR access until the device connectivity is recovered and the errors are cleared. This is the default behavior.
709 .RE
710
711 .sp
712 .ne 2
713 .mk
714 .na
715 \fB\fBcontinue\fR\fR
716 .ad
717 .RS 12n
718 .rt
719 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.
720 .RE
721
722 .sp
723 .ne 2
724 .mk
725 .na
726 \fB\fBpanic\fR\fR
727 .ad
728 .RS 12n
729 .rt
730 Prints out a message to the console and generates a system crash dump.
731 .RE
732
733 .RE
734
735 .sp
736 .ne 2
737 .na
738 \fB\fBfeature@\fR\fIfeature_name\fR=\fBenabled\fR\fR
739 .ad
740 .RS 4n
741 The value of this property is the current state of \fIfeature_name\fR. The
742 only valid value when setting this property is \fBenabled\fR which moves
743 \fIfeature_name\fR to the enabled state. See \fBzpool-features\fR(5) for
744 details on feature states.
745 .RE
746
747 .sp
748 .ne 2
749 .mk
750 .na
751 \fB\fBlistsnaps\fR=on | off\fR
752 .ad
753 .sp .6
754 .RS 4n
755 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".
756 .RE
757
758 .sp
759 .ne 2
760 .mk
761 .na
762 \fB\fBversion\fR=\fIversion\fR\fR
763 .ad
764 .sp .6
765 .RS 4n
766 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.
767 .RE
768
769 .SS "Subcommands"
770 .sp
771 .LP
772 All subcommands that modify state are logged persistently to the pool in their original form.
773 .sp
774 .LP
775 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:
776 .sp
777 .ne 2
778 .mk
779 .na
780 \fB\fBzpool\fR \fB-?\fR\fR
781 .ad
782 .sp .6
783 .RS 4n
784 Displays a help message.
785 .RE
786
787 .sp
788 .ne 2
789 .mk
790 .na
791 \fB\fBzpool add\fR [\fB-fn\fR] [\fB-o\fR \fIproperty=value\fR] \fIpool\fR \fIvdev\fR ...\fR
792 .ad
793 .sp .6
794 .RS 4n
795 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.
796 .sp
797 .ne 2
798 .mk
799 .na
800 \fB\fB-f\fR\fR
801 .ad
802 .RS 6n
803 .rt
804 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.
805 .RE
806
807 .sp
808 .ne 2
809 .mk
810 .na
811 \fB\fB-n\fR\fR
812 .ad
813 .RS 6n
814 .rt
815 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.
816 .RE
817
818 .sp
819 .ne 2
820 .mk
821 .na
822 \fB\fB-o\fR \fIproperty=value\fR
823 .ad
824 .sp .6
825 .RS 4n
826 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".
827 .RE
828
829 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.
830 .RE
831
832 .sp
833 .ne 2
834 .mk
835 .na
836 \fB\fBzpool attach\fR [\fB-f\fR] [\fB-o\fR \fIproperty=value\fR] \fIpool\fR \fIdevice\fR \fInew_device\fR\fR
837 .ad
838 .sp .6
839 .RS 4n
840 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.
841 .sp
842 .ne 2
843 .mk
844 .na
845 \fB\fB-f\fR\fR
846 .ad
847 .RS 6n
848 .rt
849 Forces use of \fInew_device\fR, even if its appears to be in use. Not all devices can be overridden in this manner.
850 .RE
851
852 .sp
853 .ne 2
854 .mk
855 .na
856 \fB\fB-o\fR \fIproperty=value\fR
857 .ad
858 .sp .6
859 .RS 4n
860 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".
861 .RE
862
863 .RE
864
865 .sp
866 .ne 2
867 .mk
868 .na
869 \fB\fBzpool clear\fR \fIpool\fR [\fIdevice\fR] ...\fR
870 .ad
871 .sp .6
872 .RS 4n
873 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.
874 .RE
875
876 .sp
877 .ne 2
878 .mk
879 .na
880 \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
881 .ad
882 .sp .6
883 .RS 4n
884 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.
885 .sp
886 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.
887 .sp
888 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.
889 .sp
890 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.
891 .sp
892 By default all supported features are enabled on the new pool unless the \fB-d\fR option is specified.
893 .sp
894 .ne 2
895 .mk
896 .na
897 \fB\fB-f\fR\fR
898 .ad
899 .sp .6
900 .RS 4n
901 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.
902 .RE
903
904 .sp
905 .ne 2
906 .mk
907 .na
908 \fB\fB-n\fR\fR
909 .ad
910 .sp .6
911 .RS 4n
912 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.
913 .RE
914
915 .sp
916 .ne 2
917 .mk
918 .na
919 \fB\fB-d\fR\fR
920 .ad
921 .sp .6
922 .RS 4n
923 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.
924 .RE
925
926 .sp
927 .ne 2
928 .na
929 \fB\fB-o\fR \fIproperty=value\fR [\fB-o\fR \fIproperty=value\fR] ...\fR
930 .ad
931 .sp .6
932 .RS 4n
933 Sets the given pool properties. See the "Properties" section for a list of valid properties that can be set.
934 .RE
935
936 .sp
937 .ne 2
938 .mk
939 .na
940 \fB\fB-O\fR \fIfile-system-property=value\fR\fR
941 .ad
942 .br
943 .na
944 \fB[\fB-O\fR \fIfile-system-property=value\fR] ...\fR
945 .ad
946 .sp .6
947 .RS 4n
948 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.
949 .RE
950
951 .sp
952 .ne 2
953 .mk
954 .na
955 \fB\fB-R\fR \fIroot\fR\fR
956 .ad
957 .sp .6
958 .RS 4n
959 Equivalent to "-o cachefile=none,altroot=\fIroot\fR"
960 .RE
961
962 .sp
963 .ne 2
964 .mk
965 .na
966 \fB\fB-m\fR \fImountpoint\fR\fR
967 .ad
968 .sp .6
969 .RS 4n
970 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).
971 .RE
972
973 .RE
974
975 .sp
976 .ne 2
977 .mk
978 .na
979 \fB\fBzpool destroy\fR [\fB-f\fR] \fIpool\fR\fR
980 .ad
981 .sp .6
982 .RS 4n
983 Destroys the given pool, freeing up any devices for other use. This command tries to unmount any active datasets before destroying the pool.
984 .sp
985 .ne 2
986 .mk
987 .na
988 \fB\fB-f\fR\fR
989 .ad
990 .RS 6n
991 .rt
992 Forces any active datasets contained within the pool to be unmounted.
993 .RE
994
995 .RE
996
997 .sp
998 .ne 2
999 .mk
1000 .na
1001 \fB\fBzpool detach\fR \fIpool\fR \fIdevice\fR\fR
1002 .ad
1003 .sp .6
1004 .RS 4n
1005 Detaches \fIdevice\fR from a mirror. The operation is refused if there are no other valid replicas of the data. If \fIdevice\fR may be re-added to the pool later on then consider the "\fBzpool offline\fR" command instead.
1006 .RE
1007
1008 .sp
1009 .ne 2
1010 .mk
1011 .na
1012 \fB\fBzpool export\fR [\fB-f\fR] \fIpool\fR ...\fR
1013 .ad
1014 .sp .6
1015 .RS 4n
1016 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.
1017 .sp
1018 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.
1019 .sp
1020 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.
1021 .sp
1022 .ne 2
1023 .mk
1024 .na
1025 \fB\fB-f\fR\fR
1026 .ad
1027 .RS 6n
1028 .rt
1029 Forcefully unmount all datasets, using the "\fBunmount -f\fR" command.
1030 .sp
1031 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.
1032 .RE
1033
1034 .RE
1035
1036 .sp
1037 .ne 2
1038 .mk
1039 .na
1040 \fB\fBzpool get\fR "\fIall\fR" | \fIproperty\fR[,...] \fIpool\fR ...\fR
1041 .ad
1042 .sp .6
1043 .RS 4n
1044 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:
1045 .sp
1046 .in +2
1047 .nf
1048 name Name of storage pool
1049 property Property name
1050 value Property value
1051 source Property source, either 'default' or 'local'.
1052 .fi
1053 .in -2
1054 .sp
1055
1056 See the "Properties" section for more information on the available pool properties.
1057 .RE
1058
1059 .sp
1060 .ne 2
1061 .mk
1062 .na
1063 \fB\fBzpool history\fR [\fB-il\fR] [\fIpool\fR] ...\fR
1064 .ad
1065 .sp .6
1066 .RS 4n
1067 Displays the command history of the specified pools or all pools if no pool is specified.
1068 .sp
1069 .ne 2
1070 .mk
1071 .na
1072 \fB\fB-i\fR\fR
1073 .ad
1074 .RS 6n
1075 .rt
1076 Displays internally logged \fBZFS\fR events in addition to user initiated events.
1077 .RE
1078
1079 .sp
1080 .ne 2
1081 .mk
1082 .na
1083 \fB\fB-l\fR\fR
1084 .ad
1085 .RS 6n
1086 .rt
1087 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.
1088 .RE
1089
1090 .RE
1091
1092 .sp
1093 .ne 2
1094 .mk
1095 .na
1096 \fB\fBzpool import\fR [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR] [\fB-D\fR]\fR
1097 .ad
1098 .sp .6
1099 .RS 4n
1100 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.
1101 .sp
1102 The numeric identifier is unique, and can be used instead of the pool name when multiple exported pools of the same name are available.
1103 .sp
1104 .ne 2
1105 .mk
1106 .na
1107 \fB\fB-c\fR \fIcachefile\fR\fR
1108 .ad
1109 .RS 16n
1110 .rt
1111 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.
1112 .RE
1113
1114 .sp
1115 .ne 2
1116 .mk
1117 .na
1118 \fB\fB-d\fR \fIdir\fR\fR
1119 .ad
1120 .RS 16n
1121 .rt
1122 Searches for devices or files in \fIdir\fR. The \fB-d\fR option can be specified multiple times.
1123 .RE
1124
1125 .sp
1126 .ne 2
1127 .mk
1128 .na
1129 \fB\fB-D\fR\fR
1130 .ad
1131 .RS 16n
1132 .rt
1133 Lists destroyed pools only.
1134 .RE
1135
1136 .RE
1137
1138 .sp
1139 .ne 2
1140 .mk
1141 .na
1142 \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
1143 .ad
1144 .sp .6
1145 .RS 4n
1146 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.
1147 .sp
1148 .ne 2
1149 .mk
1150 .na
1151 \fB\fB-o\fR \fImntopts\fR\fR
1152 .ad
1153 .RS 21n
1154 .rt
1155 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.
1156 .RE
1157
1158 .sp
1159 .ne 2
1160 .mk
1161 .na
1162 \fB\fB-o\fR \fIproperty=value\fR\fR
1163 .ad
1164 .RS 21n
1165 .rt
1166 Sets the specified property on the imported pool. See the "Properties" section for more information on the available pool properties.
1167 .RE
1168
1169 .sp
1170 .ne 2
1171 .mk
1172 .na
1173 \fB\fB-c\fR \fIcachefile\fR\fR
1174 .ad
1175 .RS 21n
1176 .rt
1177 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.
1178 .RE
1179
1180 .sp
1181 .ne 2
1182 .mk
1183 .na
1184 \fB\fB-d\fR \fIdir\fR\fR
1185 .ad
1186 .RS 21n
1187 .rt
1188 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.
1189 .RE
1190
1191 .sp
1192 .ne 2
1193 .mk
1194 .na
1195 \fB\fB-D\fR\fR
1196 .ad
1197 .RS 21n
1198 .rt
1199 Imports destroyed pools only. The \fB-f\fR option is also required.
1200 .RE
1201
1202 .sp
1203 .ne 2
1204 .mk
1205 .na
1206 \fB\fB-f\fR\fR
1207 .ad
1208 .RS 21n
1209 .rt
1210 Forces import, even if the pool appears to be potentially active.
1211 .RE
1212
1213 .sp
1214 .ne 2
1215 .mk
1216 .na
1217 \fB\fB-F\fR\fR
1218 .ad
1219 .RS 21n
1220 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.
1221 .RE
1222
1223 .sp
1224 .ne 2
1225 .mk
1226 .na
1227 \fB\fB-a\fR\fR
1228 .ad
1229 .RS 21n
1230 .rt
1231 Searches for and imports all pools found.
1232 .RE
1233
1234 .sp
1235 .ne 2
1236 .mk
1237 .na
1238 \fB\fB-m\fR\fR
1239 .ad
1240 .RS 21n
1241 Allows a pool to import when there is a missing log device.
1242 .RE
1243
1244 .sp
1245 .ne 2
1246 .mk
1247 .na
1248 \fB\fB-R\fR \fIroot\fR\fR
1249 .ad
1250 .RS 21n
1251 .rt
1252 Sets the "\fBcachefile\fR" property to "\fBnone\fR" and the "\fIaltroot\fR" property to "\fIroot\fR".
1253 .RE
1254
1255 .sp
1256 .ne 2
1257 .mk
1258 .na
1259 \fB\fB-N\fR\fR
1260 .ad
1261 .RS 21n
1262 Import the pool without mounting any file systems.
1263 .RE
1264
1265 .sp
1266 .ne 2
1267 .mk
1268 .na
1269 \fB\fB-n\fR\fR
1270 .ad
1271 .RS 21n
1272 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.
1273 .RE
1274
1275 .RE
1276
1277 .sp
1278 .ne 2
1279 .mk
1280 .na
1281 \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
1282 .ad
1283 .sp .6
1284 .RS 4n
1285 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.
1286 .sp
1287 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.
1288 .sp
1289 .ne 2
1290 .mk
1291 .na
1292 \fB\fB-o\fR \fImntopts\fR\fR
1293 .ad
1294 .sp .6
1295 .RS 4n
1296 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.
1297 .RE
1298
1299 .sp
1300 .ne 2
1301 .mk
1302 .na
1303 \fB\fB-o\fR \fIproperty=value\fR\fR
1304 .ad
1305 .sp .6
1306 .RS 4n
1307 Sets the specified property on the imported pool. See the "Properties" section for more information on the available pool properties.
1308 .RE
1309
1310 .sp
1311 .ne 2
1312 .mk
1313 .na
1314 \fB\fB-c\fR \fIcachefile\fR\fR
1315 .ad
1316 .sp .6
1317 .RS 4n
1318 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.
1319 .RE
1320
1321 .sp
1322 .ne 2
1323 .mk
1324 .na
1325 \fB\fB-d\fR \fIdir\fR\fR
1326 .ad
1327 .sp .6
1328 .RS 4n
1329 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.
1330 .RE
1331
1332 .sp
1333 .ne 2
1334 .mk
1335 .na
1336 \fB\fB-D\fR\fR
1337 .ad
1338 .sp .6
1339 .RS 4n
1340 Imports destroyed pool. The \fB-f\fR option is also required.
1341 .RE
1342
1343 .sp
1344 .ne 2
1345 .mk
1346 .na
1347 \fB\fB-f\fR\fR
1348 .ad
1349 .sp .6
1350 .RS 4n
1351 Forces import, even if the pool appears to be potentially active.
1352 .RE
1353
1354 .sp
1355 .ne 2
1356 .mk
1357 .na
1358 \fB\fB-F\fR\fR
1359 .ad
1360 .sp .6
1361 .RS 4n
1362 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.
1363 .RE
1364
1365 .sp
1366 .ne 2
1367 .mk
1368 .na
1369 \fB\fB-R\fR \fIroot\fR\fR
1370 .ad
1371 .sp .6
1372 .RS 4n
1373 Sets the "\fBcachefile\fR" property to "\fBnone\fR" and the "\fIaltroot\fR" property to "\fIroot\fR".
1374 .RE
1375
1376 .sp
1377 .ne 2
1378 .mk
1379 .na
1380 \fB\fB-n\fR\fR
1381 .ad
1382 .sp .6
1383 .RS 4n
1384 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.
1385 .RE
1386
1387 .sp
1388 .ne 2
1389 .mk
1390 .na
1391 \fB\fB-m\fR\fR
1392 .ad
1393 .sp .6
1394 .RS 4n
1395 Allows a pool to import when there is a missing log device.
1396 .RE
1397
1398 .RE
1399
1400 .sp
1401 .ne 2
1402 .mk
1403 .na
1404 \fB\fBzpool iostat\fR [\fB-T\fR \fBd\fR | \fBu\fR] [\fB-v\fR] [\fIpool\fR] ... [\fIinterval\fR[\fIcount\fR]]\fR
1405 .ad
1406 .sp .6
1407 .RS 4n
1408 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.
1409 .sp
1410 .ne 2
1411 .mk
1412 .na
1413 \fB\fB-T\fR \fBu\fR | \fBd\fR\fR
1414 .ad
1415 .RS 12n
1416 .rt
1417 Display a time stamp.
1418 .sp
1419 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).
1420 .RE
1421
1422 .sp
1423 .ne 2
1424 .mk
1425 .na
1426 \fB\fB-v\fR\fR
1427 .ad
1428 .RS 12n
1429 .rt
1430 Verbose statistics. Reports usage statistics for individual \fIvdevs\fR within the pool, in addition to the pool-wide statistics.
1431 .RE
1432
1433 .RE
1434
1435 .sp
1436 .ne 2
1437 .mk
1438 .na
1439 \fB\fBzpool labelclear\fR [\fB-f\fR] \fIdevice\fR
1440 .ad
1441 .sp .6
1442 .RS 4n
1443 Removes ZFS label information from the specified device. The device must not be part of an active pool configuration.
1444 .sp
1445 .ne 2
1446 .mk
1447 .na
1448 \fB\fB-f\fR\fR
1449 .ad
1450 .RS 12n
1451 .rt
1452 Treat exported or foreign devices as inactive.
1453 .RE
1454
1455 .RE
1456
1457 .sp
1458 .ne 2
1459 .mk
1460 .na
1461 \fB\fBzpool list\fR [\fB-T\fR \fBd\fR | \fBu\fR] [\fB-Hv\fR] [\fB-o\fR \fIprops\fR[,...]] [\fIpool\fR] ... [\fIinterval\fR[\fIcount\fR]]\fR
1462 .ad
1463 .sp .6
1464 .RS 4n
1465 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.
1466 .sp
1467 .ne 2
1468 .mk
1469 .na
1470 \fB\fB-H\fR\fR
1471 .ad
1472 .RS 12n
1473 .rt
1474 Scripted mode. Do not display headers, and separate fields by a single tab instead of arbitrary space.
1475 .RE
1476
1477 .ne 2
1478 .mk
1479 .na
1480 \fB\fB-T\fR \fBd\fR | \fBu\fR\fR
1481 .ad
1482 .RS 12n
1483 .rt
1484 Display a time stamp.
1485 .sp
1486 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).
1487 .RE
1488
1489 .sp
1490 .ne 2
1491 .mk
1492 .na
1493 \fB\fB-o\fR \fIprops\fR\fR
1494 .ad
1495 .RS 12n
1496 .rt
1497 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"
1498 .RE
1499
1500 .sp
1501 .ne 2
1502 .mk
1503 .na
1504 \fB\fB-v\fR\fR
1505 .ad
1506 .RS 12n
1507 .rt
1508 Verbose statistics. Reports usage statistics for individual \fIvdevs\fR within the pool, in addition to the pool-wise statistics.
1509 .RE
1510
1511 .RE
1512
1513 .sp
1514 .ne 2
1515 .mk
1516 .na
1517 \fB\fBzpool offline\fR [\fB-t\fR] \fIpool\fR \fIdevice\fR ...\fR
1518 .ad
1519 .sp .6
1520 .RS 4n
1521 Takes the specified physical device offline. While the \fIdevice\fR is offline, no attempt is made to read or write to the device.
1522 .sp
1523 This command is not applicable to spares or cache devices.
1524 .sp
1525 .ne 2
1526 .mk
1527 .na
1528 \fB\fB-t\fR\fR
1529 .ad
1530 .RS 6n
1531 .rt
1532 Temporary. Upon reboot, the specified physical device reverts to its previous state.
1533 .RE
1534
1535 .RE
1536
1537 .sp
1538 .ne 2
1539 .mk
1540 .na
1541 \fB\fBzpool online\fR [\fB-e\fR] \fIpool\fR \fIdevice\fR...\fR
1542 .ad
1543 .sp .6
1544 .RS 4n
1545 Brings the specified physical device online.
1546 .sp
1547 This command is not applicable to spares or cache devices.
1548 .sp
1549 .ne 2
1550 .mk
1551 .na
1552 \fB\fB-e\fR\fR
1553 .ad
1554 .RS 6n
1555 .rt
1556 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.
1557 .RE
1558
1559 .RE
1560
1561 .sp
1562 .ne 2
1563 .mk
1564 .na
1565 \fB\fBzpool reguid\fR \fIpool\fR
1566 .ad
1567 .sp .6
1568 .RS 4n
1569 Generates a new unique identifier for the pool. You must ensure that all
1570 devices in this pool are online and healthy before performing this action.
1571 .RE
1572
1573 .sp
1574 .ne 2
1575 .na
1576 \fB\fBzpool reopen\fR \fIpool\fR
1577 .ad
1578 .sp .6
1579 .RS 4n
1580 Reopen all the vdevs associated with the pool.
1581 .RE
1582
1583 .sp
1584 .ne 2
1585 .na
1586 \fB\fBzpool remove\fR \fIpool\fR \fIdevice\fR ...\fR
1587 .ad
1588 .sp .6
1589 .RS 4n
1590 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.
1591 .RE
1592
1593 .sp
1594 .ne 2
1595 .mk
1596 .na
1597 \fB\fBzpool replace\fR [\fB-f\fR] \fIpool\fR \fIold_device\fR [\fInew_device\fR]\fR
1598 .ad
1599 .sp .6
1600 .RS 4n
1601 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.
1602 .sp
1603 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.
1604 .sp
1605 \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.
1606 .sp
1607 .ne 2
1608 .mk
1609 .na
1610 \fB\fB-f\fR\fR
1611 .ad
1612 .RS 6n
1613 .rt
1614 Forces use of \fInew_device\fR, even if its appears to be in use. Not all devices can be overridden in this manner.
1615 .RE
1616
1617 .RE
1618
1619 .sp
1620 .ne 2
1621 .mk
1622 .na
1623 \fB\fBzpool scrub\fR [\fB-s\fR] \fIpool\fR ...\fR
1624 .ad
1625 .sp .6
1626 .RS 4n
1627 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.
1628 .sp
1629 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.
1630 .sp
1631 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.
1632 .sp
1633 .ne 2
1634 .mk
1635 .na
1636 \fB\fB-s\fR\fR
1637 .ad
1638 .RS 6n
1639 .rt
1640 Stop scrubbing.
1641 .RE
1642
1643 .RE
1644
1645 .sp
1646 .ne 2
1647 .mk
1648 .na
1649 \fB\fBzpool set\fR \fIproperty\fR=\fIvalue\fR \fIpool\fR\fR
1650 .ad
1651 .sp .6
1652 .RS 4n
1653 Sets the given property on the specified pool. See the "Properties" section for more information on what properties can be set and acceptable values.
1654 .RE
1655
1656 .sp
1657 .ne 2
1658 .mk
1659 .na
1660 \fBzpool split\fR [\fB-n\fR] [\fB-R\fR \fIaltroot\fR] [\fB-o\fR \fIproperty=value\fR] \fIpool\fR \fInewpool\fR
1661 .ad
1662 .sp .6
1663 .RS 4n
1664 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.
1665
1666 .sp
1667 .ne 2
1668 .mk
1669 .na
1670 \fB\fB-n\fR \fR
1671 .ad
1672 .sp .6
1673 .RS 4n
1674 Do dry run, do not actually perform the split. Print out the expected configuration of \fInewpool\fR.
1675 .RE
1676
1677 .sp
1678 .ne 2
1679 .mk
1680 .na
1681 \fB\fB-R\fR \fIaltroot\fR \fR
1682 .ad
1683 .sp .6
1684 .RS 4n
1685 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.
1686 .RE
1687
1688 .sp
1689 .ne 2
1690 .mk
1691 .na
1692 \fB\fB-o\fR \fIproperty=value\fR \fR
1693 .ad
1694 .sp .6
1695 .RS 4n
1696 Sets the specified property for \fInewpool\fR. See the “Properties” section for more information on the available pool properties.
1697 .RE
1698
1699 .RE
1700
1701 .sp
1702 .ne 2
1703 .mk
1704 .na
1705 \fBzpool status\fR [\fB-xvD\fR] [\fB-T\fR d | u] [\fIpool\fR] ... [\fIinterval\fR [\fIcount\fR]]
1706 .ad
1707 .sp .6
1708 .RS 4n
1709 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.
1710 .sp
1711 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.
1712 .sp
1713 .ne 2
1714 .mk
1715 .na
1716 \fB\fB-x\fR\fR
1717 .ad
1718 .RS 12n
1719 .rt
1720 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.
1721 .RE
1722
1723 .sp
1724 .ne 2
1725 .mk
1726 .na
1727 \fB\fB-v\fR\fR
1728 .ad
1729 .RS 12n
1730 .rt
1731 Displays verbose data error information, printing out a complete list of all data errors since the last complete pool scrub.
1732 .RE
1733
1734 .sp
1735 .ne 2
1736 .mk
1737 .na
1738 \fB\fB-D\fR\fR
1739 .ad
1740 .RS 12n
1741 .rt
1742 Display a histogram of deduplication statistics, showing the allocated (physically present on disk) and
1743 referenced (logically referenced in the pool) block counts and sizes by reference count.
1744 .RE
1745
1746 .sp
1747 .ne 2
1748 .mk
1749 .na
1750 \fB\fB-T\fR \fBd\fR | \fBu\fR\fR
1751 .ad
1752 .RS 12n
1753 .rt
1754 Display a time stamp.
1755 .sp
1756 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).
1757 .RE
1758
1759 .sp
1760 .ne 2
1761 .mk
1762 .na
1763 \fB\fBzpool upgrade\fR\fR
1764 .ad
1765 .sp .6
1766 .RS 4n
1767 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.
1768 .RE
1769
1770 .sp
1771 .ne 2
1772 .mk
1773 .na
1774 \fB\fBzpool upgrade\fR \fB-v\fR\fR
1775 .ad
1776 .sp .6
1777 .RS 4n
1778 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.
1779 .RE
1780
1781 .sp
1782 .ne 2
1783 .mk
1784 .na
1785 \fB\fBzpool upgrade\fR [\fB-V\fR \fIversion\fR] \fB-a\fR | \fIpool\fR ...\fR
1786 .ad
1787 .sp .6
1788 .RS 4n
1789 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.
1790 .sp
1791 .ne 2
1792 .mk
1793 .na
1794 \fB\fB-a\fR\fR
1795 .ad
1796 .RS 14n
1797 .rt
1798 Enables all supported features on all pools.
1799 .RE
1800
1801 .sp
1802 .ne 2
1803 .mk
1804 .na
1805 \fB\fB-V\fR \fIversion\fR\fR
1806 .ad
1807 .RS 14n
1808 .rt
1809 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.
1810 .RE
1811
1812 .RE
1813
1814 .SH EXAMPLES
1815 .LP
1816 \fBExample 1 \fRCreating a RAID-Z Storage Pool
1817 .sp
1818 .LP
1819 The following command creates a pool with a single \fBraidz\fR root \fIvdev\fR that consists of six disks.
1820
1821 .sp
1822 .in +2
1823 .nf
1824 # \fBzpool create tank raidz sda sdb sdc sdd sde sdf\fR
1825 .fi
1826 .in -2
1827 .sp
1828
1829 .LP
1830 \fBExample 2 \fRCreating a Mirrored Storage Pool
1831 .sp
1832 .LP
1833 The following command creates a pool with two mirrors, where each mirror contains two disks.
1834
1835 .sp
1836 .in +2
1837 .nf
1838 # \fBzpool create tank mirror sda sdb mirror sdc sdd\fR
1839 .fi
1840 .in -2
1841 .sp
1842
1843 .LP
1844 \fBExample 3 \fRCreating a ZFS Storage Pool by Using Partitions
1845 .sp
1846 .LP
1847 The following command creates an unmirrored pool using two disk partitions.
1848
1849 .sp
1850 .in +2
1851 .nf
1852 # \fBzpool create tank sda1 sdb2\fR
1853 .fi
1854 .in -2
1855 .sp
1856
1857 .LP
1858 \fBExample 4 \fRCreating a ZFS Storage Pool by Using Files
1859 .sp
1860 .LP
1861 The following command creates an unmirrored pool using files. While not recommended, a pool based on files can be useful for experimental purposes.
1862
1863 .sp
1864 .in +2
1865 .nf
1866 # \fBzpool create tank /path/to/file/a /path/to/file/b\fR
1867 .fi
1868 .in -2
1869 .sp
1870
1871 .LP
1872 \fBExample 5 \fRAdding a Mirror to a ZFS Storage Pool
1873 .sp
1874 .LP
1875 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.
1876
1877 .sp
1878 .in +2
1879 .nf
1880 # \fBzpool add tank mirror sda sdb\fR
1881 .fi
1882 .in -2
1883 .sp
1884
1885 .LP
1886 \fBExample 6 \fRListing Available ZFS Storage Pools
1887 .sp
1888 .LP
1889 The following command lists all available pools on the system. In this case, the pool \fIzion\fR is faulted due to a missing device.
1890
1891 .sp
1892 .LP
1893 The results from this command are similar to the following:
1894
1895 .sp
1896 .in +2
1897 .nf
1898 # \fBzpool list\fR
1899 NAME SIZE ALLOC FREE EXPANDSZ CAP DEDUP HEALTH ALTROOT
1900 rpool 19.9G 8.43G 11.4G - 42% 1.00x ONLINE -
1901 tank 61.5G 20.0G 41.5G - 32% 1.00x ONLINE -
1902 zion - - - - - - FAULTED -
1903 .fi
1904 .in -2
1905 .sp
1906
1907 .LP
1908 \fBExample 7 \fRDestroying a ZFS Storage Pool
1909 .sp
1910 .LP
1911 The following command destroys the pool \fItank\fR and any datasets contained within.
1912
1913 .sp
1914 .in +2
1915 .nf
1916 # \fBzpool destroy -f tank\fR
1917 .fi
1918 .in -2
1919 .sp
1920
1921 .LP
1922 \fBExample 8 \fRExporting a ZFS Storage Pool
1923 .sp
1924 .LP
1925 The following command exports the devices in pool \fItank\fR so that they can be relocated or later imported.
1926
1927 .sp
1928 .in +2
1929 .nf
1930 # \fBzpool export tank\fR
1931 .fi
1932 .in -2
1933 .sp
1934
1935 .LP
1936 \fBExample 9 \fRImporting a ZFS Storage Pool
1937 .sp
1938 .LP
1939 The following command displays available pools, and then imports the pool \fItank\fR for use on the system.
1940
1941 .sp
1942 .LP
1943 The results from this command are similar to the following:
1944
1945 .sp
1946 .in +2
1947 .nf
1948 # \fBzpool import\fR
1949 pool: tank
1950 id: 15451357997522795478
1951 state: ONLINE
1952 action: The pool can be imported using its name or numeric identifier.
1953 config:
1954
1955 tank ONLINE
1956 mirror ONLINE
1957 sda ONLINE
1958 sdb ONLINE
1959
1960 # \fBzpool import tank\fR
1961 .fi
1962 .in -2
1963 .sp
1964
1965 .LP
1966 \fBExample 10 \fRUpgrading All ZFS Storage Pools to the Current Version
1967 .sp
1968 .LP
1969 The following command upgrades all ZFS Storage pools to the current version of the software.
1970
1971 .sp
1972 .in +2
1973 .nf
1974 # \fBzpool upgrade -a\fR
1975 This system is currently running ZFS pool version 28.
1976 .fi
1977 .in -2
1978 .sp
1979
1980 .LP
1981 \fBExample 11 \fRManaging Hot Spares
1982 .sp
1983 .LP
1984 The following command creates a new pool with an available hot spare:
1985
1986 .sp
1987 .in +2
1988 .nf
1989 # \fBzpool create tank mirror sda sdb spare sdc\fR
1990 .fi
1991 .in -2
1992 .sp
1993
1994 .sp
1995 .LP
1996 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:
1997
1998 .sp
1999 .in +2
2000 .nf
2001 # \fBzpool replace tank sda sdd\fR
2002 .fi
2003 .in -2
2004 .sp
2005
2006 .sp
2007 .LP
2008 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:
2009
2010 .sp
2011 .in +2
2012 .nf
2013 # \fBzpool remove tank sdc\fR
2014 .fi
2015 .in -2
2016 .sp
2017
2018 .LP
2019 \fBExample 12 \fRCreating a ZFS Pool with Mirrored Separate Intent Logs
2020 .sp
2021 .LP
2022 The following command creates a ZFS storage pool consisting of two, two-way mirrors and mirrored log devices:
2023
2024 .sp
2025 .in +2
2026 .nf
2027 # \fBzpool create pool mirror sda sdb mirror sdc sdd log mirror \e
2028 sde sdf\fR
2029 .fi
2030 .in -2
2031 .sp
2032
2033 .LP
2034 \fBExample 13 \fRAdding Cache Devices to a ZFS Pool
2035 .sp
2036 .LP
2037 The following command adds two disks for use as cache devices to a ZFS storage pool:
2038
2039 .sp
2040 .in +2
2041 .nf
2042 # \fBzpool add pool cache sdc sdd\fR
2043 .fi
2044 .in -2
2045 .sp
2046
2047 .sp
2048 .LP
2049 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:
2050
2051 .sp
2052 .in +2
2053 .nf
2054 # \fBzpool iostat -v pool 5\fR
2055 .fi
2056 .in -2
2057 .sp
2058
2059 .LP
2060 \fBExample 14 \fRRemoving a Mirrored Log Device
2061 .sp
2062 .LP
2063 The following command removes the mirrored log device \fBmirror-2\fR.
2064
2065 .sp
2066 .LP
2067 Given this configuration:
2068
2069 .sp
2070 .in +2
2071 .nf
2072 pool: tank
2073 state: ONLINE
2074 scrub: none requested
2075 config:
2076
2077 NAME STATE READ WRITE CKSUM
2078 tank ONLINE 0 0 0
2079 mirror-0 ONLINE 0 0 0
2080 sda ONLINE 0 0 0
2081 sdb ONLINE 0 0 0
2082 mirror-1 ONLINE 0 0 0
2083 sdc ONLINE 0 0 0
2084 sdd ONLINE 0 0 0
2085 logs
2086 mirror-2 ONLINE 0 0 0
2087 sde ONLINE 0 0 0
2088 sdf ONLINE 0 0 0
2089 .fi
2090 .in -2
2091 .sp
2092
2093 .sp
2094 .LP
2095 The command to remove the mirrored log \fBmirror-2\fR is:
2096
2097 .sp
2098 .in +2
2099 .nf
2100 # \fBzpool remove tank mirror-2\fR
2101 .fi
2102 .in -2
2103 .sp
2104
2105 .LP
2106 \fBExample 15 \fRDisplaying expanded space on a device
2107 .sp
2108 .LP
2109 The following command dipslays the detailed information for the \fIdata\fR
2110 pool. This pool is comprised of a single \fIraidz\fR vdev where one of its
2111 devices increased its capacity by 1GB. In this example, the pool will not
2112 be able to utilized this extra capacity until all the devices under the
2113 \fIraidz\fR vdev have been expanded.
2114
2115 .sp
2116 .in +2
2117 .nf
2118 # \fBzpool list -v data\fR
2119 NAME SIZE ALLOC FREE EXPANDSZ CAP DEDUP HEALTH ALTROOT
2120 data 17.9G 174K 17.9G - 0% 1.00x ONLINE -
2121 raidz1 17.9G 174K 17.9G -
2122 c4t2d0 - - - 1G
2123 c4t3d0 - - - -
2124 c4t4d0 - - - -
2125 .fi
2126 .in -2
2127
2128 .SH EXIT STATUS
2129 .sp
2130 .LP
2131 The following exit values are returned:
2132 .sp
2133 .ne 2
2134 .mk
2135 .na
2136 \fB\fB0\fR\fR
2137 .ad
2138 .RS 5n
2139 .rt
2140 Successful completion.
2141 .RE
2142
2143 .sp
2144 .ne 2
2145 .mk
2146 .na
2147 \fB\fB1\fR\fR
2148 .ad
2149 .RS 5n
2150 .rt
2151 An error occurred.
2152 .RE
2153
2154 .sp
2155 .ne 2
2156 .mk
2157 .na
2158 \fB\fB2\fR\fR
2159 .ad
2160 .RS 5n
2161 .rt
2162 Invalid command line options were specified.
2163 .RE
2164
2165 .SH SEE ALSO
2166 .sp
2167 .LP
2168 \fBzfs\fR(8), \fBzpool-features\fR(5)