Slackware HowTo

Replace a failed disk in mdadm RAID on Slackware

Handle a degraded array with controlled removal, replacement, and rebuild.

1. Goal

Handle a degraded array with controlled removal, replacement, and rebuild.

2. Files and components involved

/proc/mdstat
/etc/mdadm.conf
mdadm
/dev/sdX1

3. Operational flow

cat /proc/mdstat
mdadm /dev/md0 --fail /dev/sdX1 --remove /dev/sdX1
mdadm /dev/md0 --add /dev/sdY1

4. Operational verification

mdadm --detail /dev/md0
watch cat /proc/mdstat
dmesg
tail -n 30

5. Practical notes

Before touching disks, mounts, and filesystems, note the UUIDs, current outputs, and the latest valid backup available.

When you work on storage and filesystems, the rule stays the same: first identify the right device, then modify, and finally verify.

Quick checklist

[ ] Backup or copy of the existing configuration completed
[ ] Files and commands updated as expected
[ ] Local test completed successfully
[ ] Logs or final output verified
[ ] Rollback procedure documented

Back to the Linux HowTo section