Replace faulty disk in linux md

Replacing a faulty drive in an mdadm managed RAID array.

  1. Use 'mdadm –manage /dev/mdX -r /dev/sdF' to remove the drive that was marked as faulty from the array.
  2. Power down and replace the drive with a good drive.
  3. 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/sdN | sfdisk /dev/sdF'.
  4. Add the proper partition on the new drive into the array, 'mdadm –manage /dev/mdX -a /dev/sdN2'
  5. Sit back and wait for the recovery to happen. The system will be a bit slow but usable.

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

blog/replace_faulty_disk_in_linux_md.txt · Last modified: 2012/02/16 06:21 by brb
Back to top
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0