Proxmox VE - TASK ERROR: CT is locked (snapshot-delete)
During an issue with a defective storage solution, I had temporarily (as in not added to fstab) mounted an external USB disk under
/mnt/usb-disk on a Proxmox server to keep the backups flowing. A day and a reboot later, those backups started to fill up the local storage instead with unfortunate consequences. As they say, you really can’t fix stupid.
Examining the LXC container
To be able to start up this LXC container again, it will be necessary to remove the lock. By examining the configuration file for the LXC container with the id of 107, we can observe the lock status and an additional entry for the vzdump backup utility:
# /etc/pve/lxc/107.conf arch: amd64 cores: 4 hostname: example.net lock: snapshot-delete </snip> [vzdump] #vzdump backup snapshot arch: amd64 </snip>
Unlocking the LXC container with the pct tool
Proxmox VE provides the pct tool to manage Linux containers (LXC). To manually have the lock removed, simply issue the command
pct unlock 107. This removes the lock on container 107. Deleting the failed snapshot can be performed by issuing the command
pct delsnapshot 107 vzdump.
Please refer to
man pct for more detailed instructions.