Internal Memory full, cant find old LXC container?


I was running an LXC container with Ubuntu as my smart home server and I did my first (test) installation on the internal memory. However it showed there are only 10% of free memory left. So, recently, I set up an internal HDD as dev/sda1 as described in the the tutorials. All works well, but my old LXC Ubuntu seems to be left on the internal disk and I cant seem to locate it. Running commands looking for directory/file sizes only results in biggest files of about 80MiB and total used space of 800MiB.

So where is the rest of the 7GiB?

Any ideas how to resolve this?


I think you still have data in /srv/lxc - when you will mount HDD over existing folder, then you are working with HDD, but the existing data in that folder in internal memory don’t disappear, they will stay there, they are just not accessible at the time you have mounted HDD.

I am not the right one to explain so I will refer to stackexchange where I get this knowledge when I was looking for in past.

Also check this thread: to find out how big are your snapshots.

Stop your LXC containers …go to /etc/lxc/lxc.conf edit accodring to your configuration lxc.lxcpath = /mnt/MyDrive/root_lxc copy all data from old to new location, check if you lxc machines are facing correctly that lxc.lxcpath and restart them :slight_smile:

Thanks for the hints!
The problem is clear now, however it doesnt seem to be resolved easily.

Just changing the path in /etc/lxc/lxc.conf doesnt work. It will not display the VM in LuCi any more. (there are other config files too?)

And copy all data to sda1, then mount it to previous location also doesnt work (doesnt show VMs).
Edit: made a mistake when mounting, that actually works!