How many really distinct permutations of volumes are in mdadm raid5 degraded array?

Adam Ryczkowski asked:

I’m attempting to recover from a failure of my raid volume after upgrade from ubuntu 10.04 to 12.04.

I’ve tried re-creating the array in any combination of 5 elementary volumes with one replaced with “missing” to ensure that the array wakes as degraded.

Next, with help of dd if=/dev/md1, I made a backup of the first 256kB of each version of my reassembled raid for inspection.

To my astonishment I see only 5 distinct version of the first 256kB chunk out of possible 120 permutations on a 5 disk set or even 24 on a 4 disk set. I assume the 4 disk set number should be correct, because 1 volume must be set as missing and henceforth shouldn’t be accounted for.

How can this occur?

My answer:

The Linux RAID Wiki has a script designed to go through all the possible permutations and find the “right” one. You should be able to use this to begin recovering your array.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.