[ale] Software RAID1 rebuild after HDD failure (How to do?)

Jim Popovitch jimpop at yahoo.com
Fri Jun 30 19:34:18 EDT 2006


Ryan Fish wrote:
> A) How do I change the type within fdisk?  I don't see any mention of it in
> the man pages.  Would the "t" option be used?

Yes, use "t".  You can also press "m" at some point to see the menu of 
other options if you want.

> B) Will I need to set the partition that becomes part of /boot as bootable
> using "a"?

That depends on how your boot loader is setup.  I would check hda (fdisk 
-l /dev/hda) to see if either /dev/hda1 is setup with the "Boot" flag 
(asterisk), and if so set the same on /dev/hdd1.  Of course the BIOS is 
probably setup to locate the first bootable device based on a certain 
order (i.e. floppy, cdrom, first disk, second disk), so it probably is 
already booting off of the first disk so you really don't need a boot 
flag anywhere on the second disk unless the first disk fails and even 
then only if you reboot.

> The box is remote to me but I will be in front of it when the disk swap is
> done.  Unfortunately I don't have an extra HDD to test with here at home and
> don't have a server/HDD to test with at the office.

Gotcha.  Just as an FYI, I've never worked with boot/root level raid 
before (OK, I've toyed with it).  I generally have the root partition 
and /boot partition only active on the first drive (also mirrored to 
identical partitions on the second drive) but not setup in raid.  Data 
partitions (/home, /usr/local, etc.) are then mounted as raid partitions 
but this is further down in the boot cycle.  I mirror /dev/hda1 (/boot) 
and /dev/hda2 (/) to /dev/hdc1 and /dev/hdc2 respectively, along with
a dd image of the boot sector ("dd if=/dev/hda of=/dev/hda bs=1 
count=512" <- verify this first as it's been a while since I've done 
that).  This way either hda or hdd can boot the box without any raid 
issues, yet data is mirrored on the individual raid partitions once the 
system is up and active.  In my cases I use lilo and the boot partition 
is /dev/hda (master boot record) not in a partition.

-Jim P.




More information about the Ale mailing list