raidz-expansion · shipping · also RAID-Z expansion

RAIDZ expansion

RAIDZ expansion widens an existing RAIDZ virtual device by attaching another member and redistributing allocated space while retaining old blocks' data-to-parity ratios.

Attaching a device to a RAID-Z group reads all allocated space from the existing members and rewrites it across the wider group, after which a pool-wide scrub verifies the checksums of the copied blocks. Redundancy is maintained throughout and the tolerated failure count does not change. A disk failure pauses the expansion until the group is healthy again. This is capacity expansion, not replacement-device resilvering. [1]

Old blocks keep their old ratio. A 5-wide RAID-Z2 has 3 data and 2 parity columns, and after one expansion to 6-wide only newly written blocks use 4 data and 2 parity. [1]

Reflow starts in the 3.5 MiB reserved boot area after the disk labels, used as scratch space so early rows can move without overwriting data whose copy progress is not yet on disk. The next offset to reflow is persisted in the uberblock. After completion, an array of logical stripe widths by transaction group tells readers which geometry each block was written with. [2]

Relations

related
RAIDZ, Resilver, Storage snapshot, Data scrubbing

Advantages

  • Adds capacity to an existing RAID-Z group without recreating the pool, and a group can be expanded more than once. [1]

Limitations

  • An active raidz_expansion feature blocks even read-only import by software that lacks it, so recovery tools must support the feature. [3]
  • Because the assumed parity ratio of the group does not change, df, zfs list and similar tools can report slightly less space than expected for newly written blocks. [1]

Citations

  1. OpenZFS 2.3: zpool-attach(8), RAID-Z expansion and space reporting (accessed 2026-10-23)
  2. OpenZFS zfs-2.3.0: vdev_raidz.c, reflow and time-dependent geometry (accessed 2026-10-23)
  3. OpenZFS 2.3: zpool-features(7), raidz_expansion compatibility (accessed 2026-10-23)

Further reading

  1. Hesela: RAIDZ expansion and retained parity cost (accessed 2026-10-16)
Sources & caveats
  • attach and features re-read 2026-10-23 for the expansion procedure, the 5-wide to 6-wide example and feature compatibility. geometry is vdev_raidz.c at tag zfs-2.3.0, read for the scratch area, uberblock reflow state and raidz_expand_txgs.
  • A companion analysis with a bounded accounting model is listed but not used in prose; it is not a pool-capacity estimator.
  • The zfs-error-scrub entry links here because a full pool scrub runs at the end of an expansion, whereas an error scrub re-reads only files with recorded errors.

JSON: /data/terms/raidz-expansion.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. RAIDZ expansion. Hesela. 2026-10-23. https://hesela.dev/terms/raidz-expansion/