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