Affected versions: Debian 12

πŸ“– ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

RAID array shows degraded state, risking redundancy and performance.

Environment & Reproduction

Occurs after disk failure, cable issue, or metadata mismatch.

cat /etc/os-release
cat /proc/mdstat
sudo mdadm --detail /dev/md0

Root Cause Analysis

One or more member devices dropped out or failed assembly at boot.

Quick Triage

Identify failed member and collect SMART and mdadm details.

cat /proc/mdstat
sudo mdadm --examine /dev/sd[bcd]1
sudo smartctl -H /dev/sdX

Step-by-Step Diagnosis

Confirm member UUID consistency and current array event counts.

sudo mdadm --detail /dev/md0
sudo mdadm --examine --scan
journalctl -b | grep -i mdadm
Illustrative mockup for debian-12 β€” terminal_or_shell
Diagnostic output for storage/mdadm-degraded β€” Illustrative mockup β€” Progressive Robot

Solution – Primary Fix

Replace failed disk or re-add healthy member and monitor rebuild.

Still having issues? Our Server Management team can diagnose and resolve this for you. Get in touch for a free consultation.

sudo mdadm /dev/md0 --fail /dev/sdX1 --remove /dev/sdX1
sudo mdadm /dev/md0 --add /dev/sdY1
watch -n 5 cat /proc/mdstat
Illustrative mockup for debian-12 β€” log_or_config
Resolution output for storage/mdadm-degraded β€” Illustrative mockup β€” Progressive Robot

Solution – Alternative Approaches

Assemble array manually in rescue mode when auto-assembly fails.

sudo mdadm --assemble --scan
sudo update-initramfs -u

Verification & Acceptance Criteria

Array returns to clean state with all expected active members.

cat /proc/mdstat
sudo mdadm --detail /dev/md0 | grep -E 'State|Active Devices'

Rollback Plan

Keep failed drive detached and restore data from backup if rebuild fails.

# restore from backup snapshot if RAID consistency cannot be recovered

Prevention & Hardening

Enable RAID monitoring alerts and periodic SMART checks.

sudo dpkg-reconfigure mdadm
sudo smartctl -a /dev/sdX | grep -E 'Reallocated|Pending'

Related messages include mdadm array not clean and device faulty.

Related tutorial: View the step-by-step tutorial for Debian 12.

View all Debian 12 tutorials on the Tutorials Hub β†’

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

Debian mdadm administration and Linux RAID recovery docs.

Need Expert Help?

If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β€” we respond within one business day.