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) 2012, 2017 by Delphix. All rights reserved.
24 .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
25 .\" Copyright (c) 2017 Datto Inc.
26 .\" Copyright (c) 2018 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
60 .Op Fl m Ar mountpoint
61 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
62 .Oo Fl o Ar feature@feature Ns = Ns Ar value Oc
63 .Oo Fl O Ar file-system-property Ns = Ns Ar value Oc Ns ...
75 .Op Fl vHf Oo Ar pool Oc | Fl c
84 .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
85 .Sy all Ns | Ns Ar property Ns Oo , Ns Ar property Oc Ns ...
94 .Op Fl d Ar dir Ns | Ns device
99 .Op Fl F Oo Fl n Oc Oo Fl T Oc Oo Fl X Oc
100 .Op Fl -rewind-to-checkpoint
101 .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir Ns | Ns device
103 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
108 .Op Fl F Oo Fl n Oc Oo Fl T Oc Oo Fl X Oc
109 .Op Fl -rewind-to-checkpoint
110 .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir Ns | Ns device
112 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
115 .Ar pool Ns | Ns Ar id
116 .Op Ar newpool Oo Fl t Oc
119 .Op Oo Oo Fl c Ar SCRIPT Oc Oo Fl lq Oc Oc Ns | Ns Fl rw
120 .Op Fl T Sy u Ns | Ns Sy d
122 .Oo Oo Ar pool Ns ... Oc Ns | Ns Oo Ar pool vdev Ns ... Oc Ns | Ns Oo Ar vdev Ns ... Oc Oc
123 .Op Ar interval Op Ar count
131 .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
132 .Op Fl T Sy u Ns | Ns Sy d
133 .Oo Ar pool Oc Ns ...
134 .Op Ar interval Op Ar count
139 .Ar pool Ar device Ns ...
143 .Ar pool Ar device Ns ...
154 .Ar pool Ar device Ns ...
162 .Oo Fl o Ar property Ns = Ns Ar value Oc
163 .Ar pool Ar device Op Ar new_device
170 .Ar property Ns = Ns Ar value
175 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
178 .Oo Ar device Oc Ns ...
181 .Oo Fl c Ar SCRIPT Oc
183 .Op Fl T Sy u Ns | Ns Sy d
184 .Oo Ar pool Oc Ns ...
185 .Op Ar interval Op Ar count
188 .Oo Ar pool Oc Ns ...
197 .Fl a Ns | Ns Ar pool Ns ...
201 command configures ZFS storage pools.
202 A storage pool is a collection of devices that provides physical storage and
203 data replication for ZFS datasets.
204 All datasets within a storage pool share the same space.
207 for information on managing datasets.
208 .Ss Virtual Devices (vdevs)
209 A "virtual device" describes a single device or a collection of devices
210 organized according to certain performance and fault characteristics.
211 The following virtual devices are supported:
214 A block device, typically located under
216 ZFS can use individual slices or partitions, though the recommended mode of
217 operation is to use whole disks.
218 A disk can be specified by a full path, or it can be a shorthand name
219 .Po the relative portion of the path under
222 A whole disk can be specified by omitting the slice or partition designation.
227 When given a whole disk, ZFS automatically labels the disk, if necessary.
230 The use of files as a backing store is strongly discouraged.
231 It is designed primarily for experimental purposes, as the fault tolerance of a
232 file is only as good as the file system of which it is a part.
233 A file must be specified by a full path.
235 A mirror of two or more devices.
236 Data is replicated in an identical fashion across all components of a mirror.
237 A mirror with N disks of size X can hold X bytes and can withstand (N-1) devices
238 failing before data integrity is compromised.
239 .It Sy raidz , raidz1 , raidz2 , raidz3
240 A variation on RAID-5 that allows for better distribution of parity and
241 eliminates the RAID-5
243 .Pq in which data and parity become inconsistent after a power loss .
244 Data and parity is striped across all disks within a raidz group.
246 A raidz group can have single-, double-, or triple-parity, meaning that the
247 raidz group can sustain one, two, or three failures, respectively, without
251 vdev type specifies a single-parity raidz group; the
253 vdev type specifies a double-parity raidz group; and the
255 vdev type specifies a triple-parity raidz group.
258 vdev type is an alias for
261 A raidz group with N disks of size X with P parity disks can hold approximately
262 (N-P)*X bytes and can withstand P device(s) failing before data integrity is
264 The minimum number of devices in a raidz group is one more than the number of
266 The recommended number is between 3 and 9 to help increase performance.
268 A special pseudo-vdev which keeps track of available hot spares for a pool.
269 For more information, see the
273 A separate intent log device.
274 If more than one log device is specified, then writes are load-balanced between
276 Log devices can be mirrored.
277 However, raidz vdev types are not supported for the intent log.
278 For more information, see the
282 A device used to cache storage pool data.
283 A cache device cannot be configured as a mirror or raidz group.
284 For more information, see the
289 Virtual devices cannot be nested, so a mirror or raidz virtual device can only
290 contain files or disks.
292 .Pq or other combinations
295 A pool can have any number of virtual devices at the top of the configuration
299 Data is dynamically distributed across all top-level devices to balance data
301 As new virtual devices are added, ZFS automatically places data on the newly
304 Virtual devices are specified one at a time on the command line, separated by
310 are used to distinguish where a group ends and another begins.
311 For example, the following creates two root vdevs, each a mirror of two disks:
313 # zpool create mypool mirror sda sdb mirror sdc sdd
315 .Ss Device Failure and Recovery
316 ZFS supports a rich set of mechanisms for handling device failure and data
318 All metadata and data is checksummed, and ZFS automatically repairs bad data
319 from a good copy when corruption is detected.
321 In order to take advantage of these features, a pool must make use of some form
322 of redundancy, using either mirrored or raidz groups.
323 While ZFS supports running in a non-redundant configuration, where each root
324 vdev is simply a disk or file, this is strongly discouraged.
325 A single case of bit corruption can render some or all of your data unavailable.
327 A pool's health status is described by one of three states: online, degraded,
329 An online pool has all devices operating normally.
330 A degraded pool is one in which one or more devices have failed, but the data is
331 still available due to a redundant configuration.
332 A faulted pool has corrupted metadata, or one or more faulted devices, and
333 insufficient replicas to continue functioning.
335 The health of the top-level vdev, such as mirror or raidz device, is
336 potentially impacted by the state of its associated vdevs, or component
338 A top-level vdev or component device is in one of the following states:
339 .Bl -tag -width "DEGRADED"
341 One or more top-level vdevs is in the degraded state because one or more
342 component devices are offline.
343 Sufficient replicas exist to continue functioning.
345 One or more component devices is in the degraded or faulted state, but
346 sufficient replicas exist to continue functioning.
347 The underlying conditions are as follows:
350 The number of checksum errors exceeds acceptable levels and the device is
351 degraded as an indication that something may be wrong.
352 ZFS continues to use the device as necessary.
354 The number of I/O errors exceeds acceptable levels.
355 The device could not be marked as faulted because there are insufficient
356 replicas to continue functioning.
359 One or more top-level vdevs is in the faulted state because one or more
360 component devices are offline.
361 Insufficient replicas exist to continue functioning.
363 One or more component devices is in the faulted state, and insufficient
364 replicas exist to continue functioning.
365 The underlying conditions are as follows:
368 The device could be opened, but the contents did not match expected values.
370 The number of I/O errors exceeds acceptable levels and the device is faulted to
371 prevent further use of the device.
374 The device was explicitly taken offline by the
378 The device is online and functioning.
380 The device was physically removed while the system was running.
381 Device removal detection is hardware-dependent and may not be supported on all
384 The device could not be opened.
385 If a pool is imported when a device was unavailable, then the device will be
386 identified by a unique identifier instead of its path since the path was never
387 correct in the first place.
390 If a device is removed and later re-attached to the system, ZFS attempts
391 to put the device online automatically.
392 Device attach detection is hardware-dependent and might not be supported on all
395 ZFS allows devices to be associated with pools as
397 These devices are not actively used in the pool, but when an active device
398 fails, it is automatically replaced by a hot spare.
399 To create a pool with hot spares, specify a
401 vdev with any number of devices.
404 # zpool create pool mirror sda sdb spare sdc sdd
407 Spares can be shared across multiple pools, and can be added with the
409 command and removed with the
412 Once a spare replacement is initiated, a new
414 vdev is created within the configuration that will remain there until the
415 original device is replaced.
416 At this point, the hot spare becomes available again if another device fails.
418 If a pool has a shared spare that is currently being used, the pool can not be
419 exported since other pools may use this shared spare, which may lead to
420 potential data corruption.
422 An in-progress spare replacement can be cancelled by detaching the hot spare.
423 If the original faulted device is detached, then the hot spare assumes its
424 place in the configuration, and is removed from the spare list of all active
427 Spares cannot replace log devices.
429 The ZFS Intent Log (ZIL) satisfies POSIX requirements for synchronous
431 For instance, databases often require their transactions to be on stable storage
432 devices when returning from a system call.
433 NFS and other applications can also use
435 to ensure data stability.
436 By default, the intent log is allocated from blocks within the main pool.
437 However, it might be possible to get better performance using separate intent
438 log devices such as NVRAM or a dedicated disk.
441 # zpool create pool sda sdb log sdc
444 Multiple log devices can also be specified, and they can be mirrored.
447 section for an example of mirroring multiple log devices.
449 Log devices can be added, replaced, attached, detached and removed. In
450 addition, log devices are imported and exported as part of the pool
452 Mirrored devices can be removed by specifying the top-level mirror vdev.
454 Devices can be added to a storage pool as
456 These devices provide an additional layer of caching between main memory and
458 For read-heavy workloads, where the working set size is much larger than what
459 can be cached in main memory, using cache devices allow much more of this
460 working set to be served from low latency media.
461 Using cache devices provides the greatest performance improvement for random
462 read-workloads of mostly static content.
464 To create a pool with cache devices, specify a
466 vdev with any number of devices.
469 # zpool create pool sda sdb cache sdc sdd
472 Cache devices cannot be mirrored or part of a raidz configuration.
473 If a read error is encountered on a cache device, that read I/O is reissued to
474 the original storage pool device, which might be part of a mirrored or raidz
477 The content of the cache devices is considered volatile, as is the case with
480 Before starting critical procedures that include destructive actions (e.g
482 ), an administrator can checkpoint the pool's state and in the case of a
483 mistake or failure, rewind the entire pool back to the checkpoint.
484 Otherwise, the checkpoint can be discarded when the procedure has completed
487 A pool checkpoint can be thought of as a pool-wide snapshot and should be used
488 with care as it contains every part of the pool's state, from properties to vdev
490 Thus, while a pool has a checkpoint certain operations are not allowed.
491 Specifically, vdev removal/attach/detach, mirror splitting, and
492 changing the pool's guid.
493 Adding a new vdev is supported but in the case of a rewind it will have to be
495 Finally, users of this feature should keep in mind that scrubs in a pool that
496 has a checkpoint do not repair checkpointed data.
498 To create a checkpoint for a pool:
500 # zpool checkpoint pool
503 To later rewind to its checkpointed state, you need to first export it and
504 then rewind it during import:
507 # zpool import --rewind-to-checkpoint pool
510 To discard the checkpoint from a pool:
512 # zpool checkpoint -d pool
515 Dataset reservations (controlled by the
519 zfs properties) may be unenforceable while a checkpoint exists, because the
520 checkpoint is allowed to consume the dataset's reservation.
521 Finally, data that is part of the checkpoint but has been freed in the
522 current state of the pool won't be scanned during a scrub.
524 Each pool has several properties associated with it.
525 Some properties are read-only statistics while others are configurable and
526 change the behavior of the pool.
528 The following are read-only properties:
531 Amount of storage used within the pool.
533 Percentage of pool space used.
534 This property can also be referred to by its shortened column name,
537 Amount of uninitialized space within the pool or device that can be used to
538 increase the total capacity of the pool.
539 Uninitialized space consists of any space on an EFI labeled vdev which has not
542 .Nm zpool Cm online Fl e
544 This space occurs when a LUN is dynamically expanded.
546 The amount of fragmentation in the pool.
548 The amount of free space available in the pool.
550 After a file system or snapshot is destroyed, the space it was using is
551 returned to the pool asynchronously.
553 is the amount of space remaining to be reclaimed.
560 The current health of the pool.
562 .Sy ONLINE , DEGRADED , FAULTED , OFFLINE, REMOVED , UNAVAIL .
564 A unique identifier for the pool.
566 Total size of the storage pool.
567 .It Sy unsupported@ Ns Em feature_guid
568 Information about unsupported features that are enabled on the pool.
574 The space usage properties report actual physical space available to the
576 The physical space can be different from the total amount of space that any
577 contained datasets can actually use.
578 The amount of space used in a raidz configuration depends on the characteristics
579 of the data being written.
580 In addition, ZFS reserves some space for internal accounting that the
582 command takes into account, but the
585 For non-full pools of a reasonable size, these effects should be invisible.
586 For small pools, or pools that are close to being completely full, these
587 discrepancies may become more noticeable.
589 The following property can be set at creation time and import time:
592 Alternate root directory.
593 If set, this directory is prepended to any mount points within the pool.
594 This can be used when examining an unknown pool where the mount points cannot be
595 trusted, or in an alternate boot environment, where the typical paths are not
598 is not a persistent property.
599 It is valid only while the system is up.
603 .Sy cachefile Ns = Ns Sy none ,
604 though this may be overridden using an explicit setting.
607 The following property can be set only at import time:
609 .It Sy readonly Ns = Ns Sy on Ns | Ns Sy off
612 the pool will be imported in read-only mode.
613 This property can also be referred to by its shortened column name,
617 The following properties can be set at creation time and import time, and later
622 .It Sy ashift Ns = Ns Sy ashift
623 Pool sector size exponent, to the power of
625 (internally referred to as
627 ). Values from 9 to 16, inclusive, are valid; also, the special
628 value 0 (the default) means to auto-detect using the kernel's block
629 layer and a ZFS internal exception list. I/O operations will be aligned
630 to the specified size boundaries. Additionally, the minimum (disk)
631 write size will be set to the specified size, so this represents a
632 space vs. performance trade-off. For optimal performance, the pool
633 sector size should be greater than or equal to the sector size of the
634 underlying disks. The typical case for setting this property is when
635 performance is important and the underlying disks use 4KiB sectors but
636 report 512B sectors to the OS (for compatibility reasons); in that
639 (which is 1<<12 = 4096). When set, this property is
640 used as the default hint value in subsequent vdev operations (add,
641 attach and replace). Changing this value will not modify any existing
642 vdev, not even on disk replacement; however it can be used, for
643 instance, to replace a dying 512B sectors disk with a newer 4KiB
644 sectors device: this will probably result in bad performance but at the
645 same time could prevent loss of data.
646 .It Sy autoexpand Ns = Ns Sy on Ns | Ns Sy off
647 Controls automatic pool expansion when the underlying LUN is grown.
650 the pool will be resized according to the size of the expanded device.
651 If the device is part of a mirror or raidz then all devices within that
652 mirror/raidz group must be expanded before the new space is made available to
654 The default behavior is
656 This property can also be referred to by its shortened column name,
658 .It Sy autoreplace Ns = Ns Sy on Ns | Ns Sy off
659 Controls automatic device replacement.
662 device replacement must be initiated by the administrator by using the
667 any new device, found in the same physical location as a device that previously
668 belonged to the pool, is automatically formatted and replaced.
669 The default behavior is
671 This property can also be referred to by its shortened column name,
673 Autoreplace can also be used with virtual disks (like device
674 mapper) provided that you use the /dev/disk/by-vdev paths setup by
675 vdev_id.conf. See the
677 man page for more details.
678 Autoreplace and autoonline require the ZFS Event Daemon be configured and
681 man page for more details.
682 .It Sy bootfs Ns = Ns Sy (unset) Ns | Ns Ar pool Ns / Ns Ar dataset
683 Identifies the default bootable dataset for the root pool. This property is
684 expected to be set mainly by the installation and upgrade programs.
685 Not all Linux distribution boot processes use the bootfs property.
686 .It Sy cachefile Ns = Ns Ar path Ns | Ns Sy none
687 Controls the location of where the pool configuration is cached.
688 Discovering all pools on system startup requires a cached copy of the
689 configuration data that is stored on the root file system.
690 All pools in this cache are automatically imported when the system boots.
691 Some environments, such as install and clustering, need to cache this
692 information in a different location so that pools are not automatically
694 Setting this property caches the pool configuration in a different location that
695 can later be imported with
696 .Nm zpool Cm import Fl c .
697 Setting it to the special value
699 creates a temporary pool that is never cached, and the special value
702 uses the default location.
704 Multiple pools can share the same cache file.
705 Because the kernel destroys and recreates this file when pools are added and
706 removed, care should be taken when attempting to access this file.
707 When the last pool using a
709 is exported or destroyed, the file will be empty.
710 .It Sy comment Ns = Ns Ar text
711 A text string consisting of printable ASCII characters that will be stored
712 such that it is available even if the pool becomes faulted.
713 An administrator can provide additional information about a pool using this
715 .It Sy dedupditto Ns = Ns Ar number
716 Threshold for the number of block ditto copies.
717 If the reference count for a deduplicated block increases above this number, a
718 new ditto copy of this block is automatically stored.
719 The default setting is
721 which causes no ditto copies to be created for deduplicated blocks.
722 The minimum legal nonzero setting is
724 .It Sy delegation Ns = Ns Sy on Ns | Ns Sy off
725 Controls whether a non-privileged user is granted access based on the dataset
726 permissions defined on the dataset.
729 for more information on ZFS delegated administration.
730 .It Sy failmode Ns = Ns Sy wait Ns | Ns Sy continue Ns | Ns Sy panic
731 Controls the system behavior in the event of catastrophic pool failure.
732 This condition is typically a result of a loss of connectivity to the underlying
733 storage device(s) or a failure of all devices within the pool.
734 The behavior of such an event is determined as follows:
735 .Bl -tag -width "continue"
737 Blocks all I/O access until the device connectivity is recovered and the errors
739 This is the default behavior.
743 to any new write I/O requests but allows reads to any of the remaining healthy
745 Any write requests that have yet to be committed to disk would be blocked.
747 Prints out a message to the console and generates a system crash dump.
749 .It Sy feature@ Ns Ar feature_name Ns = Ns Sy enabled
750 The value of this property is the current state of
752 The only valid value when setting this property is
756 to the enabled state.
759 for details on feature states.
760 .It Sy listsnapshots Ns = Ns Sy on Ns | Ns Sy off
761 Controls whether information about snapshots associated with this pool is
769 This property can also be referred to by its shortened name,
771 .It Sy multihost Ns = Ns Sy on Ns | Ns Sy off
772 Controls whether a pool activity check should be performed during
773 .Nm zpool Cm import .
774 When a pool is determined to be active it cannot be imported, even with the
776 option. This property is intended to be used in failover configurations
777 where multiple hosts have access to a pool on shared storage. When this
778 property is on, periodic writes to storage occur to show the pool is in use.
780 .Sy zfs_multihost_interval
782 .Xr zfs-module-parameters 5
783 man page. In order to enable this property each host must set a unique hostid.
787 .Xr spl-module-parameters 5
788 for additional details. The default value is
790 .It Sy version Ns = Ns Ar version
791 The current on-disk version of the pool.
792 This can be increased, but never decreased.
793 The preferred method of updating pools is with the
795 command, though this property can be used when a specific version is needed for
796 backwards compatibility.
797 Once feature flags are enabled on a pool this property will no longer have a
801 All subcommands that modify state are logged persistently to the pool in their
806 command provides subcommands to create and destroy storage pools, add capacity
807 to storage pools, and provide information about the storage pools.
808 The following subcommands are supported:
814 Displays a help message.
819 .Oo Fl o Ar property Ns = Ns Ar value Oc
822 Adds the specified virtual devices to the given pool.
825 specification is described in the
830 option, and the device checks performed are described in the
837 even if they appear in use or specify a conflicting replication level.
838 Not all devices can be overridden in this manner.
842 GUIDs instead of the normal device names. These GUIDs can be used in place of
843 device names for the zpool detach/offline/remove/replace commands.
845 Display real paths for
847 resolving all symbolic links. This can be used to look up the current block
848 device name regardless of the /dev/disk/ path used to open it.
850 Displays the configuration that would be used without actually adding the
852 The actual pool creation can still fail due to insufficient privileges or
855 Display real paths for
857 instead of only the last component of the path. This can be used in
861 .It Fl o Ar property Ns = Ns Ar value
862 Sets the given pool properties. See the
864 section for a list of valid properties that can be set. The only property
865 supported at the moment is ashift.
871 .Oo Fl o Ar property Ns = Ns Ar value Oc
872 .Ar pool device new_device
878 The existing device cannot be part of a raidz configuration.
881 is not currently part of a mirrored configuration,
883 automatically transforms into a two-way mirror of
889 is part of a two-way mirror, attaching
891 creates a three-way mirror, and so on.
894 begins to resilver immediately.
899 even if its appears to be in use.
900 Not all devices can be overridden in this manner.
901 .It Fl o Ar property Ns = Ns Ar value
902 Sets the given pool properties. See the
904 section for a list of valid properties that can be set. The only property
905 supported at the moment is ashift.
913 Checkpoints the current state of
915 , which can be later restored by
916 .Nm zpool Cm import --rewind-to-checkpoint .
917 The existence of a checkpoint in a pool prohibits the following
926 In addition, it may break reservation boundaries if the pool lacks free
930 command indicates the existence of a checkpoint or the progress of discarding a
931 checkpoint from a pool.
934 command reports how much space the checkpoint takes from the pool.
937 Discards an existing checkpoint from
946 Clears device errors in a pool.
947 If no arguments are specified, all device errors within the pool are cleared.
948 If one or more devices is specified, only those errors associated with the
949 specified device or devices are cleared.
954 .Op Fl m Ar mountpoint
955 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
956 .Oo Fl o Ar feature@feature Ns = Ns Ar value Oc Ns ...
957 .Oo Fl O Ar file-system-property Ns = Ns Ar value Oc Ns ...
962 Creates a new storage pool containing the virtual devices specified on the
964 The pool name must begin with a letter, and can only contain
965 alphanumeric characters as well as underscore
981 are reserved, as are names beginning with
989 specification is described in the
993 The command verifies that each device specified is accessible and not currently
994 in use by another subsystem.
995 There are some uses, such as being currently mounted, or specified as the
996 dedicated dump device, that prevents a device from ever being used by ZFS.
997 Other uses, such as having a preexisting UFS file system, can be overridden with
1002 The command also checks that the replication strategy for the pool is
1004 An attempt to combine redundant and non-redundant storage in a single pool, or
1005 to mix disks and files, results in an error unless
1008 The use of differently sized devices within a single raidz or mirror group is
1009 also flagged as an error unless
1015 option is specified, the default mount point is
1017 The mount point must not exist or must be empty, or else the root dataset
1019 This can be overridden with the
1023 By default all supported features are enabled on the new pool unless the
1025 option is specified.
1028 Do not enable any features on the new pool.
1029 Individual features can be enabled by setting their corresponding properties to
1035 .Xr zpool-features 5
1036 for details about feature properties.
1040 even if they appear in use or specify a conflicting replication level.
1041 Not all devices can be overridden in this manner.
1042 .It Fl m Ar mountpoint
1043 Sets the mount point for the root dataset.
1044 The default mount point is
1051 The mount point must be an absolute path,
1055 For more information on dataset mount points, see
1058 Displays the configuration that would be used without actually creating the
1060 The actual pool creation can still fail due to insufficient privileges or
1062 .It Fl o Ar property Ns = Ns Ar value
1063 Sets the given pool properties.
1066 section for a list of valid properties that can be set.
1067 .It Fl o Ar feature@feature Ns = Ns Ar value
1068 Sets the given pool feature. See the
1069 .Xr zpool-features 5
1070 section for a list of valid features that can be set.
1071 Value can be either disabled or enabled.
1072 .It Fl O Ar file-system-property Ns = Ns Ar value
1073 Sets the given file system properties in the root file system of the pool.
1078 for a list of valid properties that can be set.
1081 .Fl o Sy cachefile Ns = Ns Sy none Fl o Sy altroot Ns = Ns Ar root
1083 Sets the in-core pool name to
1085 while the on-disk name will be the name specified as the pool name
1087 This will set the default cachefile property to none. This is intended
1088 to handle name space collisions when creating pools for other systems,
1089 such as virtual machines or physical machines whose pools live on network
1098 Destroys the given pool, freeing up any devices for other use.
1099 This command tries to unmount any active datasets before destroying the pool.
1102 Forces any active datasets contained within the pool to be unmounted.
1112 The operation is refused if there are no other valid replicas of the data.
1113 If device may be re-added to the pool later on then consider the
1119 .Op Fl vHf Oo Ar pool Oc | Fl c
1121 Lists all recent events generated by the ZFS kernel modules. These events
1124 and used to automate administrative tasks such as replacing a failed device
1125 with a hot spare. For more information about the subclasses and event payloads
1126 that can be generated see the
1131 Clear all previous events.
1135 Scripted mode. Do not display headers, and separate fields by a
1136 single tab instead of arbitrary space.
1138 Print the entire payload for each event.
1147 Exports the given pools from the system.
1148 All devices are marked as exported, but are still considered in use by other
1150 The devices can be moved between systems
1151 .Pq even those of different endianness
1152 and imported as long as a sufficient number of devices are present.
1154 Before exporting the pool, all datasets within the pool are unmounted.
1155 A pool can not be exported if it has a shared spare that is currently being
1158 For pools to be portable, you must give the
1160 command whole disks, not just partitions, so that ZFS can label the disks with
1161 portable EFI labels.
1162 Otherwise, disk drivers on platforms of different endianness will not recognize
1166 Exports all pools imported on the system.
1168 Forcefully unmount all datasets, using the
1172 This command will forcefully export the pool even if it has a shared spare that
1173 is currently being used.
1174 This may lead to potential data corruption.
1180 .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
1181 .Sy all Ns | Ns Ar property Ns Oo , Ns Ar property Oc Ns ...
1184 Retrieves the given list of properties
1186 or all properties if
1190 for the specified storage pool(s).
1191 These properties are displayed with the following fields:
1193 name Name of storage pool
1194 property Property name
1195 value Property value
1196 source Property source, either 'default' or 'local'.
1201 section for more information on the available pool properties.
1205 Do not display headers, and separate fields by a single tab instead of arbitrary
1208 A comma-separated list of columns to display.
1209 .Sy name Ns \&, Ns Sy property Ns \&, Ns Sy value Ns \&, Ns Sy source
1210 is the default value.
1212 Display numbers in parsable (exact) values.
1218 .Oo Ar pool Oc Ns ...
1220 Displays the command history of the specified pool(s) or all pools if no pool is
1224 Displays internally logged ZFS events in addition to user initiated events.
1226 Displays log records in long format, which in addition to standard format
1227 includes, the user name, the hostname, and the zone in which the operation was
1234 .Op Fl d Ar dir Ns | Ns device
1236 Lists pools available to import.
1239 option is not specified, this command searches for devices in
1243 option can be specified multiple times, and all directories are searched.
1244 If the device appears to be part of an exported pool, this command displays a
1245 summary of the pool with the name of the pool, a numeric identifier, as well as
1246 the vdev layout and current health of the device for each device or file.
1247 Destroyed pools, pools that were previously destroyed with the
1248 .Nm zpool Cm destroy
1249 command, are not listed unless the
1251 option is specified.
1253 The numeric identifier is unique, and can be used instead of the pool name when
1254 multiple exported pools of the same name are available.
1256 .It Fl c Ar cachefile
1257 Reads configuration from the given
1259 that was created with the
1264 is used instead of searching for devices.
1265 .It Fl d Ar dir Ns | Ns Ar device
1268 or searches for devices or files in
1272 option can be specified multiple times.
1274 Lists destroyed pools only.
1281 .Op Fl F Oo Fl n Oc Oo Fl T Oc Oo Fl X Oc
1282 .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir Ns | Ns device
1284 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1288 Imports all pools found in the search directories.
1289 Identical to the previous command, except that all pools with a sufficient
1290 number of devices available are imported.
1291 Destroyed pools, pools that were previously destroyed with the
1292 .Nm zpool Cm destroy
1293 command, will not be imported unless the
1295 option is specified.
1298 Searches for and imports all pools found.
1299 .It Fl c Ar cachefile
1300 Reads configuration from the given
1302 that was created with the
1307 is used instead of searching for devices.
1308 .It Fl d Ar dir Ns | Ns Ar device
1311 or searches for devices or files in
1315 option can be specified multiple times.
1316 This option is incompatible with the
1320 Imports destroyed pools only.
1323 option is also required.
1325 Forces import, even if the pool appears to be potentially active.
1327 Recovery mode for a non-importable pool.
1328 Attempt to return the pool to an importable state by discarding the last few
1330 Not all damaged pools can be recovered by using this option.
1331 If successful, the data from the discarded transactions is irretrievably lost.
1332 This option is ignored if the pool is importable or already imported.
1334 Indicates that this command will request encryption keys for all encrypted
1335 datasets it attempts to mount as it is bringing the pool online. Note that if
1340 this command will block waiting for the keys to be entered. Without this flag
1341 encrypted datasets will be left unavailable until the keys are loaded.
1343 Allows a pool to import when there is a missing log device.
1344 Recent transactions can be lost because the log device will be discarded.
1349 Determines whether a non-importable pool can be made importable again, but does
1350 not actually perform the pool recovery.
1351 For more details about pool recovery mode, see the
1355 Import the pool without mounting any file systems.
1357 Comma-separated list of mount options to use when mounting datasets within the
1361 for a description of dataset properties and mount options.
1362 .It Fl o Ar property Ns = Ns Ar value
1363 Sets the specified property on the imported pool.
1366 section for more information on the available pool properties.
1376 .It Fl -rewind-to-checkpoint
1377 Rewinds pool to the checkpointed state.
1378 Once the pool is imported with this flag there is no way to undo the rewind.
1379 All changes and data that were written after the checkpoint are lost!
1380 The only exception is when the
1382 mounting option is enabled.
1383 In this case, the checkpointed state of the pool is opened and an
1384 administrator can see how the pool would look like if they were
1387 Scan using the default search path, the libblkid cache will not be
1388 consulted. A custom search path may be specified by setting the
1389 ZPOOL_IMPORT_PATH environment variable.
1393 recovery option. Determines whether extreme
1394 measures to find a valid txg should take place. This allows the pool to
1395 be rolled back to a txg which is no longer guaranteed to be consistent.
1396 Pools imported at an inconsistent txg may contain uncorrectable
1397 checksum errors. For more details about pool recovery mode, see the
1399 option, above. WARNING: This option can be extremely hazardous to the
1400 health of your pool and should only be used as a last resort.
1402 Specify the txg to use for rollback. Implies
1405 about pool recovery mode, see the
1407 option, above. WARNING: This option can be extremely hazardous to the
1408 health of your pool and should only be used as a last resort.
1414 .Op Fl F Oo Fl n Oc Oo Fl t Oc Oo Fl T Oc Oo Fl X Oc
1415 .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir Ns | Ns device
1417 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1420 .Ar pool Ns | Ns Ar id
1423 Imports a specific pool.
1424 A pool can be identified by its name or the numeric identifier.
1427 is specified, the pool is imported using the name
1429 Otherwise, it is imported with the same name as its exported name.
1431 If a device is removed from a system without running
1433 first, the device appears as potentially active.
1434 It cannot be determined if this was a failed export, or whether the device is
1435 really in use from another host.
1436 To import a pool in this state, the
1440 .It Fl c Ar cachefile
1441 Reads configuration from the given
1443 that was created with the
1448 is used instead of searching for devices.
1449 .It Fl d Ar dir Ns | Ns Ar device
1452 or searches for devices or files in
1456 option can be specified multiple times.
1457 This option is incompatible with the
1461 Imports destroyed pool.
1464 option is also required.
1466 Forces import, even if the pool appears to be potentially active.
1468 Recovery mode for a non-importable pool.
1469 Attempt to return the pool to an importable state by discarding the last few
1471 Not all damaged pools can be recovered by using this option.
1472 If successful, the data from the discarded transactions is irretrievably lost.
1473 This option is ignored if the pool is importable or already imported.
1475 Indicates that this command will request encryption keys for all encrypted
1476 datasets it attempts to mount as it is bringing the pool online. Note that if
1481 this command will block waiting for the keys to be entered. Without this flag
1482 encrypted datasets will be left unavailable until the keys are loaded.
1484 Allows a pool to import when there is a missing log device.
1485 Recent transactions can be lost because the log device will be discarded.
1490 Determines whether a non-importable pool can be made importable again, but does
1491 not actually perform the pool recovery.
1492 For more details about pool recovery mode, see the
1496 Comma-separated list of mount options to use when mounting datasets within the
1500 for a description of dataset properties and mount options.
1501 .It Fl o Ar property Ns = Ns Ar value
1502 Sets the specified property on the imported pool.
1505 section for more information on the available pool properties.
1516 Scan using the default search path, the libblkid cache will not be
1517 consulted. A custom search path may be specified by setting the
1518 ZPOOL_IMPORT_PATH environment variable.
1522 recovery option. Determines whether extreme
1523 measures to find a valid txg should take place. This allows the pool to
1524 be rolled back to a txg which is no longer guaranteed to be consistent.
1525 Pools imported at an inconsistent txg may contain uncorrectable
1526 checksum errors. For more details about pool recovery mode, see the
1528 option, above. WARNING: This option can be extremely hazardous to the
1529 health of your pool and should only be used as a last resort.
1531 Specify the txg to use for rollback. Implies
1534 about pool recovery mode, see the
1536 option, above. WARNING: This option can be extremely hazardous to the
1537 health of your pool and should only be used as a last resort.
1543 is temporary. Temporary pool names last until export. Ensures that
1544 the original pool name will be used in all label updates and therefore
1545 is retained upon export.
1546 Will also set -o cachefile=none when not explicitly specified.
1551 .Op Oo Oo Fl c Ar SCRIPT Oc Oo Fl lq Oc Oc Ns | Ns Fl rw
1552 .Op Fl T Sy u Ns | Ns Sy d
1554 .Oo Oo Ar pool Ns ... Oc Ns | Ns Oo Ar pool vdev Ns ... Oc Ns | Ns Oo Ar vdev Ns ... Oc Oc
1555 .Op Ar interval Op Ar count
1557 Displays I/O statistics for the given pools/vdevs. You can pass in a
1558 list of pools, a pool and list of vdevs in that pool, or a list of any
1559 vdevs from any pool. If no items are specified, statistics for every
1560 pool in the system are shown.
1563 the statistics are printed every
1565 seconds until ^C is pressed. If count is specified, the command exits
1566 after count reports are printed. The first report printed is always
1567 the statistics since boot regardless of whether
1571 are passed. However, this behavior can be suppressed with the
1573 flag. Also note that the units of
1577 that are printed in the report are in base 1024. To get the raw
1582 .It Fl c Op Ar SCRIPT1 Ns Oo , Ns Ar SCRIPT2 Oc Ns ...
1583 Run a script (or scripts) on each vdev and include the output as a new column
1586 output. Users can run any script found in their
1588 directory or from the system
1589 .Pa /etc/zfs/zpool.d
1590 directory. Script names containing the slash (/) character are not allowed.
1591 The default search path can be overridden by setting the
1592 ZPOOL_SCRIPTS_PATH environment variable. A privileged user can run
1594 if they have the ZPOOL_SCRIPTS_AS_ROOT
1595 environment variable set. If a script requires the use of a privileged
1598 then it's recommended you allow the user access to it in
1600 or add the user to the
1601 .Pa /etc/sudoers.d/zfs
1606 is passed without a script name, it prints a list of all scripts.
1608 also sets verbose mode
1609 .No \&( Ns Fl v Ns No \&).
1611 Script output should be in the form of "name=value". The column name is
1612 set to "name" and the value is set to "value". Multiple lines can be
1613 used to output multiple columns. The first line of output not in the
1614 "name=value" format is displayed without a column title, and no more
1615 output after that is displayed. This can be useful for printing error
1616 messages. Blank or NULL values are printed as a '-' to make output
1619 The following environment variables are set before running each script:
1620 .Bl -tag -width "VDEV_PATH"
1622 Full path to the vdev
1624 .Bl -tag -width "VDEV_UPATH"
1626 Underlying path to the vdev (/dev/sd*). For use with device mapper,
1627 multipath, or partitioned vdevs.
1629 .Bl -tag -width "VDEV_ENC_SYSFS_PATH"
1630 .It Sy VDEV_ENC_SYSFS_PATH
1631 The sysfs path to the enclosure for the vdev (if any).
1633 .It Fl T Sy u Ns | Ns Sy d
1634 Display a time stamp.
1637 for a printed representation of the internal representation of time.
1642 for standard date format.
1646 Display vdev GUIDs instead of the normal device names. These GUIDs
1647 can be used in place of device names for the zpool
1648 detach/offline/remove/replace commands.
1650 Scripted mode. Do not display headers, and separate fields by a
1651 single tab instead of arbitrary space.
1653 Display real paths for vdevs resolving all symbolic links. This can
1654 be used to look up the current block device name regardless of the
1656 path used to open it.
1658 Display numbers in parsable (exact) values. Time values are in
1661 Display full paths for vdevs instead of only the last component of
1662 the path. This can be used in conjunction with the
1666 Print request size histograms for the leaf ZIOs. This includes
1667 histograms of individual ZIOs (
1669 and aggregate ZIOs (
1671 These stats can be useful for seeing how well the ZFS IO aggregator is
1672 working. Do not confuse these request size stats with the block layer
1673 requests; it's possible ZIOs can be broken up before being sent to the
1676 Verbose statistics Reports usage statistics for individual vdevs within the
1677 pool, in addition to the pool-wide statistics.
1679 Omit statistics since boot.
1680 Normally the first line of output reports the statistics since boot.
1681 This option suppresses that first line of output.
1683 Display latency histograms:
1686 Total IO time (queuing + disk IO time).
1688 Disk IO time (time reading/writing the disk).
1690 Amount of time IO spent in synchronous priority queues. Does not include
1693 Amount of time IO spent in asynchronous priority queues. Does not include
1696 Amount of time IO spent in scrub queue. Does not include disk time.
1698 Include average latency statistics:
1701 Average total IO time (queuing + disk IO time).
1703 Average disk IO time (time reading/writing the disk).
1705 Average amount of time IO spent in synchronous priority queues. Does
1706 not include disk time.
1708 Average amount of time IO spent in asynchronous priority queues.
1709 Does not include disk time.
1711 Average queuing time in scrub queue. Does not include disk time.
1713 Include active queue statistics. Each priority queue has both
1718 IOs. Pending IOs are waiting to
1719 be issued to the disk, and active IOs have been issued to disk and are
1720 waiting for completion. These stats are broken out by priority queue:
1722 .Ar syncq_read/write :
1723 Current number of entries in synchronous priority
1725 .Ar asyncq_read/write :
1726 Current number of entries in asynchronous priority queues.
1728 Current number of entries in scrub queue.
1730 All queue statistics are instantaneous measurements of the number of
1731 entries in the queues. If you specify an interval, the measurements
1732 will be sampled from the end of the interval.
1740 Removes ZFS label information from the specified
1744 must not be part of an active pool configuration.
1747 Treat exported or foreign devices as inactive.
1753 .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
1754 .Op Fl T Sy u Ns | Ns Sy d
1755 .Oo Ar pool Oc Ns ...
1756 .Op Ar interval Op Ar count
1758 Lists the given pools along with a health status and space usage.
1761 are specified, all pools in the system are listed.
1764 the information is printed every
1766 seconds until ^C is pressed.
1769 is specified, the command exits after
1771 reports are printed.
1774 Display vdev GUIDs instead of the normal device names. These GUIDs
1775 can be used in place of device names for the zpool
1776 detach/offline/remove/replace commands.
1779 Do not display headers, and separate fields by a single tab instead of arbitrary
1781 .It Fl o Ar property
1782 Comma-separated list of properties to display.
1785 section for a list of valid properties.
1787 .Cm name , size , allocated , free , expandsize , fragmentation , capacity ,
1788 .Cm dedupratio , health , altroot .
1790 Display real paths for vdevs resolving all symbolic links. This can
1791 be used to look up the current block device name regardless of the
1792 /dev/disk/ path used to open it.
1794 Display numbers in parsable
1798 Display full paths for vdevs instead of only the last component of
1799 the path. This can be used in conjunction with the
1802 .It Fl T Sy u Ns | Ns Sy d
1803 Display a time stamp.
1806 for a printed representation of the internal representation of time.
1811 for standard date format.
1816 Reports usage statistics for individual vdevs within the pool, in addition to
1817 the pool-wise statistics.
1824 .Ar pool Ar device Ns ...
1826 Takes the specified physical device offline.
1829 is offline, no attempt is made to read or write to the device.
1830 This command is not applicable to spares.
1833 Force fault. Instead of offlining the disk, put it into a faulted
1834 state. The fault will persist across imports unless the
1839 Upon reboot, the specified physical device reverts to its previous state.
1845 .Ar pool Ar device Ns ...
1847 Brings the specified physical device online.
1848 This command is not applicable to spares.
1851 Expand the device to use all available space.
1852 If the device is part of a mirror or raidz then all devices must be expanded
1853 before the new space will become available to the pool.
1860 Generates a new unique identifier for the pool.
1861 You must ensure that all devices in this pool are online and healthy before
1862 performing this action.
1869 Reopen all the vdevs associated with the pool.
1872 Do not restart an in-progress scrub operation. This is not recommended and can
1873 result in partially resilvered devices unless a second scrub is performed.
1879 .Ar pool Ar device Ns ...
1881 Removes the specified device from the pool.
1882 This command currently only supports removing hot spares, cache, log
1883 devices and mirrored top-level vdevs (mirror of leaf devices); but not raidz.
1885 Removing a top-level vdev reduces the total amount of space in the storage pool.
1886 The specified device will be evacuated by copying all allocated space from it to
1887 the other devices in the pool.
1890 command initiates the removal and returns, while the evacuation continues in
1892 The removal progress can be monitored with
1893 .Nm zpool Cm status.
1894 This feature must be enabled to be used, see
1895 .Xr zpool-features 5
1897 A mirrored top-level device (log or data) can be removed by specifying the top-level mirror for the
1899 Non-log devices or data devices that are part of a mirrored configuration can be removed using
1905 Do not actually perform the removal ("no-op").
1906 Instead, print the estimated amount of memory that will be used by the
1907 mapping table after the removal completes.
1908 This is nonzero only for top-level vdevs.
1912 Used in conjunction with the
1914 flag, displays numbers as parsable (exact) values.
1922 Stops and cancels an in-progress removal of a top-level vdev.
1927 .Op Fl o Ar property Ns = Ns Ar value
1928 .Ar pool Ar device Op Ar new_device
1934 This is equivalent to attaching
1936 waiting for it to resilver, and then detaching
1941 must be greater than or equal to the minimum size of all the devices in a mirror
1942 or raidz configuration.
1945 is required if the pool is not redundant.
1948 is not specified, it defaults to
1950 This form of replacement is useful after an existing disk has failed and has
1951 been physically replaced.
1952 In this case, the new disk may have the same
1954 path as the old device, even though it is actually a different disk.
1955 ZFS recognizes this.
1960 even if its appears to be in use.
1961 Not all devices can be overridden in this manner.
1962 .It Fl o Ar property Ns = Ns Ar value
1963 Sets the given pool properties. See the
1965 section for a list of valid properties that can be set.
1966 The only property supported at the moment is
1975 Begins a scrub or resumes a paused scrub.
1976 The scrub examines all data in the specified pools to verify that it checksums
1980 devices, ZFS automatically repairs any damage discovered during the scrub.
1983 command reports the progress of the scrub and summarizes the results of the
1984 scrub upon completion.
1986 Scrubbing and resilvering are very similar operations.
1987 The difference is that resilvering only examines data that ZFS knows to be out
1990 for example, when attaching a new device to a mirror or replacing an existing
1993 whereas scrubbing examines all data to discover silent errors due to hardware
1994 faults or disk failure.
1996 Because scrubbing and resilvering are I/O-intensive operations, ZFS only allows
1998 If a scrub is paused, the
2001 If a resilver is in progress, ZFS does not allow a scrub to be started until the
2010 Scrub pause state and progress are periodically synced to disk.
2011 If the system is restarted or pool is exported during a paused scrub,
2012 even after import, scrub will remain paused until it is resumed.
2013 Once resumed the scrub will pick up from the place where it was last
2014 checkpointed to disk.
2015 To resume a paused scrub issue
2022 .Ar property Ns = Ns Ar value
2025 Sets the given property on the specified pool.
2028 section for more information on what properties can be set and acceptable
2034 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
2045 must be mirrors and the pool must not be in the process of resilvering.
2046 At the time of the split,
2048 will be a replica of
2051 last device in each mirror is split from
2056 The optional device specification causes the specified device(s) to be
2059 and, should any devices remain unspecified,
2060 the last device in each mirror is used as would be by default.
2063 Display vdev GUIDs instead of the normal device names. These GUIDs
2064 can be used in place of device names for the zpool
2065 detach/offline/remove/replace commands.
2067 Display real paths for vdevs resolving all symbolic links. This can
2068 be used to look up the current block device name regardless of the
2070 path used to open it.
2072 Indicates that this command will request encryption keys for all encrypted
2073 datasets it attempts to mount as it is bringing the new pool online. Note that
2074 if any datasets have a
2078 this command will block waiting for the keys to be entered. Without this flag
2079 encrypted datasets will be left unavailable until the keys are loaded.
2081 Do dry run, do not actually perform the split.
2082 Print out the expected configuration of
2085 Display full paths for vdevs instead of only the last component of
2086 the path. This can be used in conjunction with the
2089 .It Fl o Ar property Ns = Ns Ar value
2090 Sets the specified property for
2094 section for more information on the available pool properties.
2102 and automatically import it.
2107 .Op Fl c Op Ar SCRIPT1 Ns Oo , Ns Ar SCRIPT2 Oc Ns ...
2109 .Op Fl T Sy u Ns | Ns Sy d
2110 .Oo Ar pool Oc Ns ...
2111 .Op Ar interval Op Ar count
2113 Displays the detailed health status for the given pools.
2116 is specified, then the status of each pool in the system is displayed.
2117 For more information on pool and device health, see the
2118 .Sx Device Failure and Recovery
2121 If a scrub or resilver is in progress, this command reports the percentage done
2122 and the estimated time to completion.
2123 Both of these are only approximate, because the amount of data in the pool and
2124 the other workloads on the system can change.
2126 .It Fl c Op Ar SCRIPT1 Ns Oo , Ns Ar SCRIPT2 Oc Ns ...
2127 Run a script (or scripts) on each vdev and include the output as a new column
2134 for complete details.
2136 Display vdev GUIDs instead of the normal device names. These GUIDs
2137 can be used in place of device names for the zpool
2138 detach/offline/remove/replace commands.
2140 Display real paths for vdevs resolving all symbolic links. This can
2141 be used to look up the current block device name regardless of the
2143 path used to open it.
2145 Display full paths for vdevs instead of only the last component of
2146 the path. This can be used in conjunction with the
2150 Display a histogram of deduplication statistics, showing the allocated
2151 .Pq physically present on disk
2153 .Pq logically referenced in the pool
2154 block counts and sizes by reference count.
2155 .It Fl T Sy u Ns | Ns Sy d
2156 Display a time stamp.
2159 for a printed representation of the internal representation of time.
2164 for standard date format.
2168 Displays verbose data error information, printing out a complete list of all
2169 data errors since the last complete pool scrub.
2171 Only display status for pools that are exhibiting errors or are otherwise
2173 Warnings about pools not using the latest on-disk format will not be included.
2180 This command forces all in-core dirty data to be written to the primary
2181 pool storage and not the ZIL. It will also update administrative
2182 information including quota reporting. Without arguments,
2184 will sync all pools on the system. Otherwise, it will sync only the
2190 Displays pools which do not have all supported features enabled and pools
2191 formatted using a legacy ZFS version number.
2192 These pools can continue to be used, but some features may not be available.
2194 .Nm zpool Cm upgrade Fl a
2195 to enable all features on all pools.
2201 Displays legacy ZFS versions supported by the current software.
2203 .Xr zpool-features 5
2204 for a description of feature flags features supported by the current software.
2209 .Fl a Ns | Ns Ar pool Ns ...
2211 Enables all supported features on the given pool.
2212 Once this is done, the pool will no longer be accessible on systems that do not
2213 support feature flags.
2216 for details on compatibility with systems that support feature flags, but do not
2217 support all features enabled on the pool.
2220 Enables all supported features on all pools.
2222 Upgrade to the specified legacy version.
2225 flag is specified, no features will be enabled on the pool.
2226 This option can only be used to increase the version number up to the last
2227 supported legacy version number.
2231 The following exit values are returned:
2234 Successful completion.
2238 Invalid command line options were specified.
2242 .It Sy Example 1 No Creating a RAID-Z Storage Pool
2243 The following command creates a pool with a single raidz root vdev that
2244 consists of six disks.
2246 # zpool create tank raidz sda sdb sdc sdd sde sdf
2248 .It Sy Example 2 No Creating a Mirrored Storage Pool
2249 The following command creates a pool with two mirrors, where each mirror
2252 # zpool create tank mirror sda sdb mirror sdc sdd
2254 .It Sy Example 3 No Creating a ZFS Storage Pool by Using Partitions
2255 The following command creates an unmirrored pool using two disk partitions.
2257 # zpool create tank sda1 sdb2
2259 .It Sy Example 4 No Creating a ZFS Storage Pool by Using Files
2260 The following command creates an unmirrored pool using files.
2261 While not recommended, a pool based on files can be useful for experimental
2264 # zpool create tank /path/to/file/a /path/to/file/b
2266 .It Sy Example 5 No Adding a Mirror to a ZFS Storage Pool
2267 The following command adds two mirrored disks to the pool
2269 assuming the pool is already made up of two-way mirrors.
2270 The additional space is immediately available to any datasets within the pool.
2272 # zpool add tank mirror sda sdb
2274 .It Sy Example 6 No Listing Available ZFS Storage Pools
2275 The following command lists all available pools on the system.
2276 In this case, the pool
2278 is faulted due to a missing device.
2279 The results from this command are similar to the following:
2282 NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
2283 rpool 19.9G 8.43G 11.4G - 33% 42% 1.00x ONLINE -
2284 tank 61.5G 20.0G 41.5G - 48% 32% 1.00x ONLINE -
2285 zion - - - - - - - FAULTED -
2287 .It Sy Example 7 No Destroying a ZFS Storage Pool
2288 The following command destroys the pool
2290 and any datasets contained within.
2292 # zpool destroy -f tank
2294 .It Sy Example 8 No Exporting a ZFS Storage Pool
2295 The following command exports the devices in pool
2297 so that they can be relocated or later imported.
2301 .It Sy Example 9 No Importing a ZFS Storage Pool
2302 The following command displays available pools, and then imports the pool
2304 for use on the system.
2305 The results from this command are similar to the following:
2309 id: 15451357997522795478
2311 action: The pool can be imported using its name or numeric identifier.
2321 .It Sy Example 10 No Upgrading All ZFS Storage Pools to the Current Version
2322 The following command upgrades all ZFS Storage pools to the current version of
2326 This system is currently running ZFS version 2.
2328 .It Sy Example 11 No Managing Hot Spares
2329 The following command creates a new pool with an available hot spare:
2331 # zpool create tank mirror sda sdb spare sdc
2334 If one of the disks were to fail, the pool would be reduced to the degraded
2336 The failed device can be replaced using the following command:
2338 # zpool replace tank sda sdd
2341 Once the data has been resilvered, the spare is automatically removed and is
2342 made available for use should another device fail.
2343 The hot spare can be permanently removed from the pool using the following
2346 # zpool remove tank sdc
2348 .It Sy Example 12 No Creating a ZFS Pool with Mirrored Separate Intent Logs
2349 The following command creates a ZFS storage pool consisting of two, two-way
2350 mirrors and mirrored log devices:
2352 # zpool create pool mirror sda sdb mirror sdc sdd log mirror \\
2355 .It Sy Example 13 No Adding Cache Devices to a ZFS Pool
2356 The following command adds two disks for use as cache devices to a ZFS storage
2359 # zpool add pool cache sdc sdd
2362 Once added, the cache devices gradually fill with content from main memory.
2363 Depending on the size of your cache devices, it could take over an hour for
2365 Capacity and reads can be monitored using the
2369 # zpool iostat -v pool 5
2371 .It Sy Example 14 No Removing a Mirrored top-level (Log or Data) Device
2372 The following commands remove the mirrored log device
2374 and mirrored top-level data device
2377 Given this configuration:
2381 scrub: none requested
2384 NAME STATE READ WRITE CKSUM
2386 mirror-0 ONLINE 0 0 0
2389 mirror-1 ONLINE 0 0 0
2393 mirror-2 ONLINE 0 0 0
2398 The command to remove the mirrored log
2402 # zpool remove tank mirror-2
2405 The command to remove the mirrored data
2409 # zpool remove tank mirror-1
2411 .It Sy Example 15 No Displaying expanded space on a device
2412 The following command displays the detailed information for the pool
2414 This pool is comprised of a single raidz vdev where one of its devices
2415 increased its capacity by 10GB.
2416 In this example, the pool will not be able to utilize this extra capacity until
2417 all the devices under the raidz vdev have been expanded.
2419 # zpool list -v data
2420 NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
2421 data 23.9G 14.6G 9.30G - 48% 61% 1.00x ONLINE -
2422 raidz1 23.9G 14.6G 9.30G - 48%
2427 .It Sy Example 16 No Adding output columns
2428 Additional columns can be added to the
2436 # zpool status -c vendor,model,size
2437 NAME STATE READ WRITE CKSUM vendor model size
2439 mirror-0 ONLINE 0 0 0
2440 U1 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T
2441 U10 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T
2442 U11 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T
2443 U12 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T
2444 U13 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T
2445 U14 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T
2447 # zpool iostat -vc slaves
2448 capacity operations bandwidth
2449 pool alloc free read write read write slaves
2450 ---------- ----- ----- ----- ----- ----- ----- ---------
2451 tank 20.4G 7.23T 26 152 20.7M 21.6M
2452 mirror 20.4G 7.23T 26 152 20.7M 21.6M
2453 U1 - - 0 31 1.46K 20.6M sdb sdff
2454 U10 - - 0 1 3.77K 13.3K sdas sdgw
2455 U11 - - 0 1 288K 13.3K sdat sdgx
2456 U12 - - 0 1 78.4K 13.3K sdau sdgy
2457 U13 - - 0 1 128K 13.3K sdav sdgz
2458 U14 - - 0 1 63.2K 13.3K sdfk sdg
2461 .Sh ENVIRONMENT VARIABLES
2462 .Bl -tag -width "ZFS_ABORT"
2466 to dump core on exit for the purposes of running
2469 .Bl -tag -width "ZPOOL_IMPORT_PATH"
2470 .It Ev ZPOOL_IMPORT_PATH
2471 The search path for devices or files to use with the pool. This is a colon-separated list of directories in which
2473 looks for device nodes and files.
2479 .Bl -tag -width "ZPOOL_VDEV_NAME_GUID"
2480 .It Ev ZPOOL_VDEV_NAME_GUID
2482 .Nm zpool subcommands to output vdev guids by default. This behavior
2485 command line option.
2487 .Bl -tag -width "ZPOOL_VDEV_NAME_FOLLOW_LINKS"
2488 .It Ev ZPOOL_VDEV_NAME_FOLLOW_LINKS
2491 subcommands to follow links for vdev names by default. This behavior is identical to the
2493 command line option.
2495 .Bl -tag -width "ZPOOL_VDEV_NAME_PATH"
2496 .It Ev ZPOOL_VDEV_NAME_PATH
2499 subcommands to output full vdev path names by default. This
2500 behavior is identical to the
2502 command line option.
2504 .Bl -tag -width "ZFS_VDEV_DEVID_OPT_OUT"
2505 .It Ev ZFS_VDEV_DEVID_OPT_OUT
2506 Older ZFS on Linux implementations had issues when attempting to display pool
2507 config VDEV names if a
2509 NVP value is present in the pool's config.
2511 For example, a pool that originated on illumos platform would have a devid
2512 value in the config and
2514 would fail when listing the config.
2515 This would also be true for future Linux based pools.
2517 A pool can be stripped of any
2519 values on import or prevented from adding
2525 .Sy ZFS_VDEV_DEVID_OPT_OUT .
2527 .Bl -tag -width "ZPOOL_SCRIPTS_AS_ROOT"
2528 .It Ev ZPOOL_SCRIPTS_AS_ROOT
2529 Allow a privileged user to run the
2530 .Nm zpool status/iostat
2533 option. Normally, only unprivileged users are allowed to run
2536 .Bl -tag -width "ZPOOL_SCRIPTS_PATH"
2537 .It Ev ZPOOL_SCRIPTS_PATH
2538 The search path for scripts when running
2539 .Nm zpool status/iostat
2542 option. This is a colon-separated list of directories and overrides the default
2545 .Pa /etc/zfs/zpool.d
2548 .Bl -tag -width "ZPOOL_SCRIPTS_ENABLED"
2549 .It Ev ZPOOL_SCRIPTS_ENABLED
2551 .Nm zpool status/iostat
2555 .Sy ZPOOL_SCRIPTS_ENABLED
2556 is not set, it is assumed that the user is allowed to run
2557 .Nm zpool status/iostat -c .
2559 .Sh INTERFACE STABILITY
2563 .Xr zfs-module-parameters 5 ,
2564 .Xr zpool-features 5 ,