[RAID1, GRUB] Secondary HDD can't boot up when primary HDD fails
RAID 1
------- /dev/md0 consists of /dev/sda1 and /dev/sdb1 /dev/md1 consists of /dev/sda2 and /dev/sdb2 /dev/md0 is used as /boot /dev/md1 is used as physical volume of LVM LVM ---- /dev/md1 is the physical volume of a volume group with logical volume for swap and root. Grub has been installed on the second harddisk's MBR with grub> root (hd1,0) grub> setup (hd1) grub> quit However, after I remove the first harddisk (/dev/sda), the system can't boot up with the second harddisk. Just a blank bootup screen. Any advice please? Thanks ! |
Have to say up front that my experience with Grub is on single disks only as I broke up my Raid because not all Linux could recognise Raid the same way.
As far as I am aware Grub wouldn't give a damn of the disk type of Sata or IDE and uses only the disk order as founded in the Bios. The statement "root (hd1,0)" instructs Grub to accept the root of the Linux in in the 1st partition of the 2nd disk (hd1) because Grub counts from 0. After you removed sda the disk order is no longer valid because there isn't a 2nd disk to be found and Grub should be at a loss with (hd1,0). I have no knowledge of how Grub store its information in a RAID 1 which according to you the Linux was stored in both sda2 and sdb2. In that case why would Grub choose (hd1) for booting and not (hd0)? It is possbile that on amending hd1 to hd0 in your Grub menu.lst your system will boot again. At least theoretically it should as (hd1) is a 100% duplicate of (hd0) in using Raid 1. |
I have exactly the same configuration and mine works ok. You need to setup the mbr on sdb disk as follows
grub:> device (hd0) /dev/sdb grub:>root (hd0,0) grub:> setup (hd0) grub:> quit and also update grub.conf to refrenece hd1 as well as hd0 - just repeat the following lines and change hd0-->hd1 title Red Hat Enterprise Linux AS (2.6.9-22.ELsmp) root (hd0,0) kernel /vmlinuz-2.6.9-22.ELsmp ro root=/dev/VolGroup00/LogVol01 rhgb qui et initrd /initrd-2.6.9-22.ELsmp.img title Red Hat Enterprise Linux AS-up (2.6.9-22.EL) root (hd0,0) kernel /vmlinuz-2.6.9-22.EL ro root=/dev/VolGroup00/LogVol01 rhgb quiet initrd /initrd-2.6.9-22.EL.img |
All times are GMT -5. The time now is 03:25 AM. |