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

Ryan Fish FishR at bellsouth.net
Fri Jun 30 19:12:41 EDT 2006


Ryan Fish wrote:
> One disk in a *software* RAID1 mirror has failed on a RHEL3 ES box.  I 
> am trying to figure out exactly what I need to do once I have the new 
> HDD in hand and am ready to replace the failed one.
> 
> I am thinking the following must be done:
> 
> 1) Physically replace the disk

yep

> 2) Enter the BIOS of the RAID card and set the drive to JBOD and as a 
> hot spare (not sure why though when using SW RAID)

I doubt you need step 2.

> 3) Partition the new HDD in the same manner as the good disk using fdisk

You should be able to boot up cleanly on the one good disk (albeit with 
a bunch of bootlog errors related to the missing raid partitions).  Run 
fdisk to build the partitions, make sure to set them as type 
raid_autodetect (type fd) while in fdisk.

> 
> 4) Format the drive to use ext3 on all partitions

while still operating off of the first disk, mkfs.ext3 the new 
partitions (i.e. mkfs.ext3 /dev/hdd (or hdc, depending on your setup).

> 5) Use raidhotadd or mdadm to add the partitions of the new HDD into the 
> proper spots within the RAID1 array.

Yes, although I think you will have to raidhotremove the erroneous 
partition first, then raidhotadd the new one.

Is this a remote box or a local box?  If remote, then procedural testing 
should be done first on a local box.

-Jim P.

-------------------------------------------------------------------

> You should be able to boot up cleanly on the one good disk (albeit with 
a bunch of bootlog errors related to the missing raid partitions).  Run 
fdisk to build the partitions, make sure to set them as type 
raid_autodetect (type fd) while in fdisk.


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?

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


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.

Thank you.
-Ryan





More information about the Ale mailing list