Disk swaps: lessons that held up

Below is what we check whenever a question about disk swaps comes up in a design discussion.

What We Learned

  1. We replace any drive when its SMART counters start creeping up every week, instead of holding out for the final failure.

  2. While the array is being rebuilt, any surviving disk works hard for many hours, and a second failure during this stretch becomes far from rare.

  3. RAID sets seldom die out of the blue; a missing-disk state appears from /proc/mdstat weeks ahead of that, if a monitor polls it.

cat /proc/mdstat
sudo mdadm --detail /dev/md0
sudo smartctl -A /dev/sdf | grep -iE 'reallocated'
echo check | sudo tee /sys/block/md0/md/sync_action