You are not logged in.

#1 2020-04-20 13:54:49

Nocifer
Member
Registered: 2019-05-23
Posts: 14

LVM volume on RAID array fails to activate on boot with kernel >=5.5

Hello,

I have a RAID1 array set up as a physical volume for an LVM logical volume, which is then set to mount on boot. Along with it I have other, non-RAID LVM volumes in use (including one containing the root partition). Since a couple months ago or so this particular volume began failing to automatically activate and mount, with its systemd service reporting as follows:

Apr 20 16:05:32 archlinux systemd[1]: Starting LVM2 PV scan on device 9:127...
Apr 20 16:05:33 archlinux systemd[1]: lvm2-pvscan@9:127.service: Main process exited, code=killed, status=15/TERM
Apr 20 16:05:33 archlinux systemd[1]: lvm2-pvscan@9:127.service: Failed with result 'signal'.
Apr 20 16:05:33 archlinux systemd[1]: Stopped LVM2 PV scan on device 9:127.

All the other volumes kept working as well as ever, and I could still activate this volume manually and mount it, and this array only contains non-essential stuff, so I kept postponing my properly looking into this.

Today, due to having too much time on my hands lately (the good side of this corona virus situation), I finally decided to find what is actually going on. After a little digging I realized the problems started on January 28, just after I had upgraded my kernel to 5.5. So I installed the LTS kernel, which is still on 5.4, and voila, the array properly activated and mounted on boot. Trying with the 5.5 kernel failed, as expected, like it does with my current 5.6 kernel.

So this seems like a kernel issue, but there's more. My current HOOKS array in mkinitcpio.conf is this:

HOOKS=(base systemd autodetect modconf block mdadm_udev sd-lvm2 filesystems keyboard fsck)

On a hunch, I switched it to a non-systemd array, like this:

HOOKS=(base udev autodetect modconf block mdadm_udev lvm2 filesystems keyboard fsck)

And what do you know - it worked like a charm, even with kernel 5.6 (I do not have a 5.5 kernel at hand to test, but everything points to it being a similar experience).

So, there seems to be some incompatibility between systemd and linux >=5.5 when it comes to using a RAID array in combination with LVM.

Has anyone else experienced something like this? Or at least, since I'm not really all that knowledgeable when it comes to LVM, could perhaps someone more educated than me point me to the right direction of debugging this and at least making sure that it's indeed a kernel/LVM/systemd issue and not some weird misconfiguration on my part, before I go lose myself by scuba-diving alone into my system's internals?

Thanks in advance.

Offline

Board footer

Powered by FluxBB