Proxmox does not allow deleting CT with missing LVM volumes but does for VMs

shodan

Active Member
Sep 1, 2022
235
66
33
Hi,

I am salvaging a broken system, I'm copying and deleting the thin volumes manually as I determine they are no longer needed.
Some are on a disk no longer in the system.

I could delete VMs with missing thin volumes, however I just discovered this behaviour is inconsistent when trying to delete LXC containers.

When you try that it gives as error as follows.

1760156178778.png

Destroy CT destroy command should work even if the volume is no longer present

Code:
root@proxmox2:~# pct destroy 1075
storage 'local-14tb-lvm' is not available on node 'proxmox2'
root@proxmox2:~# find /etc/ | grep 1075
/etc/pve/nodes/proxmox2/lxc/1075.conf
root@proxmox2:~# cat /etc/pve/nodes/proxmox2/lxc/1075.conf
arch: amd64
cmode: shell
cores: 4
features: nesting=1
hostname: mail
memory: 2000
net0: name=eth0,bridge=vmbr0,firewall=0,hwaddr=DE:AD:BE:EF:79:55,ip=dhcp,ip6=manual,type=veth
ostype: debian
rootfs: local-14tb-lvm:vm-1075-disk-0,size=16G
swap: 512
unprivileged: 1
root@proxmox2:~#
 
Hi,

storage 'local-14tb-lvm' is not available on node 'proxmox2'
means that the LXC container 1075 is referencing a storage volume (local-14tb-lvm) that is not accessible or not configured on the current node that can be expected in your case.
You can try to remove config manually
Code:
rm /etc/pve/nodes/proxmox2/lxc/1075.conf

This should remove the container definition from ProxmoxVE UI and CLI.
 
Yes, this is is what I've done.
This is why I believe this is a bug, the webui should not have failed at this task.