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

Jim Popovitch jimpop at yahoo.com
Fri Jun 30 18:32:43 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.





More information about the Ale mailing list