FS#39896 - [lvm2] regression (v2.02.105->v2.02.106): systemd fails to detect swap
Attached to Project:
Arch Linux
Opened by Ronald (Rexilion) - Wednesday, 16 April 2014, 10:10 GMT
Last edited by Doug Newgard (Scimmia) - Monday, 06 July 2015, 04:34 GMT
Opened by Ronald (Rexilion) - Wednesday, 16 April 2014, 10:10 GMT
Last edited by Doug Newgard (Scimmia) - Monday, 06 July 2015, 04:34 GMT
|
Details
I have swap residing in LVM and it fails to work with lvm2
2.02.106. The previous version (2.02.105) works. The author
suggests some more options are enabled to make it work (I
have not verified it yet).
https://bugzilla.redhat.com/show_bug.cgi?id=1087586#c12 I tried to rebuild the package with the mentioned buildflag. But it seems that ARCH is using *a lot* of specific config files to make everything work. It seems that the lvm2 PKGBUILD is used to build two packages. Hence, they are seperated. On top of that, many critical config files have modifications not residing in the upstream packages. I'm seeing this issue on two machines. One with stock kernel and one with a custom kernel. One has a 64bit kernel and 32bit userspace. The other is pure 32bit. Former is hyperthreading, the latter is UP. So I think we can rule out any race conditions or 32/64 bit bugs. |
This task depends upon
The example I gave in #19 does not indicate a replacement of RedHat specific bits, but I could be wrong. Did not check that much.
Comment #21 indicates that a lot of testing goes into these sensitive settings. I want to help unifying these configuration files with the little knowledge I have.
It does not fix my issue, I'll report back to the upstream developers. Let them have their spin with it.
Again, thank you.
I question the severity of the bug report - looking at the forums it's not just me that has been left with an unbootable system since this update. Does this not qualify for critical status?
Maybe I should open a new RH bug...
You could post the output of systemctl status lvm2-pvscan@a:b.service (use tab completion on the status command to find out the correct a:b). For me, this returns the following (which is correct):
$ systemctl status lvm2-pvscan@8:4.service
● lvm2-pvscan@8:4.service - LVM2 PV scan on device 8:4
Loaded: loaded (/usr/lib/systemd/system/lvm2-pvscan@.service; static)
Active: active (exited) since Mi 2014-04-30 10:18:01 CEST; 2h 18min ago
Docs: man:pvscan(8)
Process: 278 ExecStart=/usr/bin/lvm pvscan --cache --activate ay %i (code=exited, status=0/SUCCESS)
Main PID: 278 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/system-lvm2\x2dpvscan.slice/lvm2-pvscan@8:4.service
Apr 30 10:18:01 lije lvm[278]: 2 logical volume(s) in volume group "lije" now active
Apr 30 10:18:01 lije systemd[1]: Started LVM2 PV scan on device 8:4.
$ systemctl status lvm2-pvscan@9:0.service
● lvm2-pvscan@9:0.service - LVM2 PV scan on device 9:0
Loaded: loaded (/usr/lib/systemd/system/lvm2-pvscan@.service; static)
Active: active (exited) since Mi 2014-04-30 10:18:02 CEST; 2h 18min ago
Docs: man:pvscan(8)
Process: 389 ExecStart=/usr/bin/lvm pvscan --cache --activate ay %i (code=exited, status=0/SUCCESS)
Main PID: 389 (code=exited, status=0/SUCCESS)
Apr 30 10:18:01 lije lvm[389]: 3 logical volume(s) in volume group "architect" now active
Apr 30 10:18:02 lije systemd[1]: Started LVM2 PV scan on device 9:0.
As you can see here, it lists the number of LVs that got activated. There could also be an error message here, which would be interesting.
Another question: Do you activate lvm2 in initramfs, too? If so, are you using base+udev+lvm2 or systemd+sd-lvm2 hooks?
https://wiki.archlinux.org/index.php/mkinitcpio#Common_hooks
My current layout:
HOOKS="base udev autodetect modconf lvm2 block filesystems build_system keyboard fsck shutdown"
Should that be:
HOOKS="systemd udev autodetect modconf sd-lvm2 block filesystems build_system keyboard fsck shutdown"
???
About the missing install_tmpfiles_configuration line, that was meant as an observation. I hope you did not consider that as offensive. I really appreciate your help on this.
This line, for example, is correct: HOOKS="systemd autodetect modconf sd-lvm2 block filesystems keyboard fsck".
However, I am much more interested in the status output from lvm2-pvscan@.service.
As per the RH bug: Only the swap is mounted 'automatically' from an fstab. I mount the other partions by copying /etc/fstab from my lv containing /etc and then loop over each partition with a mountpoint located under /root.
So, I am suffering the same bug. I have posted build_system and fstab to help you understand my lousy explanation:
build_system http://http://pastebin.com/raw.php?i=sLfx1H4b
fstab http://pastebin.com/raw.php?i=CZUP3PMA
Yeah, that should work. sd-lvm2 does not have add_runscript (like lvm2) because I take it systemD does not execute those. However, sd-lvm2 does copy over the *.service files. ... right? :)
Can you paste the output of: udevadm info /dev/main/swap
sdb .. sde are part of a broken card reader.
It does not appear to have native support for resuming after suspend to disk. So I made something myself which does that.
However, on the other side. I tried to setup my filesystems using my old build_system script instead of fstab entries with x-initrd.mount. This seemed to work, but then systemd-udevd hangs after switching root. It somehow fails to do a sd_notify.
Currently, it's just fstab with the x-initrd.mount option for the systems that I used to mount myself.
I also looked at dracut to reliably implement resume from disk. Would you like me to provide my findings on how to do this for the hooks in mkinitcpio? (in a seperate task ofc)
HOOKS="base udev autodetect modconf block mdadm_udev filesystems keyboard lvm2 usr fsck shutdown"
to:
HOOKS="systemd autodetect modconf sd-lvm2 block filesystems keyboard usr fsck"
and the issue is gone. Thank you.