I don't want to get off on a rant here, but....

Avatar

Technology, Programming, Complaints, etc.

Gotchas while migrating an existing Ubuntu install to Software RAID (MDADM)

There are a lot of HOWTOs out there to migrate or setup software RAID on Linux.  So here's my two cents on the WTF moments I encountered:

I noticed after moving to booting off the RAID array the first time, edits to /boot/grub/menu.lst were no longer showing up at boot, no matter what combination of grub, root, setup, or grub-install I was running.  I then noticed grub-install was printing an odd message about probe issues, but was then saying it ran without errors.  I ran grub-probe -v and found it was having a problem on my second drive, which had a yet unformatted extra partition that was not in any way related to the RAID arrays.  When it was scanning that second drive it was printing an "unknown filesystem" message.  Once I formated that partition to EXT3 grub-install no longer had any suspicious/error looking lines.

The other issue I had was with booting off the new disk.  When I'd boot with root (hd1,0) the RAID drive didn't seem to come up right, and the kernel would timeout waiting for /dev/md0 on boot.  The directions I'd found always said to run grub and then do the following commands:
root (hd0,0)
setup (hd0)
root (hd1,0)
setup (hd1)

I stumbled upon another set of instructions that said not to change the root between the two setups, and once I did this and rebooted things worked when booting with root(hd1,0):
root (hd0,0)
setup (hd0)
setup (hd1)

I should point out that the second grub menu.lst entry still references root (hd1,0), it's just the grub command line setup that I left root(hd0,0) active.