Package: lvm2
Version: 2.03.11-2.1
Followup-For: Bug #989374

Dear Maintainer,

some Proxmox VE users are also affected by this issue [0][1].
With the help of LVM2 developers, the root cause was found to be
the following during early init [2]:

1. pvscan is started by the udev 69-lvm-metad.rules.
2. pvscan activates XYZ_tmeta and XYZ_tdata.
3. pvscan starts thin_check for the pool and waits for it to complete.
4. The timeout enforced by udev is hit and pvscan is killed.
5. Some time later, thin_check completes, but the activation of the
thin pool never completes.

Users reported that the workaround with '--skip-mappings' suggested in
[2] indeed works around the issue[3].

It would also be enough to set this only for the relevant instance of
pvscan, so a candidate for fixing this is:

diff --git a/udev/69-dm-lvm-metad.rules.in b/udev/69-dm-lvm-metad.rules.in
index 237b714d7..ff849e3f7 100644
--- a/udev/69-dm-lvm-metad.rules.in
+++ b/udev/69-dm-lvm-metad.rules.in
@@ -124,6 +124,6 @@ LABEL="direct_pvscan"
 #  MD    |          |      X      |       X*       |                   |
 #  loop  |          |      X      |       X*       |                   |
 #  other |    X     |             |       X        |                   |   X
-RUN+="(LVM_EXEC)/lvm pvscan --cache --activate ay --major $major --minor 
$minor", ENV{LVM_SCANNED}="1"
+RUN+="(LVM_EXEC)/lvm pvscan --cache --activate ay --major $major --minor 
$minor --config 'global/thin_check_options = [ \"-q\", \"--skip-mappings\" ]'", 
ENV{LVM_SCANNED}="1"
 
 LABEL="lvm_end"
-- 
2.30.2

Of course, the downside is that the more thorough check doesn't happen
anymore for users for whom it didn't cause problems.

[0]: 
https://forum.proxmox.com/threads/local-lvm-not-available-after-kernel-update-on-pve-7.97406/
[1]: 
https://forum.proxmox.com/threads/prox7-lvmthin-lv-after-reboot-inactive.93413/post-406490
[2]: https://bugzilla.redhat.com/show_bug.cgi?id=2023213#c4
[3]: 
https://forum.proxmox.com/threads/local-lvm-not-available-after-kernel-update-on-pve-7.97406/post-431009


-- System Information:
Debian Release: 11.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.13.19-1-pve (SMP w/24 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages lvm2 depends on:
ii  dmeventd                  2:1.02.175-2.1
ii  dmsetup                   2:1.02.175-2.1
ii  init-system-helpers       1.60
ii  libaio1                   0.3.112-9
ii  libblkid1                 2.36.1-8
ii  libc6                     2.31-13+deb11u2
ii  libdevmapper-event1.02.1  2:1.02.175-2.1
ii  libedit2                  3.1-20191231-2+b1
ii  libselinux1               3.1-3
ii  libsystemd0               247.3-6
ii  libudev1                  247.3-6
ii  lsb-base                  11.1.0

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

lvm2 suggests no packages.

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

-- no debconf information

Reply via email to