LXC Container cannot be deleted

dody0007

Member
Feb 27, 2022
3
0
6
42
Hello everyone,

I wanted to delete an LXC container. Unfortunately that doesn't work. I've attached the error as a screenshot.
Maybe you can help me. I've searched half the internet and can't find a solution. I have also removed the 101.conf from the /nodes/pve/lxc directory. As a result, the container is no longer displayed to me, but the storage space of 20GB is still occupied.
I'm really in despair.

Greets
 

Attachments

  • error proxmox.png
    error proxmox.png
    30.6 KB · Views: 24
  • error proxmox2.png
    error proxmox2.png
    105.7 KB · Views: 25
  • error proxmoxssh.png
    error proxmoxssh.png
    36.9 KB · Views: 23
I've tried, but can't get any further. after entering "lsof | grep "253,25" I get a strange output, see screenshot
 

Attachments

  • error proxmoxssh1.png
    error proxmoxssh1.png
    89.5 KB · Views: 9
  • error proxmoxssh2.png
    error proxmoxssh2.png
    67.4 KB · Views: 8
Generally when a guide asks you to run a command and it contains something like : dmsetup info -c | grep [lvname]
that means you need to replace [lvname] with an actual lvname, in your case pv-vm--101--disk-0
It wants to find numbers that are in second and third column, so you can supply them to the next command.

This may be more targeted for you: https://www.thegeekdiary.com/logica...esystem-in-use-while-removing-lvm-filesystem/

Its the first google search result for "lvremove contains a filesystem in use" ...


Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:
Having this issue with a couple of containers i have shutdown and tried to delete.
They have been shutdown for a few months now, and im just doing some spring cleaning.
Failing to remove them with the same error, disk in use.

Tried the solutions in both of the links with no luck.

dmsetup returns nothing.
lsof returns nothing

Tried just deactivating the logical volumes with lvchange but fails because.. disk is in use.

Pretty sure i will solve the issue with a reboot, but i have 10'ish other production servers running on that node.
If anyone have any more suggestions ill be happy.. :)

Edit: I checked if the disks are mounted in any other containers, they are not.
 
Last edited: