Scan configured Linux software RAID arrays
Build a paste-ready command, then review its compatibility and effects before running it.
mdadm --detail --scanread-onlyno known side effects Compatibility
LinuxVerified for Linux using posix, bash, zsh syntax.
Operational knowledgereview due 2027-01-20
Requirementsmdadmmdadm must be installed and available on PATH.
Version supportmdadm Current supported releasesVerified for linux using posix, bash, zsh syntax; consult compatibility notes for platform-specific differences.
Expected signalsARRAY /dev/md0 metadata=1.2 name=host:0 UUID=6d6a5e4c:9c44c117:18e35d4c:2811a6fbRepresentative successful output; values vary with the selected target and system state.
Known errorsmdadm: command not foundmdadm is missing or is not available on PATH.
Verifymdadm --detail --scanThe output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01mdadmCommandRuns the mdadm stage of this one-liner.
02--detailOptionConfigures mdadm with the --detail option.
03--scanOptionConfigures mdadm with the --scan option.
Example input
mdadm --detail --scan
Example output
ARRAY /dev/md0 metadata=1.2 name=host:0 UUID=6d6a5e4c:9c44c117:18e35d4c:2811a6fb
Illustrative output — exact values vary by system and data.
Official sources