Package: lvm2
Version: 2.03.31-2
Severity: important
X-Debbugs-Cc: [email protected]

  On trixie and sid systems, attempting to remove a shared VG hangs
forever. The process must be terminated via `kill -9`.

  Originally observed in a clustered Incus environment, the problem is
trivial to reproduce on a minimal trixie install:

      gibmat@debian:~$ dpkg -l | grep lvm
      ii  liblvm2cmd2.03:amd64            2.03.31-2                            
amd64        LVM2 command library
      ii  lvm2                            2.03.31-2                            
amd64        Linux Logical Volume Manager
      ii  lvm2-lockd                      2.03.31-2                            
amd64        LVM locking daemon
      gibmat@debian:~$ sudo vgcreate --shared vg /dev/vdb
        Enabling sanlock global lock
        Logical volume "lvmlock" created.
        Volume group "vg" successfully created
        VG vg starting sanlock lockspace
        Starting locking.  Waiting until locks are ready...
      gibmat@debian:~$ sudo vgs
        VG #PV #LV #SN Attr   VSize   VFree  
        vg   1   0   0 wz--ns <20.00g <19.75g
      gibmat@debian:~$ sudo vgremove vg
      ^C^C^CKilled

  Force-downgrading to lvm2 packages from bookworm works as expected:

      gibmat@debian:~$ dpkg -l | grep lvm
      ii  liblvm2cmd2.03:amd64            2.03.16-2                            
amd64        LVM2 command library
      ii  lvm2                            2.03.16-2                            
amd64        Linux Logical Volume Manager
      ii  lvm2-lockd                      2.03.16-2                            
amd64        LVM locking daemon
      gibmat@debian:~$ sudo vgcreate --shared vg /dev/vdb
        Enabling sanlock global lock
        Physical volume "/dev/vdb" successfully created.
        Logical volume "lvmlock" created.
        Volume group "vg" successfully created
        VG vg starting sanlock lockspace
        Starting locking.  Waiting until locks are ready...
      gibmat@debian:~$ sudo vgs
        VG #PV #LV #SN Attr   VSize   VFree  
        vg   1   0   0 wz--ns <20.00g <19.75g
      gibmat@debian:~$ sudo vgremove vg
        Volume group "vg" successfully removed

  Apparently this works fine on current Fedora systems, which implies
this problem was fixed by the time of the 2.03.38 release of lvm2.

Mathias

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

Kernel: Linux 6.12.88+deb13-amd64 (SMP w/2 CPU threads; PREEMPT)
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.205-2
ii  dmsetup                   2:1.02.205-2
ii  libaio1t64                0.3.113-8+b1
ii  libblkid1                 2.41-5
ii  libc6                     2.41-12+deb13u3
ii  libdevmapper-event1.02.1  2:1.02.205-2
ii  libedit2                  3.1-20250104-1
ii  libselinux1               3.8.1-1
ii  libsystemd0               257.13-1~deb13u1
ii  libudev1                  257.13-1~deb13u1

Versions of packages lvm2 recommends:
ii  thin-provisioning-tools  1.1.0-4+b1

lvm2 suggests no packages.

-- Configuration Files:
/etc/lvm/lvm.conf changed:
global {
        use_lvmlockd = 1
}

/etc/lvm/lvmlocal.conf changed:
local {
        host_id = 123
}


-- no debconf information

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to