Rebuild mdadm RAID5 array with fewer disks
According to the power of Google, which brought me to this article, it's possible to resize RAID5 arrays under Linux since mdadm
version 3.1.something.
- First shrink the filesystem (using
resize2fs -M
). - Use
mdadm ... --grow --array-size=
to resize the array down so that it's the correct size for three physical volumes. - Use
mdadm ... --grow --raid-devices=3 --backup-file=/tmp/backup
to change the number of devices in the array.
I have never tested this myself, and until now I didn't even realize this operation was supported. So, I've learned something. Good luck!