RAID5 Recover

A single disk of my RAID5 failed, it reported that the erroneous device was /dev/sda. As I have three disks with the same size I did a ls -l /dev/disk/by-id to find the serial number of the drive which maps to /dev/sda. After I did that I could proceed to actually removing the device from the raid and replacing the hard drive.

Thanks to the cheat sheet at I could do

mdadm /dev/md0 --fail /dev/sda1 --remove /dev/sda1

Actually I forgot to do that before replacing the disk so I changed the config in /etc/mdadm/mdadm.conf and rebooted the system. After that I added /dev/sda back again to the raid with

mdadm --add /dev/md0 /dev/sda

And then I could watch with watch cat /proc/mdstat how the rebuild process progresses:

Personalities : [raid6] [raid5] [raid4]
md0 : active raid5 sda[3] sdb[1] sdc[2]
625142272 blocks level 5, 64k chunk, algorithm 2 [3/2] [_UU]
[>....................] recovery = 1.0% (3328860/312571136) finish=78.3min speed=65756K/sec

unused devices:


Curious to see this being done from a command line and not a GUI. My next task will be to separate a flex raid on a home Netgear ReadyNAS 104 into two separate drives, one of which I would like to power down and only use for manually started backups. Other tasks on that device I do directly in a shell (cronjobs, youtube downloader). Maybe I should try. :-)

User login

This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
1 + 9 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
Powered by Drupal