I try to recover from mdadm raid disaster, which happened when moving from ubuntu server 10.04 to 12.04. I know the correct order of devices from dmesg log, but given this information, I still cannot access the data.
The superblocks look messy; the mdadm --examine for each disk is on this question on askubuntu
By inspecting the raw contents of backing storage, I found the beginning of my data (the LUKS container in my case) at position 0x22000 relative to the beginning of the first partition in the raid.
Question: What is the combination of options issued to "mdadm --create" to re-create mdadm that starts with the given offset? Bitmap size?
PS. The relevant information from syslog when the system was healthy are pasted here.
It appears, that there is no need for any tool for setting start of the RAID payload on any given offset. The problem arose from change in offset between mdadm versions above 3.00 and below. It appears, that at the moment, due to the different offsets, the mdadm from version above 3.00 (I tried 3.24) cannot cannot re-create layout made by older mdadm. One needs to use the older one.
The problem appeared in the first place from a known bug in Ubuntu 12.04 kernel, which under certain circumstances (e.g. found during distribution upgrade...) overwrites the superblocks. The solution is to use avoid kernels from 3.2.0-22.35 to 3.2.0-24.37, which incidentaly include among other, kernel used on Ubuntu 12.04 Mini-cd installer.
This is the conversation in [email protected] mailing list, in which Mr. Robin Hill gave me the solution:
So after booting from XUbuntu 10.04 live CD I was able to successfully re-create the array with the given commands, and get access to all my data.
It is important to note, that the old mdadm was needed only for re-creation the array. The array can be normally accessed with 12.04 live CD (using usual
mdadm --assemble --scan
).If one wants to change the layout of the raid to the newer one (with the offset 2048 sectors) the path is long:
...In hope that this post would keep at least one system administrator upgrading from 10.04 to 12.04 from heart-attack ;-)
See also related problem on askubuntu: mdadm fails after 10.04 -> 12.04 upgrade.