raidsbdump for examining Linux RAID superblocks
While recovering from a
multiple-disk RAID failure, I wrote a small tool to
examine the superblock of a device that is part of a Linux
software RAID array. I’ve since cleaned up the patch to
apply to the current 20010914
version of the raidtools, and am posting it
here.
If this tool would be useful to you, then the example output should be sufficient to explain what it does:
# ./raidsbdump /dev/hdc3
MD ID: a92b4efc
Conforms to MD version: 0.90.0
preferred minor 0 (md0)
gvalid_words: 0
Raid set ID: e723e5dc
Creation time: Fri Sep 27 19:35:49 2002
Update time: Sat Oct 5 17:59:49 2002
State: 0
Raid level: 1
Individual disk size: 36101MB (36968320kB)
Total number of disks: 2
Number of raid disks: 2
Number of active disks: 2
Number of working disks: 2
Number of failed disks: 0
Number of spare disks: 0
Disk 0: major 3, minor 3, raid_disk 0, state: 6 (operational, active, sync)
Disk 1: major 22, minor 3, raid_disk 1, state: 6 (operational, active, sync)