Howto rebuilding a RAID array after a disk fails

by on May 27, 2006 · 4 comments· last updated at December 27, 2007

Q. I have two disk-mirrored array, suppose if one of my disk in mirrored RAID array fails, then I will replace that disk with new one (I have hot swapping SCSI drives). Now question is how I rebuild a RAID array after a disk fails.

A. A redundant array of inexpensive disks, (redundant array of independent disks) is a system, which uses multiple hard drives to share or replicate data among the drives. You can use both IDE and SCSI disk for mirroring.

If you are not using hot swapping drives then you need to shutdown server. Once hard disk has been replaced to system, you need to use used raidhotadd to add disks from RAID-1, -4 and -5 arrays, while they are active.

Assuming that new SCSI disk is /dev/sdb, type the following command:# raidhotadd /dev/mdX /dev/sdbReplace /dev/mdX with actual raid device name (e.g. /dev/md0). While array is under construction, you can see progress and other information by typing following command:# cat /proc/mdstat

See also:



You should follow me on twitter here or grab rss feed to keep track of new changes.

Featured Articles:

{ 4 comments… read them below or add one }

1 franklin August 4, 2008 at 5:25 am

i used raid5 with 3 hard disk.each partition has 5gb,now totally how much space i have in this situation?

Reply

2 franklin August 4, 2008 at 5:58 am

Anyone tells please what is the hot swap drive and use also where used in raid?

Reply

3 franklin August 4, 2008 at 8:54 am

Do you kno abowt relationshoip btn kernel,shell,and
userinterface also please tell to me boss

Reply

4 Nikolay March 8, 2011 at 8:32 pm

for RAID5 subtract 1 disk.
If you have 3 disks * 10 GB each, RAID5 would be 20 GB
If you have 4 disk s* 10 GB each, RAID5 would be 30 GB
If you have 8 disks * 10 GB each, RAID5 would be 70 GB

for RAID6 subtract 1 disk more (2 total).
If you have 4 disks * 10 GB each, RAID5 would be 20 GB
If you have 8 disks * 10 GB each, RAID5 would be 60 GB

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <kbd> <blockquote> <pre> <a href="" title="">

Tagged as: , , , , , , , , , , , , , ,

Previous Faq:

Next Faq: