扩容流程(RAID 5 加一块盘)
扩容流程(RAID 5 加一块盘)
mdadm /dev/md0 --add /dev/sdf1
mdadm --grow /dev/md0 --raid-devices=5
cat /proc/mdstat # 观察 reshape 进度
resize2fs /dev/md0 # ext4;XFS 用 xfs_growfs /mount| 风险 | reshape 期间性能下降,备份窗口内更稳妥 |
|---|---|
| 限制 | 扩容后容量按新盘数重算,需文件系统配套扩展 |
| 回退 | 部分 reshape 支持 --revert-reshape;不支持时只能等待完成 |
reshape 中断电可能导致阵列停在中间状态;变更前确认 UPS 与备份。