Practical commands and checks to watch Linux mdadm rebuilds in real time 11.01.2026 | reading time: 2 min When a drive fails and a replacement is added, the rebuild is the critical phase; watch it closely to spot slowdowns or new errors, and react before data gets at risk. Rebuild in action Do this now to reproduce a common workflow and read the live progress: add the new device and watch the kernel status. ```bash sudo mdadm --manage /dev/md0 --add /dev/sdb1 watch -n1 cat /proc/mdstat ``` You will see output similar to: ```text Personalities : [raid1] md0 : active raid1 sdb1[1] sda1[0] 104320 blocks super 1.2 [2/1] [U_] [===>.................] recovery = 17.4% (18144/104320) finish=12.0min speed=3400K/sec ``` For a detailed snapshot run: ```bash sudo mdadm --detail /dev/md0 ``` and check the Recovery or Rebuild lines to confirm percent complete and current speed. Tune and troubleshoot If the rebuild is too slow or impacting production, inspect logs and adjust limits; read current settings and change carefully as root because higher speeds raise IO pressure. ```bash cat /proc/sys/dev/raid/speed_limit_min echo 50000 | sudo tee /proc/sys/dev/raid/speed_limit_min sudo dmesg -w sudo journalctl -f ``` Units are in kilobytes per second, and temporary increases can shorten rebuild time but may harm latency for active services. Other useful checks Don’t rely on a single view: query drive health, IO and kernel messages to find underlying causes; run smart checks, watch IO stats, and examine syslog for errors while the array recovers. For example use `sudo smartctl -a /dev/sdb` and `iostat -x 1` alongside the mdadm and /proc/mdstat checks to correlate slow rebuilds with failing devices or host load. Close the loop Monitor until mdadm reports the array as clean and all devices show as active; validate file system integrity if the array was degraded; then document what happened and consider replacing drives proactively to avoid repeat incidents. Join Bits & Bytes Academy First class LINUX exam preparation. storage utilities troubleshooting backup processes