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 2016 Nexenta Systems, Inc.
25 .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
26 .\" Copyright (c) 2017 Datto Inc.
27 .\" Copyright (c) 2017 George Melikov. All Rights Reserved.
28 .\" Copyright (c) 2017 Datto Inc.
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 ...
81 .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
82 .Sy all Ns | Ns Ar property Ns Oo , Ns Ar property Oc Ns ...
91 .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir
96 .Op Fl F Oo Fl n Oc Oo Fl T Oc Oo Fl X Oc
97 .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir
99 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
104 .Op Fl F Oo Fl n Oc Oo Fl T Oc Oo Fl X Oc
105 .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir
107 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
110 .Ar pool Ns | Ns Ar id
111 .Op Ar newpool Oo Fl t Oc
114 .Op Oo Oo Fl c Ar SCRIPT Oc Oo Fl lq Oc Oc Ns | Ns Fl rw
115 .Op Fl T Sy u Ns | Ns Sy d
117 .Oo Oo Ar pool Ns ... Oc Ns | Ns Oo Ar pool vdev Ns ... Oc Ns | Ns Oo Ar vdev Ns ... Oc Oc
118 .Op Ar interval Op Ar count
126 .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
127 .Op Fl T Sy u Ns | Ns Sy d
128 .Oo Ar pool Oc Ns ...
129 .Op Ar interval Op Ar count
134 .Ar pool Ar device Ns ...
138 .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 canceled 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 available within the pool.
477 This property can also be referred to by its shortened column name,
480 Percentage of pool space used.
481 This property can also be referred to by its shortened column name,
484 Amount of uninitialized space within the pool or device that can be used to
485 increase the total capacity of the pool.
486 Uninitialized space consists of any space on an EFI labeled vdev which has not
489 .Nm zpool Cm online Fl e
491 This space occurs when a LUN is dynamically expanded.
493 The amount of fragmentation in the pool.
495 The amount of free space available in the pool.
497 After a file system or snapshot is destroyed, the space it was using is
498 returned to the pool asynchronously.
500 is the amount of space remaining to be reclaimed.
507 The current health of the pool.
509 .Sy ONLINE , DEGRADED , FAULTED , OFFLINE, REMOVED , UNAVAIL .
511 A unique identifier for the pool.
513 Total size of the storage pool.
514 .It Sy unsupported@ Ns Em feature_guid
515 Information about unsupported features that are enabled on the pool.
520 Amount of storage space used within the pool.
523 The space usage properties report actual physical space available to the
525 The physical space can be different from the total amount of space that any
526 contained datasets can actually use.
527 The amount of space used in a raidz configuration depends on the characteristics
528 of the data being written.
529 In addition, ZFS reserves some space for internal accounting that the
531 command takes into account, but the
534 For non-full pools of a reasonable size, these effects should be invisible.
535 For small pools, or pools that are close to being completely full, these
536 discrepancies may become more noticeable.
538 The following property can be set at creation time and import time:
541 Alternate root directory.
542 If set, this directory is prepended to any mount points within the pool.
543 This can be used when examining an unknown pool where the mount points cannot be
544 trusted, or in an alternate boot environment, where the typical paths are not
547 is not a persistent property.
548 It is valid only while the system is up.
552 .Sy cachefile Ns = Ns Sy none ,
553 though this may be overridden using an explicit setting.
556 The following property can be set only at import time:
558 .It Sy readonly Ns = Ns Sy on Ns | Ns Sy off
561 the pool will be imported in read-only mode.
562 This property can also be referred to by its shortened column name,
566 The following properties can be set at creation time and import time, and later
571 .It Sy ashift Ns = Ns Sy ashift
572 Pool sector size exponent, to the power of
574 (internally referred to as
576 ). Values from 9 to 16, inclusive, are valid; also, the special
577 value 0 (the default) means to auto-detect using the kernel's block
578 layer and a ZFS internal exception list. I/O operations will be aligned
579 to the specified size boundaries. Additionally, the minimum (disk)
580 write size will be set to the specified size, so this represents a
581 space vs. performance trade-off. For optimal performance, the pool
582 sector size should be greater than or equal to the sector size of the
583 underlying disks. The typical case for setting this property is when
584 performance is important and the underlying disks use 4KiB sectors but
585 report 512B sectors to the OS (for compatibility reasons); in that
588 (which is 1<<12 = 4096). When set, this property is
589 used as the default hint value in subsequent vdev operations (add,
590 attach and replace). Changing this value will not modify any existing
591 vdev, not even on disk replacement; however it can be used, for
592 instance, to replace a dying 512B sectors disk with a newer 4KiB
593 sectors device: this will probably result in bad performance but at the
594 same time could prevent loss of data.
595 .It Sy autoexpand Ns = Ns Sy on Ns | Ns Sy off
596 Controls automatic pool expansion when the underlying LUN is grown.
599 the pool will be resized according to the size of the expanded device.
600 If the device is part of a mirror or raidz then all devices within that
601 mirror/raidz group must be expanded before the new space is made available to
603 The default behavior is
605 This property can also be referred to by its shortened column name,
607 .It Sy autoreplace Ns = Ns Sy on Ns | Ns Sy off
608 Controls automatic device replacement.
611 device replacement must be initiated by the administrator by using the
616 any new device, found in the same physical location as a device that previously
617 belonged to the pool, is automatically formatted and replaced.
618 The default behavior is
620 This property can also be referred to by its shortened column name,
622 Autoreplace can also be used with virtual disks (like device
623 mapper) provided that you use the /dev/disk/by-vdev paths setup by
624 vdev_id.conf. See the
626 man page for more details.
627 Autoreplace and autoonline require the ZFS Event Daemon be configured and
630 man page for more details.
631 .It Sy bootfs Ns = Ns Sy (unset) Ns | Ns Ar pool Ns / Ns Ar dataset
632 Identifies the default bootable dataset for the root pool. This property is
633 expected to be set mainly by the installation and upgrade programs.
634 Not all Linux distribution boot processes use the bootfs property.
635 .It Sy cachefile Ns = Ns Ar path Ns | Ns Sy none
636 Controls the location of where the pool configuration is cached.
637 Discovering all pools on system startup requires a cached copy of the
638 configuration data that is stored on the root file system.
639 All pools in this cache are automatically imported when the system boots.
640 Some environments, such as install and clustering, need to cache this
641 information in a different location so that pools are not automatically
643 Setting this property caches the pool configuration in a different location that
644 can later be imported with
645 .Nm zpool Cm import Fl c .
646 Setting it to the special value
648 creates a temporary pool that is never cached, and the special value
651 uses the default location.
653 Multiple pools can share the same cache file.
654 Because the kernel destroys and recreates this file when pools are added and
655 removed, care should be taken when attempting to access this file.
656 When the last pool using a
658 is exported or destroyed, the file is removed.
659 .It Sy comment Ns = Ns Ar text
660 A text string consisting of printable ASCII characters that will be stored
661 such that it is available even if the pool becomes faulted.
662 An administrator can provide additional information about a pool using this
664 .It Sy dedupditto Ns = Ns Ar number
665 Threshold for the number of block ditto copies.
666 If the reference count for a deduplicated block increases above this number, a
667 new ditto copy of this block is automatically stored.
668 The default setting is
670 which causes no ditto copies to be created for deduplicated blocks.
671 The minimum legal nonzero setting is
673 .It Sy delegation Ns = Ns Sy on Ns | Ns Sy off
674 Controls whether a non-privileged user is granted access based on the dataset
675 permissions defined on the dataset.
678 for more information on ZFS delegated administration.
679 .It Sy failmode Ns = Ns Sy wait Ns | Ns Sy continue Ns | Ns Sy panic
680 Controls the system behavior in the event of catastrophic pool failure.
681 This condition is typically a result of a loss of connectivity to the underlying
682 storage device(s) or a failure of all devices within the pool.
683 The behavior of such an event is determined as follows:
684 .Bl -tag -width "continue"
686 Blocks all I/O access until the device connectivity is recovered and the errors
688 This is the default behavior.
692 to any new write I/O requests but allows reads to any of the remaining healthy
694 Any write requests that have yet to be committed to disk would be blocked.
696 Prints out a message to the console and generates a system crash dump.
698 .It Sy feature@ Ns Ar feature_name Ns = Ns Sy enabled
699 The value of this property is the current state of
701 The only valid value when setting this property is
705 to the enabled state.
708 for details on feature states.
709 .It Sy listsnapshots Ns = Ns Sy on Ns | Ns Sy off
710 Controls whether information about snapshots associated with this pool is
718 This property can also be referred to by its shortened name,
720 .It Sy multihost Ns = Ns Sy on Ns | Ns Sy off
721 Controls whether a pool activity check should be performed during
722 .Nm zpool Cm import .
723 When a pool is determined to be active it cannot be imported, even with the
725 option. This property is intended to be used in failover configurations
726 where multiple hosts have access to a pool on shared storage. When this
727 property is on, periodic writes to storage occur to show the pool is in use.
729 .Sy zfs_multihost_interval
731 .Xr zfs-module-parameters 5
732 man page. In order to enable this property each host must set a unique hostid.
736 .Xr spl-module-paramters 5
737 for additional details. The default value is
739 .It Sy version Ns = Ns Ar version
740 The current on-disk version of the pool.
741 This can be increased, but never decreased.
742 The preferred method of updating pools is with the
744 command, though this property can be used when a specific version is needed for
745 backwards compatibility.
746 Once feature flags are enabled on a pool this property will no longer have a
750 All subcommands that modify state are logged persistently to the pool in their
755 command provides subcommands to create and destroy storage pools, add capacity
756 to storage pools, and provide information about the storage pools.
757 The following subcommands are supported:
763 Displays a help message.
768 .Oo Fl o Ar property Ns = Ns Ar value Oc
771 Adds the specified virtual devices to the given pool.
774 specification is described in the
779 option, and the device checks performed are described in the
786 even if they appear in use or specify a conflicting replication level.
787 Not all devices can be overridden in this manner.
791 GUIDs instead of the normal device names. These GUIDs can be used in place of
792 device names for the zpool detach/offline/remove/replace commands.
794 Display real paths for
796 resolving all symbolic links. This can be used to look up the current block
797 device name regardless of the /dev/disk/ path used to open it.
799 Displays the configuration that would be used without actually adding the
801 The actual pool creation can still fail due to insufficient privileges or
804 Display real paths for
806 instead of only the last component of the path. This can be used in
807 conjunction with the -L flag.
808 .It Fl o Ar property Ns = Ns Ar value
809 Sets the given pool properties. See the
811 section for a list of valid properties that can be set. The only property
812 supported at the moment is ashift.
818 .Oo Fl o Ar property Ns = Ns Ar value Oc
819 .Ar pool device new_device
825 The existing device cannot be part of a raidz configuration.
828 is not currently part of a mirrored configuration,
830 automatically transforms into a two-way mirror of
836 is part of a two-way mirror, attaching
838 creates a three-way mirror, and so on.
841 begins to resilver immediately.
846 even if its appears to be in use.
847 Not all devices can be overridden in this manner.
848 .It Fl o Ar property Ns = Ns Ar value
849 Sets the given pool properties. See the
851 section for a list of valid properties that can be set. The only property
852 supported at the moment is ashift.
860 Clears device errors in a pool.
861 If no arguments are specified, all device errors within the pool are cleared.
862 If one or more devices is specified, only those errors associated with the
863 specified device or devices are cleared.
868 .Op Fl m Ar mountpoint
869 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
870 .Oo Fl o Ar feature@feature Ns = Ns Ar value Oc Ns ...
871 .Oo Fl O Ar file-system-property Ns = Ns Ar value Oc Ns ...
876 Creates a new storage pool containing the virtual devices specified on the
878 The pool name must begin with a letter, and can only contain
879 alphanumeric characters as well as underscore
895 are reserved, as are names beginning with the pattern
899 specification is described in the
903 The command verifies that each device specified is accessible and not currently
904 in use by another subsystem.
905 There are some uses, such as being currently mounted, or specified as the
906 dedicated dump device, that prevents a device from ever being used by ZFS.
907 Other uses, such as having a preexisting UFS file system, can be overridden with
912 The command also checks that the replication strategy for the pool is
914 An attempt to combine redundant and non-redundant storage in a single pool, or
915 to mix disks and files, results in an error unless
918 The use of differently sized devices within a single raidz or mirror group is
919 also flagged as an error unless
925 option is specified, the default mount point is
927 The mount point must not exist or must be empty, or else the root dataset
929 This can be overridden with the
933 By default all supported features are enabled on the new pool unless the
938 Do not enable any features on the new pool.
939 Individual features can be enabled by setting their corresponding properties to
946 for details about feature properties.
950 even if they appear in use or specify a conflicting replication level.
951 Not all devices can be overridden in this manner.
952 .It Fl m Ar mountpoint
953 Sets the mount point for the root dataset.
954 The default mount point is
961 The mount point must be an absolute path,
965 For more information on dataset mount points, see
968 Displays the configuration that would be used without actually creating the
970 The actual pool creation can still fail due to insufficient privileges or
972 .It Fl o Ar property Ns = Ns Ar value
973 Sets the given pool properties.
976 section for a list of valid properties that can be set.
977 .It Fl o Ar feature@feature Ns = Ns Ar value
978 Sets the given pool feature. See the
980 section for a list of valid features that can be set.
981 Value can be either disabled or enabled.
982 .It Fl O Ar file-system-property Ns = Ns Ar value
983 Sets the given file system properties in the root file system of the pool.
988 for a list of valid properties that can be set.
991 .Fl o Sy cachefile Ns = Ns Sy none Fl o Sy altroot Ns = Ns Ar root
993 Sets the in-core pool name to
995 while the on-disk name will be the name specified as the pool name
997 This will set the default cachefile property to none. This is intended
998 to handle name space collisions when creating pools for other systems,
999 such as virtual machines or physical machines whose pools live on network
1008 Destroys the given pool, freeing up any devices for other use.
1009 This command tries to unmount any active datasets before destroying the pool.
1012 Forces any active datasets contained within the pool to be unmounted.
1022 The operation is refused if there are no other valid replicas of the data.
1023 If device may be re-added to the pool later on then consider the
1032 Lists all recent events generated by the ZFS kernel modules. These events
1035 and used to automate administrative tasks such as replacing a failed device
1036 with a hot spare. For more information about the subclasses and event payloads
1037 that can be generated see the
1042 Clear all previous events.
1046 Scripted mode. Do not display headers, and separate fields by a
1047 single tab instead of arbitrary space.
1049 Print the entire payload for each event.
1058 Exports the given pools from the system.
1059 All devices are marked as exported, but are still considered in use by other
1061 The devices can be moved between systems
1062 .Pq even those of different endianness
1063 and imported as long as a sufficient number of devices are present.
1065 Before exporting the pool, all datasets within the pool are unmounted.
1066 A pool can not be exported if it has a shared spare that is currently being
1069 For pools to be portable, you must give the
1071 command whole disks, not just partitions, so that ZFS can label the disks with
1072 portable EFI labels.
1073 Otherwise, disk drivers on platforms of different endianness will not recognize
1077 Exports all pools imported on the system.
1079 Forcefully unmount all datasets, using the
1083 This command will forcefully export the pool even if it has a shared spare that
1084 is currently being used.
1085 This may lead to potential data corruption.
1091 .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
1092 .Sy all Ns | Ns Ar property Ns Oo , Ns Ar property Oc Ns ...
1095 Retrieves the given list of properties
1097 or all properties if
1101 for the specified storage pool(s).
1102 These properties are displayed with the following fields:
1104 name Name of storage pool
1105 property Property name
1106 value Property value
1107 source Property source, either 'default' or 'local'.
1112 section for more information on the available pool properties.
1116 Do not display headers, and separate fields by a single tab instead of arbitrary
1119 A comma-separated list of columns to display.
1120 .Sy name Ns , Ns Sy property Ns , Ns Sy value Ns , Ns Sy source
1121 is the default value.
1123 Display numbers in parsable (exact) values.
1129 .Oo Ar pool Oc Ns ...
1131 Displays the command history of the specified pool(s) or all pools if no pool is
1135 Displays internally logged ZFS events in addition to user initiated events.
1137 Displays log records in long format, which in addition to standard format
1138 includes, the user name, the hostname, and the zone in which the operation was
1145 .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir
1147 Lists pools available to import.
1150 option is not specified, this command searches for devices in
1154 option can be specified multiple times, and all directories are searched.
1155 If the device appears to be part of an exported pool, this command displays a
1156 summary of the pool with the name of the pool, a numeric identifier, as well as
1157 the vdev layout and current health of the device for each device or file.
1158 Destroyed pools, pools that were previously destroyed with the
1159 .Nm zpool Cm destroy
1160 command, are not listed unless the
1162 option is specified.
1164 The numeric identifier is unique, and can be used instead of the pool name when
1165 multiple exported pools of the same name are available.
1167 .It Fl c Ar cachefile
1168 Reads configuration from the given
1170 that was created with the
1175 is used instead of searching for devices.
1177 Searches for devices or files in
1181 option can be specified multiple times.
1183 Lists destroyed pools only.
1190 .Op Fl F Oo Fl n Oc Oo Fl T Oc Oo Fl X Oc
1191 .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir
1193 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1197 Imports all pools found in the search directories.
1198 Identical to the previous command, except that all pools with a sufficient
1199 number of devices available are imported.
1200 Destroyed pools, pools that were previously destroyed with the
1201 .Nm zpool Cm destroy
1202 command, will not be imported unless the
1204 option is specified.
1207 Searches for and imports all pools found.
1208 .It Fl c Ar cachefile
1209 Reads configuration from the given
1211 that was created with the
1216 is used instead of searching for devices.
1218 Searches for devices or files in
1222 option can be specified multiple times.
1223 This option is incompatible with the
1227 Imports destroyed pools only.
1230 option is also required.
1232 Forces import, even if the pool appears to be potentially active.
1234 Recovery mode for a non-importable pool.
1235 Attempt to return the pool to an importable state by discarding the last few
1237 Not all damaged pools can be recovered by using this option.
1238 If successful, the data from the discarded transactions is irretrievably lost.
1239 This option is ignored if the pool is importable or already imported.
1241 Allows a pool to import when there is a missing log device.
1242 Recent transactions can be lost because the log device will be discarded.
1247 Determines whether a non-importable pool can be made importable again, but does
1248 not actually perform the pool recovery.
1249 For more details about pool recovery mode, see the
1253 Import the pool without mounting any file systems.
1255 Comma-separated list of mount options to use when mounting datasets within the
1259 for a description of dataset properties and mount options.
1260 .It Fl o Ar property Ns = Ns Ar value
1261 Sets the specified property on the imported pool.
1264 section for more information on the available pool properties.
1275 Scan using the default search path, the libblkid cache will not be
1276 consulted. A custom search path may be specified by setting the
1277 ZPOOL_IMPORT_PATH environment variable.
1281 recovery option. Determines whether extreme
1282 measures to find a valid txg should take place. This allows the pool to
1283 be rolled back to a txg which is no longer guaranteed to be consistent.
1284 Pools imported at an inconsistent txg may contain uncorrectable
1285 checksum errors. For more details about pool recovery mode, see the
1287 option, above. WARNING: This option can be extremely hazardous to the
1288 health of your pool and should only be used as a last resort.
1290 Specify the txg to use for rollback. Implies
1293 about pool recovery mode, see the
1295 option, above. WARNING: This option can be extremely hazardous to the
1296 health of your pool and should only be used as a last resort.
1302 .Op Fl F Oo Fl n Oc Oo Fl t Oc Oo Fl T Oc Oo Fl X Oc
1303 .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir
1305 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1308 .Ar pool Ns | Ns Ar id
1311 Imports a specific pool.
1312 A pool can be identified by its name or the numeric identifier.
1315 is specified, the pool is imported using the name
1317 Otherwise, it is imported with the same name as its exported name.
1319 If a device is removed from a system without running
1321 first, the device appears as potentially active.
1322 It cannot be determined if this was a failed export, or whether the device is
1323 really in use from another host.
1324 To import a pool in this state, the
1328 .It Fl c Ar cachefile
1329 Reads configuration from the given
1331 that was created with the
1336 is used instead of searching for devices.
1338 Searches for devices or files in
1342 option can be specified multiple times.
1343 This option is incompatible with the
1347 Imports destroyed pool.
1350 option is also required.
1352 Forces import, even if the pool appears to be potentially active.
1354 Recovery mode for a non-importable pool.
1355 Attempt to return the pool to an importable state by discarding the last few
1357 Not all damaged pools can be recovered by using this option.
1358 If successful, the data from the discarded transactions is irretrievably lost.
1359 This option is ignored if the pool is importable or already imported.
1361 Allows a pool to import when there is a missing log device.
1362 Recent transactions can be lost because the log device will be discarded.
1367 Determines whether a non-importable pool can be made importable again, but does
1368 not actually perform the pool recovery.
1369 For more details about pool recovery mode, see the
1373 Comma-separated list of mount options to use when mounting datasets within the
1377 for a description of dataset properties and mount options.
1378 .It Fl o Ar property Ns = Ns Ar value
1379 Sets the specified property on the imported pool.
1382 section for more information on the available pool properties.
1393 Scan using the default search path, the libblkid cache will not be
1394 consulted. A custom search path may be specified by setting the
1395 ZPOOL_IMPORT_PATH environment variable.
1399 recovery option. Determines whether extreme
1400 measures to find a valid txg should take place. This allows the pool to
1401 be rolled back to a txg which is no longer guaranteed to be consistent.
1402 Pools imported at an inconsistent txg may contain uncorrectable
1403 checksum errors. For more details about pool recovery mode, see the
1405 option, above. WARNING: This option can be extremely hazardous to the
1406 health of your pool and should only be used as a last resort.
1408 Specify the txg to use for rollback. Implies
1411 about pool recovery mode, see the
1413 option, above. WARNING: This option can be extremely hazardous to the
1414 health of your pool and should only be used as a last resort.
1420 is temporary. Temporary pool names last until export. Ensures that
1421 the original pool name will be used in all label updates and therefore
1422 is retained upon export.
1423 Will also set -o cachefile=none when not explicitly specified.
1428 .Op Oo Oo Fl c Ar SCRIPT Oc Oo Fl lq Oc Oc Ns | Ns Fl rw
1429 .Op Fl T Sy u Ns | Ns Sy d
1431 .Oo Oo Ar pool Ns ... Oc Ns | Ns Oo Ar pool vdev Ns ... Oc Ns | Ns Oo Ar vdev Ns ... Oc Oc
1432 .Op Ar interval Op Ar count
1434 Displays I/O statistics for the given pools/vdevs. You can pass in a
1435 list of pools, a pool and list of vdevs in that pool, or a list of any
1436 vdevs from any pool. If no items are specified, statistics for every
1437 pool in the system are shown.
1440 the statistics are printed every
1442 seconds until ^C is pressed. If count is specified, the command exits
1443 after count reports are printed. The first report printed is always
1444 the statistics since boot regardless of whether
1448 are passed. However, this behavior can be suppressed with the
1450 flag. Also note that the units of
1454 that are printed in the report are in base 1024. To get the raw
1459 .It Fl c Op Ar SCRIPT1 Ns Oo , Ns Ar SCRIPT2 Oc Ns ...
1460 Run a script (or scripts) on each vdev and include the output as a new column
1463 output. Users can run any script found in their
1465 directory or from the system
1466 .Pa /etc/zfs/zpool.d
1467 directory. The default search path can be overridden by setting the
1468 ZPOOL_SCRIPTS_PATH environment variable. A privileged user can run
1470 if they have the ZPOOL_SCRIPTS_AS_ROOT
1471 environment variable set. If a script requires the use of a privileged
1474 then it's recommended you allow the user access to it in
1476 or add the user to the
1477 .Pa /etc/sudoers.d/zfs
1482 is passed without a script name, it prints a list of all scripts.
1484 also sets verbose mode
1485 .No ( Ns Fl v Ns No ).
1487 Script output should be in the form of "name=value". The column name is
1488 set to "name" and the value is set to "value". Multiple lines can be
1489 used to output multiple columns. The first line of output not in the
1490 "name=value" format is displayed without a column title, and no more
1491 output after that is displayed. This can be useful for printing error
1492 messages. Blank or NULL values are printed as a '-' to make output
1495 The following environment variables are set before running each script:
1497 .Bl -tag -width "VDEV_PATH"
1499 Full path to the vdev
1501 .Bl -tag -width "VDEV_UPATH"
1503 Underlying path to the vdev (/dev/sd*). For use with device mapper,
1504 multipath, or partitioned vdevs.
1506 .Bl -tag -width "VDEV_ENC_SYSFS_PATH"
1507 .It Sy VDEV_ENC_SYSFS_PATH
1508 The sysfs path to the enclosure for the vdev (if any).
1510 .It Fl T Sy u Ns | Ns Sy d
1511 Display a time stamp.
1514 for a printed representation of the internal representation of time.
1519 for standard date format.
1523 Display vdev GUIDs instead of the normal device names. These GUIDs
1524 can be used in place of device names for the zpool
1525 detach/offline/remove/replace commands.
1527 Scripted mode. Do not display headers, and separate fields by a
1528 single tab instead of arbitrary space.
1530 Display real paths for vdevs resolving all symbolic links. This can
1531 be used to look up the current block device name regardless of the
1533 path used to open it.
1535 Display numbers in parsable (exact) values. Time values are in
1538 Display full paths for vdevs instead of only the last component of
1539 the path. This can be used in conjunction with the
1543 Print request size histograms for the leaf ZIOs. This includes
1544 histograms of individual ZIOs (
1546 and aggregate ZIOs (
1548 These stats can be useful for seeing how well the ZFS IO aggregator is
1549 working. Do not confuse these request size stats with the block layer
1550 requests; it's possible ZIOs can be broken up before being sent to the
1553 Verbose statistics Reports usage statistics for individual vdevs within the
1554 pool, in addition to the pool-wide statistics.
1558 Include average latency statistics:
1561 Average total IO time (queuing + disk IO time).
1563 Average disk IO time (time reading/writing the disk).
1565 Average amount of time IO spent in synchronous priority queues. Does
1566 not include disk time.
1568 Average amount of time IO spent in asynchronous priority queues.
1569 Does not include disk time.
1571 Average queuing time in scrub queue. Does not include disk time.
1573 Include active queue statistics. Each priority queue has both
1578 IOs. Pending IOs are waiting to
1579 be issued to the disk, and active IOs have been issued to disk and are
1580 waiting for completion. These stats are broken out by priority queue:
1582 .Ar syncq_read/write :
1583 Current number of entries in synchronous priority
1585 .Ar asyncq_read/write :
1586 Current number of entries in asynchronous priority queues.
1588 Current number of entries in scrub queue.
1590 All queue statistics are instantaneous measurements of the number of
1591 entries in the queues. If you specify an interval, the measurements
1592 will be sampled from the end of the interval.
1600 Removes ZFS label information from the specified
1604 must not be part of an active pool configuration.
1607 Treat exported or foreign devices as inactive.
1613 .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
1614 .Op Fl T Sy u Ns | Ns Sy d
1615 .Oo Ar pool Oc Ns ...
1616 .Op Ar interval Op Ar count
1618 Lists the given pools along with a health status and space usage.
1621 are specified, all pools in the system are listed.
1624 the information is printed every
1626 seconds until ^C is pressed.
1629 is specified, the command exits after
1631 reports are printed.
1634 Display vdev GUIDs instead of the normal device names. These GUIDs
1635 can be used in place of device names for the zpool
1636 detach/offline/remove/replace commands.
1639 Do not display headers, and separate fields by a single tab instead of arbitrary
1641 .It Fl o Ar property
1642 Comma-separated list of properties to display.
1645 section for a list of valid properties.
1647 .Sy name, size, alloc, free, fragmentation, expandsize, capacity,
1648 .Sy dedupratio, health, altroot .
1650 Display real paths for vdevs resolving all symbolic links. This can
1651 be used to look up the current block device name regardless of the
1652 /dev/disk/ path used to open it.
1654 Display numbers in parsable
1658 Display full paths for vdevs instead of only the last component of
1659 the path. This can be used in conjunction with the
1661 .It Fl T Sy u Ns | Ns Sy d
1662 Display a time stamp.
1665 for a printed representation of the internal representation of time.
1670 for standard date format.
1675 Reports usage statistics for individual vdevs within the pool, in addition to
1676 the pool-wise statistics.
1683 .Ar pool Ar device Ns ...
1685 Takes the specified physical device offline.
1688 is offline, no attempt is made to read or write to the device.
1689 This command is not applicable to spares.
1692 Force fault. Instead of offlining the disk, put it into a faulted
1693 state. The fault will persist across imports unless the
1698 Upon reboot, the specified physical device reverts to its previous state.
1704 .Ar pool Ar device Ns ...
1706 Brings the specified physical device online.
1707 This command is not applicable to spares or cache devices.
1710 Expand the device to use all available space.
1711 If the device is part of a mirror or raidz then all devices must be expanded
1712 before the new space will become available to the pool.
1719 Generates a new unique identifier for the pool.
1720 You must ensure that all devices in this pool are online and healthy before
1721 performing this action.
1727 Reopen all the vdevs associated with the pool.
1731 .Ar pool Ar device Ns ...
1733 Removes the specified device from the pool.
1734 This command currently only supports removing hot spares, cache, and log
1736 A mirrored log device can be removed by specifying the top-level mirror for the
1738 Non-log devices that are part of a mirrored configuration can be removed using
1742 Non-redundant and raidz devices cannot be removed from a pool.
1747 .Op Fl o Ar property Ns = Ns Ar value
1748 .Ar pool Ar device Op Ar new_device
1754 This is equivalent to attaching
1756 waiting for it to resilver, and then detaching
1761 must be greater than or equal to the minimum size of all the devices in a mirror
1762 or raidz configuration.
1765 is required if the pool is not redundant.
1768 is not specified, it defaults to
1770 This form of replacement is useful after an existing disk has failed and has
1771 been physically replaced.
1772 In this case, the new disk may have the same
1774 path as the old device, even though it is actually a different disk.
1775 ZFS recognizes this.
1780 even if its appears to be in use.
1781 Not all devices can be overridden in this manner.
1782 .It Fl o Ar property Ns = Ns Ar value
1783 Sets the given pool properties. See the
1785 section for a list of valid properties that can be set.
1786 The only property supported at the moment is
1795 Begins a scrub or resumes a paused scrub.
1796 The scrub examines all data in the specified pools to verify that it checksums
1800 devices, ZFS automatically repairs any damage discovered during the scrub.
1803 command reports the progress of the scrub and summarizes the results of the
1804 scrub upon completion.
1806 Scrubbing and resilvering are very similar operations.
1807 The difference is that resilvering only examines data that ZFS knows to be out
1810 for example, when attaching a new device to a mirror or replacing an existing
1813 whereas scrubbing examines all data to discover silent errors due to hardware
1814 faults or disk failure.
1816 Because scrubbing and resilvering are I/O-intensive operations, ZFS only allows
1818 If a scrub is paused, the
1821 If a resilver is in progress, ZFS does not allow a scrub to be started until the
1830 Scrub progress is periodically synced to disk so if the system
1831 is restarted or pool is exported during a paused scrub, the scrub will resume
1832 from the place where it was last checkpointed to disk.
1833 To resume a paused scrub issue
1840 .Ar property Ns = Ns Ar value
1843 Sets the given property on the specified pool.
1846 section for more information on what properties can be set and acceptable
1852 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1863 must be mirrors and the pool must not be in the process of resilvering.
1864 At the time of the split,
1866 will be a replica of
1869 last device in each mirror is split from
1874 The optional device specification causes the specified device(s) to be
1877 and, should any devices remain unspecified,
1878 the last device in each mirror is used as would be by default.
1881 Display vdev GUIDs instead of the normal device names. These GUIDs
1882 can be used in place of device names for the zpool
1883 detach/offline/remove/replace commands.
1885 Display real paths for vdevs resolving all symbolic links. This can
1886 be used to look up the current block device name regardless of the
1888 path used to open it.
1890 Do dry run, do not actually perform the split.
1891 Print out the expected configuration of
1894 Display full paths for vdevs instead of only the last component of
1895 the path. This can be used in conjunction with the
1897 .It Fl o Ar property Ns = Ns Ar value
1898 Sets the specified property for
1902 section for more information on the available pool properties.
1910 and automatically import it.
1915 .Op Fl c Op Ar SCRIPT1 Ns Oo , Ns Ar SCRIPT2 Oc Ns ...
1917 .Op Fl T Sy u Ns | Ns Sy d
1918 .Oo Ar pool Oc Ns ...
1919 .Op Ar interval Op Ar count
1921 Displays the detailed health status for the given pools.
1924 is specified, then the status of each pool in the system is displayed.
1925 For more information on pool and device health, see the
1926 .Sx Device Failure and Recovery
1929 If a scrub or resilver is in progress, this command reports the percentage done
1930 and the estimated time to completion.
1931 Both of these are only approximate, because the amount of data in the pool and
1932 the other workloads on the system can change.
1934 .It Fl c Op Ar SCRIPT1 Ns Oo , Ns Ar SCRIPT2 Oc Ns ...
1935 Run a script (or scripts) on each vdev and include the output as a new column
1942 for complete details.
1944 Display vdev GUIDs instead of the normal device names. These GUIDs
1945 can be used in place of device names for the zpool
1946 detach/offline/remove/replace commands.
1948 Display real paths for vdevs resolving all symbolic links. This can
1949 be used to look up the current block device name regardless of the
1951 path used to open it.
1953 Display numbers in parsable (exact) values. Time values are in
1956 Display a histogram of deduplication statistics, showing the allocated
1957 .Pq physically present on disk
1959 .Pq logically referenced in the pool
1960 block counts and sizes by reference count.
1961 .It Fl T Sy u Ns | Ns Sy d
1962 Display a time stamp.
1965 for a printed representation of the internal representation of time.
1970 for standard date format.
1974 Displays verbose data error information, printing out a complete list of all
1975 data errors since the last complete pool scrub.
1977 Only display status for pools that are exhibiting errors or are otherwise
1979 Warnings about pools not using the latest on-disk format will not be included.
1986 This command forces all in-core dirty data to be written to the primary
1987 pool storage and not the ZIL. It will also update administrative
1988 information including quota reporting. Without arguments,
1990 will sync all pools on the system. Otherwise, it will sync only the
1996 Displays pools which do not have all supported features enabled and pools
1997 formatted using a legacy ZFS version number.
1998 These pools can continue to be used, but some features may not be available.
2000 .Nm zpool Cm upgrade Fl a
2001 to enable all features on all pools.
2007 Displays legacy ZFS versions supported by the current software.
2009 .Xr zpool-features 5
2010 for a description of feature flags features supported by the current software.
2015 .Fl a Ns | Ns Ar pool Ns ...
2017 Enables all supported features on the given pool.
2018 Once this is done, the pool will no longer be accessible on systems that do not
2019 support feature flags.
2022 for details on compatibility with systems that support feature flags, but do not
2023 support all features enabled on the pool.
2026 Enables all supported features on all pools.
2028 Upgrade to the specified legacy version.
2031 flag is specified, no features will be enabled on the pool.
2032 This option can only be used to increase the version number up to the last
2033 supported legacy version number.
2037 The following exit values are returned:
2040 Successful completion.
2044 Invalid command line options were specified.
2048 .It Sy Example 1 No Creating a RAID-Z Storage Pool
2049 The following command creates a pool with a single raidz root vdev that
2050 consists of six disks.
2052 # zpool create tank raidz sda sdb sdc sdd sde sdf
2054 .It Sy Example 2 No Creating a Mirrored Storage Pool
2055 The following command creates a pool with two mirrors, where each mirror
2058 # zpool create tank mirror sda sdb mirror sdc sdd
2060 .It Sy Example 3 No Creating a ZFS Storage Pool by Using Partitions
2061 The following command creates an unmirrored pool using two disk partitions.
2063 # zpool create tank sda1 sdb2
2065 .It Sy Example 4 No Creating a ZFS Storage Pool by Using Files
2066 The following command creates an unmirrored pool using files.
2067 While not recommended, a pool based on files can be useful for experimental
2070 # zpool create tank /path/to/file/a /path/to/file/b
2072 .It Sy Example 5 No Adding a Mirror to a ZFS Storage Pool
2073 The following command adds two mirrored disks to the pool
2075 assuming the pool is already made up of two-way mirrors.
2076 The additional space is immediately available to any datasets within the pool.
2078 # zpool add tank mirror sda sdb
2080 .It Sy Example 6 No Listing Available ZFS Storage Pools
2081 The following command lists all available pools on the system.
2082 In this case, the pool
2084 is faulted due to a missing device.
2085 The results from this command are similar to the following:
2088 NAME SIZE ALLOC FREE FRAG EXPANDSZ CAP DEDUP HEALTH ALTROOT
2089 rpool 19.9G 8.43G 11.4G 33% - 42% 1.00x ONLINE -
2090 tank 61.5G 20.0G 41.5G 48% - 32% 1.00x ONLINE -
2091 zion - - - - - - - FAULTED -
2093 .It Sy Example 7 No Destroying a ZFS Storage Pool
2094 The following command destroys the pool
2096 and any datasets contained within.
2098 # zpool destroy -f tank
2100 .It Sy Example 8 No Exporting a ZFS Storage Pool
2101 The following command exports the devices in pool
2103 so that they can be relocated or later imported.
2107 .It Sy Example 9 No Importing a ZFS Storage Pool
2108 The following command displays available pools, and then imports the pool
2110 for use on the system.
2111 The results from this command are similar to the following:
2115 id: 15451357997522795478
2117 action: The pool can be imported using its name or numeric identifier.
2127 .It Sy Example 10 No Upgrading All ZFS Storage Pools to the Current Version
2128 The following command upgrades all ZFS Storage pools to the current version of
2132 This system is currently running ZFS version 2.
2134 .It Sy Example 11 No Managing Hot Spares
2135 The following command creates a new pool with an available hot spare:
2137 # zpool create tank mirror sda sdb spare sdc
2140 If one of the disks were to fail, the pool would be reduced to the degraded
2142 The failed device can be replaced using the following command:
2144 # zpool replace tank sda sdd
2147 Once the data has been resilvered, the spare is automatically removed and is
2148 made available for use should another device fails.
2149 The hot spare can be permanently removed from the pool using the following
2152 # zpool remove tank sdc
2154 .It Sy Example 12 No Creating a ZFS Pool with Mirrored Separate Intent Logs
2155 The following command creates a ZFS storage pool consisting of two, two-way
2156 mirrors and mirrored log devices:
2158 # zpool create pool mirror sda sdb mirror sdc sdd log mirror \\
2161 .It Sy Example 13 No Adding Cache Devices to a ZFS Pool
2162 The following command adds two disks for use as cache devices to a ZFS storage
2165 # zpool add pool cache sdc sdd
2168 Once added, the cache devices gradually fill with content from main memory.
2169 Depending on the size of your cache devices, it could take over an hour for
2171 Capacity and reads can be monitored using the
2175 # zpool iostat -v pool 5
2177 .It Sy Example 14 No Removing a Mirrored Log Device
2178 The following command removes the mirrored log device
2180 Given this configuration:
2184 scrub: none requested
2187 NAME STATE READ WRITE CKSUM
2189 mirror-0 ONLINE 0 0 0
2192 mirror-1 ONLINE 0 0 0
2196 mirror-2 ONLINE 0 0 0
2201 The command to remove the mirrored log
2205 # zpool remove tank mirror-2
2207 .It Sy Example 15 No Displaying expanded space on a device
2208 The following command displays the detailed information for the pool
2210 This pool is comprised of a single raidz vdev where one of its devices
2211 increased its capacity by 10GB.
2212 In this example, the pool will not be able to utilize this extra capacity until
2213 all the devices under the raidz vdev have been expanded.
2215 # zpool list -v data
2216 NAME SIZE ALLOC FREE FRAG EXPANDSZ CAP DEDUP HEALTH ALTROOT
2217 data 23.9G 14.6G 9.30G 48% - 61% 1.00x ONLINE -
2218 raidz1 23.9G 14.6G 9.30G 48% -
2223 .It Sy Example 16 No Adding output columns
2224 Additional columns can be added to the
2232 # zpool status -c vendor,model,size
2233 NAME STATE READ WRITE CKSUM vendor model size
2235 mirror-0 ONLINE 0 0 0
2236 U1 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T
2237 U10 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T
2238 U11 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T
2239 U12 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T
2240 U13 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T
2241 U14 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T
2243 # zpool iostat -vc slaves
2244 capacity operations bandwidth
2245 pool alloc free read write read write slaves
2246 ---------- ----- ----- ----- ----- ----- ----- ---------
2247 tank 20.4G 7.23T 26 152 20.7M 21.6M
2248 mirror 20.4G 7.23T 26 152 20.7M 21.6M
2249 U1 - - 0 31 1.46K 20.6M sdb sdff
2250 U10 - - 0 1 3.77K 13.3K sdas sdgw
2251 U11 - - 0 1 288K 13.3K sdat sdgx
2252 U12 - - 0 1 78.4K 13.3K sdau sdgy
2253 U13 - - 0 1 128K 13.3K sdav sdgz
2254 U14 - - 0 1 63.2K 13.3K sdfk sdg
2257 .Sh ENVIRONMENT VARIABLES
2258 .Bl -tag -width "ZFS_ABORT"
2262 to dump core on exit for the purposes of running
2265 .Bl -tag -width "ZPOOL_IMPORT_PATH"
2266 .It Ev ZPOOL_IMPORT_PATH
2267 The search path for devices or files to use with the pool. This is a colon-separated list of directories in which
2269 looks for device nodes and files.
2275 .Bl -tag -width "ZPOOL_VDEV_NAME_GUID"
2276 .It Ev ZPOOL_VDEV_NAME_GUID
2278 .Nm zpool subcommands to output vdev guids by default. This behavior
2281 command line option.
2283 .Bl -tag -width "ZPOOL_VDEV_NAME_FOLLOW_LINKS"
2284 .It Ev ZPOOL_VDEV_NAME_FOLLOW_LINKS
2287 subcommands to follow links for vdev names by default. This behavior is identical to the
2289 command line option.
2291 .Bl -tag -width "ZPOOL_VDEV_NAME_PATH"
2292 .It Ev ZPOOL_VDEV_NAME_PATH
2295 subcommands to output full vdev path names by default. This
2296 behavior is identical to the
2298 command line option.
2300 .Bl -tag -width "ZFS_VDEV_DEVID_OPT_OUT"
2301 .It Ev ZFS_VDEV_DEVID_OPT_OUT
2302 Older ZFS on Linux implementations had issues when attempting to display pool
2303 config VDEV names if a
2305 NVP value is present in the pool's config.
2307 For example, a pool that originated on illumos platform would have a devid
2308 value in the config and
2310 would fail when listing the config.
2311 This would also be true for future Linux based pools.
2313 A pool can be stripped of any
2315 values on import or prevented from adding
2321 .Sy ZFS_VDEV_DEVID_OPT_OUT .
2323 .Bl -tag -width "ZPOOL_SCRIPTS_AS_ROOT"
2324 .It Ev ZPOOL_SCRIPTS_AS_ROOT
2325 Allow a privileged user to run the
2326 .Nm zpool status/iostat
2329 option. Normally, only unprivileged users are allowed to run
2332 .Bl -tag -width "ZPOOL_SCRIPTS_PATH"
2333 .It Ev ZPOOL_SCRIPTS_PATH
2334 The search path for scripts when running
2335 .Nm zpool status/iostat
2338 option. This is a colon-separated list of directories and overrides the default
2341 .Pa /etc/zfs/zpool.d
2344 .Bl -tag -width "ZPOOL_SCRIPTS_ENABLED"
2345 .It Ev ZPOOL_SCRIPTS_ENABLED
2347 .Nm zpool status/iostat
2351 .Sy ZPOOL_SCRIPTS_ENABLED
2352 is not set, it is assumed that the user is allowed to run
2353 .Nm zpool status/iostat -c .
2354 .Sh INTERFACE STABILITY
2360 .Xr zfs-module-parameters 5 ,
2361 .Xr zpool-features 5