One of the drives in my RAID 10 array failed during a power outage, putting the array into a degraded state. Unfortunately, it was the first drive in the array, which contained the bootloader. I was able to use an Ubuntu Server install CD to boot the server into rescue mode. When the rescue procedure prompted me to select a root device, I pressed Ctrl-Alt-F2 and switched to a shell instead. I was able to partition the replacement drive, add it to the array, and rebuild the array, according to this guide:
http://stackful-dev.com/raid-101-rec...rives-die.html
So far, so good. However, when I try to repair the bootloader, I cannot mount the array (/dev/md127) because it says "device or resource busy." I've also tried to stop the array but I see the same error message. If I try to reboot the server without the Ubuntu CD, it goes to a GRUB prompt and can't find the root device. What else can I try to repair the bootloader?
Here are the details for my server:
Ubuntu Server 12.04
RAID 10
/dev/sda hd0 (sda is the replaced drive)
/dev/sdb hd1
/dev/sdc hd2
/dev/sdd hd3
/dev/sde hd4
/dev/sdf hd5
* Please note the partitions in this array are GPT because the drives are 3 TB each. I read that you can't simply use dd to copy the MBR because of the unique IDs of the drives. Each drive has a BIOS boot partition and a data partition:
Code:
Number Start End Size File system Name Flags
1 1049kB 2097kB 1049kB biosgrub bios_grub
2 2097kB 3000592499kB 3000590402kB raid raid