software raid drive failed, please provide step bu step to rebuild

Sam Varshavchik mrsam at courier-mta.com
Fri Jul 28 22:33:50 UTC 2006


Dan Carl writes:

> I have/had a software raid running and sdc drive failed.
> I got a replacement drive today and installed it.
> My only experience with set partitions and raids in during initail setup.
> I could not fdisk the new drive because i guess it wasn't reconized so I
> rebooted.
> Now I can reach the drive via fdisk but I have made more problems now (no
> swap now)
> and I'm not sure the steps to rebuild.
> Background:
> I have a FC3 with a software raid.
> I have 3 SCSI 18gb hard drives
> If I recall this how I set it up
> md0 /boot 100MB raid 1 sda, sdb and sdc as spare
> md1 /swp 768MB raid 0 sda, sdb, sdc
> md2 / ext3 33GB raid 5 sda, sdb, sdc
> 
> Can someone please help?

Your first step is to determine your actual RAID configuration.  Unless you 
know exactly what belongs where, you're not going to get very far.

mdadm -Q -D /dev/md0

mdadm -Q -D /dev/md1

etc…

This will give you the information you need to map out how your existing 
drives are set up for RAID.

Your first step is to remove any failed devices, if mdadm -Q -D still shows 
any.  Use the mdadm -r option to remove any leftover failed devices.

Once your RAID layout consists of only the working partitions, you then need 
to figure out how your replacement drive will be added to your RAID 
configuration.  You'll need to figure out how it must be carved up into the 
different RAID partitions.  Use fdisk to partition your new disk, carefully 
making sure the sizes of the new partitions match EXACTLY the sizes of the 
corresponding partition in your existing RAID volumes.

Then, once you've double, and triple-checked your new partitions, use "mdadm 
-a" to add each partition to its appropriate RAID volume.  Linux will then 
automatically resync and rebuild your RAID volumes, one by one.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20060728/08484220/attachment-0001.sig>


More information about the fedora-list mailing list