Posted on Leave a comment

Howto replace a bad hard drive on Software RAID

On my server, I have a drive on software raid  mirroring. This array stores all my data for this blog. A couple of weeks ago I got a degraded array message. When I try to reboot the server, I heard a clicking noise on one of the mirrored drive. These are the steps I did to replace the drive.

  1. fdisk -l
  2. fdisk partition the new hard drive
  3. add the new drive

mdadm --manage /dev/mdX --add /dev/sdX