Comment 22 for bug 999076

Revision history for this message
Dave (dfluff) wrote :

I just hit this exact bug after changing my sda drive. sda4 ran all the way to the end of the disk and was part of md1, and, when booting, sda got detected as being in that array.

On almost every boot, things roughly worked, but with error messages, but on *one* boot, md1 got started before md0, meaning that sda became the member of that array, and all the other partitions became inaccessible. I've a feeling this may have hosed the Win7 install on sda1 as well at this point, but I had only just mirrored it the day before, so that was easy to resurrect. It also meant that sda2 (part of md0, my root file system) got booted out of it's array, and sda3 failed to be available for swapping. Nasty!

Doing an mdadm --examine on sda gave identical results as doing it on sda4. Doing an mdadm --zero-superblock on sda to try and remove it, also removed it on sda4.

It took a while to work out what was going on, until we realised the metadata is at the end of the partition. Eventually I shrank sda4 by a couple of MB, did another --zero-superblock on sda, and re-added sda4 to the array. Now, everything appears to work, and I don't think the other partitions will get hosed again.

FYI, I'm running Ubuntu 10.04LTS 64-bit. sda is a Western Digital Red (advanced format drive), and sdb is a Seagate Green, both 2TB. Now I've fixed it, I don't think any of that is relevant to the problem, just including it for info.