LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Installing RHEL 5 w/ Software RAID 1 (https://www.linuxquestions.org/questions/linux-software-2/installing-rhel-5-w-software-raid-1-a-646939/)

diamondgeezer1974 06-04-2008 08:01 AM

Installing RHEL 5 w/ Software RAID 1
 
Hello,

I'm installing RHEL 5 on a Dell PE 1850 w/ 2-300GB hard drives. My client wants the set up to be redundant, so I implemented a software RAID level 1 during install. I created three RAID Partitions on SDA and SDB as follows:

/dev/sda1 /dev/md0 2000MB
/dev/sda2 /dev/md1 8192MB
/dev/sda3 /dev/md2 275403MB (rest of the remaining space)

/dev/sdb1 /dev/md0 2000MB
/dev/sdb2 /dev/md1 8192MB
/dev/sdb3 /dev/md2 275403MB (rest of the remaining space)

I then created RAID devices:

/dev/md0 /boot (used sda1 and sdb1)
/dev/md1 swap (used sda2 and sdb2)
/dev/md2 / (used sda3 and sdb3)

The install goes just fine, no errors and when it comes time for reboot the system hangs withe boot loader. As the system is booting up it stops after it shows GRUB. I can leave it for any amount of time and it never moves past this point. Can anyone throw me a bone?

Regards,

The Geezer

diamondgeezer1974 06-04-2008 10:30 AM

Solution
 
Insert the first disc and go into recovery mode. Once you have a command prompt follow these instructions:

Installing Grub onto both MBRs
Since the /boot partition is a RAID, grub cannot read it to get the bootloader. It can only access physical drives. Thus, you still use (hd0,0) in this step.

Run grub:

grub --no-floppy
You must see GRUB prompt:

grub>

If you are using a RAID 1 mirror disk system, you will want to install grub on all the disks in the system, so that when one disk fails, you are still able to boot. The find command above will list the disks, e.g.

grub> find /boot/grub/stage1
(hd0,0)
(hd1,0)
grub>
Now, if your disks are /dev/sda and /dev/sdb, do the following to install GRUB on /dev/sda MBR:

device (hd0) /dev/sda
root (hd0,0)
setup (hd0)

This will install grub into the /dev/sdb MBR:

device (hd0) /dev/sdb
root (hd0,0)
setup (hd0)

The device command tells grub to assume the drive is (hd0), i.e. the first disk in the system, when it is not necessarily the case. If your first disk fails, however, your second disk will then be the first disk in the system, and so the MBR will be correct.

The grub.conf does change from the normal install. The difference is in the specified root drive, it is now a RAID drive and no longer a physical drive.For example it would look like:

File: /boot/grub/grub.conf
default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title=Gentoo Linux
root (hd0,0)
kernel /bzImage root=/dev/md3


All times are GMT -5. The time now is 04:27 AM.