Bug#987008: Grub fails to find LVM volume after previous LV rename

Hoyer, David David.Hoyer at netapp.com
Thu Apr 15 14:56:27 BST 2021


Package: grub2
Version: 2.02+dfsg1-20+deb10u4

-- System Information:
Debian Release: 10.8
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-14-clp-eseries-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

lvm2 version: 2.03.02-3
libc6 version: 2.28-10

Dear Maintainer,

We are seeing a problem with the latest buster version of grub2 with finding our LVM volume to boot from.
Our host has a single VG (named 'system'), with around 10 LVs.   One of the LVs is system-root.active which 
is what we boot from.   It contains both the /boot volume as well as the rest of the OS.   Also we are
using legacy boot on this host.

We are finding that if you rename an LV (not the LV we boot from), that on a reboot, we sometimes cannot
find the boot LV and end up at grub rescue prompt:

    error: disk `lvm/system-root.active' not found.                                 
    Entering rescue mode...                                                         
    grub rescue>

For a test, we have a LV which is not in use and we rename it to something else and then reboot.   After about 220
iterations of this, we run into this problem.   We are able to boot these hosts through a PXE server so that we
can get access to the drive which contains this VG.  When we do this sort of boot, we are not actually using the VG.
When we do this and then simply rename that unused LV again and then reboot, suddenly it will boot up again.

We reverted back to grub version 2.02+dfsg1-20+deb10u3 and the problem went away.

As part of our investigation of this matter, I have been running grub-bios-setup command after PXE booting.  I chroot
into the LV system-root.active and run the grub-bios-setup command with appropriate parameters and verbose enabled
as we have seen this to also fail due to the same problem.   Below is the output from that command when we fail:


grub-bios-setup: info: adding `hd0' -> `/dev/sda' from device.map.
grub-bios-setup: info: /dev/sda is present.
grub-bios-setup: info: Looking for /dev/sda.
grub-bios-setup: info: /dev/sda is a parent of /dev/sda.
grub-bios-setup: info: /dev/sda is present.
grub-bios-setup: info: Looking for /dev/sda.
grub-bios-setup: info: /dev/sda is a parent of /dev/sda.
grub-bios-setup: info: transformed OS device `/dev/sda' into GRUB device `hd0'.
grub-bios-setup: info: reading /boot/grub/i386-pc/boot.img.
grub-bios-setup: info: reading /boot/grub/i386-pc/core.img.
grub-bios-setup: info: root is `(null)', dest is `hd0'.
grub-bios-setup: info: Opening dest.
grub-bios-setup: info: drive = 0.
grub-bios-setup: info: the size of hd0 is 62533296.
grub-bios-setup: info: changing current directory to /dev/mapper.
grub-bios-setup: info: /dev/mapper/system-root.active is not present.
grub-bios-setup: info: changing current directory to /dev.
grub-bios-setup: info: changing current directory to system.
grub-bios-setup: info: changing current directory to mapper.
grub-bios-setup: info: changing current directory to disk.
grub-bios-setup: info: changing current directory to by-label.
grub-bios-setup: info: changing current directory to by-uuid.
grub-bios-setup: info: changing current directory to by-partuuid.
grub-bios-setup: info: changing current directory to by-id.
grub-bios-setup: info: changing current directory to by-path.
grub-bios-setup: info: changing current directory to block.
grub-bios-setup: info: /dev/sda1 is present.
grub-bios-setup: info: Looking for /dev/sda1.
grub-bios-setup: info: /dev/sda is a parent of /dev/sda1.
grub-bios-setup: info: /dev/sda1 starts from 2048.
grub-bios-setup: info: opening the device hd0.
grub-bios-setup: info: drive = 0.
grub-bios-setup: info: the size of hd0 is 62533296.
grub-bios-setup: info: drive = 0.
grub-bios-setup: info: the size of hd0 is 62533296.
grub-bios-setup: info: Scanning for DISKFILTER devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid1x devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid09 devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid09_be devices on disk hd0.
grub-bios-setup: info: Scanning for dmraid_nv devices on disk hd0.
grub-bios-setup: info: Scanning for ldm devices on disk hd0.
grub-bios-setup: info: scanning hd0 for LDM.
grub-bios-setup: info: no LDM signature found.
grub-bios-setup: info: Scanning for lvm devices on disk hd0.
grub-bios-setup: info: no LVM signature found.
grub-bios-setup: info: Scanning for DISKFILTER devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid1x devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid09 devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid09_be devices on disk hd0.
grub-bios-setup: info: Scanning for dmraid_nv devices on disk hd0.
grub-bios-setup: info: Scanning for ldm devices on disk hd0.
grub-bios-setup: info: scanning hd0 for LDM.
grub-bios-setup: info: no LDM signature found.
grub-bios-setup: info: Scanning for lvm devices on disk hd0.
grub-bios-setup: info: couldn't find ID.
grub-bios-setup: info: Scanning for DISKFILTER devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid1x devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid09 devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid09_be devices on disk hd0.
grub-bios-setup: info: Scanning for dmraid_nv devices on disk hd0.
grub-bios-setup: info: Scanning for ldm devices on disk hd0.
grub-bios-setup: info: scanning hd0 for LDM.
grub-bios-setup: info: no LDM signature found.
grub-bios-setup: info: Scanning for lvm devices on disk hd0.
grub-bios-setup: info: no LVM signature found.
grub-bios-setup: info: Partition 0 starts from 2048.
grub-bios-setup: info: /dev/mapper/system-root.active is not present.
grub-bios-setup: info: Scanning for DISKFILTER devices on disk proc.
grub-bios-setup: info: Scanning for mdraid1x devices on disk proc.
grub-bios-setup: info: Scanning for mdraid09 devices on disk proc.
grub-bios-setup: info: Scanning for mdraid09_be devices on disk proc.
grub-bios-setup: info: Scanning for dmraid_nv devices on disk proc.
grub-bios-setup: info: Scanning for ldm devices on disk proc.
grub-bios-setup: info: scanning proc for LDM.
grub-bios-setup: info: no LDM signature found.
grub-bios-setup: info: Scanning for lvm devices on disk proc.
grub-bios-setup: info: drive = 0.
grub-bios-setup: info: the size of hd0 is 62533296.
grub-bios-setup: info: Scanning for DISKFILTER devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid1x devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid09 devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid09_be devices on disk hd0.
grub-bios-setup: info: Scanning for dmraid_nv devices on disk hd0.
grub-bios-setup: info: Scanning for ldm devices on disk hd0.
grub-bios-setup: info: scanning hd0 for LDM.
grub-bios-setup: info: no LDM signature found.
grub-bios-setup: info: Scanning for lvm devices on disk hd0.
grub-bios-setup: info: no LVM signature found.
grub-bios-setup: info: Scanning for DISKFILTER devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid1x devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid09 devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid09_be devices on disk hd0.
grub-bios-setup: info: Scanning for dmraid_nv devices on disk hd0.
grub-bios-setup: info: Scanning for ldm devices on disk hd0.
grub-bios-setup: info: scanning hd0 for LDM.
grub-bios-setup: info: no LDM signature found.
grub-bios-setup: info: Scanning for lvm devices on disk hd0.
grub-bios-setup: info: couldn't find ID.
grub-bios-setup: info: Scanning for DISKFILTER devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid1x devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid09 devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid09_be devices on disk hd0.
grub-bios-setup: info: Scanning for dmraid_nv devices on disk hd0.
grub-bios-setup: info: Scanning for ldm devices on disk hd0.
grub-bios-setup: info: scanning hd0 for LDM.
grub-bios-setup: info: no LDM signature found.
grub-bios-setup: info: Scanning for lvm devices on disk hd0.
grub-bios-setup: info: no LVM signature found.
grub-bios-setup: info: drive = -1.
grub-bios-setup: error: guessing the root device failed, because of `disk `lvmid/T2cEQ3-7YCI-56fW-CG9q-W3hW-TCqt-n6Dl9G/P2POLp-JIao-fepp-SCBD-ok6G-53lK-mQ5Sr3' not found'.


