Converting software RAID1 to RAID10 for /boot

Posted by luckytaxi on Server Fault See other posts from Server Fault or by luckytaxi
Published on 2012-09-28T01:57:02Z Indexed on 2012/09/28 3:40 UTC
Read the original article Hit count: 271

Filed under:

Array info:

/dev/md0 -> /dev/sda1 and /dev/sdb1

/dev/md2 -> /dev/sda2 and /dev/sdb2

Partition info:

/boot -> /dev/md0

/ -> /dev/md1

I have two drives that are setup as RAID1 using software RAID on Redhat. I added two additional drives (same size) and I would like to conver the RAID1 to a RAID10. The problem I'm having is adding the last drive to the array. I've gotten as far as creating a RAID10 with two missing devices but as soon as I add the last drive, all hell breaks loose. It seems /dev/sda1 is the culprit.

What I'm not too sure about is how to create the RAID10. I've tried the following

mdadm --create /dev/md2 --level=raid10 --raid-device=4 /dev/sdc1 missing /dev/sdd1 missing

I then proceeded to fail /dev/sdb1 from /dev/md0 and added that partition to /dev/md2. I proceeded to install the MBR on EACH partition since boot resides on /dev/sdx1 on each drive. As a test, all is well, I'm able to boot back into the system once I do a quick reboot. Now, when I go add the last drive /dev/sda1, it breaks. I attempted to install grub on /dev/sda1 and I get the following ...

grub> root (hd0,0) /dev/sda
root (hd0,0) /dev/sda
Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd0)
setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no

Error 2: Bad file or directory type

At this point, the array is hosed I believe. I rebooted the server and it refuses to boot.

© Server Fault or respective owner

Related posts about software-raid