How to fix a failed RAID-1 array

Problem: One of the disks in your software RAID-1 array has failed.

Solution:

Check the status of your software raid array:
[root@server] mdadm --misc --detail /dev/md0

Remove the failed disk from the array set. Be careful not to remove the wrong one!
[root@server] mdadm --manage /dev/md0 --remove /dev/sdb1

Physically replace the faulty disk unit with a replacement which is identical to, or larger than the failed disk. Partition the new disk so that the partitions are equal to, or larger than, the size of the partitions on the healthy disk using fdisk.

Add the new disk to your software RAID-1 array:
[root@server] mdadm --manage /dev/md0 --add /dev/sdb1

The array should rebuilt automatically, but you can monitor its progress with:
[root@server] mdadm --misc --detail /dev/md0

This entry was posted in Linux and tagged . Bookmark the permalink. Follow any comments here with the RSS feed for this post.

Comments are closed.