Inspect a software RAID array
Build a paste-ready command, then review its compatibility and effects before running it.
mdadm --detail /dev/md0read-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 signals/dev/md0:Representative 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 /dev/md0The 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/dev/md0ArgumentPasses /dev/md0 to mdadm.
Example input
mdadm --detail /dev/md0
Example output
/dev/md0:
Version : 1.2
Raid Level : raid1
Array Size : 1047552
State : clean
Active Devices : 2
Illustrative output — exact values vary by system and data.
Official sources