Linux software mirroring with Grub

I’m in Guangzhou, China today to reinstall one of our Linux SMTP Server. I’ve installed CentOS 3.x with software mirroring. It’s pretty straight forward to make the Linux Software Raid partition during the installation but by default the system will boot only with the first hard disk (id0). This means if the first hard disk (id0) fails then the second hard disk (id1) will not be able to boot alone.

In order to make sure that the server can boot from each of the mirrored hard disk in case the other one fails, you need to run grub and install onto all other drives that are part of raid that the /boot partitions are on.

  • #grub
    grub>
    grub>find /grub/stage1
    This will give list out where all the grub setup files are located:
    (hd0,0)
    (hd1,0)

sda=hd0 sdb=hd1 for scsi and hda=hd0 and hdb=hd1 for ide

After knowing that hd0 already has grub in mbr, we run:

  • Grub>device (hd0) /dev/sdb (/dev/hdb for ide)
    Grub>root (hd0,0) and then:
    Grub>setup (hd0)

With above we’ve succeeded putting bootable mbr on the second drive and now both hard disks should be able to boot individually.

Be Sociable, Share!
Posted in Admin, HowTo, Linux/Unix, Technology

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Recent Comments

Buddha Boy attacked and injured a guy with his sword? – Media on 'Buddha Boy' on Buddha Boy attacked and injured a guy with his sword?: […] http://nirlog.com/2007/07/20/buddha-boy-attacked-and-injured-a-guy-with-his-sword/ […]…(June 11, 2017, 11:54 am)
Shishir bhattarai on Mahabir Pun — the man who brought WiFi to Himalayas: I fell pride to him and…(June 7, 2017, 2:17 pm)
Shishir bhattarai on Mahabir Pun — the man who brought WiFi to Himalayas: I fell pride to him and thanks…(June 7, 2017, 2:15 pm)
The light of Asia on Meeting Buddha Boy: DeAnna, what are you taking about? What…(March 30, 2017, 5:27 pm)
The light of Asia on Meeting Buddha Boy: Religious person don’t rape their disciple or…(March 30, 2017, 5:03 pm)