Add -p switch to "zpool get"
[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 [\fB-p\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 [\fB-p\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 .sp
1057 .ne 2
1058 .mk
1059 .na
1060 \fB\fB-p\fR\fR
1061 .ad
1062 .RS 6n
1063 .rt
1064 Display numbers in parseable (exact) values.
1065 .RE
1066
1067 .RE
1068
1069 .sp
1070 .ne 2
1071 .mk
1072 .na
1073 \fB\fBzpool history\fR [\fB-il\fR] [\fIpool\fR] ...\fR
1074 .ad
1075 .sp .6
1076 .RS 4n
1077 Displays the command history of the specified pools or all pools if no pool is specified.
1078 .sp
1079 .ne 2
1080 .mk
1081 .na
1082 \fB\fB-i\fR\fR
1083 .ad
1084 .RS 6n
1085 .rt  
1086 Displays internally logged \fBZFS\fR events in addition to user initiated events.
1087 .RE
1088
1089 .sp
1090 .ne 2
1091 .mk
1092 .na
1093 \fB\fB-l\fR\fR
1094 .ad
1095 .RS 6n
1096 .rt  
1097 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.
1098 .RE
1099
1100 .RE
1101
1102 .sp
1103 .ne 2
1104 .mk
1105 .na
1106 \fB\fBzpool import\fR [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR] [\fB-D\fR]\fR
1107 .ad
1108 .sp .6
1109 .RS 4n
1110 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. 
1111 .sp
1112 The numeric identifier is unique, and can be used instead of the pool name when multiple exported pools of the same name are available.
1113 .sp
1114 .ne 2
1115 .mk
1116 .na
1117 \fB\fB-c\fR \fIcachefile\fR\fR
1118 .ad
1119 .RS 16n
1120 .rt  
1121 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.
1122 .RE
1123
1124 .sp
1125 .ne 2
1126 .mk
1127 .na
1128 \fB\fB-d\fR \fIdir\fR\fR
1129 .ad
1130 .RS 16n
1131 .rt  
1132 Searches for devices or files in \fIdir\fR. The \fB-d\fR option can be specified multiple times. 
1133 .RE
1134
1135 .sp
1136 .ne 2
1137 .mk
1138 .na
1139 \fB\fB-D\fR\fR
1140 .ad
1141 .RS 16n
1142 .rt  
1143 Lists destroyed pools only.
1144 .RE
1145
1146 .RE
1147
1148 .sp
1149 .ne 2
1150 .mk
1151 .na
1152 \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
1153 .ad
1154 .sp .6
1155 .RS 4n
1156 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.
1157 .sp
1158 .ne 2
1159 .mk
1160 .na
1161 \fB\fB-o\fR \fImntopts\fR\fR
1162 .ad
1163 .RS 21n
1164 .rt  
1165 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.
1166 .RE
1167
1168 .sp
1169 .ne 2
1170 .mk
1171 .na
1172 \fB\fB-o\fR \fIproperty=value\fR\fR
1173 .ad
1174 .RS 21n
1175 .rt  
1176 Sets the specified property on the imported pool. See the "Properties" section for more information on the available pool properties.
1177 .RE
1178
1179 .sp
1180 .ne 2
1181 .mk
1182 .na
1183 \fB\fB-c\fR \fIcachefile\fR\fR
1184 .ad
1185 .RS 21n
1186 .rt  
1187 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.
1188 .RE
1189
1190 .sp
1191 .ne 2
1192 .mk
1193 .na
1194 \fB\fB-d\fR \fIdir\fR\fR
1195 .ad
1196 .RS 21n
1197 .rt  
1198 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.
1199 .RE
1200
1201 .sp
1202 .ne 2
1203 .mk
1204 .na
1205 \fB\fB-D\fR\fR
1206 .ad
1207 .RS 21n
1208 .rt  
1209 Imports destroyed pools only. The \fB-f\fR option is also required.
1210 .RE
1211
1212 .sp
1213 .ne 2
1214 .mk
1215 .na
1216 \fB\fB-f\fR\fR
1217 .ad
1218 .RS 21n
1219 .rt  
1220 Forces import, even if the pool appears to be potentially active.
1221 .RE
1222
1223 .sp
1224 .ne 2
1225 .mk
1226 .na
1227 \fB\fB-F\fR\fR
1228 .ad
1229 .RS 21n
1230 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.
1231 .RE
1232
1233 .sp
1234 .ne 2
1235 .mk
1236 .na
1237 \fB\fB-a\fR\fR
1238 .ad
1239 .RS 21n
1240 .rt  
1241 Searches for and imports all pools found. 
1242 .RE
1243
1244 .sp
1245 .ne 2
1246 .mk
1247 .na
1248 \fB\fB-m\fR\fR
1249 .ad
1250 .RS 21n
1251 Allows a pool to import when there is a missing log device.
1252 .RE
1253
1254 .sp
1255 .ne 2
1256 .mk
1257 .na
1258 \fB\fB-R\fR \fIroot\fR\fR
1259 .ad
1260 .RS 21n
1261 .rt  
1262 Sets the "\fBcachefile\fR" property to "\fBnone\fR" and the "\fIaltroot\fR" property to "\fIroot\fR".
1263 .RE
1264
1265 .sp
1266 .ne 2
1267 .mk
1268 .na
1269 \fB\fB-N\fR\fR
1270 .ad
1271 .RS 21n
1272 Import the pool without mounting any file systems.
1273 .RE
1274
1275 .sp
1276 .ne 2
1277 .mk
1278 .na
1279 \fB\fB-n\fR\fR
1280 .ad
1281 .RS 21n
1282 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.
1283 .RE
1284
1285 .RE
1286
1287 .sp
1288 .ne 2
1289 .mk
1290 .na
1291 \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
1292 .ad
1293 .sp .6
1294 .RS 4n
1295 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.
1296 .sp
1297 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.
1298 .sp
1299 .ne 2
1300 .mk
1301 .na
1302 \fB\fB-o\fR \fImntopts\fR\fR
1303 .ad
1304 .sp .6
1305 .RS 4n
1306 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.
1307 .RE
1308
1309 .sp
1310 .ne 2
1311 .mk
1312 .na
1313 \fB\fB-o\fR \fIproperty=value\fR\fR
1314 .ad
1315 .sp .6
1316 .RS 4n
1317 Sets the specified property on the imported pool. See the "Properties" section for more information on the available pool properties.
1318 .RE
1319
1320 .sp
1321 .ne 2
1322 .mk
1323 .na
1324 \fB\fB-c\fR \fIcachefile\fR\fR
1325 .ad
1326 .sp .6
1327 .RS 4n
1328 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.
1329 .RE
1330
1331 .sp
1332 .ne 2
1333 .mk
1334 .na
1335 \fB\fB-d\fR \fIdir\fR\fR
1336 .ad
1337 .sp .6
1338 .RS 4n
1339 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.
1340 .RE
1341
1342 .sp
1343 .ne 2
1344 .mk
1345 .na
1346 \fB\fB-D\fR\fR
1347 .ad
1348 .sp .6
1349 .RS 4n
1350 Imports destroyed pool. The \fB-f\fR option is also required.
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 Forces import, even if the pool appears to be potentially active.
1362 .RE
1363
1364 .sp
1365 .ne 2
1366 .mk
1367 .na
1368 \fB\fB-F\fR\fR
1369 .ad
1370 .sp .6
1371 .RS 4n
1372 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.
1373 .RE
1374
1375 .sp
1376 .ne 2
1377 .mk
1378 .na
1379 \fB\fB-R\fR \fIroot\fR\fR
1380 .ad
1381 .sp .6
1382 .RS 4n
1383 Sets the "\fBcachefile\fR" property to "\fBnone\fR" and the "\fIaltroot\fR" property to "\fIroot\fR".
1384 .RE
1385
1386 .sp
1387 .ne 2
1388 .mk
1389 .na
1390 \fB\fB-n\fR\fR
1391 .ad
1392 .sp .6
1393 .RS 4n
1394 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.
1395 .RE
1396
1397 .sp
1398 .ne 2
1399 .mk
1400 .na
1401 \fB\fB-m\fR\fR
1402 .ad
1403 .sp .6
1404 .RS 4n
1405 Allows a pool to import when there is a missing log device.
1406 .RE
1407
1408 .RE
1409
1410 .sp
1411 .ne 2
1412 .mk
1413 .na
1414 \fB\fBzpool iostat\fR [\fB-T\fR \fBu\fR | \fBd\fR] [\fB-v\fR] [\fIpool\fR] ... [\fIinterval\fR[\fIcount\fR]]\fR
1415 .ad
1416 .sp .6
1417 .RS 4n
1418 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.
1419 .sp
1420 .ne 2
1421 .mk
1422 .na
1423 \fB\fB-T\fR \fBu\fR | \fBd\fR\fR
1424 .ad
1425 .RS 12n
1426 .rt  
1427 Display a time stamp.
1428 .sp
1429 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).
1430 .RE
1431
1432 .sp
1433 .ne 2
1434 .mk
1435 .na
1436 \fB\fB-v\fR\fR
1437 .ad
1438 .RS 12n
1439 .rt  
1440 Verbose statistics. Reports usage statistics for individual \fIvdevs\fR within the pool, in addition to the pool-wide statistics.
1441 .RE
1442
1443 .RE
1444
1445 .sp
1446 .ne 2
1447 .mk
1448 .na
1449 \fB\fBzpool labelclear\fR [\fB-f\fR] \fIdevice\fR
1450 .ad
1451 .sp .6
1452 .RS 4n
1453 Removes ZFS label information from the specified device. The device must not be part of an active pool configuration.
1454 .sp
1455 .ne 2
1456 .mk
1457 .na
1458 \fB\fB-f\fR\fR
1459 .ad
1460 .RS 12n
1461 .rt
1462 Treat exported or foreign devices as inactive.
1463 .RE
1464
1465 .RE
1466
1467 .sp
1468 .ne 2
1469 .mk
1470 .na
1471 \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
1472 .ad
1473 .sp .6
1474 .RS 4n
1475 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.
1476 .sp
1477 .ne 2
1478 .mk
1479 .na
1480 \fB\fB-H\fR\fR
1481 .ad
1482 .RS 12n
1483 .rt  
1484 Scripted mode. Do not display headers, and separate fields by a single tab instead of arbitrary space.
1485 .RE
1486
1487 .ne 2
1488 .mk
1489 .na
1490 \fB\fB-T\fR \fBu\fR | \fBd\fR\fR
1491 .ad
1492 .RS 12n
1493 .rt  
1494 Display a time stamp.
1495 .sp
1496 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).
1497 .RE
1498
1499 .sp
1500 .ne 2
1501 .mk
1502 .na
1503 \fB\fB-o\fR \fIprops\fR\fR
1504 .ad
1505 .RS 12n
1506 .rt  
1507 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"
1508 .RE
1509
1510 .sp
1511 .ne 2
1512 .mk
1513 .na
1514 \fB\fB-v\fR\fR
1515 .ad
1516 .RS 12n
1517 .rt
1518 Verbose statistics. Reports usage statistics for individual \fIvdevs\fR within the pool, in addition to the pool-wise statistics.
1519 .RE
1520
1521 .RE
1522
1523 .sp
1524 .ne 2
1525 .mk
1526 .na
1527 \fB\fBzpool offline\fR [\fB-t\fR] \fIpool\fR \fIdevice\fR ...\fR
1528 .ad
1529 .sp .6
1530 .RS 4n
1531 Takes the specified physical device offline. While the \fIdevice\fR is offline, no attempt is made to read or write to the device.
1532 .sp
1533 This command is not applicable to spares or cache devices.
1534 .sp
1535 .ne 2
1536 .mk
1537 .na
1538 \fB\fB-t\fR\fR
1539 .ad
1540 .RS 6n
1541 .rt  
1542 Temporary. Upon reboot, the specified physical device reverts to its previous state.
1543 .RE
1544
1545 .RE
1546
1547 .sp
1548 .ne 2
1549 .mk
1550 .na
1551 \fB\fBzpool online\fR [\fB-e\fR] \fIpool\fR \fIdevice\fR...\fR
1552 .ad
1553 .sp .6
1554 .RS 4n
1555 Brings the specified physical device online.
1556 .sp
1557 This command is not applicable to spares or cache devices.
1558 .sp
1559 .ne 2
1560 .mk
1561 .na
1562 \fB\fB-e\fR\fR
1563 .ad
1564 .RS 6n
1565 .rt  
1566 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.
1567 .RE
1568
1569 .RE
1570
1571 .sp
1572 .ne 2
1573 .mk
1574 .na
1575 \fB\fBzpool reguid\fR \fIpool\fR
1576 .ad
1577 .sp .6
1578 .RS 4n
1579 Generates a new unique identifier for the pool. You must ensure that all
1580 devices in this pool are online and healthy before performing this action.
1581 .RE
1582
1583 .sp
1584 .ne 2
1585 .na
1586 \fB\fBzpool reopen\fR \fIpool\fR
1587 .ad
1588 .sp .6
1589 .RS 4n
1590 Reopen all the vdevs associated with the pool.
1591 .RE
1592
1593 .sp
1594 .ne 2
1595 .na
1596 \fB\fBzpool remove\fR \fIpool\fR \fIdevice\fR ...\fR
1597 .ad
1598 .sp .6
1599 .RS 4n
1600 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.
1601 .RE
1602
1603 .sp
1604 .ne 2
1605 .mk
1606 .na
1607 \fB\fBzpool replace\fR [\fB-f\fR] \fIpool\fR \fIold_device\fR [\fInew_device\fR]\fR
1608 .ad
1609 .sp .6
1610 .RS 4n
1611 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.
1612 .sp
1613 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.
1614 .sp
1615 \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.
1616 .sp
1617 .ne 2
1618 .mk
1619 .na
1620 \fB\fB-f\fR\fR
1621 .ad
1622 .RS 6n
1623 .rt  
1624 Forces use of \fInew_device\fR, even if its appears to be in use. Not all devices can be overridden in this manner.
1625 .RE
1626
1627 .RE
1628
1629 .sp
1630 .ne 2
1631 .mk
1632 .na
1633 \fB\fBzpool scrub\fR [\fB-s\fR] \fIpool\fR ...\fR
1634 .ad
1635 .sp .6
1636 .RS 4n
1637 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.
1638 .sp
1639 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.
1640 .sp
1641 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.
1642 .sp
1643 .ne 2
1644 .mk
1645 .na
1646 \fB\fB-s\fR\fR
1647 .ad
1648 .RS 6n
1649 .rt  
1650 Stop scrubbing.
1651 .RE
1652
1653 .RE
1654
1655 .sp
1656 .ne 2
1657 .mk
1658 .na
1659 \fB\fBzpool set\fR \fIproperty\fR=\fIvalue\fR \fIpool\fR\fR
1660 .ad
1661 .sp .6
1662 .RS 4n
1663 Sets the given property on the specified pool. See the "Properties" section for more information on what properties can be set and acceptable values.
1664 .RE
1665
1666 .sp
1667 .ne 2
1668 .mk
1669 .na
1670 \fBzpool split\fR [\fB-n\fR] [\fB-R\fR \fIaltroot\fR] [\fB-o\fR \fIproperty=value\fR] \fIpool\fR \fInewpool\fR
1671 .ad
1672 .sp .6
1673 .RS 4n
1674 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.
1675
1676 .sp
1677 .ne 2
1678 .mk
1679 .na
1680 \fB\fB-n\fR \fR
1681 .ad
1682 .sp .6
1683 .RS 4n
1684 Do dry run, do not actually perform the split. Print out the expected configuration of \fInewpool\fR.
1685 .RE
1686
1687 .sp
1688 .ne 2
1689 .mk
1690 .na
1691 \fB\fB-R\fR \fIaltroot\fR \fR
1692 .ad
1693 .sp .6
1694 .RS 4n
1695 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.
1696 .RE
1697
1698 .sp
1699 .ne 2
1700 .mk
1701 .na
1702 \fB\fB-o\fR \fIproperty=value\fR \fR
1703 .ad
1704 .sp .6
1705 .RS 4n
1706 Sets the specified property for \fInewpool\fR. See the “Properties” section for more information on the available pool properties.
1707 .RE
1708
1709 .RE
1710
1711 .sp
1712 .ne 2
1713 .mk
1714 .na
1715 \fB\fBzpool status\fR [\fB-xv\fR] [\fIpool\fR] ...\fR
1716 .ad
1717 .sp .6
1718 .RS 4n
1719 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.
1720 .sp
1721 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.
1722 .sp
1723 .ne 2
1724 .mk
1725 .na
1726 \fB\fB-x\fR\fR
1727 .ad
1728 .RS 6n
1729 .rt  
1730 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.
1731 .RE
1732
1733 .sp
1734 .ne 2
1735 .mk
1736 .na
1737 \fB\fB-v\fR\fR
1738 .ad
1739 .RS 6n
1740 .rt  
1741 Displays verbose data error information, printing out a complete list of all data errors since the last complete pool scrub.
1742 .RE
1743
1744 .RE
1745
1746 .sp
1747 .ne 2
1748 .mk
1749 .na
1750 \fB\fBzpool upgrade\fR\fR
1751 .ad
1752 .sp .6
1753 .RS 4n
1754 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.
1755 .RE
1756
1757 .sp
1758 .ne 2
1759 .mk
1760 .na
1761 \fB\fBzpool upgrade\fR \fB-v\fR\fR
1762 .ad
1763 .sp .6
1764 .RS 4n
1765 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.
1766 .RE
1767
1768 .sp
1769 .ne 2
1770 .mk
1771 .na
1772 \fB\fBzpool upgrade\fR [\fB-V\fR \fIversion\fR] \fB-a\fR | \fIpool\fR ...\fR
1773 .ad
1774 .sp .6
1775 .RS 4n
1776 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.
1777 .sp
1778 .ne 2
1779 .mk
1780 .na
1781 \fB\fB-a\fR\fR
1782 .ad
1783 .RS 14n
1784 .rt
1785 Enables all supported features on all pools.
1786 .RE
1787
1788 .sp
1789 .ne 2
1790 .mk
1791 .na
1792 \fB\fB-V\fR \fIversion\fR\fR
1793 .ad
1794 .RS 14n
1795 .rt
1796 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.
1797 .RE
1798
1799 .RE
1800
1801 .SH EXAMPLES
1802 .LP
1803 \fBExample 1 \fRCreating a RAID-Z Storage Pool
1804 .sp
1805 .LP
1806 The following command creates a pool with a single \fBraidz\fR root \fIvdev\fR that consists of six disks.
1807
1808 .sp
1809 .in +2
1810 .nf
1811 # \fBzpool create tank raidz sda sdb sdc sdd sde sdf\fR
1812 .fi
1813 .in -2
1814 .sp
1815
1816 .LP
1817 \fBExample 2 \fRCreating a Mirrored Storage Pool
1818 .sp
1819 .LP
1820 The following command creates a pool with two mirrors, where each mirror contains two disks.
1821
1822 .sp
1823 .in +2
1824 .nf
1825 # \fBzpool create tank mirror sda sdb mirror sdc sdd\fR
1826 .fi
1827 .in -2
1828 .sp
1829
1830 .LP
1831 \fBExample 3 \fRCreating a ZFS Storage Pool by Using Partitions
1832 .sp
1833 .LP
1834 The following command creates an unmirrored pool using two disk partitions.
1835
1836 .sp
1837 .in +2
1838 .nf
1839 # \fBzpool create tank sda1 sdb2\fR
1840 .fi
1841 .in -2
1842 .sp
1843
1844 .LP
1845 \fBExample 4 \fRCreating a ZFS Storage Pool by Using Files
1846 .sp
1847 .LP
1848 The following command creates an unmirrored pool using files. While not recommended, a pool based on files can be useful for experimental purposes.
1849
1850 .sp
1851 .in +2
1852 .nf
1853 # \fBzpool create tank /path/to/file/a /path/to/file/b\fR
1854 .fi
1855 .in -2
1856 .sp
1857
1858 .LP
1859 \fBExample 5 \fRAdding a Mirror to a ZFS Storage Pool
1860 .sp
1861 .LP
1862 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.
1863
1864 .sp
1865 .in +2
1866 .nf
1867 # \fBzpool add tank mirror sda sdb\fR
1868 .fi
1869 .in -2
1870 .sp
1871
1872 .LP
1873 \fBExample 6 \fRListing Available ZFS Storage Pools
1874 .sp
1875 .LP
1876 The following command lists all available pools on the system. In this case, the pool \fIzion\fR is faulted due to a missing device.
1877
1878 .sp
1879 .LP
1880 The results from this command are similar to the following:
1881
1882 .sp
1883 .in +2
1884 .nf
1885 # \fBzpool list\fR
1886      NAME    SIZE  ALLOC   FREE  EXPANDSZ    CAP  DEDUP  HEALTH  ALTROOT
1887      rpool  19.9G  8.43G  11.4G         -    42%  1.00x  ONLINE  -
1888      tank   61.5G  20.0G  41.5G         -    32%  1.00x  ONLINE  -
1889      zion       -      -      -         -      -      -  FAULTED -
1890 .fi
1891 .in -2
1892 .sp
1893
1894 .LP
1895 \fBExample 7 \fRDestroying a ZFS Storage Pool
1896 .sp
1897 .LP
1898 The following command destroys the pool \fItank\fR and any datasets contained within.
1899
1900 .sp
1901 .in +2
1902 .nf
1903 # \fBzpool destroy -f tank\fR
1904 .fi
1905 .in -2
1906 .sp
1907
1908 .LP
1909 \fBExample 8 \fRExporting a ZFS Storage Pool
1910 .sp
1911 .LP
1912 The following command exports the devices in pool \fItank\fR so that they can be relocated or later imported.
1913
1914 .sp
1915 .in +2
1916 .nf
1917 # \fBzpool export tank\fR
1918 .fi
1919 .in -2
1920 .sp
1921
1922 .LP
1923 \fBExample 9 \fRImporting a ZFS Storage Pool
1924 .sp
1925 .LP
1926 The following command displays available pools, and then imports the pool \fItank\fR for use on the system.
1927
1928 .sp
1929 .LP
1930 The results from this command are similar to the following:
1931
1932 .sp
1933 .in +2
1934 .nf
1935 # \fBzpool import\fR
1936   pool: tank
1937     id: 15451357997522795478
1938  state: ONLINE
1939 action: The pool can be imported using its name or numeric identifier.
1940 config:
1941
1942         tank        ONLINE
1943           mirror    ONLINE
1944             sda     ONLINE
1945             sdb     ONLINE
1946
1947 # \fBzpool import tank\fR
1948 .fi
1949 .in -2
1950 .sp
1951
1952 .LP
1953 \fBExample 10 \fRUpgrading All ZFS Storage Pools to the Current Version
1954 .sp
1955 .LP
1956 The following command upgrades all ZFS Storage pools to the current version of the software.
1957
1958 .sp
1959 .in +2
1960 .nf
1961 # \fBzpool upgrade -a\fR
1962 This system is currently running ZFS pool version 28.
1963 .fi
1964 .in -2
1965 .sp
1966
1967 .LP
1968 \fBExample 11 \fRManaging Hot Spares
1969 .sp
1970 .LP
1971 The following command creates a new pool with an available hot spare:
1972
1973 .sp
1974 .in +2
1975 .nf
1976 # \fBzpool create tank mirror sda sdb spare sdc\fR
1977 .fi
1978 .in -2
1979 .sp
1980
1981 .sp
1982 .LP
1983 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:
1984
1985 .sp
1986 .in +2
1987 .nf
1988 # \fBzpool replace tank sda sdd\fR
1989 .fi
1990 .in -2
1991 .sp
1992
1993 .sp
1994 .LP
1995 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:
1996
1997 .sp
1998 .in +2
1999 .nf
2000 # \fBzpool remove tank sdc\fR
2001 .fi
2002 .in -2
2003 .sp
2004
2005 .LP
2006 \fBExample 12 \fRCreating a ZFS Pool with Mirrored Separate Intent Logs
2007 .sp
2008 .LP
2009 The following command creates a ZFS storage pool consisting of two, two-way mirrors and mirrored log devices:
2010
2011 .sp
2012 .in +2
2013 .nf
2014 # \fBzpool create pool mirror sda sdb mirror sdc sdd log mirror \e
2015    sde sdf\fR
2016 .fi
2017 .in -2
2018 .sp
2019
2020 .LP
2021 \fBExample 13 \fRAdding Cache Devices to a ZFS Pool
2022 .sp
2023 .LP
2024 The following command adds two disks for use as cache devices to a ZFS storage pool:
2025
2026 .sp
2027 .in +2
2028 .nf
2029 # \fBzpool add pool cache sdc sdd\fR
2030 .fi
2031 .in -2
2032 .sp
2033
2034 .sp
2035 .LP
2036 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: 
2037
2038 .sp
2039 .in +2
2040 .nf
2041 # \fBzpool iostat -v pool 5\fR
2042 .fi
2043 .in -2
2044 .sp
2045
2046 .LP
2047 \fBExample 14 \fRRemoving a Mirrored Log Device
2048 .sp
2049 .LP
2050 The following command removes the mirrored log device \fBmirror-2\fR.
2051
2052 .sp
2053 .LP
2054 Given this configuration:
2055
2056 .sp
2057 .in +2
2058 .nf
2059    pool: tank
2060   state: ONLINE
2061   scrub: none requested
2062 config:
2063
2064          NAME        STATE     READ WRITE CKSUM
2065          tank        ONLINE       0     0     0
2066            mirror-0  ONLINE       0     0     0
2067              sda     ONLINE       0     0     0
2068              sdb     ONLINE       0     0     0
2069            mirror-1  ONLINE       0     0     0
2070              sdc     ONLINE       0     0     0
2071              sdd     ONLINE       0     0     0
2072          logs
2073            mirror-2  ONLINE       0     0     0
2074              sde     ONLINE       0     0     0
2075              sdf     ONLINE       0     0     0
2076 .fi
2077 .in -2
2078 .sp
2079
2080 .sp
2081 .LP
2082 The command to remove the mirrored log \fBmirror-2\fR is:
2083
2084 .sp
2085 .in +2
2086 .nf
2087 # \fBzpool remove tank mirror-2\fR
2088 .fi
2089 .in -2
2090 .sp
2091
2092 .LP
2093 \fBExample 15 \fRDisplaying expanded space on a device
2094 .sp
2095 .LP
2096 The following command dipslays the detailed information for the \fIdata\fR
2097 pool. This pool is comprised of a single \fIraidz\fR vdev where one of its
2098 devices increased its capacity by 1GB. In this example, the pool will not 
2099 be able to utilized this extra capacity until all the devices under the
2100 \fIraidz\fR vdev have been expanded.
2101
2102 .sp
2103 .in +2
2104 .nf
2105 # \fBzpool list -v data\fR
2106    NAME         SIZE  ALLOC   FREE  EXPANDSZ    CAP  DEDUP  HEALTH  ALTROOT
2107    data        17.9G   174K  17.9G         -     0%  1.00x  ONLINE  -
2108      raidz1    17.9G   174K  17.9G         -
2109        c4t2d0      -      -      -        1G
2110        c4t3d0      -      -      -         -
2111        c4t4d0      -      -      -         - 
2112 .fi
2113 .in -2
2114
2115 .SH EXIT STATUS
2116 .sp
2117 .LP
2118 The following exit values are returned:
2119 .sp
2120 .ne 2
2121 .mk
2122 .na
2123 \fB\fB0\fR\fR
2124 .ad
2125 .RS 5n
2126 .rt  
2127 Successful completion. 
2128 .RE
2129
2130 .sp
2131 .ne 2
2132 .mk
2133 .na
2134 \fB\fB1\fR\fR
2135 .ad
2136 .RS 5n
2137 .rt  
2138 An error occurred.
2139 .RE
2140
2141 .sp
2142 .ne 2
2143 .mk
2144 .na
2145 \fB\fB2\fR\fR
2146 .ad
2147 .RS 5n
2148 .rt  
2149 Invalid command line options were specified.
2150 .RE
2151
2152 .SH SEE ALSO
2153 .sp
2154 .LP
2155 \fBzfs\fR(8), \fBzpool-features\fR(5)