#1137189 lvm2: vgremove of a shared VG hangs forever

Package:
lvm2
Source:
lvm2
Description:
Linux Logical Volume Manager
Submitter:
Mathias Gibbens
Date:
2026-05-20 15:33:02 UTC
Severity:
normal
#1137189#5
Date:
2026-05-20 15:30:49 UTC
From:
To:
  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