zpool(8)
Create, destroy, and manage ZFS storage pools.
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
| Flag | What it does |
|---|---|
create | Create a new storage pool with specified name and devices |
destroy | Destroy an existing storage pool and all contained datasets |
list | Display basic information about all or specified pools |
status | Show detailed status, capacity, and health information for pools |
add | Add one or more devices (vdevs) to an existing pool |
remove | Remove a device from the pool (if mirror or RAID-Z allows) |
replace | Replace a failed or degraded device with a new one |
scrub | Scan entire pool for data integrity issues and repair errors |
-H | Suppress headers and use tab delimiters for scripting |
-o | Specify output columns or set pool properties |
Examples
Display a summary of all storage pools on the system
zpool listCreate a mirrored pool named 'tank' using two entire disks with redundancy
zpool create tank mirror /dev/sda /dev/sdbShow detailed status of the 'tank' pool including verbose error information
zpool status -v tankStart a data integrity check (scrub) on the 'tank' pool to detect and repair errors
zpool scrub tankAdd two more devices as a mirror vdev to increase pool capacity and redundancy
zpool add tank mirror /dev/sdc /dev/sddReplace a failed or worn device (/dev/sda) with a new one (/dev/sde)
zpool replace tank /dev/sda /dev/sdeDisplay I/O statistics for the 'tank' pool updated every 2 seconds
zpool iostat -v tank 2Completely destroy the 'tank' pool and all datasets within it (irreversible)
zpool destroy tank