Single Disk / Stripe
Fast but no redundancy. Pool is lost if the disk fails.
Solaris · ZPOOL – Pool Management in Solaris
Solaris · Lesson 17
Create and manage ZFS pools. Mirror and RAIDZ concepts. Import export pools. Scrub and repair operations.
A ZPOOL is the top-level storage object in ZFS. All ZFS filesystems, volumes, snapshots and clones live inside a pool.
A pool is built from one or more vdevs(virtual devices), which determine redundancy:
Fast but no redundancy. Pool is lost if the disk fails.
Safest for OS/root pools and critical data. Survives 1 disk failure.
Parity-based redundancy. Survives 1, 2, or 3 disk failures respectively.
Shows size, alloc, free, expandsize, fragmentation, and more.
Shows pool state, errors, vdevs, read/write/checksum failures and device paths.
List available disks in non-interactive mode to avoid format> prompt.
Always use the whole disk (slice s2). Single-disk pools have no redundancy.
Mirror protects against 1 disk failure (RAID-1 equivalent).
RAID-Z avoids the write hole and provides better data integrity.
Adding disks expands capacity but may reduce redundancy depending on vdev layout.
Attach a second disk to turn a single-disk pool into a mirror.
Detaching removes the disk and returns the pool to degraded or single state.
Exporting cleanly unmounts filesystems and removes ZFS metadata from memory.
Shows pools found but not yet imported.
Standard import after an export.
zpool import -D shows pools that were destroyed OR have corrupted labels.
-x means 'only show pools with issues', -v provides detailed error logs.
Resets error counters after issues have been fixed.
Scrubbing scans all data for silent corruption (checksums) and repairs from redundant copies.
Shows pool creation, add/remove, scrubs, snapshots, dataset creation, etc.
WARNING: Destroys all data in the pool. Only use in labs or confirmed migrations.
zpool scrub regularly to detect silent corruption.Next chapter: ZFS datasets, filesystems, quotas, mountpoints and snapshots.