Sun 01 May 2011 07:17:14 PM UTC, original submission:
With LVM it is possible to create logical volumes which are mirrored across a number of the physical volumes in the volume group. If a volume group contains one or more of these volumes, grub-probe generally fails.
To avoid any confusion, I am talking about using the mirroring feature which is built into LVM (lvcreate -m1 etc.). I'm not talking about the /dev/mdX type of mirroring.
When grub-probe looks at a volume group containing a mirror set, it attempts to parse the configuration by calling grub_lvm_scan_device. This function looks for a line in the configuration information for each logical volume that matches "stripes = [" (grub-core/disk/lvm.c line 608).
If the volume is a mirror set, it doesn't contain a list of stripes. Instead it contains a list of pointers to other logical volumes. (One of those volumes is the mirror log, and the others represent the redundant copies of the data.) As a result, the call on line 608 doesn't match where it should. Instead of matching somewhere in the current logical volume, it matches in the first subsequent volume which is not a mirror set.
As a result, grub-probe skips a number of LVs, and then mixes two volumes' configuration information together. Usually this causes an error but I think it could also cause grub-probe to return wrong information.
I am using Grub from Ubuntu Natty, grub2_1.99~rc1-13ubuntu3. I'm also running Natty amd64. This problem exists with the desktop and server builds. I haven't tested the 32-bit builds but based on the above, it seems likely that they would suffer from the problem too.
I hope this is helpful and please ask if you need any more information.
|