Debian Bug report logs - #989374
lvm2: Activation of logical volume is prohibited while logical volume is active.

version graph

Package: lvm2; Maintainer for lvm2 is Debian LVM Team <[email protected]>; Source for lvm2 is src:lvm2 (PTS, buildd, popcon).

Reported by: Johnny Strom <[email protected]>

Date: Wed, 2 Jun 2021 06:06:01 UTC

Severity: normal

Found in version lvm2/2.03.11-2.1

Full log


Message #15 received at [email protected] (full text, mbox, reply):

Received: (at 989374) by bugs.debian.org; 24 Nov 2021 09:28:41 +0000
From [email protected] Wed Nov 24 09:28:41 2021
X-Spam-Checker-Version: SpamAssassin 3.4.2-bugs.debian.org_2005_01_02
	(2018-09-13) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-12.6 required=4.0 tests=BAYES_00,DIGITS_LETTERS,
	FOURLA,HAS_PACKAGE,SPF_HELO_NONE,SPF_PASS,TXREP,XMAILER_REPORTBUG
	autolearn=ham autolearn_force=no
	version=3.4.2-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 63; hammy, 150; neutral, 172; spammy,
	0. spammytokens: hammytokens:0.000-+--followup-for,
	0.000-+--followupfor, 0.000-+--FollowupFor, 0.000-+--Followup-For,
	0.000-+--sk:taint_o
Return-path: <[email protected]>
Received: from proxmox-new.maurer-it.com ([94.136.29.106]:16005)
	by buxtehude.debian.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.92)
	(envelope-from <[email protected]>)
	id 1mpoa0-0006t6-EN
	for [email protected]; Wed, 24 Nov 2021 09:28:41 +0000
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
	by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 5E3AA44785
	for <[email protected]>; Wed, 24 Nov 2021 10:18:44 +0100 (CET)
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Fabian Ebner <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: Re: lvm2: Activation of logical volume is prohibited while logical volume is active.
Message-ID: <163774551830.42731.1824103432171956230.reportbug@pve7-dev.enia.proxmox.com>
X-Mailer: reportbug 7.10.3+deb11u1
Date: Wed, 24 Nov 2021 10:18:38 +0100
X-Greylist: delayed 594 seconds by postgrey-1.36 at buxtehude; Wed, 24 Nov 2021 09:28:40 UTC
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




Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 14:38:04 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.