Software RAID Rebuild

Verify Drive – Fix Errors – through controller utility
or replace with new drive

Check the numbers for the bad drive

cat /proc/scsi/scsi

Remove bad drive

echo “scsi remove-single-device 0 0 2 0” > /proc/scsi/scsi

Check to make sure it’s gone

cat /proc/scsi/scsi

Add good drive

echo “scsi add-single-device 0 0 2 0” > /proc/scsi/scsi

Check to make sure it’s there

cat /proc/scsi/scsi

Fdisk the drive as needed (set type (t) to linux raid auto-detect (fd))

fdisk /dev/sdc

If using an drive from a previous RAID

mdadm –zero-superblock /dev/sdc1

Add the new drive to the software RAID

mdadm –add /dev/md0 /dev/sdc1

Check rebuild progress

cat /proc/mdstat

Leave a comment

Your email address will not be published. Required fields are marked *