]> git.proxmox.com Git - mirror_zfs.git/blob - man/man8/zpool.8
zfs.8 & zpool.8: Linux/Solaris differences
[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) 2013 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 "May 11, 2016" "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-fgLnP\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] [\fB-t\fR \fItname\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 events\fR [\fB-vHfc\fR] [\fIpool\fR] ...
61 .fi
62
63 .LP
64 .nf
65 \fBzpool export\fR [\fB-a\fR] [\fB-f\fR] \fIpool\fR ...
66 .fi
67
68 .LP
69 .nf
70 \fBzpool get\fR [\fB-Hp\fR] [\fB-o \fR\fIfield\fR[,...]] "\fIall\fR" | \fIproperty\fR[,...] \fIpool\fR ...
71 .fi
72
73 .LP
74 .nf
75 \fBzpool history\fR [\fB-il\fR] [\fIpool\fR] ...
76 .fi
77
78 .LP
79 .nf
80 \fBzpool import\fR [\fB-d\fR \fIdir\fR] [\fB-D\fR]
81 .fi
82
83 .LP
84 .nf
85 \fBzpool import\fR [\fB-o \fImntopts\fR\fR] [\fB-o\fR \fIproperty=value\fR] ... [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR]
86 [\fB-D\fR] [\fB-f\fR] [\fB-m\fR] [\fB-N\fR] [\fB-R\fR \fIroot\fR] [\fB-F\fR [\fB-n\fR] [\fB-X\fR\] [\fB-T\fR\]] [\fB-s\fR] \fB-a\fR
87 .fi
88
89 .LP
90 .nf
91 \fBzpool import\fR [\fB-o \fImntopts\fR\fR] [\fB-o\fR \fIproperty=value\fR] ... [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR]
92 [\fB-D\fR] [\fB-f\fR] [\fB-m\fR] [\fB-R\fR \fIroot\fR] [\fB-F\fR [\fB-n\fR] [\fB-X\fR] [\fB-T\fR\]] [\fB-t\fR]] [\fB-s\fR]
93 \fIpool\fR | \fIid\fR [\fInewpool\fR]
94 .fi
95
96 .LP
97 .nf
98 \fB\fBzpool iostat\fR [\fB-T\fR \fBd\fR | \fBu\fR] [\fB-ghHLpPvy\fR] [\fB-G\fR|[\fB-lq\fR]]
99 [[\fIpool\fR ...]|[\fIpool vdev\fR ...]|[\fIvdev\fR ...]] [\fIinterval\fR[\fIcount\fR]]\fR
100
101 .fi
102
103 .LP
104 .nf
105 \fBzpool labelclear\fR [\fB-f\fR] \fIdevice\fR
106 .fi
107
108 .LP
109 .nf
110 \fBzpool list\fR [\fB-T\fR d | u ] [\fB-HgLpPv\fR] [\fB-o\fR \fIproperty\fR[,...]] [\fIpool\fR] ...
111 [\fIinterval\fR[\fIcount\fR]]
112 .fi
113
114 .LP
115 .nf
116 \fBzpool offline\fR [\fB-t\fR] \fIpool\fR \fIdevice\fR ...
117 .fi
118
119 .LP
120 .nf
121 \fBzpool online\fR \fIpool\fR \fIdevice\fR ...
122 .fi
123
124 .LP
125 .nf
126 \fBzpool reguid\fR \fIpool\fR
127 .fi
128
129 .LP
130 .nf
131 \fBzpool reopen\fR \fIpool\fR
132 .fi
133
134 .LP
135 .nf
136 \fBzpool remove\fR \fIpool\fR \fIdevice\fR ...
137 .fi
138
139 .LP
140 .nf
141 \fBzpool replace\fR [\fB-f\fR] [\fB-o\fR \fIproperty=value\fR] \fIpool\fR \fIdevice\fR [\fInew_device\fR]
142 .fi
143
144 .LP
145 .nf
146 \fBzpool scrub\fR [\fB-s\fR] \fIpool\fR ...
147 .fi
148
149 .LP
150 .nf
151 \fBzpool set\fR \fIproperty\fR=\fIvalue\fR \fIpool\fR
152 .fi
153
154 .LP
155 .nf
156 \fBzpool split\fR [\fB-gLnP\fR] [\fB-R\fR \fIaltroot\fR] [\fB-o\fR \fIproperty=value\fR] \fIpool\fR \fInewpool\fR [\fIdevice\fR ...]
157 .fi
158
159 .LP
160 .nf
161 \fBzpool status\fR [\fB-gLPvxD\fR] [\fB-T\fR d | u] [\fIpool\fR] ... [\fIinterval\fR [\fIcount\fR]]
162 .fi
163
164 .LP
165 .nf
166 \fBzpool upgrade\fR
167 .fi
168
169 .LP
170 .nf
171 \fBzpool upgrade\fR \fB-v\fR
172 .fi
173
174 .LP
175 .nf
176 \fBzpool upgrade\fR [\fB-V\fR \fIversion\fR] \fB-a\fR | \fIpool\fR ...
177 .fi
178
179 .SH DESCRIPTION
180 .sp
181 .LP
182 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.
183 .sp
184 .LP
185 All datasets within a storage pool share the same space. See \fBzfs\fR(8) for information on managing datasets.
186 .SS "Virtual Devices (\fBvdev\fRs)"
187 .sp
188 .LP
189 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:
190 .sp
191 .ne 2
192 .mk
193 .na
194 \fB\fBdisk\fR\fR
195 .ad
196 .RS 10n
197 .rt
198 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.
199 .RE
200
201 .sp
202 .ne 2
203 .mk
204 .na
205 \fB\fBfile\fR\fR
206 .ad
207 .RS 10n
208 .rt
209 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.
210 .RE
211
212 .sp
213 .ne 2
214 .mk
215 .na
216 \fB\fBmirror\fR\fR
217 .ad
218 .RS 10n
219 .rt
220 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.
221 .RE
222
223 .sp
224 .ne 2
225 .mk
226 .na
227 \fB\fBraidz\fR\fR
228 .ad
229 .br
230 .na
231 \fB\fBraidz1\fR\fR
232 .ad
233 .br
234 .na
235 \fB\fBraidz2\fR\fR
236 .ad
237 .br
238 .na
239 \fB\fBraidz3\fR\fR
240 .ad
241 .RS 10n
242 .rt
243 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.
244 .sp
245 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.
246 .sp
247 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.
248 .RE
249
250 .sp
251 .ne 2
252 .mk
253 .na
254 \fB\fBspare\fR\fR
255 .ad
256 .RS 10n
257 .rt
258 A special pseudo-\fBvdev\fR which keeps track of available hot spares for a pool. For more information, see the "Hot Spares" section.
259 .RE
260
261 .sp
262 .ne 2
263 .mk
264 .na
265 \fB\fBlog\fR\fR
266 .ad
267 .RS 10n
268 .rt
269 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.
270 .RE
271
272 .sp
273 .ne 2
274 .mk
275 .na
276 \fB\fBcache\fR\fR
277 .ad
278 .RS 10n
279 .rt
280 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.
281 .RE
282
283 .sp
284 .LP
285 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.
286 .sp
287 .LP
288 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.
289 .sp
290 .LP
291 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:
292 .sp
293 .in +2
294 .nf
295 # \fBzpool create mypool mirror sda sdb mirror sdc sdd\fR
296 .fi
297 .in -2
298 .sp
299
300 .SS "Device Failure and Recovery"
301 .sp
302 .LP
303 \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.
304 .sp
305 .LP
306 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.
307 .sp
308 .LP
309 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.
310 .sp
311 .LP
312 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:
313 .sp
314 .ne 2
315 .mk
316 .na
317 \fB\fBDEGRADED\fR\fR
318 .ad
319 .RS 12n
320 .rt
321 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.
322 .sp
323 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:
324 .RS +4
325 .TP
326 .ie t \(bu
327 .el o
328 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.
329 .RE
330 .RS +4
331 .TP
332 .ie t \(bu
333 .el o
334 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.
335 .RE
336 .RE
337
338 .sp
339 .ne 2
340 .mk
341 .na
342 \fB\fBFAULTED\fR\fR
343 .ad
344 .RS 12n
345 .rt
346 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.
347 .sp
348 One or more component devices is in the faulted state, and insufficient replicas exist to continue functioning. The underlying conditions are as follows:
349 .RS +4
350 .TP
351 .ie t \(bu
352 .el o
353 The device could be opened, but the contents did not match expected values.
354 .RE
355 .RS +4
356 .TP
357 .ie t \(bu
358 .el o
359 The number of I/O errors exceeds acceptable levels and the device is faulted to prevent further use of the device.
360 .RE
361 .RE
362
363 .sp
364 .ne 2
365 .mk
366 .na
367 \fB\fBOFFLINE\fR\fR
368 .ad
369 .RS 12n
370 .rt
371 The device was explicitly taken offline by the "\fBzpool offline\fR" command.
372 .RE
373
374 .sp
375 .ne 2
376 .mk
377 .na
378 \fB\fBONLINE\fR\fR
379 .ad
380 .RS 12n
381 .rt
382 The device is online and functioning.
383 .RE
384
385 .sp
386 .ne 2
387 .mk
388 .na
389 \fB\fBREMOVED\fR\fR
390 .ad
391 .RS 12n
392 .rt
393 The device was physically removed while the system was running. Device removal detection is hardware-dependent and may not be supported on all platforms.
394 .RE
395
396 .sp
397 .ne 2
398 .mk
399 .na
400 \fB\fBUNAVAIL\fR\fR
401 .ad
402 .RS 12n
403 .rt
404 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.
405 .RE
406
407 .sp
408 .LP
409 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.
410 .SS "Hot Spares"
411 .sp
412 .LP
413 \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,
414 .sp
415 .in +2
416 .nf
417 # zpool create pool mirror sda sdb spare sdc sdd
418 .fi
419 .in -2
420 .sp
421
422 .sp
423 .LP
424 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.
425 .sp
426 .LP
427 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.
428 .sp
429 .LP
430 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.
431 .sp
432 .LP
433 Spares cannot replace log devices.
434 .SS "Intent Log"
435 .sp
436 .LP
437 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:
438 .sp
439 .in +2
440 .nf
441 \fB# zpool create pool sda sdb log sdc\fR
442 .fi
443 .in -2
444 .sp
445
446 .sp
447 .LP
448 Multiple log devices can also be specified, and they can be mirrored. See the EXAMPLES section for an example of mirroring multiple log devices.
449 .sp
450 .LP
451 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.
452 .SS "Cache Devices"
453 .sp
454 .LP
455 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.
456 .sp
457 .LP
458 To create a pool with cache devices, specify a "cache" \fBvdev\fR with any number of devices. For example:
459 .sp
460 .in +2
461 .nf
462 \fB# zpool create pool sda sdb cache sdc sdd\fR
463 .fi
464 .in -2
465 .sp
466
467 .sp
468 .LP
469 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.
470 .sp
471 .LP
472 The content of the cache devices is considered volatile, as is the case with other system caches.
473 .SS "Properties"
474 .sp
475 .LP
476 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:
477 .sp
478 .ne 2
479 .mk
480 .na
481 \fB\fBavailable\fR\fR
482 .ad
483 .RS 20n
484 .rt
485 Amount of storage available within the pool. This property can also be referred to by its shortened column name, "avail".
486 .RE
487
488 .sp
489 .ne 2
490 .mk
491 .na
492 \fB\fBcapacity\fR\fR
493 .ad
494 .RS 20n
495 .rt
496 Percentage of pool space used. This property can also be referred to by its shortened column name, "cap".
497 .RE
498
499 .sp
500 .ne 2
501 .mk
502 .na
503 \fB\fBexpandsize\fR\fR
504 .ad
505 .RS 20n
506 .rt
507 Amount of uninitialized space within the pool or device that can be used to
508 increase the total capacity of the pool. Uninitialized space consists of
509 any space on an EFI labeled vdev which has not been brought online
510 (i.e. zpool online -e). This space occurs when a LUN is dynamically expanded.
511 .RE
512
513 .sp
514 .ne 2
515 .mk
516 .na
517 \fB\fBfragmentation\fR\fR
518 .ad
519 .RS 20n
520 .rt
521 The amount of fragmentation in the pool.
522 .RE
523
524 .sp
525 .ne 2
526 .mk
527 .na
528 \fB\fBfree\fR\fR
529 .ad
530 .RS 20n
531 .rt
532 The amount of free space available in the pool.
533 .RE
534
535 .sp
536 .ne 2
537 .mk
538 .na
539 \fB\fBfreeing\fR\fR
540 .ad
541 .RS 20n
542 .rt
543 After a file system or snapshot is destroyed, the space it was using is
544 returned to the pool asynchronously. \fB\fBfreeing\fR\fR is the amount of
545 space remaining to be reclaimed. Over time \fB\fBfreeing\fR\fR will decrease
546 while \fB\fBfree\fR\fR increases.
547 .RE
548
549 .sp
550 .ne 2
551 .mk
552 .na
553 \fB\fBhealth\fR\fR
554 .ad
555 .RS 20n
556 .rt
557 The current health of the pool. Health can be "\fBONLINE\fR", "\fBDEGRADED\fR", "\fBFAULTED\fR", " \fBOFFLINE\fR", "\fBREMOVED\fR", or "\fBUNAVAIL\fR".
558 .RE
559
560 .sp
561 .ne 2
562 .mk
563 .na
564 \fB\fBguid\fR\fR
565 .ad
566 .RS 20n
567 .rt
568 A unique identifier for the pool.
569 .RE
570
571 .sp
572 .ne 2
573 .mk
574 .na
575 \fB\fBsize\fR\fR
576 .ad
577 .RS 20n
578 .rt
579 Total size of the storage pool.
580 .RE
581
582 .sp
583 .ne 2
584 .mk
585 .na
586 \fB\fBunsupported@\fR\fIfeature_guid\fR\fR
587 .ad
588 .RS 20n
589 .rt
590 .sp
591 Information about unsupported features that are enabled on the pool. See
592 \fBzpool-features\fR(5) for details.
593 .RE
594
595 .sp
596 .ne 2
597 .mk
598 .na
599 \fB\fBused\fR\fR
600 .ad
601 .RS 20n
602 .rt
603 Amount of storage space used within the pool.
604 .RE
605
606 .sp
607 .LP
608 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.
609
610 .sp
611 .LP
612 The following property can be set at creation time:
613 .sp
614 .ne 2
615 .mk
616 .na
617 \fB\fBashift\fR\fR
618 .ad
619 .sp .6
620 .RS 4n
621 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).
622 .LP
623 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.
624 .LP
625 Keep in mind is that the \fBashift\fR is \fIvdev\fR specific and is not a \fIpool\fR global. This means that when adding new vdevs to an existing pool you may need to specify the \fBashift\fR.
626 .RE
627
628 .sp
629 .LP
630 The following property can be set at creation time and import time:
631 .sp
632 .ne 2
633 .mk
634 .na
635 \fB\fBaltroot\fR\fR
636 .ad
637 .sp .6
638 .RS 4n
639 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.
640 .RE
641
642 .sp
643 .LP
644 The following property can only be set at import time:
645 .sp
646 .ne 2
647 .mk
648 .na
649 \fB\fBreadonly\fR=\fBon\fR | \fBoff\fR\fR
650 .ad
651 .sp .6
652 .RS 4n
653 If set to \fBon\fR, the pool will be imported in read-only mode: Synchronous data in the intent log will not be accessible, properties of the pool can not be changed and datasets of the pool can only be mounted read-only. The \fBreadonly\fR property of its datasets will be implicitly set to \fBon\fR.
654
655 It can also be specified by its column name of \fBrdonly\fR.
656
657 To write to a read-only pool, a export and import of the pool is required.
658 .RE
659
660 .sp
661 .LP
662 The following properties can be set at creation time and import time, and later changed with the \fBzpool set\fR command:
663 .sp
664 .ne 2
665 .mk
666 .na
667 \fB\fBautoexpand\fR=\fBon\fR | \fBoff\fR\fR
668 .ad
669 .sp .6
670 .RS 4n
671 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.
672 .RE
673
674 .sp
675 .ne 2
676 .mk
677 .na
678 \fB\fBautoreplace\fR=\fBon\fR | \fBoff\fR\fR
679 .ad
680 .sp .6
681 .RS 4n
682 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".
683 .RE
684
685 .sp
686 .ne 2
687 .mk
688 .na
689 \fB\fBbootfs\fR=\fIpool\fR/\fIdataset\fR\fR
690 .ad
691 .sp .6
692 .RS 4n
693 Identifies the default bootable dataset for the root pool. This property is expected to be set mainly by the installation and upgrade programs. Not all Linux distribution boot processes use the \fBbootfs\fR property.
694 .RE
695
696 .sp
697 .ne 2
698 .mk
699 .na
700 \fB\fBcachefile\fR=\fIpath\fR | \fBnone\fR\fR
701 .ad
702 .sp .6
703 .RS 4n
704 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.
705 .sp
706 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.
707 .RE
708
709 .sp
710 .ne 2
711 .mk
712 .na
713 \fB\fBcomment\fR=\fB\fItext\fR\fR
714 .ad
715 .sp .6
716 .RS 4n
717 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.
718 .RE
719
720 .sp
721 .ne 2
722 .mk
723 .na
724 \fB\fBdedupditto\fR=\fB\fInumber\fR\fR
725 .ad
726 .sp .6
727 .RS 4n
728 Threshold for the number of block ditto copies. If the reference count for a deduplicated block increases above this number, a new ditto copy of this block is automatically stored. The default setting is 0 which causes no ditto copies to be created for deduplicated blocks. The minimum legal nonzero setting is 100.
729 .RE
730
731 .sp
732 .ne 2
733 .mk
734 .na
735 \fB\fBdelegation\fR=\fBon\fR | \fBoff\fR\fR
736 .ad
737 .sp .6
738 .RS 4n
739 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.
740 .RE
741
742 .sp
743 .ne 2
744 .mk
745 .na
746 \fB\fBfailmode\fR=\fBwait\fR | \fBcontinue\fR | \fBpanic\fR\fR
747 .ad
748 .sp .6
749 .RS 4n
750 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:
751 .sp
752 .ne 2
753 .mk
754 .na
755 \fB\fBwait\fR\fR
756 .ad
757 .RS 12n
758 .rt
759 Blocks all \fBI/O\fR access until the device connectivity is recovered and the errors are cleared. This is the default behavior.
760 .RE
761
762 .sp
763 .ne 2
764 .mk
765 .na
766 \fB\fBcontinue\fR\fR
767 .ad
768 .RS 12n
769 .rt
770 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.
771 .RE
772
773 .sp
774 .ne 2
775 .mk
776 .na
777 \fB\fBpanic\fR\fR
778 .ad
779 .RS 12n
780 .rt
781 Prints out a message to the console and generates a system crash dump.
782 .RE
783
784 .RE
785
786 .sp
787 .ne 2
788 .na
789 \fB\fBfeature@\fR\fIfeature_name\fR=\fBenabled\fR\fR
790 .ad
791 .RS 4n
792 The value of this property is the current state of \fIfeature_name\fR. The
793 only valid value when setting this property is \fBenabled\fR which moves
794 \fIfeature_name\fR to the enabled state. See \fBzpool-features\fR(5) for
795 details on feature states.
796 .RE
797
798 .sp
799 .ne 2
800 .mk
801 .na
802 \fB\fBlistsnaps\fR=on | off\fR
803 .ad
804 .sp .6
805 .RS 4n
806 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".
807 .RE
808
809 .sp
810 .ne 2
811 .mk
812 .na
813 \fB\fBversion\fR=\fIversion\fR\fR
814 .ad
815 .sp .6
816 .RS 4n
817 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.
818 .RE
819
820 .SS "Subcommands"
821 .sp
822 .LP
823 All subcommands that modify state are logged persistently to the pool in their original form.
824 .sp
825 .LP
826 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:
827 .sp
828 .ne 2
829 .mk
830 .na
831 \fB\fBzpool\fR \fB-?\fR\fR
832 .ad
833 .sp .6
834 .RS 4n
835 Displays a help message.
836 .RE
837
838 .sp
839 .ne 2
840 .mk
841 .na
842 \fB\fBzpool add\fR [\fB-fgLnP\fR] [\fB-o\fR \fIproperty=value\fR] \fIpool\fR \fIvdev\fR ...\fR
843 .ad
844 .sp .6
845 .RS 4n
846 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.
847 .sp
848 .ne 2
849 .mk
850 .na
851 \fB\fB-f\fR\fR
852 .ad
853 .RS 6n
854 .rt
855 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.
856 .RE
857
858 .sp
859 .ne 2
860 .mk
861 .na
862 \fB\fB-g\fR\fR
863 .ad
864 .RS 6n
865 .rt
866 Display vdev GUIDs instead of the normal device names. These GUIDs can be used in place of device names for the zpool detach/offline/remove/replace commands.
867 .RE
868
869 .sp
870 .ne 2
871 .mk
872 .na
873 \fB\fB-L\fR\fR
874 .ad
875 .RS 6n
876 .rt
877 Display real paths for vdevs resolving all symbolic links. This can be used to look up the current block device name regardless of the /dev/disk/ path used to open it.
878 .RE
879
880 .sp
881 .ne 2
882 .mk
883 .na
884 \fB\fB-n\fR\fR
885 .ad
886 .RS 6n
887 .rt
888 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.
889 .RE
890
891 .sp
892 .ne 2
893 .mk
894 .na
895 \fB\fB-P\fR\fR
896 .ad
897 .RS 6n
898 .rt
899 Display full paths for vdevs instead of only the last component of the path. This can be used in conjunction with the \fB-L\fR flag.
900 .RE
901
902 .sp
903 .ne 2
904 .mk
905 .na
906 \fB\fB-o\fR \fIproperty=value\fR
907 .ad
908 .sp .6
909 .RS 4n
910 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 \fBashift\fR. \fBDo note\fR that some properties (among them \fBashift\fR) are \fInot\fR inherited from a previous vdev. They are vdev specific, not pool specific.
911 .RE
912
913 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.
914 .RE
915
916 .sp
917 .ne 2
918 .mk
919 .na
920 \fB\fBzpool attach\fR [\fB-f\fR] [\fB-o\fR \fIproperty=value\fR] \fIpool\fR \fIdevice\fR \fInew_device\fR\fR
921 .ad
922 .sp .6
923 .RS 4n
924 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.
925 .sp
926 .ne 2
927 .mk
928 .na
929 \fB\fB-f\fR\fR
930 .ad
931 .RS 6n
932 .rt
933 Forces use of \fInew_device\fR, even if its appears to be in use. Not all devices can be overridden in this manner.
934 .RE
935
936 .sp
937 .ne 2
938 .mk
939 .na
940 \fB\fB-o\fR \fIproperty=value\fR
941 .ad
942 .sp .6
943 .RS 4n
944 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".
945 .RE
946
947 .RE
948
949 .sp
950 .ne 2
951 .mk
952 .na
953 \fB\fBzpool clear\fR \fIpool\fR [\fIdevice\fR] ...\fR
954 .ad
955 .sp .6
956 .RS 4n
957 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.
958 .RE
959
960 .sp
961 .ne 2
962 .mk
963 .na
964 \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] [\fB-t\fR \fItname\fR] \fIpool\fR \fIvdev\fR ...\fR
965 .ad
966 .sp .6
967 .RS 4n
968 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.
969 .sp
970 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.
971 .sp
972 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.
973 .sp
974 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.
975 .sp
976 By default all supported features are enabled on the new pool unless the \fB-d\fR option is specified.
977 .sp
978 .ne 2
979 .mk
980 .na
981 \fB\fB-f\fR\fR
982 .ad
983 .sp .6
984 .RS 4n
985 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.
986 .RE
987
988 .sp
989 .ne 2
990 .mk
991 .na
992 \fB\fB-n\fR\fR
993 .ad
994 .sp .6
995 .RS 4n
996 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.
997 .RE
998
999 .sp
1000 .ne 2
1001 .mk
1002 .na
1003 \fB\fB-d\fR\fR
1004 .ad
1005 .sp .6
1006 .RS 4n
1007 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.
1008 .RE
1009
1010 .sp
1011 .ne 2
1012 .na
1013 \fB\fB-o\fR \fIproperty=value\fR [\fB-o\fR \fIproperty=value\fR] ...\fR
1014 .ad
1015 .sp .6
1016 .RS 4n
1017 Sets the given pool properties. See the "Properties" section for a list of valid properties that can be set.
1018 .RE
1019
1020 .sp
1021 .ne 2
1022 .mk
1023 .na
1024 \fB\fB-O\fR \fIfile-system-property=value\fR\fR
1025 .ad
1026 .br
1027 .na
1028 \fB[\fB-O\fR \fIfile-system-property=value\fR] ...\fR
1029 .ad
1030 .sp .6
1031 .RS 4n
1032 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.
1033 .RE
1034
1035 .sp
1036 .ne 2
1037 .mk
1038 .na
1039 \fB\fB-R\fR \fIroot\fR\fR
1040 .ad
1041 .sp .6
1042 .RS 4n
1043 Equivalent to "-o cachefile=none,altroot=\fIroot\fR"
1044 .RE
1045
1046 .sp
1047 .ne 2
1048 .mk
1049 .na
1050 \fB\fB-m\fR \fImountpoint\fR\fR
1051 .ad
1052 .sp .6
1053 .RS 4n
1054 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).
1055 .RE
1056
1057 .sp
1058 .ne 2
1059 .mk
1060 .na
1061 \fB\fB-t\fR \fItname\fR\fR
1062 .ad
1063 .sp .6
1064 .RS 4n
1065 Sets the in-core pool name to "\fBtname\fR" while the on-disk name will be the name specified as the pool name "\fBpool\fR". This will set the default cachefile property to none. This is intended to handle name space collisions when creating pools for other systems, such as virtual machines or physical machines whose pools live on network block devices.
1066 .RE
1067
1068 .RE
1069
1070 .sp
1071 .ne 2
1072 .mk
1073 .na
1074 \fB\fBzpool destroy\fR [\fB-f\fR] \fIpool\fR\fR
1075 .ad
1076 .sp .6
1077 .RS 4n
1078 Destroys the given pool, freeing up any devices for other use. This command tries to unmount any active datasets before destroying the pool.
1079 .sp
1080 .ne 2
1081 .mk
1082 .na
1083 \fB\fB-f\fR\fR
1084 .ad
1085 .RS 6n
1086 .rt
1087 Forces any active datasets contained within the pool to be unmounted.
1088 .RE
1089
1090 .RE
1091
1092 .sp
1093 .ne 2
1094 .mk
1095 .na
1096 \fB\fBzpool detach\fR \fIpool\fR \fIdevice\fR\fR
1097 .ad
1098 .sp .6
1099 .RS 4n
1100 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.
1101 .RE
1102
1103 .RE
1104
1105 .sp
1106 .ne 2
1107 .mk
1108 .na
1109 \fBzpool events\fR [\fB-vHfc\fR] [\fIpool\fR] ...
1110 .ad
1111 .sp .6
1112 .RS 4n
1113 Description of the different events generated by the ZFS kernel modules. See \fBzfs-events\fR(5) for more information about the subclasses and event payloads that can be generated.
1114
1115 .sp
1116 .ne 2
1117 .mk
1118 .na
1119 \fB\fB-v\fR\fR
1120 .ad
1121 .RS 6n
1122 .rt
1123 Get a full detail of the events and what information is available about it.
1124 .RE
1125
1126 .sp
1127 .ne 2
1128 .mk
1129 .na
1130 \fB\fB-H\fR\fR
1131 .ad
1132 .RS 6n
1133 .rt
1134 Scripted mode. Do not display headers, and separate fields by a single tab instead of arbitrary space.
1135 .RE
1136
1137 .sp
1138 .ne 2
1139 .mk
1140 .na
1141 \fB\fB-f\fR\fR
1142 .ad
1143 .RS 6n
1144 .rt
1145 Follow mode.
1146 .RE
1147
1148 .sp
1149 .ne 2
1150 .mk
1151 .na
1152 \fB\fB-c\fR\fR
1153 .ad
1154 .RS 6n
1155 .rt
1156 Clear all previous events.
1157 .RE
1158
1159 .RE
1160
1161 .sp
1162 .ne 2
1163 .mk
1164 .na
1165 \fB\fBzpool export\fR [\fB-a\fR] [\fB-f\fR] \fIpool\fR ...\fR
1166 .ad
1167 .sp .6
1168 .RS 4n
1169 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.
1170 .sp
1171 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.
1172 .sp
1173 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.
1174 .sp
1175 .ne 2
1176 .mk
1177 .na
1178 \fB\fB-a\fR\fR
1179 .ad
1180 .RS 6n
1181 .rt
1182 Exports all pools imported on the system.
1183 .RE
1184
1185 .sp
1186 .ne 2
1187 .mk
1188 .na
1189 \fB\fB-f\fR\fR
1190 .ad
1191 .RS 6n
1192 .rt
1193 Forcefully unmount all datasets, using the "\fBunmount -f\fR" command.
1194 .sp
1195 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.
1196 .RE
1197
1198 .RE
1199
1200 .sp
1201 .ne 2
1202 .mk
1203 .na
1204 \fB\fBzpool get\fR [\fB-Hp\fR] [\fB-o \fR\fIfield\fR[,...]] "\fIall\fR" | \fIproperty\fR[,...]
1205 \fIpool\fR ...\fR
1206 .ad
1207 .sp .6
1208 .RS 4n
1209 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:
1210 .sp
1211 .in +2
1212 .nf
1213 name Name of storage pool
1214 property Property name
1215 value Property value
1216 source Property source, either 'default' or 'local'.
1217 .fi
1218 .in -2
1219 .sp
1220
1221 See the "Properties" section for more information on the available pool properties.
1222
1223 .sp
1224 .ne 2
1225 .mk
1226 .na
1227 \fB\fB-H\fR\fR
1228 .ad
1229 .RS 6n
1230 .rt
1231 Scripted mode. Do not display headers, and separate fields by a single tab instead of arbitrary space.
1232 .RE
1233
1234 .sp
1235 .ne 2
1236 .mk
1237 .na
1238 \fB\fB-p\fR\fR
1239 .ad
1240 .RS 6n
1241 .rt
1242 Display numbers in parseable (exact) values.
1243 .RE
1244
1245 .sp
1246 .ne 2
1247 .mk
1248 .na
1249 \fB\fB-o\fR \fIfield\fR\fR
1250 .ad
1251 .RS 12n
1252 .rt
1253 A comma-separated list of columns to display. \fBname,property,value,source\fR
1254 is the default value.
1255 .RE
1256 .RE
1257
1258 .sp
1259 .ne 2
1260 .mk
1261 .na
1262 \fB\fBzpool history\fR [\fB-il\fR] [\fIpool\fR] ...\fR
1263 .ad
1264 .sp .6
1265 .RS 4n
1266 Displays the command history of the specified pools or all pools if no pool is specified.
1267 .sp
1268 .ne 2
1269 .mk
1270 .na
1271 \fB\fB-i\fR\fR
1272 .ad
1273 .RS 6n
1274 .rt
1275 Displays internally logged \fBZFS\fR events in addition to user initiated events.
1276 .RE
1277
1278 .sp
1279 .ne 2
1280 .mk
1281 .na
1282 \fB\fB-l\fR\fR
1283 .ad
1284 .RS 6n
1285 .rt
1286 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.
1287 .RE
1288
1289 .RE
1290
1291 .sp
1292 .ne 2
1293 .mk
1294 .na
1295 \fB\fBzpool import\fR [\fB-d\fR \fIdir\fR | \fB-c\fR \fIcachefile\fR] [\fB-D\fR]\fR
1296 .ad
1297 .sp .6
1298 .RS 4n
1299 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.
1300 .sp
1301 The numeric identifier is unique, and can be used instead of the pool name when multiple exported pools of the same name are available.
1302 .sp
1303 .ne 2
1304 .mk
1305 .na
1306 \fB\fB-c\fR \fIcachefile\fR\fR
1307 .ad
1308 .RS 16n
1309 .rt
1310 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.
1311 .RE
1312
1313 .sp
1314 .ne 2
1315 .mk
1316 .na
1317 \fB\fB-d\fR \fIdir\fR\fR
1318 .ad
1319 .RS 16n
1320 .rt
1321 Searches for devices or files in \fIdir\fR. The \fB-d\fR option can be specified multiple times.
1322 .RE
1323
1324 .sp
1325 .ne 2
1326 .mk
1327 .na
1328 \fB\fB-D\fR\fR
1329 .ad
1330 .RS 16n
1331 .rt
1332 Lists destroyed pools only.
1333 .RE
1334
1335 .RE
1336
1337 .sp
1338 .ne 2
1339 .mk
1340 .na
1341 \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-s\fR] \fB-a\fR\fR
1342 .ad
1343 .sp .6
1344 .RS 4n
1345 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.
1346 .sp
1347 .ne 2
1348 .mk
1349 .na
1350 \fB\fB-o\fR \fImntopts\fR\fR
1351 .ad
1352 .RS 21n
1353 .rt
1354 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.
1355 .RE
1356
1357 .sp
1358 .ne 2
1359 .mk
1360 .na
1361 \fB\fB-o\fR \fIproperty=value\fR\fR
1362 .ad
1363 .RS 21n
1364 .rt
1365 Sets the specified property on the imported pool. See the "Properties" section for more information on the available pool properties.
1366 .RE
1367
1368 .sp
1369 .ne 2
1370 .mk
1371 .na
1372 \fB\fB-c\fR \fIcachefile\fR\fR
1373 .ad
1374 .RS 21n
1375 .rt
1376 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.
1377 .RE
1378
1379 .sp
1380 .ne 2
1381 .mk
1382 .na
1383 \fB\fB-d\fR \fIdir\fR\fR
1384 .ad
1385 .RS 21n
1386 .rt
1387 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.
1388 .RE
1389
1390 .sp
1391 .ne 2
1392 .mk
1393 .na
1394 \fB\fB-D\fR\fR
1395 .ad
1396 .RS 21n
1397 .rt
1398 Imports destroyed pools only. The \fB-f\fR option is also required.
1399 .RE
1400
1401 .sp
1402 .ne 2
1403 .mk
1404 .na
1405 \fB\fB-f\fR\fR
1406 .ad
1407 .RS 21n
1408 .rt
1409 Forces import, even if the pool appears to be potentially active.
1410 .RE
1411
1412 .sp
1413 .ne 2
1414 .mk
1415 .na
1416 \fB\fB-F\fR\fR
1417 .ad
1418 .RS 21n
1419 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.
1420 .RE
1421
1422 .sp
1423 .ne 2
1424 .mk
1425 .na
1426 \fB\fB-a\fR\fR
1427 .ad
1428 .RS 21n
1429 .rt
1430 Searches for and imports all pools found.
1431 .RE
1432
1433 .sp
1434 .ne 2
1435 .mk
1436 .na
1437 \fB\fB-m\fR\fR
1438 .ad
1439 .RS 21n
1440 Allows a pool to import when there is a missing log device.
1441 .RE
1442
1443 .sp
1444 .ne 2
1445 .mk
1446 .na
1447 \fB\fB-R\fR \fIroot\fR\fR
1448 .ad
1449 .RS 21n
1450 .rt
1451 Sets the "\fBcachefile\fR" property to "\fBnone\fR" and the "\fIaltroot\fR" property to "\fIroot\fR".
1452 .RE
1453
1454 .sp
1455 .ne 2
1456 .mk
1457 .na
1458 \fB\fB-N\fR\fR
1459 .ad
1460 .RS 21n
1461 Import the pool without mounting any file systems.
1462 .RE
1463
1464 .sp
1465 .ne 2
1466 .mk
1467 .na
1468 \fB\fB-n\fR\fR
1469 .ad
1470 .RS 21n
1471 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.
1472 .RE
1473
1474 .sp
1475 .ne 2
1476 .mk
1477 .na
1478 \fB\fB-X\fR\fR
1479 .ad
1480 .RS 21n
1481 Used with the \fB-F\fR recovery option. Determines whether extreme measures to find a valid txg should take place. This allows the pool to be rolled back to a txg which is no longer guaranteed to be consistent. Pools imported at an inconsistent txg may contain uncorrectable checksum errors. For more details about pool recovery mode, see the \fB-F\fR option, above.
1482 \fBWARNING\fR: This option can be extremely hazardous to the health of your pool and should only be used as a last resort.
1483 .RE
1484
1485 .sp
1486 .ne 2
1487 .mk
1488 .na
1489 \fB\fB-T\fR\fR
1490 .ad
1491 .RS 21n
1492 Specify the txg to use for rollback. Implies \fB-FX\fR. For more details about pool recovery mode, see the \fB-X\fR option, above.
1493 \fBWARNING\fR: This option can be extremely hazardous to the health of your pool and should only be used as a last resort.
1494 .RE
1495
1496 .sp
1497 .ne 2
1498 .mk
1499 .na
1500 \fB\fB-s\fR
1501 .ad
1502 .RS 21n
1503 .rt
1504 Scan using the default search path, the libblkid cache will not be consulted. A custom search path may be specified by setting the \fBZPOOL_IMPORT_PATH\fR environment variable.
1505 .RE
1506
1507 .RE
1508
1509 .sp
1510 .ne 2
1511 .mk
1512 .na
1513 \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]] [\fB-t\fR]] [\fB-s\fR] \fIpool\fR | \fIid\fR [\fInewpool\fR]\fR
1514 .ad
1515 .sp .6
1516 .RS 4n
1517 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.
1518 .sp
1519 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.
1520 .sp
1521 .ne 2
1522 .mk
1523 .na
1524 \fB\fB-o\fR \fImntopts\fR\fR
1525 .ad
1526 .sp .6
1527 .RS 4n
1528 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.
1529 .RE
1530
1531 .sp
1532 .ne 2
1533 .mk
1534 .na
1535 \fB\fB-o\fR \fIproperty=value\fR\fR
1536 .ad
1537 .sp .6
1538 .RS 4n
1539 Sets the specified property on the imported pool. See the "Properties" section for more information on the available pool properties.
1540 .RE
1541
1542 .sp
1543 .ne 2
1544 .mk
1545 .na
1546 \fB\fB-c\fR \fIcachefile\fR\fR
1547 .ad
1548 .sp .6
1549 .RS 4n
1550 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.
1551 .RE
1552
1553 .sp
1554 .ne 2
1555 .mk
1556 .na
1557 \fB\fB-d\fR \fIdir\fR\fR
1558 .ad
1559 .sp .6
1560 .RS 4n
1561 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.
1562 .RE
1563
1564 .sp
1565 .ne 2
1566 .mk
1567 .na
1568 \fB\fB-D\fR\fR
1569 .ad
1570 .sp .6
1571 .RS 4n
1572 Imports destroyed pool. The \fB-f\fR option is also required.
1573 .RE
1574
1575 .sp
1576 .ne 2
1577 .mk
1578 .na
1579 \fB\fB-f\fR\fR
1580 .ad
1581 .sp .6
1582 .RS 4n
1583 Forces import, even if the pool appears to be potentially active.
1584 .RE
1585
1586 .sp
1587 .ne 2
1588 .mk
1589 .na
1590 \fB\fB-F\fR\fR
1591 .ad
1592 .sp .6
1593 .RS 4n
1594 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.
1595 .RE
1596
1597 .sp
1598 .ne 2
1599 .mk
1600 .na
1601 \fB\fB-R\fR \fIroot\fR\fR
1602 .ad
1603 .sp .6
1604 .RS 4n
1605 Sets the "\fBcachefile\fR" property to "\fBnone\fR" and the "\fIaltroot\fR" property to "\fIroot\fR".
1606 .RE
1607
1608 .sp
1609 .ne 2
1610 .mk
1611 .na
1612 \fB\fB-n\fR\fR
1613 .ad
1614 .sp .6
1615 .RS 4n
1616 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.
1617 .RE
1618
1619 .sp
1620 .ne 2
1621 .mk
1622 .na
1623 \fB\fB-X\fR\fR
1624 .ad
1625 .sp .6
1626 .RS 4n
1627 Used with the \fB-F\fR recovery option. Determines whether extreme measures to find a valid txg should take place. This allows the pool to be rolled back to a txg which is no longer guaranteed to be consistent. Pools imported at an inconsistent txg may contain uncorrectable checksum errors. For more details about pool recovery mode, see the \fB-F\fR option, above.
1628 \fBWARNING\fR: This option can be extremely hazardous to the health of your pool and should only be used as a last resort.
1629 .RE
1630
1631 .sp
1632 .ne 2
1633 .mk
1634 .na
1635 \fB\fB-T\fR\fR
1636 .ad
1637 .sp .6
1638 .RS 4n
1639 Specify the txg to use for rollback. Implies \fB-FX\fR. For more details about pool recovery mode, see the \fB-X\fR option, above.
1640 \fBWARNING\fR: This option can be extremely hazardous to the health of your pool and should only be used as a last resort.
1641 .RE
1642
1643 .sp
1644 .ne 2
1645 .mk
1646 .na
1647 \fB\fB-t\fR\fR
1648 .ad
1649 .sp .6
1650 .RS 4n
1651 Used with "\fBnewpool\fR". Specifies that "\fBnewpool\fR" is temporary. Temporary pool names last until export. Ensures that the original pool name will be used in all label updates and therefore is retained upon export. Will also set -o cachefile=none when not explicitly specified.
1652 .RE
1653
1654 .sp
1655 .ne 2
1656 .mk
1657 .na
1658 \fB\fB-m\fR\fR
1659 .ad
1660 .sp .6
1661 .RS 4n
1662 Allows a pool to import when there is a missing log device.
1663 .RE
1664
1665 .sp
1666 .ne 2
1667 .mk
1668 .na
1669 \fB\fB-s\fR
1670 .ad
1671 .sp .6
1672 .RS 4n
1673 Scan using the default search path, the libblkid cache will not be consulted. A custom search path may be specified by setting the \fBZPOOL_IMPORT_PATH\fR environment variable.
1674 .RE
1675
1676 .RE
1677
1678 .sp
1679 .ne 2
1680 .mk
1681 .na
1682 \fB\fBzpool iostat\fR [\fB-T\fR \fBd\fR | \fBu\fR] [\fB-ghHLpPvy\fR] [\fB-w\fR|[\fB-lq\fR]] [[\fIpool\fR ...]|[\fIpool vdev\fR ...]|[\fIvdev\fR ...]] [\fIinterval\fR[\fIcount\fR]]\fR
1683
1684 .ad
1685 .sp .6
1686 .RS 4n
1687 Displays \fBI/O\fR statistics for the given \fIpool\fRs/\fIvdev\fRs. You can
1688 pass in a list of \fIpool\fRs, a \fIpool\fR and list of \fIvdev\fRs in that
1689 \fIpool\fR, or a list of any \fIvdev\fRs from any \fIpool\fR. If no items are
1690 specified, statistics for every pool in the system are shown. When given an
1691 interval, the statistics are printed every \fIinterval\fR seconds until
1692 \fBCtrl-C\fR is pressed. If \fIcount\fR is specified, the command exits after
1693 \fIcount\fR reports are printed. The first report printed is always the
1694 statistics since boot regardless of whether \fIinterval\fR and \fIcount\fR
1695 are passed. However, this behavior can be suppressed with the -y flag. Also
1696 note that the units of 'K', 'M', 'G'... that are printed in the report are in
1697 base 1024. To get the raw values, use the \fB-p\fR flag.
1698 .sp
1699 .ne 2
1700 .mk
1701 .na
1702 \fB\fB-T\fR \fBu\fR | \fBd\fR\fR
1703 .ad
1704 .RS 12n
1705 .rt
1706 Display a time stamp.
1707 .sp
1708 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).
1709 .RE
1710
1711 .sp
1712 .ne 2
1713 .mk
1714 .na
1715 \fB\fB-g\fR\fR
1716 .ad
1717 .RS 12n
1718 .rt
1719 Display vdev GUIDs instead of the normal device names. These GUIDs can be used in place of device names for the zpool detach/offline/remove/replace commands.
1720 .RE
1721
1722 .sp
1723 .ne 2
1724 .mk
1725 .na
1726 \fB\fB-H\fR\fR
1727 .ad
1728 .RS 12n
1729 .rt
1730 Scripted mode. Do not display headers, and separate fields by a single tab instead of arbitrary space.
1731 .RE
1732
1733 .sp
1734 .ne 2
1735 .mk
1736 .na
1737 \fB\fB-L\fR\fR
1738 .ad
1739 .RS 12n
1740 .rt
1741 Display real paths for vdevs resolving all symbolic links. This can be used to look up the current block device name regardless of the /dev/disk/ path used to open it.
1742 .RE
1743
1744 .sp
1745 .ne 2
1746 .mk
1747 .na
1748 \fB\fB-p\fR\fR
1749 .ad
1750 .RS 12n
1751 .rt
1752 Display numbers in parseable (exact) values. Time values are in nanoseconds.
1753 .RE
1754
1755 .sp
1756 .ne 2
1757 .mk
1758 .na
1759 \fB\fB-P\fR\fR
1760 .ad
1761 .RS 12n
1762 .rt
1763 Display full paths for vdevs instead of only the last component of the path. This can be used in conjunction with the \fB-L\fR flag.
1764 .RE
1765
1766 .sp
1767 .ne 2
1768 .mk
1769 .na
1770 \fB\fB-v\fR\fR
1771 .ad
1772 .RS 12n
1773 .rt
1774 Verbose statistics. Reports usage statistics for individual \fIvdevs\fR within the pool, in addition to the pool-wide statistics.
1775 .RE
1776
1777 .sp
1778 .ne 2
1779 .mk
1780 .na
1781 \fB\fB-y\fR\fR
1782 .ad
1783 .RS 12n
1784 .rt
1785 Omit statistics since boot. Normally the first line of output reports the statistics since boot. This option suppresses that first line of output.
1786 .RE
1787 .sp
1788 .ne 2
1789 .mk
1790 .na
1791 \fB\fB-w\fR\fR
1792 .ad
1793 .RS 12n
1794 .rt
1795 Display latency histograms:
1796
1797 .sp
1798 .ne 2
1799 .mk
1800 .na
1801 total_wait:
1802 .ad
1803 .RS 20n
1804 .rt
1805 Total IO time (queuing + disk IO time).
1806 .RE
1807 .ne 2
1808 .mk
1809 .na
1810 disk_wait:
1811 .ad
1812 .RS 20n
1813 .rt
1814 Disk IO time (time reading/writing the disk).
1815 .RE
1816 .ne 2
1817 .mk
1818 .na
1819 syncq_wait:
1820 .ad
1821 .RS 20n
1822 .rt
1823 Amount of time IO spent in synchronous priority queues. Does not include
1824 disk time.
1825 .RE
1826 .ne 2
1827 .mk
1828 .na
1829 asyncq_wait:
1830 .ad
1831 .RS 20n
1832 .rt
1833 Amount of time IO spent in asynchronous priority queues. Does not include
1834 disk time.
1835 .RE
1836 .ne 2
1837 .mk
1838 .na
1839 scrub:
1840 .ad
1841 .RS 20n
1842 .rt
1843 Amount of time IO spent in scrub queue. Does not include disk time.
1844
1845
1846 .RE
1847
1848 All histogram buckets are power-of-two sized. The time labels are the end
1849 ranges of the buckets, so for example, a 15ns bucket stores latencies from
1850 8-15ns. The last bucket is also a catch-all for latencies higher than the
1851 maximum.
1852 .RE
1853 .sp
1854 .ne 2
1855 .mk
1856 .na
1857 \fB\fB-l\fR\fR
1858 .ad
1859 .RS 12n
1860 .rt
1861 Include average latency statistics:
1862
1863 .sp
1864 .ne 2
1865 .mk
1866 .na
1867 total_wait:
1868 .ad
1869 .RS 20n
1870 .rt
1871 Average total IO time (queuing + disk IO time).
1872 .RE
1873 .ne 2
1874 .mk
1875 .na
1876 disk_wait:
1877 .ad
1878 .RS 20n
1879 .rt
1880 Average disk IO time (time reading/writing the disk).
1881 .RE
1882 .ne 2
1883 .mk
1884 .na
1885 syncq_wait:
1886 .ad
1887 .RS 20n
1888 .rt
1889 Average amount of time IO spent in synchronous priority queues. Does not
1890 include disk time.
1891 .RE
1892 .ne 2
1893 .mk
1894 .na
1895 asyncq_wait:
1896 .ad
1897 .RS 20n
1898 .rt
1899 Average amount of time IO spent in asynchronous priority queues. Does not
1900 include disk time.
1901 .RE
1902 .ne 2
1903 .mk
1904 .na
1905 scrub:
1906 .ad
1907 .RS 20n
1908 .rt
1909 Average queuing time in scrub queue. Does not include disk time.
1910 .RE
1911
1912 .RE
1913 .sp
1914 .ne 2
1915 .mk
1916 .na
1917 \fB\fB-q\fR\fR
1918 .ad
1919 .RS 12n
1920 .rt
1921 Include active queue statistics. Each priority queue has both pending ("pend")
1922 and active ("activ") IOs. Pending IOs are waiting to be issued to the disk, and
1923 active IOs have been issued to disk and are waiting for completion. These stats
1924 are broken out by priority queue:
1925 .sp
1926 .ne 2
1927 .mk
1928 .na
1929 syncq_read/write:
1930 .ad
1931 .RS 20n
1932 .rt
1933 Current number of entries in synchronous priority queues.
1934 .RE
1935 .ne 2
1936 .mk
1937 .na
1938 asyncq_read/write:
1939 .ad
1940 .RS 20n
1941 .rt
1942 Current number of entries in asynchronous priority queues.
1943 .RE
1944 .ne 2
1945 .mk
1946 .na
1947 scrubq_read:
1948 .ad
1949 .RS 20n
1950 .rt
1951 Current number of entries in scrub queue.
1952 .RE
1953
1954 All queue statistics are instantaneous measurements of the number of entries
1955 in the queues. If you specify an interval, the measurements will be sampled
1956 from the end of the interval.
1957 .RE
1958 .sp
1959 .ne 2
1960 .mk
1961 .na
1962 \fB\fBzpool labelclear\fR [\fB-f\fR] \fIdevice\fR
1963 .ad
1964 .sp .6
1965 .RS 4n
1966 Removes ZFS label information from the specified device. The device must not be part of an active pool configuration.
1967 .sp
1968 .ne 2
1969 .mk
1970 .na
1971 \fB\fB-f\fR\fR
1972 .ad
1973 .RS 12n
1974 .rt
1975 Treat exported or foreign devices as inactive.
1976 .RE
1977
1978 .RE
1979
1980 .sp
1981 .ne 2
1982 .mk
1983 .na
1984 \fB\fBzpool list\fR [\fB-T\fR \fBd\fR | \fBu\fR] [\fB-HgLpPv\fR] [\fB-o\fR \fIprops\fR[,...]] [\fIpool\fR] ... [\fIinterval\fR[\fIcount\fR]]\fR
1985 .ad
1986 .sp .6
1987 .RS 4n
1988 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.
1989 .sp
1990 .ne 2
1991 .mk
1992 .na
1993 \fB\fB-H\fR\fR
1994 .ad
1995 .RS 12n
1996 .rt
1997 Scripted mode. Do not display headers, and separate fields by a single tab instead of arbitrary space.
1998 .RE
1999
2000 .sp
2001 .ne 2
2002 .mk
2003 .na
2004 \fB\fB-g\fR\fR
2005 .ad
2006 .RS 12n
2007 .rt
2008 Display vdev GUIDs instead of the normal device names. These GUIDs can be used in place of device names for the zpool detach/offline/remove/replace commands.
2009 .RE
2010
2011 .sp
2012 .ne 2
2013 .mk
2014 .na
2015 \fB\fB-L\fR\fR
2016 .ad
2017 .RS 12n
2018 .rt
2019 Display real paths for vdevs resolving all symbolic links. This can be used to look up the current block device name regardless of the /dev/disk/ path used to open it.
2020 .RE
2021
2022 .sp
2023 .ne 2
2024 .mk
2025 .na
2026 \fB\fB-p\fR\fR
2027 .ad
2028 .RS 12n
2029 .rt
2030 Display numbers in parsable (exact) values.
2031 .RE
2032
2033 .sp
2034 .ne 2
2035 .mk
2036 .na
2037 \fB\fB-P\fR\fR
2038 .ad
2039 .RS 12n
2040 .rt
2041 Display full paths for vdevs instead of only the last component of the path. This can be used in conjunction with the \fB-L\fR flag.
2042 .RE
2043
2044 .sp
2045 .ne 2
2046 .mk
2047 .na
2048 \fB\fB-T\fR \fBd\fR | \fBu\fR\fR
2049 .ad
2050 .RS 12n
2051 .rt
2052 Display a time stamp.
2053 .sp
2054 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).
2055 .RE
2056
2057 .sp
2058 .ne 2
2059 .mk
2060 .na
2061 \fB\fB-o\fR \fIprops\fR\fR
2062 .ad
2063 .RS 12n
2064 .rt
2065 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, fragmentation, expandsize, capacity, dedupratio, health, altroot"
2066 .RE
2067
2068 .sp
2069 .ne 2
2070 .mk
2071 .na
2072 \fB\fB-v\fR\fR
2073 .ad
2074 .RS 12n
2075 .rt
2076 Verbose statistics. Reports usage statistics for individual \fIvdevs\fR within the pool, in addition to the pool-wise statistics.
2077 .RE
2078
2079 .RE
2080
2081 .sp
2082 .ne 2
2083 .mk
2084 .na
2085 \fB\fBzpool offline\fR [\fB-t\fR] \fIpool\fR \fIdevice\fR ...\fR
2086 .ad
2087 .sp .6
2088 .RS 4n
2089 Takes the specified physical device offline. While the \fIdevice\fR is offline, no attempt is made to read or write to the device.
2090 .sp
2091 This command is not applicable to spares or cache devices.
2092 .sp
2093 .ne 2
2094 .mk
2095 .na
2096 \fB\fB-t\fR\fR
2097 .ad
2098 .RS 6n
2099 .rt
2100 Temporary. Upon reboot, the specified physical device reverts to its previous state.
2101 .RE
2102
2103 .RE
2104
2105 .sp
2106 .ne 2
2107 .mk
2108 .na
2109 \fB\fBzpool online\fR [\fB-e\fR] \fIpool\fR \fIdevice\fR...\fR
2110 .ad
2111 .sp .6
2112 .RS 4n
2113 Brings the specified physical device online.
2114 .sp
2115 This command is not applicable to spares or cache devices.
2116 .sp
2117 .ne 2
2118 .mk
2119 .na
2120 \fB\fB-e\fR\fR
2121 .ad
2122 .RS 6n
2123 .rt
2124 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.
2125 .RE
2126
2127 .RE
2128
2129 .sp
2130 .ne 2
2131 .mk
2132 .na
2133 \fB\fBzpool reguid\fR \fIpool\fR
2134 .ad
2135 .sp .6
2136 .RS 4n
2137 Generates a new unique identifier for the pool. You must ensure that all
2138 devices in this pool are online and healthy before performing this action.
2139 .RE
2140
2141 .sp
2142 .ne 2
2143 .na
2144 \fB\fBzpool reopen\fR \fIpool\fR
2145 .ad
2146 .sp .6
2147 .RS 4n
2148 Reopen all the vdevs associated with the pool.
2149 .RE
2150
2151 .sp
2152 .ne 2
2153 .na
2154 \fB\fBzpool remove\fR \fIpool\fR \fIdevice\fR ...\fR
2155 .ad
2156 .sp .6
2157 .RS 4n
2158 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.
2159 .RE
2160
2161 .sp
2162 .ne 2
2163 .mk
2164 .na
2165 \fB\fBzpool replace\fR [\fB-f\fR] [\fB-o\fR \fIproperty=value\fR] \fIpool\fR \fIold_device\fR [\fInew_device\fR]\fR
2166 .ad
2167 .sp .6
2168 .RS 4n
2169 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.
2170 .sp
2171 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.
2172 .sp
2173 \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.
2174 .sp
2175 .ne 2
2176 .mk
2177 .na
2178 \fB\fB-f\fR\fR
2179 .ad
2180 .RS 6n
2181 .rt
2182 Forces use of \fInew_device\fR, even if its appears to be in use. Not all devices can be overridden in this manner.
2183 .RE
2184
2185 .sp
2186 .ne 2
2187 .mk
2188 .na
2189 \fB\fB-o\fR \fIproperty=value\fR
2190 .ad
2191 .sp .6n
2192 .RS 6n
2193 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 \fBashift\fR. \fBDo note\fR that some properties (among them \fBashift\fR) are \fInot\fR inherited from a previous vdev. They are vdev specific, not pool specific.
2194 .RE
2195
2196 .RE
2197
2198 .sp
2199 .ne 2
2200 .mk
2201 .na
2202 \fB\fBzpool scrub\fR [\fB-s\fR] \fIpool\fR ...\fR
2203 .ad
2204 .sp .6
2205 .RS 4n
2206 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.
2207 .sp
2208 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.
2209 .sp
2210 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.
2211 .sp
2212 .ne 2
2213 .mk
2214 .na
2215 \fB\fB-s\fR\fR
2216 .ad
2217 .RS 6n
2218 .rt
2219 Stop scrubbing.
2220 .RE
2221
2222 .RE
2223
2224 .sp
2225 .ne 2
2226 .mk
2227 .na
2228 \fB\fBzpool set\fR \fIproperty\fR=\fIvalue\fR \fIpool\fR\fR
2229 .ad
2230 .sp .6
2231 .RS 4n
2232 Sets the given property on the specified pool. See the "Properties" section for more information on what properties can be set and acceptable values.
2233 .RE
2234
2235 .sp
2236 .ne 2
2237 .mk
2238 .na
2239 \fBzpool split\fR [\fB-gLnP\fR] [\fB-R\fR \fIaltroot\fR] [\fB-o\fR \fIproperty=value\fR] \fIpool\fR \fInewpool\fR [\fIdevice\fR ...]
2240 .ad
2241 .sp .6
2242 .RS 4n
2243 Split devices off \fIpool\fR creating \fInewpool\fR. All \fBvdev\fRs in \fIpool\fR must be mirrors and the pool must not be in the process of resilvering. At the time of the split, \fInewpool\fR will be a replica of \fIpool\fR. By default, the last device in each mirror is split from \fIpool\fR to create \fInewpool\fR.
2244
2245 The optional \fIdevice\fR specification causes the specified device(s) to be included in the new pool and, should any devices remain unspecified, the last device in each mirror is used as would be by default.
2246
2247 .sp
2248 .ne 2
2249 .mk
2250 .na
2251 \fB\fB-g\fR\fR
2252 .ad
2253 .RS 6n
2254 .rt
2255 Display vdev GUIDs instead of the normal device names. These GUIDs can be used in place of device names for the zpool detach/offline/remove/replace commands.
2256 .RE
2257
2258 .sp
2259 .ne 2
2260 .mk
2261 .na
2262 \fB\fB-L\fR\fR
2263 .ad
2264 .RS 6n
2265 .rt
2266 Display real paths for vdevs resolving all symbolic links. This can be used to look up the current block device name regardless of the /dev/disk/ path used to open it.
2267 .RE
2268
2269 .sp
2270 .ne 2
2271 .mk
2272 .na
2273 \fB\fB-n\fR \fR
2274 .ad
2275 .sp .6
2276 .RS 4n
2277 Do dry run, do not actually perform the split. Print out the expected configuration of \fInewpool\fR.
2278 .RE
2279
2280 .sp
2281 .ne 2
2282 .mk
2283 .na
2284 \fB\fB-P\fR\fR
2285 .ad
2286 .RS 6n
2287 .rt
2288 Display full paths for vdevs instead of only the last component of the path. This can be used in conjunction with the \fB-L\fR flag.
2289 .RE
2290
2291 .sp
2292 .ne 2
2293 .mk
2294 .na
2295 \fB\fB-R\fR \fIaltroot\fR \fR
2296 .ad
2297 .sp .6
2298 .RS 4n
2299 Set \fIaltroot\fR for \fInewpool\fR and automatically import it. This can be useful to avoid mountpoint collisions if \fInewpool\fR is imported on the same filesystem as \fIpool\fR.
2300 .RE
2301
2302 .sp
2303 .ne 2
2304 .mk
2305 .na
2306 \fB\fB-o\fR \fIproperty=value\fR \fR
2307 .ad
2308 .sp .6
2309 .RS 4n
2310 Sets the specified property for \fInewpool\fR. See the “Properties” section for more information on the available pool properties.
2311 .RE
2312
2313 .RE
2314
2315 .sp
2316 .ne 2
2317 .mk
2318 .na
2319 \fBzpool status\fR [\fB-gLPvxD\fR] [\fB-T\fR d | u] [\fIpool\fR] ... [\fIinterval\fR [\fIcount\fR]]
2320 .ad
2321 .sp .6
2322 .RS 4n
2323 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.
2324 .sp
2325 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.
2326
2327 .sp
2328 .ne 2
2329 .mk
2330 .na
2331 \fB\fB-g\fR\fR
2332 .ad
2333 .RS 12n
2334 .rt
2335 Display vdev GUIDs instead of the normal device names. These GUIDs can be used innplace of device names for the zpool detach/offline/remove/replace commands.
2336 .RE
2337
2338 .sp
2339 .ne 2
2340 .mk
2341 .na
2342 \fB\fB-L\fR\fR
2343 .ad
2344 .RS 12n
2345 .rt
2346 Display real paths for vdevs resolving all symbolic links. This can be used to look up the current block device name regardless of the /dev/disk/ path used to open it.
2347 .RE
2348
2349 .sp
2350 .ne 2
2351 .mk
2352 .na
2353 \fB\fB-P\fR\fR
2354 .ad
2355 .RS 12n
2356 .rt
2357 Display full paths for vdevs instead of only the last component of the path. This can be used in conjunction with the \fB-L\fR flag.
2358 .RE
2359
2360 .sp
2361 .ne 2
2362 .mk
2363 .na
2364 \fB\fB-v\fR\fR
2365 .ad
2366 .RS 12n
2367 .rt
2368 Displays verbose data error information, printing out a complete list of all data errors since the last complete pool scrub.
2369 .RE
2370
2371 .sp
2372 .ne 2
2373 .mk
2374 .na
2375 \fB\fB-x\fR\fR
2376 .ad
2377 .RS 12n
2378 .rt
2379 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.
2380 .RE
2381
2382 .sp
2383 .ne 2
2384 .mk
2385 .na
2386 \fB\fB-D\fR\fR
2387 .ad
2388 .RS 12n
2389 .rt
2390 Display a histogram of deduplication statistics, showing the allocated (physically present on disk) and
2391 referenced (logically referenced in the pool) block counts and sizes by reference count.
2392 .RE
2393
2394 .sp
2395 .ne 2
2396 .mk
2397 .na
2398 \fB\fB-T\fR \fBd\fR | \fBu\fR\fR
2399 .ad
2400 .RS 12n
2401 .rt
2402 Display a time stamp.
2403 .sp
2404 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).
2405 .RE
2406
2407 .RE
2408
2409 .sp
2410 .ne 2
2411 .mk
2412 .na
2413 \fB\fBzpool upgrade\fR\fR
2414 .ad
2415 .sp .6
2416 .RS 4n
2417 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.
2418 .RE
2419
2420 .sp
2421 .ne 2
2422 .mk
2423 .na
2424 \fB\fBzpool upgrade\fR \fB-v\fR\fR
2425 .ad
2426 .sp .6
2427 .RS 4n
2428 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.
2429 .RE
2430
2431 .sp
2432 .ne 2
2433 .mk
2434 .na
2435 \fB\fBzpool upgrade\fR [\fB-V\fR \fIversion\fR] \fB-a\fR | \fIpool\fR ...\fR
2436 .ad
2437 .sp .6
2438 .RS 4n
2439 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 compatibility with systems that support feature flags, but do not support all features enabled on the pool.
2440 .sp
2441 .ne 2
2442 .mk
2443 .na
2444 \fB\fB-a\fR\fR
2445 .ad
2446 .RS 14n
2447 .rt
2448 Enables all supported features on all pools.
2449 .RE
2450
2451 .sp
2452 .ne 2
2453 .mk
2454 .na
2455 \fB\fB-V\fR \fIversion\fR\fR
2456 .ad
2457 .RS 14n
2458 .rt
2459 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.
2460 .RE
2461
2462 .RE
2463
2464 .SH EXAMPLES
2465 .LP
2466 \fBExample 1 \fRCreating a RAID-Z Storage Pool
2467 .sp
2468 .LP
2469 The following command creates a pool with a single \fBraidz\fR root \fIvdev\fR that consists of six disks.
2470
2471 .sp
2472 .in +2
2473 .nf
2474 # \fBzpool create tank raidz sda sdb sdc sdd sde sdf\fR
2475 .fi
2476 .in -2
2477 .sp
2478
2479 .LP
2480 \fBExample 2 \fRCreating a Mirrored Storage Pool
2481 .sp
2482 .LP
2483 The following command creates a pool with two mirrors, where each mirror contains two disks.
2484
2485 .sp
2486 .in +2
2487 .nf
2488 # \fBzpool create tank mirror sda sdb mirror sdc sdd\fR
2489 .fi
2490 .in -2
2491 .sp
2492
2493 .LP
2494 \fBExample 3 \fRCreating a ZFS Storage Pool by Using Partitions
2495 .sp
2496 .LP
2497 The following command creates an unmirrored pool using two disk partitions.
2498
2499 .sp
2500 .in +2
2501 .nf
2502 # \fBzpool create tank sda1 sdb2\fR
2503 .fi
2504 .in -2
2505 .sp
2506
2507 .LP
2508 \fBExample 4 \fRCreating a ZFS Storage Pool by Using Files
2509 .sp
2510 .LP
2511 The following command creates an unmirrored pool using files. While not recommended, a pool based on files can be useful for experimental purposes.
2512
2513 .sp
2514 .in +2
2515 .nf
2516 # \fBzpool create tank /path/to/file/a /path/to/file/b\fR
2517 .fi
2518 .in -2
2519 .sp
2520
2521 .LP
2522 \fBExample 5 \fRAdding a Mirror to a ZFS Storage Pool
2523 .sp
2524 .LP
2525 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.
2526
2527 .sp
2528 .in +2
2529 .nf
2530 # \fBzpool add tank mirror sda sdb\fR
2531 .fi
2532 .in -2
2533 .sp
2534
2535 .LP
2536 \fBExample 6 \fRListing Available ZFS Storage Pools
2537 .sp
2538 .LP
2539 The following command lists all available pools on the system. In this case, the pool \fIzion\fR is faulted due to a missing device.
2540
2541 .sp
2542 .LP
2543 The results from this command are similar to the following:
2544
2545 .sp
2546 .in +2
2547 .nf
2548 # \fBzpool list\fR
2549 NAME SIZE ALLOC FREE FRAG EXPANDSZ CAP DEDUP HEALTH ALTROOT
2550 rpool 19.9G 8.43G 11.4G 33% - 42% 1.00x ONLINE -
2551 tank 61.5G 20.0G 41.5G 48% - 32% 1.00x ONLINE -
2552 zion - - - - - - - FAULTED -
2553 .fi
2554 .in -2
2555 .sp
2556
2557 .LP
2558 \fBExample 7 \fRDestroying a ZFS Storage Pool
2559 .sp
2560 .LP
2561 The following command destroys the pool \fItank\fR and any datasets contained within.
2562
2563 .sp
2564 .in +2
2565 .nf
2566 # \fBzpool destroy -f tank\fR
2567 .fi
2568 .in -2
2569 .sp
2570
2571 .LP
2572 \fBExample 8 \fRExporting a ZFS Storage Pool
2573 .sp
2574 .LP
2575 The following command exports the devices in pool \fItank\fR so that they can be relocated or later imported.
2576
2577 .sp
2578 .in +2
2579 .nf
2580 # \fBzpool export tank\fR
2581 .fi
2582 .in -2
2583 .sp
2584
2585 .LP
2586 \fBExample 9 \fRImporting a ZFS Storage Pool
2587 .sp
2588 .LP
2589 The following command displays available pools, and then imports the pool \fItank\fR for use on the system.
2590
2591 .sp
2592 .LP
2593 The results from this command are similar to the following:
2594
2595 .sp
2596 .in +2
2597 .nf
2598 # \fBzpool import\fR
2599 pool: tank
2600 id: 15451357997522795478
2601 state: ONLINE
2602 action: The pool can be imported using its name or numeric identifier.
2603 config:
2604
2605 tank ONLINE
2606 mirror ONLINE
2607 sda ONLINE
2608 sdb ONLINE
2609
2610 # \fBzpool import tank\fR
2611 .fi
2612 .in -2
2613 .sp
2614
2615 .LP
2616 \fBExample 10 \fRUpgrading All ZFS Storage Pools to the Current Version
2617 .sp
2618 .LP
2619 The following command upgrades all ZFS Storage pools to the current version of the software.
2620
2621 .sp
2622 .in +2
2623 .nf
2624 # \fBzpool upgrade -a\fR
2625 This system is currently running ZFS pool version 28.
2626 .fi
2627 .in -2
2628 .sp
2629
2630 .LP
2631 \fBExample 11 \fRManaging Hot Spares
2632 .sp
2633 .LP
2634 The following command creates a new pool with an available hot spare:
2635
2636 .sp
2637 .in +2
2638 .nf
2639 # \fBzpool create tank mirror sda sdb spare sdc\fR
2640 .fi
2641 .in -2
2642 .sp
2643
2644 .sp
2645 .LP
2646 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:
2647
2648 .sp
2649 .in +2
2650 .nf
2651 # \fBzpool replace tank sda sdd\fR
2652 .fi
2653 .in -2
2654 .sp
2655
2656 .sp
2657 .LP
2658 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:
2659
2660 .sp
2661 .in +2
2662 .nf
2663 # \fBzpool remove tank sdc\fR
2664 .fi
2665 .in -2
2666 .sp
2667
2668 .LP
2669 \fBExample 12 \fRCreating a ZFS Pool with Mirrored Separate Intent Logs
2670 .sp
2671 .LP
2672 The following command creates a ZFS storage pool consisting of two, two-way mirrors and mirrored log devices:
2673
2674 .sp
2675 .in +2
2676 .nf
2677 # \fBzpool create pool mirror sda sdb mirror sdc sdd log mirror \e
2678 sde sdf\fR
2679 .fi
2680 .in -2
2681 .sp
2682
2683 .LP
2684 \fBExample 13 \fRAdding Cache Devices to a ZFS Pool
2685 .sp
2686 .LP
2687 The following command adds two disks for use as cache devices to a ZFS storage pool:
2688
2689 .sp
2690 .in +2
2691 .nf
2692 # \fBzpool add pool cache sdc sdd\fR
2693 .fi
2694 .in -2
2695 .sp
2696
2697 .sp
2698 .LP
2699 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:
2700
2701 .sp
2702 .in +2
2703 .nf
2704 # \fBzpool iostat -v pool 5\fR
2705 .fi
2706 .in -2
2707 .sp
2708
2709 .LP
2710 \fBExample 14 \fRRemoving a Mirrored Log Device
2711 .sp
2712 .LP
2713 The following command removes the mirrored log device \fBmirror-2\fR.
2714
2715 .sp
2716 .LP
2717 Given this configuration:
2718
2719 .sp
2720 .in +2
2721 .nf
2722 pool: tank
2723 state: ONLINE
2724 scrub: none requested
2725 config:
2726
2727 NAME STATE READ WRITE CKSUM
2728 tank ONLINE 0 0 0
2729 mirror-0 ONLINE 0 0 0
2730 sda ONLINE 0 0 0
2731 sdb ONLINE 0 0 0
2732 mirror-1 ONLINE 0 0 0
2733 sdc ONLINE 0 0 0
2734 sdd ONLINE 0 0 0
2735 logs
2736 mirror-2 ONLINE 0 0 0
2737 sde ONLINE 0 0 0
2738 sdf ONLINE 0 0 0
2739 .fi
2740 .in -2
2741 .sp
2742
2743 .sp
2744 .LP
2745 The command to remove the mirrored log \fBmirror-2\fR is:
2746
2747 .sp
2748 .in +2
2749 .nf
2750 # \fBzpool remove tank mirror-2\fR
2751 .fi
2752 .in -2
2753 .sp
2754
2755 .LP
2756 \fBExample 15 \fRDisplaying expanded space on a device
2757 .sp
2758 .LP
2759 The following command displays the detailed information for the \fIdata\fR
2760 pool. This pool is comprised of a single \fIraidz\fR vdev where one of its
2761 devices increased its capacity by 10GB. In this example, the pool will not
2762 be able to utilized this extra capacity until all the devices under the
2763 \fIraidz\fR vdev have been expanded.
2764
2765 .sp
2766 .in +2
2767 .nf
2768 # \fBzpool list -v data\fR
2769 NAME SIZE ALLOC FREE FRAG EXPANDSZ CAP DEDUP HEALTH ALTROOT
2770 data 23.9G 14.6G 9.30G 48% - 61% 1.00x ONLINE -
2771 raidz1 23.9G 14.6G 9.30G 48% -
2772 c1t1d0 - - - - -
2773 c1t2d0 - - - - 10G
2774 c1t3d0 - - - - -
2775 .fi
2776 .in -2
2777
2778 .SH EXIT STATUS
2779 .sp
2780 .LP
2781 The following exit values are returned:
2782 .sp
2783 .ne 2
2784 .mk
2785 .na
2786 \fB\fB0\fR\fR
2787 .ad
2788 .RS 5n
2789 .rt
2790 Successful completion.
2791 .RE
2792
2793 .sp
2794 .ne 2
2795 .mk
2796 .na
2797 \fB\fB1\fR\fR
2798 .ad
2799 .RS 5n
2800 .rt
2801 An error occurred.
2802 .RE
2803
2804 .sp
2805 .ne 2
2806 .mk
2807 .na
2808 \fB\fB2\fR\fR
2809 .ad
2810 .RS 5n
2811 .rt
2812 Invalid command line options were specified.
2813 .RE
2814
2815 .SH "ENVIRONMENT VARIABLES"
2816 .TP
2817 .B "ZFS_ABORT
2818 Cause \fBzpool\fR to dump core on exit for the purposes of running \fB::findleaks\fR.
2819 .TP
2820 .B "ZPOOL_IMPORT_PATH"
2821 The search path for devices or files to use with the pool. This is a colon-separated list of directories in which \fBzpool\fR looks for device nodes and files.
2822 Similar to the \fB-d\fR option in \fIzpool import\fR.
2823 .TP
2824 .B "ZPOOL_VDEV_NAME_GUID"
2825 Cause \fBzpool\fR subcommands to output vdev guids by default. This behavior
2826 is identical to the \fBzpool status -g\fR command line option.
2827 .TP
2828 .B "ZPOOL_VDEV_NAME_FOLLOW_LINKS"
2829 Cause \fBzpool\fR subcommands to follow links for vdev names by default. This behavior is identical to the \fBzpool status -L\fR command line option.
2830 .TP
2831 .B "ZPOOL_VDEV_NAME_PATH"
2832 Cause \fBzpool\fR subcommands to output full vdev path names by default. This
2833 behavior is identical to the \fBzpool status -p\fR command line option.
2834 .TP
2835 .B "ZFS_VDEV_DEVID_OPT_OUT"
2836 Older ZFS on Linux implementations had issues when attempting to display pool
2837 config VDEV names if a "devid" NVP value is present in the pool's config.
2838
2839 For example, a pool that originated on illumos platform would have a devid
2840 value in the config and \fBzpool status\fR would fail when listing the config.
2841 This would also be true for future Linux based pools.
2842
2843 A pool can be stripped of any "devid" values on import or prevented from adding
2844 them on \fBzpool create\fR or \fBzpool add\fR by setting ZFS_VDEV_DEVID_OPT_OUT.
2845
2846 .SH SEE ALSO
2847 .sp
2848 .LP
2849 \fBzfs\fR(8), \fBzpool-features\fR(5), \fBzfs-events\fR(5)