Comment 9 for bug 527401

Revision history for this message
Colin Watson (cjwatson) wrote :

The problem with mdadm in the initramfs was as follows:

The MD 0.90 metadata format operates by putting a superblock at the *end* of the physical volume. (This is arguably a little silly and the 1.x formats work differently, but GRUB doesn't support them yet so they're not an option.) This means that when mdadm starts up, it's told to just look at everything in /proc/partitions, and it finds that both /dev/sda and /dev/sda1 appear to be the same physical volume; it's not then smart enough to say "oh, I'll take the partition then".

The reason I suddenly ran into this is that I'm using exact-number-of-MiB disks as a result of using kvm (though maybe most disks are exact-MiB? I'm not sure) and so the change to use MiB alignment by default means that the end of the partition lands exactly on the end of the disk. Leaving a small gap at the end fixes this. Therefore, until such time as we can move to the newer mdadm metadata format, I think the right answer is for partman to ensure that there's always a gap at the end of the disk.