FS#57275 - [lvm2] PV scan in initramfs does not finish
Attached to Project:
Arch Linux
Opened by nl6720 (nl6720) - Monday, 29 January 2018, 14:50 GMT
Last edited by Christian Hesse (eworm) - Thursday, 18 April 2019, 06:39 GMT
Opened by nl6720 (nl6720) - Monday, 29 January 2018, 14:50 GMT
Last edited by Christian Hesse (eworm) - Thursday, 18 April 2019, 06:39 GMT
|
Details
Description:
With lvm2 2.02.177-3 I can't boot with root on a thin LVM volume. Using lvm2 mkinitcpio hook: A start job is running for LVM PV scan on device 8:2 A start job is running for Monitorin..td or progress polling This goes on forever. Using sd-lvm2 mkinitcpio hook: A start job is running for LVM PV scan on device 8:2 A start job is running for dev-mapper-VMStorage\x2dthinswap.device A start job is running for dev-mapper-VMStorage\x2dthinroot.device Eventually it times out on waiting for root. Additional info: * package version(s) * config and/or log files etc. lvm2 2.02.177-3 Steps to reproduce: |
This task depends upon
Closed by Christian Hesse (eworm)
Thursday, 18 April 2019, 06:39 GMT
Reason for closing: Fixed
Additional comments about closing: lvm2 2.02.184
Thursday, 18 April 2019, 06:39 GMT
Reason for closing: Fixed
Additional comments about closing: lvm2 2.02.184
I had the same issue this morning after upgrading from 2.02.177-1 to 2.02.177-3, startup was stuck on "start job is running...", I'm also using thin LVM volume. Downgrading to 2.02.177-1 fix it.
Regards,
Macfly
Now with lvm2 2.02.177-4:
lvm2 hook:
A start job is running for LVM PV scan on device 8:2
A start job is running for Monitorin..meventd or progress polling
The start jobs have "no limit" so this goes on for ever and I can't boot.
sd-lvm2 hook:
A stop job is running for LVM2 metadata daemon
A stop job is running for Device-mapper event daemon
After 1m30s it times out and continues booting.
The same two stop jobs also some times show up on shutdown.
lvs.log (0.7 KiB)
lvdisplay.log (3.4 KiB)
journalctl.log (60.8 KiB)
I tested with:
HOOKS=(base udev autodetect modconf keyboard keymap consolefont block lvm2 filesystems resume fsck)
that didn't work (see previous replies), changed it to:
HOOKS=(base systemd autodetect modconf keyboard sd-vconsole block sd-lvm2 filesystems fsck)
and regenerated initramfs. That eventually booted but I spent time waiting for the timeout (see previous replies).
I also have the issue, I tried the same test done by nl6720 and have got the same result (lvm2 and sd-lvm2 hook work with sd-lvm2 after timeout of 1m29s).
My root and swap are on a classic LV, only a docker mount point is on thinpool.
The lvm start job is blocked on 8:4 and 8:5 which are the thinpool on my laptop.
If that can help.
Regards,
FILES=('/usr/lib/libgcc_s.so.1')
feb 08 16:22:29 archvm3 lvm[193]: device-mapper: waitevent ioctl on LVM-yqgaHQyzPZ2MxsGXAe52FrBwprydojKZzIT96d25yHS9Ui9Slnek5hR2Er1n0Tid-tpool failed: Interrupted system call
feb 08 16:22:29 archvm3 lvm[193]: dm status LVM-yqgaHQyzPZ2MxsGXAe52FrBwprydojKZzIT96d25yHS9Ui9Slnek5hR2Er1n0Tid-tpool [ opencount noflush ] [16384] (*1)
feb 08 16:22:29 archvm3 lvm[193]: dm waitevent LVM-yqgaHQyzPZ2MxsGXAe52FrBwprydojKZzIT96d25yHS9Ui9Slnek5hR2Er1n0Tid-tpool [ opencount flush ] [16384] (*1)
Now, I'm fairly new to linux so I don't know if my solution will help you or even if it was the proper solution to my problem, but since it worked for me maybe it will work for you. What my solution does is add an override to the lvm2-lvmetad.service in the initramfs so that it runs only after systemd-udevd.service has finished. (If anyone has any feedback to give me regarding my fix/hack? I would highly appreciate it)
In order to use this fix extract my archive in /etc and then add lvm2-fix after sd-lvm2 in the hooks list in mkinitcpio.conf and rebuild your initramfs
Unfortunately aqua's fix didn't work for me, nothing changed.
-> Running build hook: [sd-lvm2]
/usr/lib/initcpio/install/sd-lvm2: Zeile 14: add_systemd_unit: Kommando nicht gefunden.
/usr/lib/initcpio/install/sd-lvm2: Zeile 15: add_systemd_unit: Kommando nicht gefunden.
/usr/lib/initcpio/install/sd-lvm2: Zeile 16: add_systemd_unit: Kommando nicht gefunden.
(Command not found)
lvm2 2.02.177-5 removed dmeventd and libdevmapper-*.so from the hooks which AFAIK were added because of
FS#49530, so this might affect that bug report.Downgrading to 2.02.182-1 fixes the problem. It seems that an upstream change introduces the problem for me (maybe it is caused by something else on my system). I can reproduce this on ~4 systems that use LVM and use a systemd-initrd environment.
After applying aquas workaround I restarted 5 times and it works flawlessly with lvm2 2.02.183-1 (thanks aqua!).
One thing that might have helped in my case: I used the fallback initrd image. This allowed me to boot successfully. Can you verify this in your case?
Here is my case. For several months I've experienced 90seconds lags during boot on lvmetad.service which eventually was stopped by timeout. I did not pay much attention as I rarely reboot and it was not big deal. But several days ago after pacman -Su system did not boot! I had to manually lvhcnage -an / -ay several LVs in emergency console to be able to boot. I'm not sure what caused boot failure in my case: probably creation on softraid and moving several LVs to PV on softraid mirror (this PV was not found somehow: "WARNING: Device for PV g7iq...Rs not found or rejected by a filter"), maybe enabling lvmcache on SSD or probably LVM update.
But after applying awua's fix system boots again and 90 seconds lag on lvmetad is gone.