Comment 12 for bug 452350

Mark Mentovai (mark-moxienet) wrote :

I don’t believe there’s any bug with GRUB here. In my case, I found “leftover” PV headers on /dev/sda1 and /dev/sdb1 at offset 0x200 (sector 1). I suspect that these were created in a similar way to what Mike Hobbs experienced in https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/452350 . I saw this with the 11.10 Alternate installer; I didn’t like the what “auto” did but I guess by the time I switched to “manual,” the PV headers had been written. In my current installation, /dev/sda1 and /dev/sdb1 are in a RAID mirror set that shows up at /dev/md0, which is used as an LVM PV.

The PV headers at /dev/sda1 and /dev/sdb1 offset 0x200 (grub_lvm_label_header with "LABELONE" magic) referenced metadata expected at offset 0x1000, but because /dev/sda1 and /dev/sdb1 are RAID members and version 1.2, the RAID superblock (grub_raid_super_1x or <linux/raid/md_p.h> mdp_superblock_1 with MD_SB_MAGIC magic) was written at that offset. This doesn’t match the LVM MD metadata, which would be grub_lvm_mda_header with GRUB_LVM_FMTT_MAGIC magic.

GRUB was correct to issue the “unknown LVM metadata header” error because it did find an LVM label pointing to something other than LVM metadata. The problem was that the LVM label didn’t belong there at all.

In my case, I was able to remove the label by brute force (although I wouldn’t recommend doing this) by running dd if=/dev/zero of=/dev/sda1 bs=512 count=2, and repeating for /dev/sdb1.