GNU bug report logs - #65177
udevd error with lvm-raid array leading to race condition with luks

Previous Next

Package: guix;

Reported by: Adrien 'neox' Bourmault <neox <at> gnu.org>

Date: Wed, 9 Aug 2023 12:06:01 UTC

Severity: normal

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 65177 <at> debbugs.gnu.org (full text, mbox):

From: Yann Dupont <Yann.Dupont <at> univ-nantes.fr>
To: 65177 <at> debbugs.gnu.org
Subject: Re: udevd error with lvm-raid array leading to race condition with
 luks
Date: Thu, 14 Sep 2023 18:23:08 +0200
[Message part 1 (text/plain, inline)]
Hi, as suggested by Josselin, I tested the following patch and it seems 
to do the job here.


Be careful, I'm not an udev or lvm2 specialist at all and basically, I 
don't really know if what I did is the right way to do it.


All I can say is that the VMs now boot.


Cheers,



diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 91109c41d9..28b3c1e0bf 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -4421,6 +4421,7 @@ (define-public lvm2
               (sha256
                (base32
"0z6w6bknhwh1n3qfkb5ij6x57q3wjf28lq3l8kh7rkhsplinjnjc"))
+              (patches (search-patches "lvm2-no-systemd.patch"))
               (modules '((guix build utils)))
               (snippet
                '(begin
diff --git a/gnu/packages/patches/lvm2-no-systemd.patch 
b/gnu/packages/patches/lvm2-no-systemd.patch
new file mode 100644
index 0000000000..7e8a37abcc
--- /dev/null
+++ b/gnu/packages/patches/lvm2-no-systemd.patch
@@ -0,0 +1,13 @@
+diff --git a/udev/69-dm-lvm.rules.in b/udev/69-dm-lvm.rules.in
+index ff1568145..8879a2ef9 100644
+--- a/udev/69-dm-lvm.rules.in
++++ b/udev/69-dm-lvm.rules.in
+@@ -76,7 +76,7 @@ LABEL="lvm_scan"
+ # it's better suited to appearing in the journal.
+
+ IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache --listvg 
--checkcomplete --vgonline --autoactivation event --udevoutput 
--journal=output $env{DEVNAME}"
+-ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(SYSTEMDRUN) --no-block 
--property DefaultDependencies=no --unit 
lvm-activate-$env{LVM_VG_NAME_COMPLETE} (LVM_EXEC)/lvm vgchange -aay 
--autoactivation event $env{LVM_VG_NAME_COMPLETE}"
++ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(LVM_EXEC)/lvm vgchange -aay 
--autoactivation event $env{LVM_VG_NAME_COMPLETE}"
+ GOTO="lvm_end"
+
+ LABEL="lvm_end"

[Message part 2 (text/html, inline)]

This bug report was last modified 109 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.