[PVE-User] LVM autoactivation failed with multipath over iSCSI
Stefan M. Radman
smr at kmi.com
Mon Feb 3 10:53:36 CET 2020
Hi Nada
SUSE document #7023336 seems to describe the race condition we are seeing but I'm not sure the solution they are offering will help in my case.
The boot parameter rd.lvm.conf=0 just removes /etc/lvm.conf from the initramfs.
My lvm.conf is unchanged (system default) so removing it from initramfs probably won't change anything I believe.
Nevertheless I'm curious about the result of your test.
My own workaround for the issue at hand is to delay the start of lvm2-pvscan by a few seconds (see below).
That gives multipathd more than enough time to complete its job.
It solves the problem for me (at least until the next upgrade) but there might be a smarter solution.
Stefan
root at proxmox:~# sed -i.orig '/^ExecStart=/i ExecStartPre=/bin/sleep 5' /lib/systemd/system/lvm2-pvscan at .service
root at proxmox:~# systemctl daemon-reload
root at proxmox:~# diff -u /lib/systemd/system/lvm2-pvscan at .service{.orig,}
--- /lib/systemd/system/lvm2-pvscan at .service.orig 2019-07-15 15:11:18.000000000 +0200
+++ /lib/systemd/system/lvm2-pvscan at .service 2020-02-03 01:19:38.440840599 +0100
@@ -10,5 +10,6 @@
[Service]
Type=oneshot
RemainAfterExit=yes
+ExecStartPre=/bin/sleep 5
ExecStart=/sbin/lvm pvscan --cache --activate ay %i
ExecStop=/sbin/lvm pvscan --cache %i
On Feb 3, 2020, at 09:42, nada <nada at verdnatura.es<mailto:nada at verdnatura.es>> wrote:
hi Stefan
some 'racing' problem is described and solved here
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.suse.com%2Fsupport%2Fkb%2Fdoc%2F%3Fid%3D7023336&data=02%7C01%7Csmr%40kmi.com%7Cfb29a75f1c3e4ff35a2b08d7a885142c%7Cc2283768b8d34e008f3d85b1b4f03b33%7C0%7C0%7C637163161847328253&sdata=xFGQYGGweOixVqVLw5DwQ81n3lgNWYzXjJATkVrfRZQ%3D&reserved=0
PLS read it
maybe i have time to test it during next weekend
Nada
On 2020-02-02 23:13, Stefan M. Radman wrote:
After upgrading a node that uses iSCSI multipath to 6.1, auto
activation of LVM volumes fails for me as well.
I am seeing exactly the same problem as originally reported by Nada.
Apparently, LVM scans the iSCSI adapters before multipath is fully
loaded and consequently ignores volumes appearing on duplicate
devices.
Marco Gaiarin correctly noted this in January.
See the error messages in the system log below.
Does anyone have a hint, how to delay the lvm-pvscan service until
multipath has finished its discovery?
Thanks
Stefan
CONFIDENTIALITY NOTICE: This communication may contain privileged and confidential information, or may otherwise be protected from disclosure, and is intended solely for use of the intended recipient(s). If you are not the intended recipient of this communication, please notify the sender that you have received this communication in error and delete and destroy all copies in your possession.
More information about the pve-user
mailing list