[CentOS] boot problem after disk change on raid1
Devin Reade
gdr at gno.org
Wed Sep 7 20:38:14 UTC 2011
--On Wednesday, September 07, 2011 08:22:47 PM +0300 Bünyamin İzzet
<bunyamin.izzet at gmail.com> wrote:
> Hello,
>
> I have two disks sda and sdb. One of the was broken so I have changed the
> broken disk with a working one. I started the server in rescue mode, and
> created the partional table, and added all the partitions to the software
> raid.
Sounds like the 'no boot record' issue. Here's an extract from one
of my server change logs, for setting things up *before* they go bad:
- made sure we have boot blocks on both disks, based on information
at http://grub.enbug.org/MirroringRAID
modified /boot/grub/device.map from:
(hd0) /dev/sda
(hd1) /dev/sdb
to:
(hd0) /dev/sda
(hd0) /dev/sdb
and then:
# grub
grub> device (hd0) /dev/sdb
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
With the above in place you can boot from either disk as long as
your BIOS will let you select the boot device. I've had older
systems where the BIOS didn't have that option, in which case
the 'in event of breakage' procedure would be to take the working
slave disk and put it on the controller cable that originally had
the flawed master disk.
># cat /boot/grub/device.map
> (hd0) /dev/sda
> (hd1) /dev/sdb
Not quite right (need hd0 on both)
Devin
More information about the CentOS
mailing list