RAID Troubleshooting
Cheat sheet · https://pcornel.dk/topic.php?topic=2776
Answer
RAID troubleshooting covers degraded or failed arrays, arrays that do not assemble at boot, slow rebuilds and mismatched or stale members.
Remember
Do not recreate an array over existing members — assemble it. Compare event counts with mdadm --examine. A stale member must be re-added, not forced. Get help before using --force on a failed array.
First checks
cat /proc/mdstat— md arrays and sync statusmdadm --detail /dev/md<n>— array state and membersmdadm --examine /dev/<dev>— member superblocksmartctl -H /dev/<disk>— disk health
Commands
mdadmmdadm /dev/md0 --remove /dev/sdc1mdadm /dev/md0 --re-add /dev/sdc1mdadm --assemble --scanmdadm --create
Verify in this order
members found → superblocks agree → assembled → clean or degraded → rebuilt
Where it usually breaks
First mismatch in hardware/block device → kernel driver/mapper/RAID/LVM → filesystem → mount namespace/options → path permissions/MAC → consumer I/O; preserve identity/native diagnostic/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2776