Daily Archives: December 9, 2008


Rebuilding failed drive in linux md raid

A drive in an Linux md raid array is failed and replaced. As md raid will not rebuild your array by itself something needs to be done. Using mdadm, it goes like this: mdadm - -add /dev/mdX /dev/sdaY where /dev/mdX is the array that has a failed member, and /dev/sdaX is a partition that needs to be added. /dev/sda needs to be partitioned before though. Then it is only a matter of time to see Your arrays being syncronized. watch -n1 'cat /proc/mdstat' That array can be in use during that syncronization process.