If you finally decided to add protection to your valuable data by using software RAID 1 – congrats. You are on the right path. But do not forget that you still need good backup.
If you have only 1 additional drive the procedure is more difficult, but still possible.

Note1: Try following procedure on your own risk. Preferably testing it on non-prod machine.
Note2: /dev/sdb is secondary disk it could vary for you.

First you create degraded RAID 1
mdadm –create /dev/md0 -l raid1 -f -n 1 /dev/sdb1

cat /proc/mdstat

Add it to mdadm.conf
mdadm –detail –scan >> /etc/mdadm.conf

Inform it the there is second disc
mdadm –grow /dev/md0 -n 2

Here you create partition on degraded drive and copy data from first disk

Repartition first disk if needed and add it to the array.
mdadm –manage /dev/md1 –add /dev/sda1

Note that this is just skeleton of steps and not full step by step tutorial.


Leave a Reply