[SOLVED] LVM-Thin storage issue - removing old state files

mike-homelab

Member
Apr 3, 2021
2
0
6
74
I was messing around with my proxmox host and wanted to test out clustering with another server I had available. I did not rtfm and was not aware you can't easily reverse moving to a cluster.

So, I hit it with a hammer and re-installed and reconfigured proxmox on the original server. After configuring all of my previous VMs, I noticed in the LVM-Thin storage "VM Disks" page, it shows a bunch of old snapshots from the previous proxmox setup for a number of VMs.

When I try to remove them from this page it gives me the error "Cannot remove image, a guest with VMID 'xxx' exists! You can delete the image from the guest's hardware panel". These old snapshots do not show up on the panel for the newly configured VM, so I cannot remove them, at least in the GUI. Is there some way to remove snapshots directly from CLI?
 
Last edited:
Hi,
yes, you'll need to use the CLI (for now, we might rework the GUI to be able to remove such stale snapshots in the future). With lvs you can list all logical volumes, and with lvremove you can delete the stale ones. For example:
Code:
lvremove pve/snap_vm-128-disk-0_snapname
lvremove pve/vm-128-state-snapname
Of course double check you got the right one ;)
 
Hi,
yes, you'll need to use the CLI (for now, we might rework the GUI to be able to remove such stale snapshots in the future). With lvs you can list all logical volumes, and with lvremove you can delete the stale ones. For example:
Code:
lvremove pve/snap_vm-128-disk-0_snapname
lvremove pve/vm-128-state-snapname
Of course double check you got the right one ;)

That works perfectly. Thanks!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!