Package: lvm2
Version: 2.03.16-2
Severity: normal
Tags: patch upstream

Dear Maintainer,

please see the bug #1069182 in initscripts for the background.

To keep device-mapper controlled drives records from deletion at udev base 
cleanup, the udev rules for adding them need to specify "db_persist" option. 
This was already done in lvm2 upstream, but the patch is pretty trivial, so I 
don't think it needs waiting for the upstream release. I modified the patch so 
it applies to the current Debian git version.


-- System Information:
Debian Release: 12.5
  APT prefers stable-updates
  APT policy: (991, 'stable-updates'), (991, 'stable-security'), (991, 
'stable'), (99, 'testing'), (90, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.6.13-bootes0-p-1000 (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en_US
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages lvm2 depends on:
ii  dmeventd                   2:1.02.185-2
ii  dmsetup                    2:1.02.185-2
ii  libaio1                    0.3.113-4
ii  libblkid1                  2.38.1-5+deb12u1
ii  libc6                      2.36-9+deb12u4
ii  libdevmapper-event1.02.1   2:1.02.185-2
ii  libedit2                   3.1-20221030-2
ii  libelogind0 [libsystemd0]  246.10-1debian1
ii  libselinux1                3.4-1+b6
ii  libudev1                   254.5-1~bpo12+3
ii  lsb-base                   11.6
ii  sysvinit-utils [lsb-base]  3.08-3~bpo12+2

Versions of packages lvm2 recommends:
ii  thin-provisioning-tools  0.9.0-2

lvm2 suggests no packages.

-- Configuration Files:
/etc/lvm/lvmlocal.conf changed [not included]

-- no debconf information
diff --git a/udev/10-dm.rules.in b/udev/10-dm.rules.in
index 4ffd3e265..4d4f46f07 100644
--- a/udev/10-dm.rules.in
+++ b/udev/10-dm.rules.in
@@ -44,6 +44,11 @@ KERNEL!="dm-[0-9]*", GOTO="dm_end"
 # is not recommended.
 ACTION!="add|change", GOTO="dm_end"
 
+# Persist device state on transition from the initrd. This means all udev device
+# properties are kept in the udev database even when it is cleaned up on
+# switch-root.
+OPTIONS+="db_persist"
+
 # Decode udev control flags and set environment variables appropriately.
 # These flags are encoded in DM_COOKIE variable that was introduced in
 # kernel version 2.6.31. Therefore, we can use this feature with

Reply via email to