How to Fix Slow Boot on RAID Setup

bootraid

I've just finished setting up a RAID 1 on my system. Everything seems to be okay, but I have a very slow boot time. It takes about three minutes between the time I select Ubuntu from GRUB and the time I get to the login screen.

I found this really neat program called bootchart which graphically displays your boot process.

This is my first boot (after installing bootchart). I'm not an expert at reading these, but it appears there are two things holding up the boot, cdrom_id and md_0_resync. I tried unplugging my CD drive SATA cable, and this is the new boot image.

It's faster, but it still takes about a minute, which seems pretty slow on this system. The md0 RAID device is my main filesystem. Is it true that it needs to get resynced on each boot?

I'm not sure how to diagnose my CD drive issue. The model is a NEC ND-3550A DVD RW drive. I should also note that there's a quick error message at startup about the CD rom. It's too quick for me to read it, just one line on a black screen saying "error: cdrom something something".

I'm not sure what other information to include. Thanks for any help.

Best Answer

This turned out to be me being impatient. The software RAID controller needs to sync the drives after you install. I wasn't giving it enough time to do that. For large drives (e.g. 1GB or larger) this can take a few hours. Rebooting can actually stop this process and make it restart once the boot is finished.

To see the progress of the drive sync you can run

cat /proc/mdstat

Related Question