User Tools

Site Tools


blog:replace_faulty_disk_in_linux_md

This is an old revision of the document!


Replace faulty disk in linux md

Replacing a faulty drive in an mdadm managed RAID array.

  1. Use “mdadm –manage /dev/md0 -r /dev/sdd” to remove the drive that was marked as faulty from the array.
  1. Power down and replace the drive with a good drive.
  1. Power up and set the partition table on the new drive to match those of the other drives in the array. Here we used “sfdisk -d /dev/sda | sfdisk /dev/sdd”.
  1. Add the proper partition on the new drive into the array, “mdadm –manage /dev/md0 -a /dev/sdd2”
  1. Sit back and wait for the recovery to happen, you can “cat /proc/mdstat” to watch its progress; you should see something like:

Ref: http://www.linuxquestions.org/questions/linux-server-73/mdadm-raid-5-single-drive-failure-644325/#post3173822

~~LINKBACK~~

Discussion

Enter your comment. Wiki syntax is allowed:
 ______   ____  _   __   __  ___  __  __
/_  __/  / __/ | | / /  /  |/  / / / / /
 / /    / _/   | |/ /  / /|_/ / / /_/ / 
/_/    /_/     |___/  /_/  /_/  \____/
 
blog/replace_faulty_disk_in_linux_md.1314803410.txt.gz · Last modified: 2011-08-31 17:10 by brb