LVM-Thin storage: Disk removal failure upon running asynchronous batch DELETE operations on various VMs

MarcoJohnshon

New Member
Nov 14, 2026
2
0
1
Hello and good day to you.

Upon dispatching several DELETE VM requests over ProxMox API on an LVM-Thin storage node, ProxMox VE fails to remove several disks regarding snapshots and the VM itself after multiple attempts of acquiring VM's disks lock.

The log reads:
trying to acquire lock...
trying to acquire lock...
trying to acquire lock...
... cannot remove disk 'snap1-basevm12000'...

This problem stems from running DELETE operations asynchronously, hence if I do it synchronously (delete VMs one by one) with 'purge' and 'destroy_unreferenced_disks' both set to TRUE, it successfully manages to delete all the disks connected to that VM.

Why does this happen? Is this a limitation related to LVM-Thin storage technology?

Many thanks in advance for your attention.
 
In LVM-thin, all the volumes in a pool share the pool’s metadata. Any operation that changes that metadata, such as deleting a disk or a snapshot, has to be serialized, so PVE takes a lock on the whole storage before each one.

How long each delete takes depends on your storage backend. A VM with several disks, snapshots or saved VM state needs several deletes, which adds up. When you send many DELETE requests at once, they all queue on the same lock. Some wait past the lock timeout and give up, and their disks are left behind.

Running deletes in parallel doesn’t make them faster, since they’re processed one at a time underneath anyway. The only gain is “click and forget.” For reliable results, delete one VM at a time per storage: wait for each task to finish (you can poll its task ID through the API) before sending the next request.

This limitation is a combination of LVM and the way PVE uses it, rather than from either one alone.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: MarcoJohnshon
In LVM-thin, all the volumes in a pool share the pool’s metadata. Any operation that changes that metadata, such as deleting a disk or a snapshot, has to be serialized, so PVE takes a lock on the whole storage before each one.

How long each delete takes depends on your storage backend. A VM with several disks, snapshots or saved VM state needs several deletes, which adds up. When you send many DELETE requests at once, they all queue on the same lock. Some wait past the lock timeout and give up, and their disks are left behind.

Running deletes in parallel doesn’t make them faster, since they’re processed one at a time underneath anyway. The only gain is “click and forget.” For reliable results, delete one VM at a time per storage: wait for each task to finish (you can poll its task ID through the API) before sending the next request.

This limitation is a combination of LVM and the way PVE uses it, rather than from either one alone.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
Thank you for your time and detailed response.