4 .\" The contents of this file are subject to the terms of the
5 .\" Common Development and Distribution License (the "License").
6 .\" You may not use this file except in compliance with the License.
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 .\" or http://www.opensolaris.org/os/licensing.
10 .\" See the License for the specific language governing permissions
11 .\" and limitations under the License.
13 .\" When distributing Covered Code, include this CDDL HEADER in each
14 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 .\" If applicable, add the following below this CDDL HEADER, with the
16 .\" fields enclosed by brackets "[]" replaced with your own identifying
17 .\" information: Portions Copyright [yyyy] [name of copyright owner]
22 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
23 .\" Copyright (c) 2013 by Delphix. All rights reserved.
24 .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
25 .\" Copyright (c) 2017 Datto Inc.
26 .\" Copyright (c) 2017 George Melikov. All Rights Reserved.
27 .\" Copyright 2017 Nexenta Systems, Inc.
28 .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
35 .Nd configure ZFS storage pools
42 .Oo Fl o Ar property Ns = Ns Ar value Oc
47 .Oo Fl o Ar property Ns = Ns Ar value Oc
48 .Ar pool device new_device
56 .Op Fl m Ar mountpoint
57 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
58 .Oo Fl o Ar feature@feature Ns = Ns Ar value Oc
59 .Oo Fl O Ar file-system-property Ns = Ns Ar value Oc Ns ...
71 .Op Fl vHf Oo Ar pool Oc | Fl c
80 .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
81 .Sy all Ns | Ns Ar property Ns Oo , Ns Ar property Oc Ns ...
95 .Op Fl F Oo Fl n Oc Oo Fl T Oc Oo Fl X Oc
96 .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir
98 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
103 .Op Fl F Oo Fl n Oc Oo Fl T Oc Oo Fl X Oc
104 .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir
106 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
109 .Ar pool Ns | Ns Ar id
110 .Op Ar newpool Oo Fl t Oc
113 .Op Oo Oo Fl c Ar SCRIPT Oc Oo Fl lq Oc Oc Ns | Ns Fl rw
114 .Op Fl T Sy u Ns | Ns Sy d
116 .Oo Oo Ar pool Ns ... Oc Ns | Ns Oo Ar pool vdev Ns ... Oc Ns | Ns Oo Ar vdev Ns ... Oc Oc
117 .Op Ar interval Op Ar count
125 .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
126 .Op Fl T Sy u Ns | Ns Sy d
127 .Oo Ar pool Oc Ns ...
128 .Op Ar interval Op Ar count
133 .Ar pool Ar device Ns ...
137 .Ar pool Ar device Ns ...
147 .Ar pool Ar device Ns ...
151 .Oo Fl o Ar property Ns = Ns Ar value Oc
152 .Ar pool Ar device Op Ar new_device
159 .Ar property Ns = Ns Ar value
164 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
167 .Oo Ar device Oc Ns ...
170 .Oo Fl c Ar SCRIPT Oc
172 .Op Fl T Sy u Ns | Ns Sy d
173 .Oo Ar pool Oc Ns ...
174 .Op Ar interval Op Ar count
177 .Oo Ar pool Oc Ns ...
186 .Fl a Ns | Ns Ar pool Ns ...
190 command configures ZFS storage pools.
191 A storage pool is a collection of devices that provides physical storage and
192 data replication for ZFS datasets.
193 All datasets within a storage pool share the same space.
196 for information on managing datasets.
197 .Ss Virtual Devices (vdevs)
198 A "virtual device" describes a single device or a collection of devices
199 organized according to certain performance and fault characteristics.
200 The following virtual devices are supported:
203 A block device, typically located under
205 ZFS can use individual slices or partitions, though the recommended mode of
206 operation is to use whole disks.
207 A disk can be specified by a full path, or it can be a shorthand name
208 .Po the relative portion of the path under
211 A whole disk can be specified by omitting the slice or partition designation.
216 When given a whole disk, ZFS automatically labels the disk, if necessary.
219 The use of files as a backing store is strongly discouraged.
220 It is designed primarily for experimental purposes, as the fault tolerance of a
221 file is only as good as the file system of which it is a part.
222 A file must be specified by a full path.
224 A mirror of two or more devices.
225 Data is replicated in an identical fashion across all components of a mirror.
226 A mirror with N disks of size X can hold X bytes and can withstand (N-1) devices
227 failing before data integrity is compromised.
228 .It Sy raidz , raidz1 , raidz2 , raidz3
229 A variation on RAID-5 that allows for better distribution of parity and
230 eliminates the RAID-5
232 .Pq in which data and parity become inconsistent after a power loss .
233 Data and parity is striped across all disks within a raidz group.
235 A raidz group can have single-, double-, or triple-parity, meaning that the
236 raidz group can sustain one, two, or three failures, respectively, without
240 vdev type specifies a single-parity raidz group; the
242 vdev type specifies a double-parity raidz group; and the
244 vdev type specifies a triple-parity raidz group.
247 vdev type is an alias for
250 A raidz group with N disks of size X with P parity disks can hold approximately
251 (N-P)*X bytes and can withstand P device(s) failing before data integrity is
253 The minimum number of devices in a raidz group is one more than the number of
255 The recommended number is between 3 and 9 to help increase performance.
257 A special pseudo-vdev which keeps track of available hot spares for a pool.
258 For more information, see the
262 A separate intent log device.
263 If more than one log device is specified, then writes are load-balanced between
265 Log devices can be mirrored.
266 However, raidz vdev types are not supported for the intent log.
267 For more information, see the
271 A device used to cache storage pool data.
272 A cache device cannot be configured as a mirror or raidz group.
273 For more information, see the
278 Virtual devices cannot be nested, so a mirror or raidz virtual device can only
279 contain files or disks.
281 .Pq or other combinations
284 A pool can have any number of virtual devices at the top of the configuration
288 Data is dynamically distributed across all top-level devices to balance data
290 As new virtual devices are added, ZFS automatically places data on the newly
293 Virtual devices are specified one at a time on the command line, separated by
299 are used to distinguish where a group ends and another begins.
300 For example, the following creates two root vdevs, each a mirror of two disks:
302 # zpool create mypool mirror sda sdb mirror sdc sdd
304 .Ss Device Failure and Recovery
305 ZFS supports a rich set of mechanisms for handling device failure and data
307 All metadata and data is checksummed, and ZFS automatically repairs bad data
308 from a good copy when corruption is detected.
310 In order to take advantage of these features, a pool must make use of some form
311 of redundancy, using either mirrored or raidz groups.
312 While ZFS supports running in a non-redundant configuration, where each root
313 vdev is simply a disk or file, this is strongly discouraged.
314 A single case of bit corruption can render some or all of your data unavailable.
316 A pool's health status is described by one of three states: online, degraded,
318 An online pool has all devices operating normally.
319 A degraded pool is one in which one or more devices have failed, but the data is
320 still available due to a redundant configuration.
321 A faulted pool has corrupted metadata, or one or more faulted devices, and
322 insufficient replicas to continue functioning.
324 The health of the top-level vdev, such as mirror or raidz device, is
325 potentially impacted by the state of its associated vdevs, or component
327 A top-level vdev or component device is in one of the following states:
328 .Bl -tag -width "DEGRADED"
330 One or more top-level vdevs is in the degraded state because one or more
331 component devices are offline.
332 Sufficient replicas exist to continue functioning.
334 One or more component devices is in the degraded or faulted state, but
335 sufficient replicas exist to continue functioning.
336 The underlying conditions are as follows:
339 The number of checksum errors exceeds acceptable levels and the device is
340 degraded as an indication that something may be wrong.
341 ZFS continues to use the device as necessary.
343 The number of I/O errors exceeds acceptable levels.
344 The device could not be marked as faulted because there are insufficient
345 replicas to continue functioning.
348 One or more top-level vdevs is in the faulted state because one or more
349 component devices are offline.
350 Insufficient replicas exist to continue functioning.
352 One or more component devices is in the faulted state, and insufficient
353 replicas exist to continue functioning.
354 The underlying conditions are as follows:
357 The device could be opened, but the contents did not match expected values.
359 The number of I/O errors exceeds acceptable levels and the device is faulted to
360 prevent further use of the device.
363 The device was explicitly taken offline by the
367 The device is online and functioning.
369 The device was physically removed while the system was running.
370 Device removal detection is hardware-dependent and may not be supported on all
373 The device could not be opened.
374 If a pool is imported when a device was unavailable, then the device will be
375 identified by a unique identifier instead of its path since the path was never
376 correct in the first place.
379 If a device is removed and later re-attached to the system, ZFS attempts
380 to put the device online automatically.
381 Device attach detection is hardware-dependent and might not be supported on all
384 ZFS allows devices to be associated with pools as
386 These devices are not actively used in the pool, but when an active device
387 fails, it is automatically replaced by a hot spare.
388 To create a pool with hot spares, specify a
390 vdev with any number of devices.
393 # zpool create pool mirror sda sdb spare sdc sdd
396 Spares can be shared across multiple pools, and can be added with the
398 command and removed with the
401 Once a spare replacement is initiated, a new
403 vdev is created within the configuration that will remain there until the
404 original device is replaced.
405 At this point, the hot spare becomes available again if another device fails.
407 If a pool has a shared spare that is currently being used, the pool can not be
408 exported since other pools may use this shared spare, which may lead to
409 potential data corruption.
411 An in-progress spare replacement can be cancelled by detaching the hot spare.
412 If the original faulted device is detached, then the hot spare assumes its
413 place in the configuration, and is removed from the spare list of all active
416 Spares cannot replace log devices.
418 The ZFS Intent Log (ZIL) satisfies POSIX requirements for synchronous
420 For instance, databases often require their transactions to be on stable storage
421 devices when returning from a system call.
422 NFS and other applications can also use
424 to ensure data stability.
425 By default, the intent log is allocated from blocks within the main pool.
426 However, it might be possible to get better performance using separate intent
427 log devices such as NVRAM or a dedicated disk.
430 # zpool create pool sda sdb log sdc
433 Multiple log devices can also be specified, and they can be mirrored.
436 section for an example of mirroring multiple log devices.
438 Log devices can be added, replaced, attached, detached, and imported and
439 exported as part of the larger pool.
440 Mirrored log devices can be removed by specifying the top-level mirror for the
443 Devices can be added to a storage pool as
445 These devices provide an additional layer of caching between main memory and
447 For read-heavy workloads, where the working set size is much larger than what
448 can be cached in main memory, using cache devices allow much more of this
449 working set to be served from low latency media.
450 Using cache devices provides the greatest performance improvement for random
451 read-workloads of mostly static content.
453 To create a pool with cache devices, specify a
455 vdev with any number of devices.
458 # zpool create pool sda sdb cache sdc sdd
461 Cache devices cannot be mirrored or part of a raidz configuration.
462 If a read error is encountered on a cache device, that read I/O is reissued to
463 the original storage pool device, which might be part of a mirrored or raidz
466 The content of the cache devices is considered volatile, as is the case with
469 Each pool has several properties associated with it.
470 Some properties are read-only statistics while others are configurable and
471 change the behavior of the pool.
473 The following are read-only properties:
476 Amount of storage used within the pool.
478 Percentage of pool space used.
479 This property can also be referred to by its shortened column name,
482 Amount of uninitialized space within the pool or device that can be used to
483 increase the total capacity of the pool.
484 Uninitialized space consists of any space on an EFI labeled vdev which has not
487 .Nm zpool Cm online Fl e
489 This space occurs when a LUN is dynamically expanded.
491 The amount of fragmentation in the pool.
493 The amount of free space available in the pool.
495 After a file system or snapshot is destroyed, the space it was using is
496 returned to the pool asynchronously.
498 is the amount of space remaining to be reclaimed.
505 The current health of the pool.
507 .Sy ONLINE , DEGRADED , FAULTED , OFFLINE, REMOVED , UNAVAIL .
509 A unique identifier for the pool.
511 Total size of the storage pool.
512 .It Sy unsupported@ Ns Em feature_guid
513 Information about unsupported features that are enabled on the pool.
519 The space usage properties report actual physical space available to the
521 The physical space can be different from the total amount of space that any
522 contained datasets can actually use.
523 The amount of space used in a raidz configuration depends on the characteristics
524 of the data being written.
525 In addition, ZFS reserves some space for internal accounting that the
527 command takes into account, but the
530 For non-full pools of a reasonable size, these effects should be invisible.
531 For small pools, or pools that are close to being completely full, these
532 discrepancies may become more noticeable.
534 The following property can be set at creation time and import time:
537 Alternate root directory.
538 If set, this directory is prepended to any mount points within the pool.
539 This can be used when examining an unknown pool where the mount points cannot be
540 trusted, or in an alternate boot environment, where the typical paths are not
543 is not a persistent property.
544 It is valid only while the system is up.
548 .Sy cachefile Ns = Ns Sy none ,
549 though this may be overridden using an explicit setting.
552 The following property can be set only at import time:
554 .It Sy readonly Ns = Ns Sy on Ns | Ns Sy off
557 the pool will be imported in read-only mode.
558 This property can also be referred to by its shortened column name,
562 The following properties can be set at creation time and import time, and later
567 .It Sy ashift Ns = Ns Sy ashift
568 Pool sector size exponent, to the power of
570 (internally referred to as
572 ). Values from 9 to 16, inclusive, are valid; also, the special
573 value 0 (the default) means to auto-detect using the kernel's block
574 layer and a ZFS internal exception list. I/O operations will be aligned
575 to the specified size boundaries. Additionally, the minimum (disk)
576 write size will be set to the specified size, so this represents a
577 space vs. performance trade-off. For optimal performance, the pool
578 sector size should be greater than or equal to the sector size of the
579 underlying disks. The typical case for setting this property is when
580 performance is important and the underlying disks use 4KiB sectors but
581 report 512B sectors to the OS (for compatibility reasons); in that
584 (which is 1<<12 = 4096). When set, this property is
585 used as the default hint value in subsequent vdev operations (add,
586 attach and replace). Changing this value will not modify any existing
587 vdev, not even on disk replacement; however it can be used, for
588 instance, to replace a dying 512B sectors disk with a newer 4KiB
589 sectors device: this will probably result in bad performance but at the
590 same time could prevent loss of data.
591 .It Sy autoexpand Ns = Ns Sy on Ns | Ns Sy off
592 Controls automatic pool expansion when the underlying LUN is grown.
595 the pool will be resized according to the size of the expanded device.
596 If the device is part of a mirror or raidz then all devices within that
597 mirror/raidz group must be expanded before the new space is made available to
599 The default behavior is
601 This property can also be referred to by its shortened column name,
603 .It Sy autoreplace Ns = Ns Sy on Ns | Ns Sy off
604 Controls automatic device replacement.
607 device replacement must be initiated by the administrator by using the
612 any new device, found in the same physical location as a device that previously
613 belonged to the pool, is automatically formatted and replaced.
614 The default behavior is
616 This property can also be referred to by its shortened column name,
618 Autoreplace can also be used with virtual disks (like device
619 mapper) provided that you use the /dev/disk/by-vdev paths setup by
620 vdev_id.conf. See the
622 man page for more details.
623 Autoreplace and autoonline require the ZFS Event Daemon be configured and
626 man page for more details.
627 .It Sy bootfs Ns = Ns Sy (unset) Ns | Ns Ar pool Ns / Ns Ar dataset
628 Identifies the default bootable dataset for the root pool. This property is
629 expected to be set mainly by the installation and upgrade programs.
630 Not all Linux distribution boot processes use the bootfs property.
631 .It Sy cachefile Ns = Ns Ar path Ns | Ns Sy none
632 Controls the location of where the pool configuration is cached.
633 Discovering all pools on system startup requires a cached copy of the
634 configuration data that is stored on the root file system.
635 All pools in this cache are automatically imported when the system boots.
636 Some environments, such as install and clustering, need to cache this
637 information in a different location so that pools are not automatically
639 Setting this property caches the pool configuration in a different location that
640 can later be imported with
641 .Nm zpool Cm import Fl c .
642 Setting it to the special value
644 creates a temporary pool that is never cached, and the special value
647 uses the default location.
649 Multiple pools can share the same cache file.
650 Because the kernel destroys and recreates this file when pools are added and
651 removed, care should be taken when attempting to access this file.
652 When the last pool using a
654 is exported or destroyed, the file will be empty.
655 .It Sy comment Ns = Ns Ar text
656 A text string consisting of printable ASCII characters that will be stored
657 such that it is available even if the pool becomes faulted.
658 An administrator can provide additional information about a pool using this
660 .It Sy dedupditto Ns = Ns Ar number
661 Threshold for the number of block ditto copies.
662 If the reference count for a deduplicated block increases above this number, a
663 new ditto copy of this block is automatically stored.
664 The default setting is
666 which causes no ditto copies to be created for deduplicated blocks.
667 The minimum legal nonzero setting is
669 .It Sy delegation Ns = Ns Sy on Ns | Ns Sy off
670 Controls whether a non-privileged user is granted access based on the dataset
671 permissions defined on the dataset.
674 for more information on ZFS delegated administration.
675 .It Sy failmode Ns = Ns Sy wait Ns | Ns Sy continue Ns | Ns Sy panic
676 Controls the system behavior in the event of catastrophic pool failure.
677 This condition is typically a result of a loss of connectivity to the underlying
678 storage device(s) or a failure of all devices within the pool.
679 The behavior of such an event is determined as follows:
680 .Bl -tag -width "continue"
682 Blocks all I/O access until the device connectivity is recovered and the errors
684 This is the default behavior.
688 to any new write I/O requests but allows reads to any of the remaining healthy
690 Any write requests that have yet to be committed to disk would be blocked.
692 Prints out a message to the console and generates a system crash dump.
694 .It Sy feature@ Ns Ar feature_name Ns = Ns Sy enabled
695 The value of this property is the current state of
697 The only valid value when setting this property is
701 to the enabled state.
704 for details on feature states.
705 .It Sy listsnapshots Ns = Ns Sy on Ns | Ns Sy off
706 Controls whether information about snapshots associated with this pool is
714 This property can also be referred to by its shortened name,
716 .It Sy multihost Ns = Ns Sy on Ns | Ns Sy off
717 Controls whether a pool activity check should be performed during
718 .Nm zpool Cm import .
719 When a pool is determined to be active it cannot be imported, even with the
721 option. This property is intended to be used in failover configurations
722 where multiple hosts have access to a pool on shared storage. When this
723 property is on, periodic writes to storage occur to show the pool is in use.
725 .Sy zfs_multihost_interval
727 .Xr zfs-module-parameters 5
728 man page. In order to enable this property each host must set a unique hostid.
732 .Xr spl-module-paramters 5
733 for additional details. The default value is
735 .It Sy version Ns = Ns Ar version
736 The current on-disk version of the pool.
737 This can be increased, but never decreased.
738 The preferred method of updating pools is with the
740 command, though this property can be used when a specific version is needed for
741 backwards compatibility.
742 Once feature flags are enabled on a pool this property will no longer have a
746 All subcommands that modify state are logged persistently to the pool in their
751 command provides subcommands to create and destroy storage pools, add capacity
752 to storage pools, and provide information about the storage pools.
753 The following subcommands are supported:
759 Displays a help message.
764 .Oo Fl o Ar property Ns = Ns Ar value Oc
767 Adds the specified virtual devices to the given pool.
770 specification is described in the
775 option, and the device checks performed are described in the
782 even if they appear in use or specify a conflicting replication level.
783 Not all devices can be overridden in this manner.
787 GUIDs instead of the normal device names. These GUIDs can be used in place of
788 device names for the zpool detach/offline/remove/replace commands.
790 Display real paths for
792 resolving all symbolic links. This can be used to look up the current block
793 device name regardless of the /dev/disk/ path used to open it.
795 Displays the configuration that would be used without actually adding the
797 The actual pool creation can still fail due to insufficient privileges or
800 Display real paths for
802 instead of only the last component of the path. This can be used in
803 conjunction with the -L flag.
804 .It Fl o Ar property Ns = Ns Ar value
805 Sets the given pool properties. See the
807 section for a list of valid properties that can be set. The only property
808 supported at the moment is ashift.
814 .Oo Fl o Ar property Ns = Ns Ar value Oc
815 .Ar pool device new_device
821 The existing device cannot be part of a raidz configuration.
824 is not currently part of a mirrored configuration,
826 automatically transforms into a two-way mirror of
832 is part of a two-way mirror, attaching
834 creates a three-way mirror, and so on.
837 begins to resilver immediately.
842 even if its appears to be in use.
843 Not all devices can be overridden in this manner.
844 .It Fl o Ar property Ns = Ns Ar value
845 Sets the given pool properties. See the
847 section for a list of valid properties that can be set. The only property
848 supported at the moment is ashift.
856 Clears device errors in a pool.
857 If no arguments are specified, all device errors within the pool are cleared.
858 If one or more devices is specified, only those errors associated with the
859 specified device or devices are cleared.
864 .Op Fl m Ar mountpoint
865 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
866 .Oo Fl o Ar feature@feature Ns = Ns Ar value Oc Ns ...
867 .Oo Fl O Ar file-system-property Ns = Ns Ar value Oc Ns ...
872 Creates a new storage pool containing the virtual devices specified on the
874 The pool name must begin with a letter, and can only contain
875 alphanumeric characters as well as underscore
891 are reserved, as are names beginning with the pattern
895 specification is described in the
899 The command verifies that each device specified is accessible and not currently
900 in use by another subsystem.
901 There are some uses, such as being currently mounted, or specified as the
902 dedicated dump device, that prevents a device from ever being used by ZFS.
903 Other uses, such as having a preexisting UFS file system, can be overridden with
908 The command also checks that the replication strategy for the pool is
910 An attempt to combine redundant and non-redundant storage in a single pool, or
911 to mix disks and files, results in an error unless
914 The use of differently sized devices within a single raidz or mirror group is
915 also flagged as an error unless
921 option is specified, the default mount point is
923 The mount point must not exist or must be empty, or else the root dataset
925 This can be overridden with the
929 By default all supported features are enabled on the new pool unless the
934 Do not enable any features on the new pool.
935 Individual features can be enabled by setting their corresponding properties to
942 for details about feature properties.
946 even if they appear in use or specify a conflicting replication level.
947 Not all devices can be overridden in this manner.
948 .It Fl m Ar mountpoint
949 Sets the mount point for the root dataset.
950 The default mount point is
957 The mount point must be an absolute path,
961 For more information on dataset mount points, see
964 Displays the configuration that would be used without actually creating the
966 The actual pool creation can still fail due to insufficient privileges or
968 .It Fl o Ar property Ns = Ns Ar value
969 Sets the given pool properties.
972 section for a list of valid properties that can be set.
973 .It Fl o Ar feature@feature Ns = Ns Ar value
974 Sets the given pool feature. See the
976 section for a list of valid features that can be set.
977 Value can be either disabled or enabled.
978 .It Fl O Ar file-system-property Ns = Ns Ar value
979 Sets the given file system properties in the root file system of the pool.
984 for a list of valid properties that can be set.
987 .Fl o Sy cachefile Ns = Ns Sy none Fl o Sy altroot Ns = Ns Ar root
989 Sets the in-core pool name to
991 while the on-disk name will be the name specified as the pool name
993 This will set the default cachefile property to none. This is intended
994 to handle name space collisions when creating pools for other systems,
995 such as virtual machines or physical machines whose pools live on network
1004 Destroys the given pool, freeing up any devices for other use.
1005 This command tries to unmount any active datasets before destroying the pool.
1008 Forces any active datasets contained within the pool to be unmounted.
1018 The operation is refused if there are no other valid replicas of the data.
1019 If device may be re-added to the pool later on then consider the
1025 .Op Fl vHf Oo Ar pool Oc | Fl c
1027 Lists all recent events generated by the ZFS kernel modules. These events
1030 and used to automate administrative tasks such as replacing a failed device
1031 with a hot spare. For more information about the subclasses and event payloads
1032 that can be generated see the
1037 Clear all previous events.
1041 Scripted mode. Do not display headers, and separate fields by a
1042 single tab instead of arbitrary space.
1044 Print the entire payload for each event.
1053 Exports the given pools from the system.
1054 All devices are marked as exported, but are still considered in use by other
1056 The devices can be moved between systems
1057 .Pq even those of different endianness
1058 and imported as long as a sufficient number of devices are present.
1060 Before exporting the pool, all datasets within the pool are unmounted.
1061 A pool can not be exported if it has a shared spare that is currently being
1064 For pools to be portable, you must give the
1066 command whole disks, not just partitions, so that ZFS can label the disks with
1067 portable EFI labels.
1068 Otherwise, disk drivers on platforms of different endianness will not recognize
1072 Exports all pools imported on the system.
1074 Forcefully unmount all datasets, using the
1078 This command will forcefully export the pool even if it has a shared spare that
1079 is currently being used.
1080 This may lead to potential data corruption.
1086 .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
1087 .Sy all Ns | Ns Ar property Ns Oo , Ns Ar property Oc Ns ...
1090 Retrieves the given list of properties
1092 or all properties if
1096 for the specified storage pool(s).
1097 These properties are displayed with the following fields:
1099 name Name of storage pool
1100 property Property name
1101 value Property value
1102 source Property source, either 'default' or 'local'.
1107 section for more information on the available pool properties.
1111 Do not display headers, and separate fields by a single tab instead of arbitrary
1114 A comma-separated list of columns to display.
1115 .Sy name Ns \&, Ns Sy property Ns \&, Ns Sy value Ns \&, Ns Sy source
1116 is the default value.
1118 Display numbers in parsable (exact) values.
1124 .Oo Ar pool Oc Ns ...
1126 Displays the command history of the specified pool(s) or all pools if no pool is
1130 Displays internally logged ZFS events in addition to user initiated events.
1132 Displays log records in long format, which in addition to standard format
1133 includes, the user name, the hostname, and the zone in which the operation was
1142 Lists pools available to import.
1145 option is not specified, this command searches for devices in
1149 option can be specified multiple times, and all directories are searched.
1150 If the device appears to be part of an exported pool, this command displays a
1151 summary of the pool with the name of the pool, a numeric identifier, as well as
1152 the vdev layout and current health of the device for each device or file.
1153 Destroyed pools, pools that were previously destroyed with the
1154 .Nm zpool Cm destroy
1155 command, are not listed unless the
1157 option is specified.
1159 The numeric identifier is unique, and can be used instead of the pool name when
1160 multiple exported pools of the same name are available.
1162 .It Fl c Ar cachefile
1163 Reads configuration from the given
1165 that was created with the
1170 is used instead of searching for devices.
1172 Searches for devices or files in
1176 option can be specified multiple times.
1178 Lists destroyed pools only.
1185 .Op Fl F Oo Fl n Oc Oo Fl T Oc Oo Fl X Oc
1186 .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir
1188 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1192 Imports all pools found in the search directories.
1193 Identical to the previous command, except that all pools with a sufficient
1194 number of devices available are imported.
1195 Destroyed pools, pools that were previously destroyed with the
1196 .Nm zpool Cm destroy
1197 command, will not be imported unless the
1199 option is specified.
1202 Searches for and imports all pools found.
1203 .It Fl c Ar cachefile
1204 Reads configuration from the given
1206 that was created with the
1211 is used instead of searching for devices.
1213 Searches for devices or files in
1217 option can be specified multiple times.
1218 This option is incompatible with the
1222 Imports destroyed pools only.
1225 option is also required.
1227 Forces import, even if the pool appears to be potentially active.
1229 Recovery mode for a non-importable pool.
1230 Attempt to return the pool to an importable state by discarding the last few
1232 Not all damaged pools can be recovered by using this option.
1233 If successful, the data from the discarded transactions is irretrievably lost.
1234 This option is ignored if the pool is importable or already imported.
1236 Indicates that this command will request encryption keys for all encrypted
1237 datasets it attempts to mount as it is bringing the pool online. Note that if
1242 this command will block waiting for the keys to be entered. Without this flag
1243 encrypted datasets will be left unavailable until the keys are loaded.
1245 Allows a pool to import when there is a missing log device.
1246 Recent transactions can be lost because the log device will be discarded.
1251 Determines whether a non-importable pool can be made importable again, but does
1252 not actually perform the pool recovery.
1253 For more details about pool recovery mode, see the
1257 Import the pool without mounting any file systems.
1259 Comma-separated list of mount options to use when mounting datasets within the
1263 for a description of dataset properties and mount options.
1264 .It Fl o Ar property Ns = Ns Ar value
1265 Sets the specified property on the imported pool.
1268 section for more information on the available pool properties.
1279 Scan using the default search path, the libblkid cache will not be
1280 consulted. A custom search path may be specified by setting the
1281 ZPOOL_IMPORT_PATH environment variable.
1285 recovery option. Determines whether extreme
1286 measures to find a valid txg should take place. This allows the pool to
1287 be rolled back to a txg which is no longer guaranteed to be consistent.
1288 Pools imported at an inconsistent txg may contain uncorrectable
1289 checksum errors. For more details about pool recovery mode, see the
1291 option, above. WARNING: This option can be extremely hazardous to the
1292 health of your pool and should only be used as a last resort.
1294 Specify the txg to use for rollback. Implies
1297 about pool recovery mode, see the
1299 option, above. WARNING: This option can be extremely hazardous to the
1300 health of your pool and should only be used as a last resort.
1306 .Op Fl F Oo Fl n Oc Oo Fl t Oc Oo Fl T Oc Oo Fl X Oc
1307 .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir
1309 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1312 .Ar pool Ns | Ns Ar id
1315 Imports a specific pool.
1316 A pool can be identified by its name or the numeric identifier.
1319 is specified, the pool is imported using the name
1321 Otherwise, it is imported with the same name as its exported name.
1323 If a device is removed from a system without running
1325 first, the device appears as potentially active.
1326 It cannot be determined if this was a failed export, or whether the device is
1327 really in use from another host.
1328 To import a pool in this state, the
1332 .It Fl c Ar cachefile
1333 Reads configuration from the given
1335 that was created with the
1340 is used instead of searching for devices.
1342 Searches for devices or files in
1346 option can be specified multiple times.
1347 This option is incompatible with the
1351 Imports destroyed pool.
1354 option is also required.
1356 Forces import, even if the pool appears to be potentially active.
1358 Recovery mode for a non-importable pool.
1359 Attempt to return the pool to an importable state by discarding the last few
1361 Not all damaged pools can be recovered by using this option.
1362 If successful, the data from the discarded transactions is irretrievably lost.
1363 This option is ignored if the pool is importable or already imported.
1365 Indicates that this command will request encryption keys for all encrypted
1366 datasets it attempts to mount as it is bringing the pool online. Note that if
1371 this command will block waiting for the keys to be entered. Without this flag
1372 encrypted datasets will be left unavailable until the keys are loaded.
1374 Allows a pool to import when there is a missing log device.
1375 Recent transactions can be lost because the log device will be discarded.
1380 Determines whether a non-importable pool can be made importable again, but does
1381 not actually perform the pool recovery.
1382 For more details about pool recovery mode, see the
1386 Comma-separated list of mount options to use when mounting datasets within the
1390 for a description of dataset properties and mount options.
1391 .It Fl o Ar property Ns = Ns Ar value
1392 Sets the specified property on the imported pool.
1395 section for more information on the available pool properties.
1406 Scan using the default search path, the libblkid cache will not be
1407 consulted. A custom search path may be specified by setting the
1408 ZPOOL_IMPORT_PATH environment variable.
1412 recovery option. Determines whether extreme
1413 measures to find a valid txg should take place. This allows the pool to
1414 be rolled back to a txg which is no longer guaranteed to be consistent.
1415 Pools imported at an inconsistent txg may contain uncorrectable
1416 checksum errors. For more details about pool recovery mode, see the
1418 option, above. WARNING: This option can be extremely hazardous to the
1419 health of your pool and should only be used as a last resort.
1421 Specify the txg to use for rollback. Implies
1424 about pool recovery mode, see the
1426 option, above. WARNING: This option can be extremely hazardous to the
1427 health of your pool and should only be used as a last resort.
1433 is temporary. Temporary pool names last until export. Ensures that
1434 the original pool name will be used in all label updates and therefore
1435 is retained upon export.
1436 Will also set -o cachefile=none when not explicitly specified.
1441 .Op Oo Oo Fl c Ar SCRIPT Oc Oo Fl lq Oc Oc Ns | Ns Fl rw
1442 .Op Fl T Sy u Ns | Ns Sy d
1444 .Oo Oo Ar pool Ns ... Oc Ns | Ns Oo Ar pool vdev Ns ... Oc Ns | Ns Oo Ar vdev Ns ... Oc Oc
1445 .Op Ar interval Op Ar count
1447 Displays I/O statistics for the given pools/vdevs. You can pass in a
1448 list of pools, a pool and list of vdevs in that pool, or a list of any
1449 vdevs from any pool. If no items are specified, statistics for every
1450 pool in the system are shown.
1453 the statistics are printed every
1455 seconds until ^C is pressed. If count is specified, the command exits
1456 after count reports are printed. The first report printed is always
1457 the statistics since boot regardless of whether
1461 are passed. However, this behavior can be suppressed with the
1463 flag. Also note that the units of
1467 that are printed in the report are in base 1024. To get the raw
1472 .It Fl c Op Ar SCRIPT1 Ns Oo , Ns Ar SCRIPT2 Oc Ns ...
1473 Run a script (or scripts) on each vdev and include the output as a new column
1476 output. Users can run any script found in their
1478 directory or from the system
1479 .Pa /etc/zfs/zpool.d
1480 directory. Script names containing the slash (/) character are not allowed.
1481 The default search path can be overridden by setting the
1482 ZPOOL_SCRIPTS_PATH environment variable. A privileged user can run
1484 if they have the ZPOOL_SCRIPTS_AS_ROOT
1485 environment variable set. If a script requires the use of a privileged
1488 then it's recommended you allow the user access to it in
1490 or add the user to the
1491 .Pa /etc/sudoers.d/zfs
1496 is passed without a script name, it prints a list of all scripts.
1498 also sets verbose mode
1499 .No \&( Ns Fl v Ns No \&).
1501 Script output should be in the form of "name=value". The column name is
1502 set to "name" and the value is set to "value". Multiple lines can be
1503 used to output multiple columns. The first line of output not in the
1504 "name=value" format is displayed without a column title, and no more
1505 output after that is displayed. This can be useful for printing error
1506 messages. Blank or NULL values are printed as a '-' to make output
1509 The following environment variables are set before running each script:
1510 .Bl -tag -width "VDEV_PATH"
1512 Full path to the vdev
1514 .Bl -tag -width "VDEV_UPATH"
1516 Underlying path to the vdev (/dev/sd*). For use with device mapper,
1517 multipath, or partitioned vdevs.
1519 .Bl -tag -width "VDEV_ENC_SYSFS_PATH"
1520 .It Sy VDEV_ENC_SYSFS_PATH
1521 The sysfs path to the enclosure for the vdev (if any).
1523 .It Fl T Sy u Ns | Ns Sy d
1524 Display a time stamp.
1527 for a printed representation of the internal representation of time.
1532 for standard date format.
1536 Display vdev GUIDs instead of the normal device names. These GUIDs
1537 can be used in place of device names for the zpool
1538 detach/offline/remove/replace commands.
1540 Scripted mode. Do not display headers, and separate fields by a
1541 single tab instead of arbitrary space.
1543 Display real paths for vdevs resolving all symbolic links. This can
1544 be used to look up the current block device name regardless of the
1546 path used to open it.
1548 Display numbers in parsable (exact) values. Time values are in
1551 Display full paths for vdevs instead of only the last component of
1552 the path. This can be used in conjunction with the
1556 Print request size histograms for the leaf ZIOs. This includes
1557 histograms of individual ZIOs (
1559 and aggregate ZIOs (
1561 These stats can be useful for seeing how well the ZFS IO aggregator is
1562 working. Do not confuse these request size stats with the block layer
1563 requests; it's possible ZIOs can be broken up before being sent to the
1566 Verbose statistics Reports usage statistics for individual vdevs within the
1567 pool, in addition to the pool-wide statistics.
1571 Include average latency statistics:
1574 Average total IO time (queuing + disk IO time).
1576 Average disk IO time (time reading/writing the disk).
1578 Average amount of time IO spent in synchronous priority queues. Does
1579 not include disk time.
1581 Average amount of time IO spent in asynchronous priority queues.
1582 Does not include disk time.
1584 Average queuing time in scrub queue. Does not include disk time.
1586 Include active queue statistics. Each priority queue has both
1591 IOs. Pending IOs are waiting to
1592 be issued to the disk, and active IOs have been issued to disk and are
1593 waiting for completion. These stats are broken out by priority queue:
1595 .Ar syncq_read/write :
1596 Current number of entries in synchronous priority
1598 .Ar asyncq_read/write :
1599 Current number of entries in asynchronous priority queues.
1601 Current number of entries in scrub queue.
1603 All queue statistics are instantaneous measurements of the number of
1604 entries in the queues. If you specify an interval, the measurements
1605 will be sampled from the end of the interval.
1613 Removes ZFS label information from the specified
1617 must not be part of an active pool configuration.
1620 Treat exported or foreign devices as inactive.
1626 .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
1627 .Op Fl T Sy u Ns | Ns Sy d
1628 .Oo Ar pool Oc Ns ...
1629 .Op Ar interval Op Ar count
1631 Lists the given pools along with a health status and space usage.
1634 are specified, all pools in the system are listed.
1637 the information is printed every
1639 seconds until ^C is pressed.
1642 is specified, the command exits after
1644 reports are printed.
1647 Display vdev GUIDs instead of the normal device names. These GUIDs
1648 can be used in place of device names for the zpool
1649 detach/offline/remove/replace commands.
1652 Do not display headers, and separate fields by a single tab instead of arbitrary
1654 .It Fl o Ar property
1655 Comma-separated list of properties to display.
1658 section for a list of valid properties.
1660 .Cm name , size , allocated , free , expandsize , fragmentation , capacity ,
1661 .Cm dedupratio , health , altroot .
1663 Display real paths for vdevs resolving all symbolic links. This can
1664 be used to look up the current block device name regardless of the
1665 /dev/disk/ path used to open it.
1667 Display numbers in parsable
1671 Display full paths for vdevs instead of only the last component of
1672 the path. This can be used in conjunction with the
1674 .It Fl T Sy u Ns | Ns Sy d
1675 Display a time stamp.
1678 for a printed representation of the internal representation of time.
1683 for standard date format.
1688 Reports usage statistics for individual vdevs within the pool, in addition to
1689 the pool-wise statistics.
1696 .Ar pool Ar device Ns ...
1698 Takes the specified physical device offline.
1701 is offline, no attempt is made to read or write to the device.
1702 This command is not applicable to spares.
1705 Force fault. Instead of offlining the disk, put it into a faulted
1706 state. The fault will persist across imports unless the
1711 Upon reboot, the specified physical device reverts to its previous state.
1717 .Ar pool Ar device Ns ...
1719 Brings the specified physical device online.
1720 This command is not applicable to spares.
1723 Expand the device to use all available space.
1724 If the device is part of a mirror or raidz then all devices must be expanded
1725 before the new space will become available to the pool.
1732 Generates a new unique identifier for the pool.
1733 You must ensure that all devices in this pool are online and healthy before
1734 performing this action.
1741 Reopen all the vdevs associated with the pool.
1744 Do not restart an in-progress scrub operation. This is not recommended and can
1745 result in partially resilvered devices unless a second scrub is performed.
1750 .Ar pool Ar device Ns ...
1752 Removes the specified device from the pool.
1753 This command currently only supports removing hot spares, cache, and log
1755 A mirrored log device can be removed by specifying the top-level mirror for the
1757 Non-log devices that are part of a mirrored configuration can be removed using
1761 Non-redundant and raidz devices cannot be removed from a pool.
1766 .Op Fl o Ar property Ns = Ns Ar value
1767 .Ar pool Ar device Op Ar new_device
1773 This is equivalent to attaching
1775 waiting for it to resilver, and then detaching
1780 must be greater than or equal to the minimum size of all the devices in a mirror
1781 or raidz configuration.
1784 is required if the pool is not redundant.
1787 is not specified, it defaults to
1789 This form of replacement is useful after an existing disk has failed and has
1790 been physically replaced.
1791 In this case, the new disk may have the same
1793 path as the old device, even though it is actually a different disk.
1794 ZFS recognizes this.
1799 even if its appears to be in use.
1800 Not all devices can be overridden in this manner.
1801 .It Fl o Ar property Ns = Ns Ar value
1802 Sets the given pool properties. See the
1804 section for a list of valid properties that can be set.
1805 The only property supported at the moment is
1814 Begins a scrub or resumes a paused scrub.
1815 The scrub examines all data in the specified pools to verify that it checksums
1819 devices, ZFS automatically repairs any damage discovered during the scrub.
1822 command reports the progress of the scrub and summarizes the results of the
1823 scrub upon completion.
1825 Scrubbing and resilvering are very similar operations.
1826 The difference is that resilvering only examines data that ZFS knows to be out
1829 for example, when attaching a new device to a mirror or replacing an existing
1832 whereas scrubbing examines all data to discover silent errors due to hardware
1833 faults or disk failure.
1835 Because scrubbing and resilvering are I/O-intensive operations, ZFS only allows
1837 If a scrub is paused, the
1840 If a resilver is in progress, ZFS does not allow a scrub to be started until the
1849 Scrub pause state and progress are periodically synced to disk.
1850 If the system is restarted or pool is exported during a paused scrub,
1851 even after import, scrub will remain paused until it is resumed.
1852 Once resumed the scrub will pick up from the place where it was last
1853 checkpointed to disk.
1854 To resume a paused scrub issue
1861 .Ar property Ns = Ns Ar value
1864 Sets the given property on the specified pool.
1867 section for more information on what properties can be set and acceptable
1873 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1884 must be mirrors and the pool must not be in the process of resilvering.
1885 At the time of the split,
1887 will be a replica of
1890 last device in each mirror is split from
1895 The optional device specification causes the specified device(s) to be
1898 and, should any devices remain unspecified,
1899 the last device in each mirror is used as would be by default.
1902 Display vdev GUIDs instead of the normal device names. These GUIDs
1903 can be used in place of device names for the zpool
1904 detach/offline/remove/replace commands.
1906 Display real paths for vdevs resolving all symbolic links. This can
1907 be used to look up the current block device name regardless of the
1909 path used to open it.
1911 Indicates that this command will request encryption keys for all encrypted
1912 datasets it attempts to mount as it is bringing the new pool online. Note that
1913 if any datasets have a
1917 this command will block waiting for the keys to be entered. Without this flag
1918 encrypted datasets will be left unavailable until the keys are loaded.
1920 Do dry run, do not actually perform the split.
1921 Print out the expected configuration of
1924 Display full paths for vdevs instead of only the last component of
1925 the path. This can be used in conjunction with the
1927 .It Fl o Ar property Ns = Ns Ar value
1928 Sets the specified property for
1932 section for more information on the available pool properties.
1940 and automatically import it.
1945 .Op Fl c Op Ar SCRIPT1 Ns Oo , Ns Ar SCRIPT2 Oc Ns ...
1947 .Op Fl T Sy u Ns | Ns Sy d
1948 .Oo Ar pool Oc Ns ...
1949 .Op Ar interval Op Ar count
1951 Displays the detailed health status for the given pools.
1954 is specified, then the status of each pool in the system is displayed.
1955 For more information on pool and device health, see the
1956 .Sx Device Failure and Recovery
1959 If a scrub or resilver is in progress, this command reports the percentage done
1960 and the estimated time to completion.
1961 Both of these are only approximate, because the amount of data in the pool and
1962 the other workloads on the system can change.
1964 .It Fl c Op Ar SCRIPT1 Ns Oo , Ns Ar SCRIPT2 Oc Ns ...
1965 Run a script (or scripts) on each vdev and include the output as a new column
1972 for complete details.
1974 Display vdev GUIDs instead of the normal device names. These GUIDs
1975 can be used in place of device names for the zpool
1976 detach/offline/remove/replace commands.
1978 Display real paths for vdevs resolving all symbolic links. This can
1979 be used to look up the current block device name regardless of the
1981 path used to open it.
1983 Display full paths for vdevs instead of only the last component of
1984 the path. This can be used in conjunction with the
1987 Display a histogram of deduplication statistics, showing the allocated
1988 .Pq physically present on disk
1990 .Pq logically referenced in the pool
1991 block counts and sizes by reference count.
1992 .It Fl T Sy u Ns | Ns Sy d
1993 Display a time stamp.
1996 for a printed representation of the internal representation of time.
2001 for standard date format.
2005 Displays verbose data error information, printing out a complete list of all
2006 data errors since the last complete pool scrub.
2008 Only display status for pools that are exhibiting errors or are otherwise
2010 Warnings about pools not using the latest on-disk format will not be included.
2017 This command forces all in-core dirty data to be written to the primary
2018 pool storage and not the ZIL. It will also update administrative
2019 information including quota reporting. Without arguments,
2021 will sync all pools on the system. Otherwise, it will sync only the
2027 Displays pools which do not have all supported features enabled and pools
2028 formatted using a legacy ZFS version number.
2029 These pools can continue to be used, but some features may not be available.
2031 .Nm zpool Cm upgrade Fl a
2032 to enable all features on all pools.
2038 Displays legacy ZFS versions supported by the current software.
2040 .Xr zpool-features 5
2041 for a description of feature flags features supported by the current software.
2046 .Fl a Ns | Ns Ar pool Ns ...
2048 Enables all supported features on the given pool.
2049 Once this is done, the pool will no longer be accessible on systems that do not
2050 support feature flags.
2053 for details on compatibility with systems that support feature flags, but do not
2054 support all features enabled on the pool.
2057 Enables all supported features on all pools.
2059 Upgrade to the specified legacy version.
2062 flag is specified, no features will be enabled on the pool.
2063 This option can only be used to increase the version number up to the last
2064 supported legacy version number.
2068 The following exit values are returned:
2071 Successful completion.
2075 Invalid command line options were specified.
2079 .It Sy Example 1 No Creating a RAID-Z Storage Pool
2080 The following command creates a pool with a single raidz root vdev that
2081 consists of six disks.
2083 # zpool create tank raidz sda sdb sdc sdd sde sdf
2085 .It Sy Example 2 No Creating a Mirrored Storage Pool
2086 The following command creates a pool with two mirrors, where each mirror
2089 # zpool create tank mirror sda sdb mirror sdc sdd
2091 .It Sy Example 3 No Creating a ZFS Storage Pool by Using Partitions
2092 The following command creates an unmirrored pool using two disk partitions.
2094 # zpool create tank sda1 sdb2
2096 .It Sy Example 4 No Creating a ZFS Storage Pool by Using Files
2097 The following command creates an unmirrored pool using files.
2098 While not recommended, a pool based on files can be useful for experimental
2101 # zpool create tank /path/to/file/a /path/to/file/b
2103 .It Sy Example 5 No Adding a Mirror to a ZFS Storage Pool
2104 The following command adds two mirrored disks to the pool
2106 assuming the pool is already made up of two-way mirrors.
2107 The additional space is immediately available to any datasets within the pool.
2109 # zpool add tank mirror sda sdb
2111 .It Sy Example 6 No Listing Available ZFS Storage Pools
2112 The following command lists all available pools on the system.
2113 In this case, the pool
2115 is faulted due to a missing device.
2116 The results from this command are similar to the following:
2119 NAME SIZE ALLOC FREE FRAG EXPANDSZ CAP DEDUP HEALTH ALTROOT
2120 rpool 19.9G 8.43G 11.4G 33% - 42% 1.00x ONLINE -
2121 tank 61.5G 20.0G 41.5G 48% - 32% 1.00x ONLINE -
2122 zion - - - - - - - FAULTED -
2124 .It Sy Example 7 No Destroying a ZFS Storage Pool
2125 The following command destroys the pool
2127 and any datasets contained within.
2129 # zpool destroy -f tank
2131 .It Sy Example 8 No Exporting a ZFS Storage Pool
2132 The following command exports the devices in pool
2134 so that they can be relocated or later imported.
2138 .It Sy Example 9 No Importing a ZFS Storage Pool
2139 The following command displays available pools, and then imports the pool
2141 for use on the system.
2142 The results from this command are similar to the following:
2146 id: 15451357997522795478
2148 action: The pool can be imported using its name or numeric identifier.
2158 .It Sy Example 10 No Upgrading All ZFS Storage Pools to the Current Version
2159 The following command upgrades all ZFS Storage pools to the current version of
2163 This system is currently running ZFS version 2.
2165 .It Sy Example 11 No Managing Hot Spares
2166 The following command creates a new pool with an available hot spare:
2168 # zpool create tank mirror sda sdb spare sdc
2171 If one of the disks were to fail, the pool would be reduced to the degraded
2173 The failed device can be replaced using the following command:
2175 # zpool replace tank sda sdd
2178 Once the data has been resilvered, the spare is automatically removed and is
2179 made available for use should another device fail.
2180 The hot spare can be permanently removed from the pool using the following
2183 # zpool remove tank sdc
2185 .It Sy Example 12 No Creating a ZFS Pool with Mirrored Separate Intent Logs
2186 The following command creates a ZFS storage pool consisting of two, two-way
2187 mirrors and mirrored log devices:
2189 # zpool create pool mirror sda sdb mirror sdc sdd log mirror \\
2192 .It Sy Example 13 No Adding Cache Devices to a ZFS Pool
2193 The following command adds two disks for use as cache devices to a ZFS storage
2196 # zpool add pool cache sdc sdd
2199 Once added, the cache devices gradually fill with content from main memory.
2200 Depending on the size of your cache devices, it could take over an hour for
2202 Capacity and reads can be monitored using the
2206 # zpool iostat -v pool 5
2208 .It Sy Example 14 No Removing a Mirrored Log Device
2209 The following command removes the mirrored log device
2211 Given this configuration:
2215 scrub: none requested
2218 NAME STATE READ WRITE CKSUM
2220 mirror-0 ONLINE 0 0 0
2223 mirror-1 ONLINE 0 0 0
2227 mirror-2 ONLINE 0 0 0
2232 The command to remove the mirrored log
2236 # zpool remove tank mirror-2
2238 .It Sy Example 15 No Displaying expanded space on a device
2239 The following command displays the detailed information for the pool
2241 This pool is comprised of a single raidz vdev where one of its devices
2242 increased its capacity by 10GB.
2243 In this example, the pool will not be able to utilize this extra capacity until
2244 all the devices under the raidz vdev have been expanded.
2246 # zpool list -v data
2247 NAME SIZE ALLOC FREE FRAG EXPANDSZ CAP DEDUP HEALTH ALTROOT
2248 data 23.9G 14.6G 9.30G 48% - 61% 1.00x ONLINE -
2249 raidz1 23.9G 14.6G 9.30G 48% -
2254 .It Sy Example 16 No Adding output columns
2255 Additional columns can be added to the
2263 # zpool status -c vendor,model,size
2264 NAME STATE READ WRITE CKSUM vendor model size
2266 mirror-0 ONLINE 0 0 0
2267 U1 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T
2268 U10 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T
2269 U11 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T
2270 U12 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T
2271 U13 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T
2272 U14 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T
2274 # zpool iostat -vc slaves
2275 capacity operations bandwidth
2276 pool alloc free read write read write slaves
2277 ---------- ----- ----- ----- ----- ----- ----- ---------
2278 tank 20.4G 7.23T 26 152 20.7M 21.6M
2279 mirror 20.4G 7.23T 26 152 20.7M 21.6M
2280 U1 - - 0 31 1.46K 20.6M sdb sdff
2281 U10 - - 0 1 3.77K 13.3K sdas sdgw
2282 U11 - - 0 1 288K 13.3K sdat sdgx
2283 U12 - - 0 1 78.4K 13.3K sdau sdgy
2284 U13 - - 0 1 128K 13.3K sdav sdgz
2285 U14 - - 0 1 63.2K 13.3K sdfk sdg
2288 .Sh ENVIRONMENT VARIABLES
2289 .Bl -tag -width "ZFS_ABORT"
2293 to dump core on exit for the purposes of running
2296 .Bl -tag -width "ZPOOL_IMPORT_PATH"
2297 .It Ev ZPOOL_IMPORT_PATH
2298 The search path for devices or files to use with the pool. This is a colon-separated list of directories in which
2300 looks for device nodes and files.
2306 .Bl -tag -width "ZPOOL_VDEV_NAME_GUID"
2307 .It Ev ZPOOL_VDEV_NAME_GUID
2309 .Nm zpool subcommands to output vdev guids by default. This behavior
2312 command line option.
2314 .Bl -tag -width "ZPOOL_VDEV_NAME_FOLLOW_LINKS"
2315 .It Ev ZPOOL_VDEV_NAME_FOLLOW_LINKS
2318 subcommands to follow links for vdev names by default. This behavior is identical to the
2320 command line option.
2322 .Bl -tag -width "ZPOOL_VDEV_NAME_PATH"
2323 .It Ev ZPOOL_VDEV_NAME_PATH
2326 subcommands to output full vdev path names by default. This
2327 behavior is identical to the
2329 command line option.
2331 .Bl -tag -width "ZFS_VDEV_DEVID_OPT_OUT"
2332 .It Ev ZFS_VDEV_DEVID_OPT_OUT
2333 Older ZFS on Linux implementations had issues when attempting to display pool
2334 config VDEV names if a
2336 NVP value is present in the pool's config.
2338 For example, a pool that originated on illumos platform would have a devid
2339 value in the config and
2341 would fail when listing the config.
2342 This would also be true for future Linux based pools.
2344 A pool can be stripped of any
2346 values on import or prevented from adding
2352 .Sy ZFS_VDEV_DEVID_OPT_OUT .
2354 .Bl -tag -width "ZPOOL_SCRIPTS_AS_ROOT"
2355 .It Ev ZPOOL_SCRIPTS_AS_ROOT
2356 Allow a privileged user to run the
2357 .Nm zpool status/iostat
2360 option. Normally, only unprivileged users are allowed to run
2363 .Bl -tag -width "ZPOOL_SCRIPTS_PATH"
2364 .It Ev ZPOOL_SCRIPTS_PATH
2365 The search path for scripts when running
2366 .Nm zpool status/iostat
2369 option. This is a colon-separated list of directories and overrides the default
2372 .Pa /etc/zfs/zpool.d
2375 .Bl -tag -width "ZPOOL_SCRIPTS_ENABLED"
2376 .It Ev ZPOOL_SCRIPTS_ENABLED
2378 .Nm zpool status/iostat
2382 .Sy ZPOOL_SCRIPTS_ENABLED
2383 is not set, it is assumed that the user is allowed to run
2384 .Nm zpool status/iostat -c .
2386 .Sh INTERFACE STABILITY
2390 .Xr zfs-module-parameters 5 ,
2391 .Xr zpool-features 5 ,