$linuxjunkies
>

zpool(8)

Create, destroy, and manage ZFS storage pools.

UbuntuDebianFedoraArch

Synopsis

zpool SUBCOMMAND [OPTIONS] [ARGUMENTS]

Description

zpool is the primary command for managing ZFS storage pools. It allows administrators to create and destroy pools, add or remove storage devices, configure redundancy and caching, and monitor pool health and statistics.

ZFS pools are virtual storage devices composed of one or more physical disks or partitions, organized with optional RAID-like configurations (mirrors, RAID-Z) for data protection and performance optimization.

Common options

FlagWhat it does
createCreate a new storage pool with specified name and devices
destroyDestroy an existing storage pool and all contained datasets
listDisplay basic information about all or specified pools
statusShow detailed status, capacity, and health information for pools
addAdd one or more devices (vdevs) to an existing pool
removeRemove a device from the pool (if mirror or RAID-Z allows)
replaceReplace a failed or degraded device with a new one
scrubScan entire pool for data integrity issues and repair errors
-HSuppress headers and use tab delimiters for scripting
-oSpecify output columns or set pool properties

Examples

Display a summary of all storage pools on the system

zpool list

Create a mirrored pool named 'tank' using two entire disks with redundancy

zpool create tank mirror /dev/sda /dev/sdb

Show detailed status of the 'tank' pool including verbose error information

zpool status -v tank

Start a data integrity check (scrub) on the 'tank' pool to detect and repair errors

zpool scrub tank

Add two more devices as a mirror vdev to increase pool capacity and redundancy

zpool add tank mirror /dev/sdc /dev/sdd

Replace a failed or worn device (/dev/sda) with a new one (/dev/sde)

zpool replace tank /dev/sda /dev/sde

Display I/O statistics for the 'tank' pool updated every 2 seconds

zpool iostat -v tank 2

Completely destroy the 'tank' pool and all datasets within it (irreversible)

zpool destroy tank

Related commands