Linux – How to make a three disk software RAID by adding the third disk

centos-7hard drivelinuxsoftware-raid

The server is running CentOS and it has been successfully running a two disk software RAID. I wish to add a third disk to this for redundancy, so when one disk fails, the system still has two disks operating until a replacement for the failed disk arrives.

When installing CentOS from a DVD-ROM, that's where I have set-up the software two disk RAID in the past. But how do you add a third disk to the existing two disk software RAID in a running system?

Best Answer

2 disks and redundancy suggest RAID1 is already used. To increase redundancy I do not think RAID5 is an option as it offers more space but - with 3 disks it is the same as RAID1 with 2 and allows losing one disk.

So presuming RAID1:

mdadm --add /dev/mdX /dev/sdY
mdadm --grow --raid-devices=3 /dev/mdX

Using lvm2 (either mirror or dm-raid) it would be:

vgextend VG /dev/sdY
lvconvert -m2 VG/LV
Related Question