[SOLVED] Can't delete volume from container because the volume's underlying storage no longer exists

poppadum

New Member
Nov 29, 2023
5
0
1
Proxmox VE 7.4-17

I temporarily attached an external USB disk to my Proxmox node and added it to DataCenter->Storage in the GUI. I then attached a VM disk on this storage to a container (disk name is usbRetro:105/vm-105-disk-0.raw)

Stupidly I removed the storage entry, forgetting that I still had a (unused) volume attached to a running container, and now I can't seem to remove the volume. The GUI for the container shows the unused disk crossed out, but it doesn't disappear after stopping and restarting the container.

Running pct config 105 doesn't show the unused disk in the container config
Running find / -name 'vm-105-disk-*' finds nothing

I only discovered my mistake when pve7to8 warned me about it:
Code:
WARN: CT 105 - volume 'usbRetro:105/vm-105-disk-0.raw' (in config) - storage does not exist!

Can anyone advise how to recover from this mistake? TIA
 
Hi,
you could check if the storage is still present in the config file. You would find that at /etc/pve/lxc/105.conf or if you are accessing it from a different node in a cluster /etc/pve/nodes/<node>/lxc/105.conf.
 
you could check if the storage is still present in the config file.

Ah, thank you - it is showing as pending deletion in the config file:

Code:
[pve:pending]
delete: unused0

How do I get it to actually get it go away? When I shut down the container and then restart, pct start reports
Code:
unable to apply pending change unused0 : storage 'usbRetro' does not exist

Is it safe to just edit the config file while the container is stopped?
 
Yes, in this case you should have no problems editing the file.
 

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!