(original article)

Re: A Nasty md/raid bug

09 January 2013, 09:24 UTC

I haven't hit this bug but I've had to re-run mdadm --create on an existing array for another reason. What isn't pointed out above is that different versions of mdadm use different data_offsets.

My array is about 750GB and was initially created with 3.1.5, and that set data_offset to 2048 sectors (1MiB), but after I re-ran madadm --create, data_offset was set to 134217728 (128MiB), a long way into to the data so it just looked like garbage and couldn't be used. re-running --create with 3.1.5 set the data_offset back to 2048 and now I can access the data again.

I had to spend several hours last night debugging mdadm with gdb to figure all this out. I wonder how many times other people have been bitten by this and given up on the array as lost.




[æ]