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

Joe Steele joe at madewell.com
Fri Jun 30 20:11:55 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) . . .

[snip]

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

I'll preface my comments by saying that I use software raid, but I've 
never had to replace a drive in a raid array.  That being said --

No, I don't think you format the partitions that are part of a raid array.

By way of comparison:  when first building a new raid array, you 
partition the drives, then you run mdadm to assemble the array.  Only 
then do you format the assembled array.  The device that gets formated 
is /dev/md0 (the raid device), not /dev/hda1 (a partition that is part 
of the array).

If a drive fails, its partition(s) are removed from the array, a new 
drive is installed with partitions of the same size as those of the 
failed drive, and the partition(s) are added back to the array.  At that 
point, the raid system begins to rebuild the data on the partitions, 
which includes rebuilding whatever formatting belongs there.

--Joe



More information about the Ale mailing list