Leftover Snapshots not possible to delete?

May 6, 2021
38
1
13
Bern, Switzerland
Hello guys

Today I had a view into the storage/disks of the nodes in our cluster and found some leftovers.
Dunno, how we arrived to have them.
Usually one needs to check the «Delete unreferenced disks» checkbox while deleting a vm. Does this checkbox automatically also include snapshots?
As we have this leftovers, they are impossible to delete. perhaps because the vm number has been reassigned?

Code:
Example of our cluster:
pve-01:/etc/pve$ sudo rbd -p capacity info vm-102-disk-0
rbd image 'vm-102-disk-0':
    size 16 GiB in 4096 objects
    order 22 (4 MiB objects)
    snapshot_count: 0
    id: b7ac51319aba11
    block_name_prefix: rbd_data.b7ac51319aba11
    format: 2
    features: layering, exclusive-lock, object-map, fast-diff, deep-flatten
    op_features:
    flags:
    create_timestamp: Thu Sep 16 16:07:36 2021
    access_timestamp: Sun May 28 22:00:29 2023
    modify_timestamp: Wed May 31 12:51:41 2023

pve-01:/etc/pve$ sudo rbd -p capacity info vm-102-state-pre_install_packetfence
rbd image 'vm-102-state-pre_install_packetfence':
    size 653 MiB in 164 objects
    order 22 (4 MiB objects)
    snapshot_count: 0
    id: bd8a71826a77a1
    block_name_prefix: rbd_data.bd8a71826a77a1
    format: 2
    features: layering, exclusive-lock, object-map, fast-diff, deep-flatten
    op_features:
    flags:
    create_timestamp: Thu Aug 26 14:54:17 2021
    access_timestamp: Thu Aug 26 14:54:17 2021
    modify_timestamp: Thu Aug 26 14:54:17 2021

They are having the same vm number (102) but the first disk is the currently running smpt-server, while the secondary disk is a leftover from the old packetfence, that was running as vm number 102.
Trying to delete the secondary disk, pve says no no, this disk is part of the running 102. But in the detail config of 102, these disks are not showing neather in Hardware/Disk nor in Snapshot.
 
You can manually remove the mwith rbd rm …. The state one should be no problem. For the other, make double sure that vm-102-disk-0 is not used by the current VM 102.

Alternatively, you could run qm rescan --vmid 102. Then the vm-102-disk-0 should be added as an unused disk to the VM, which you can then delete via the GUI.
 
  • Like
Reactions: Jackobli
You can manually remove the mwith rbd rm …. The state one should be no problem. For the other, make double sure that vm-102-disk-0 is not used by the current VM 102.

Alternatively, you could run qm rescan --vmid 102. Then the vm-102-disk-0 should be added as an unused disk to the VM, which you can then delete via the GUI.
Ok, so the «Warning»/«Check» in the PVE-GUI is just a hinder for the thick tumb to not erreanously remove the wrong disk file.

The vm-102-disk-0 may not be deleted, this is the actual disk of the actual running vm 102 ;)

I was able to remove the wrong/old images with rbd rm… Thank you.

But to avoid such a situation:
  • Will snapshots be deleted by a regular remove of a vm? Or just, if the Checkbox «Delete unreferenced disks» is checked?
  • Or have they be deleted befor the removal of the vm independently?
 

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!