This is what is looks like when the command works:

grub-bios-setup: info: adding `hd0' -> `/dev/sda' from device.map.
grub-bios-setup: info: /dev/sda is present.
grub-bios-setup: info: Looking for /dev/sda.
grub-bios-setup: info: /dev/sda is a parent of /dev/sda.
grub-bios-setup: info: /dev/sda is present.
grub-bios-setup: info: Looking for /dev/sda.
grub-bios-setup: info: /dev/sda is a parent of /dev/sda.
grub-bios-setup: info: transformed OS device `/dev/sda' into GRUB device `hd0'.
grub-bios-setup: info: reading /boot/grub/i386-pc/boot.img.
grub-bios-setup: info: reading /boot/grub/i386-pc/core.img.
grub-bios-setup: info: root is `(null)', dest is `hd0'.
grub-bios-setup: info: Opening dest.
grub-bios-setup: info: drive = 0.
grub-bios-setup: info: the size of hd0 is 62533296.
grub-bios-setup: info: changing current directory to /dev/mapper.
grub-bios-setup: info: /dev/mapper/system-root.active is not present.
grub-bios-setup: info: changing current directory to /dev.
grub-bios-setup: info: changing current directory to system.
grub-bios-setup: info: changing current directory to mapper.
grub-bios-setup: info: changing current directory to disk.
grub-bios-setup: info: changing current directory to by-label.
grub-bios-setup: info: changing current directory to by-uuid.
grub-bios-setup: info: changing current directory to by-partuuid.
grub-bios-setup: info: changing current directory to by-id.
grub-bios-setup: info: changing current directory to by-path.
grub-bios-setup: info: changing current directory to block.
grub-bios-setup: info: /dev/sda1 is present.
grub-bios-setup: info: Looking for /dev/sda1.
grub-bios-setup: info: /dev/sda is a parent of /dev/sda1.
grub-bios-setup: info: /dev/sda1 starts from 2048.
grub-bios-setup: info: opening the device hd0.
grub-bios-setup: info: drive = 0.
grub-bios-setup: info: the size of hd0 is 62533296.
grub-bios-setup: info: drive = 0.
grub-bios-setup: info: the size of hd0 is 62533296.
grub-bios-setup: info: Scanning for DISKFILTER devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid1x devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid09 devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid09_be devices on disk hd0.
grub-bios-setup: info: Scanning for dmraid_nv devices on disk hd0.
grub-bios-setup: info: Scanning for ldm devices on disk hd0.
grub-bios-setup: info: scanning hd0 for LDM.
grub-bios-setup: info: no LDM signature found.
grub-bios-setup: info: Scanning for lvm devices on disk hd0.
grub-bios-setup: info: no LVM signature found.
grub-bios-setup: info: Scanning for DISKFILTER devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid1x devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid09 devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid09_be devices on disk hd0.
grub-bios-setup: info: Scanning for dmraid_nv devices on disk hd0.
grub-bios-setup: info: Scanning for ldm devices on disk hd0.
grub-bios-setup: info: scanning hd0 for LDM.
grub-bios-setup: info: no LDM signature found.
grub-bios-setup: info: Scanning for lvm devices on disk hd0.
grub-bios-setup: info: Found array system.
grub-bios-setup: info: Inserting hd0 (+2048,37363712) into system (lvm)
.
grub-bios-setup: info: drive = 0.
grub-bios-setup: info: the size of hd0 is 62533296.
grub-bios-setup: info: Scanning for DISKFILTER devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid1x devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid09 devices on disk hd0.
grub-bios-setup: info: Scanning for mdraid09_be devices on disk hd0.
grub-bios-setup: info: Scanning for dmraid_nv devices on disk hd0.
grub-bios-setup: info: Scanning for ldm devices on disk hd0.
grub-bios-setup: info: scanning hd0 for LDM.
grub-bios-setup: info: no LDM signature found.
grub-bios-setup: info: Scanning for lvm devices on disk hd0.
grub-bios-setup: info: no LVM signature found.
grub-bios-setup: info: Partition 0 starts from 2048.
grub-bios-setup: info: /dev/mapper/system-root.active is not present.
grub-bios-setup: info: guessed root_dev `lvmid/T2cEQ3-7YCI-56fW-CG9q-W3hW-TCqt-n6Dl9G/P2POLp-JIao-fepp-SCBD-ok6G-53lK-mQ5Sr3' from dir `/boot/grub/i386-pc'.
grub-bios-setup: info: setting the root device to `lvmid/T2cEQ3-7YCI-56fW-CG9q-W3hW-TCqt-n6Dl9G/P2POLp-JIao-fepp-SCBD-ok6G-53lK-mQ5Sr3'.
grub-bios-setup: info: saving <1,0,512>.
grub-bios-setup: info: saving <2,0,512>.
grub-bios-setup: info: saving <3,0,512>.
grub-bios-setup: info: saving <4,0,512>.
grub-bios-setup: info: saving <5,0,512>.
grub-bios-setup: info: saving <6,0,512>.
grub-bios-setup: info: saving <7,0,512>.
grub-bios-setup: info: saving <8,0,512>.
grub-bios-setup: info: saving <9,0,512>.
grub-bios-setup: info: saving <10,0,512>.
grub-bios-setup: info: saving <11,0,512>.
grub-bios-setup: info: saving <12,0,512>.
grub-bios-setup: info: saving <13,0,512>.
grub-bios-setup: info: saving <14,0,512>.
grub-bios-setup: info: saving <15,0,512>.
grub-bios-setup: info: saving <16,0,512>.
grub-bios-setup: info: saving <17,0,512>.
grub-bios-setup: info: saving <18,0,512>.
grub-bios-setup: info: saving <19,0,512>.
grub-bios-setup: info: saving <20,0,512>.
grub-bios-setup: info: saving <21,0,512>.
grub-bios-setup: info: saving <22,0,512>.
grub-bios-setup: info: saving <23,0,512>.
grub-bios-setup: info: saving <24,0,512>.
grub-bios-setup: info: saving <25,0,512>.
grub-bios-setup: info: saving <26,0,512>.
grub-bios-setup: info: saving <27,0,512>.
grub-bios-setup: info: saving <28,0,512>.
grub-bios-setup: info: saving <29,0,512>.
grub-bios-setup: info: saving <30,0,512>.
grub-bios-setup: info: saving <31,0,512>.
grub-bios-setup: info: saving <32,0,512>.
grub-bios-setup: info: saving <33,0,512>.
grub-bios-setup: info: saving <34,0,512>.
grub-bios-setup: info: saving <35,0,512>.
grub-bios-setup: info: saving <36,0,512>.
grub-bios-setup: info: saving <37,0,512>.
grub-bios-setup: info: saving <38,0,512>.
grub-bios-setup: info: saving <39,0,512>.
grub-bios-setup: info: saving <40,0,512>.
grub-bios-setup: info: saving <41,0,512>.
grub-bios-setup: info: saving <42,0,512>.
grub-bios-setup: info: saving <43,0,512>.
grub-bios-setup: info: saving <44,0,512>.
grub-bios-setup: info: saving <45,0,512>.
grub-bios-setup: info: saving <46,0,512>.
grub-bios-setup: info: saving <47,0,512>.
grub-bios-setup: info: saving <48,0,512>.
grub-bios-setup: info: saving <49,0,512>.
grub-bios-setup: info: saving <50,0,512>.
grub-bios-setup: info: saving <51,0,512>.
grub-bios-setup: info: saving <52,0,512>.
grub-bios-setup: info: saving <53,0,512>.
grub-bios-setup: info: saving <54,0,512>.
grub-bios-setup: info: saving <55,0,512>.
grub-bios-setup: info: saving <56,0,512>.
grub-bios-setup: info: saving <57,0,512>.
grub-bios-setup: info: saving <58,0,512>.
grub-bios-setup: info: saving <59,0,512>.
grub-bios-setup: info: saving <60,0,512>.
grub-bios-setup: info: saving <61,0,512>.
grub-bios-setup: info: saving <62,0,512>.
grub-bios-setup: info: saving <63,0,512>.
grub-bios-setup: info: saving <64,0,512>.
grub-bios-setup: info: saving <65,0,512>.
grub-bios-setup: info: saving <66,0,512>.
grub-bios-setup: info: saving <67,0,512>.
grub-bios-setup: info: saving <68,0,512>.
grub-bios-setup: info: saving <69,0,512>.
grub-bios-setup: info: saving <70,0,512>.
grub-bios-setup: info: saving <71,0,512>.
grub-bios-setup: info: saving <72,0,512>.
grub-bios-setup: info: saving <73,0,512>.
grub-bios-setup: info: saving <74,0,512>.
grub-bios-setup: info: saving <75,0,512>.
grub-bios-setup: info: saving <76,0,512>.
grub-bios-setup: info: saving <77,0,512>.
grub-bios-setup: info: saving <78,0,512>.
grub-bios-setup: info: saving <79,0,512>.
grub-bios-setup: info: saving <80,0,512>.
grub-bios-setup: info: saving <81,0,512>.
grub-bios-setup: info: saving <82,0,512>.
grub-bios-setup: info: saving <83,0,512>.
grub-bios-setup: info: saving <84,0,512>.
grub-bios-setup: info: saving <85,0,512>.
grub-bios-setup: info: saving <86,0,512>.
grub-bios-setup: info: saving <87,0,512>.
grub-bios-setup: info: saving <88,0,512>.
grub-bios-setup: info: saving <89,0,512>.
grub-bios-setup: info: saving <90,0,512>.
grub-bios-setup: info: saving <91,0,512>.
grub-bios-setup: info: saving <92,0,512>.
grub-bios-setup: info: saving <93,0,512>.
grub-bios-setup: info: saving <94,0,512>.
grub-bios-setup: info: saving <95,0,512>.
grub-bios-setup: info: saving <96,0,512>.
grub-bios-setup: info: saving <97,0,512>.
grub-bios-setup: info: saving <98,0,512>.
grub-bios-setup: info: saving <99,0,512>.
grub-bios-setup: info: saving <100,0,512>.
grub-bios-setup: info: saving <101,0,512>.
grub-bios-setup: info: saving <102,0,512>.
grub-bios-setup: info: saving <103,0,512>.
grub-bios-setup: info: saving <104,0,512>.
grub-bios-setup: info: saving <105,0,512>.
grub-bios-setup: info: saving <106,0,512>.
grub-bios-setup: info: saving <107,0,512>.
grub-bios-setup: info: saving <108,0,512>.
grub-bios-setup: info: saving <109,0,512>.
grub-bios-setup: info: saving <110,0,512>.
grub-bios-setup: info: saving <111,0,512>.
grub-bios-setup: info: saving <112,0,512>.
grub-bios-setup: info: saving <113,0,512>.
grub-bios-setup: info: saving <114,0,512>.
grub-bios-setup: info: saving <115,0,512>.
grub-bios-setup: info: saving <116,0,512>.
grub-bios-setup: info: saving <117,0,512>.
grub-bios-setup: info: saving <118,0,512>.
grub-bios-setup: info: saving <119,0,512>.
grub-bios-setup: info: saving <120,0,512>.
grub-bios-setup: info: saving <121,0,512>.
grub-bios-setup: info: saving <122,0,512>.
grub-bios-setup: info: saving <123,0,512>.
grub-bios-setup: info: saving <124,0,512>.
grub-bios-setup: info: saving <125,0,512>.
grub-bios-setup: info: saving <126,0,512>.
grub-bios-setup: info: saving <127,0,512>.
grub-bios-setup: info: saving <128,0,512>.
grub-bios-setup: info: saving <129,0,512>.
grub-bios-setup: info: saving <130,0,512>.
grub-bios-setup: info: saving <131,0,512>.
grub-bios-setup: info: saving <132,0,512>.
grub-bios-setup: info: saving <133,0,512>.
grub-bios-setup: info: saving <134,0,512>.


David Hoyer
NetApp

  



More information about the Pkg-grub-devel mailing list