How would you use mdadm to convert a running pre-installed system on a non-raid single drive to a dual drive raid system.
I was thinking about plugging in 2 new drives, set them up as raid and then block transfer from the old drive to the raid drives and then remove the old drive.
/dev/sda = non-raid single drive pre-existing linux system (has 2 partitions)
/dev/sdb = new raid drive #1
/dev/sdc = new raid drive #2
I would shut down the system, insert sdb and sdc and set them up as follows:
Create partitions on sdb, sdc using fdisk on the entire disks.
/dev/sd[bc]1 would be for /dev/sda1
/dev/sd[bc]2 would be for /dev/sda2
mdadm --create --verbose /dev/md0 --level=stripe --raid-devices=2 /dev/sdb1 /dev/sdc1
mdadm --create --verbose /dev/md1 --level=stripe --raid-devices=2 /dev/sdb2 /dev/sdc2
Copy /dev/sda1 to /dev/md0 (how?)
Copy /dev/sda2 to /dev/md1 (how?)
Make sure /dev/md0 is bootable (???)
Shutdown, remove /dev/sda.
And now I should be able to boot from /dev/md0.
Any walkthrus would be great.
I've found this site which has some great info.
Thanks for any info.