Created attachment 859936 [details, diff] Patch See also https://savannah.gnu.org/bugs/?func=detailitem&item_id=61620 and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987008 Citation from the svannah.gnu.org Bug: When handling a regular LVM volume, Grub can fail with the message: error: disk `lvmid/******-****-****-****-****-****- ****/******-****-****-****-****-****-******' not found. If the condition which triggers this exists, grub-probe will report the error mentioned above. Similarly, the grub boot code will fail to detect LVM volumes, resulting in a failure to boot off of LVM disks/partitions. The condition can be created on any LVM VG by an LVM configuration change, so any system with /boot on LVM can become unbootable at 'any' time (after any LVM configuration change). ==== Cause === The problem is caused by an incorrect computation of mda_end in lvm.c, when the metadata area wraps around. --- Citation End --- I was hit by this yesterday, then tried the proposed fix on grub-2.06-r6 (see attached patch) which worked for me.
I'm not comfortable applying this patch without upstream review. Please submit it to to the grub-devel mailing list.
Done: https://lists.gnu.org/archive/html/grub-devel/2024-04/msg00001.html
Please submit the patch to the grub-devel list. Sending a link to their issue tracker will not suffice.
Already did it in April (https://lists.gnu.org/archive/html/grub-devel/2024-05/msg00010.html). Although my patch had some formal issues thankfully Glenn Washburn "created a suitable patch for review" (https://lists.gnu.org/archive/html/grub-devel/2024-05/msg00040.html) and in the last message of that thread (May 08, 2024) Michael Chang wrote: =================== citation start =================== The number of times to commit a wrap actually depends on the size of the metadata area, how many LVs and VGs are connected to the PV and whichever would take part in the size of active raw metadata block within the area. I managed to use the attached shell script to prepare a LVM disk where the metadata area is in wrapped state. It took about 100 cycles for me. With that, I could see the error occurred, and with the patch, the problem is gone. So, Feel free to add my: Tested-By: Michael Chang <mchang@suse.com> =================== citation end ===================