Proxmox LXC increasingly occupies more storage space

elbobo

New Member
Apr 1, 2023
3
0
1
I am running a Proxmox v. 6.4-15 server hosted on a VM to host two LXC containers. Back when this machine was first deployed, it was as a means to urgently move the first of these LCXs to a new server as its original host was to be retired. What I did back then, knowing little to nothing about Proxmox, was to copy the ".raw" disk of the LXC and rebuild it on the new virtual server.

Since then the LXC works fine but I see a steady increase on the storage space it occupies, which -I am afraid- will lead to Proxmox running out of space.

I would greatly appreciate any help to troubleshoot this issue.

Thanks in advance for your reply.
 
@leesteken

First of all, thank you for your reply. What you suggest is to first shutdown the LXC (vmid: 440) and then run the command "pct fstrim 440" on the host cli (not on the LXC), am I right?
 
First of all, thank you for your reply. What you suggest is to first shutdown the LXC (vmid: 440)
Yes but I don't know if that's really necessary. Make a back-up first, since you cannot trust the advice of a random stranger on the internet.
EDIT: A quick test shows it works fine when the container is running, but those were not in RAW-file format. Shutdown does make your backup more reliable (no open files).
and then run the command "pct fstrim 440" on the host cli (not on the LXC), am I right?
Yes, run pct fstrim 440 (as root or sudo) on the console of the Proxmox host (or Shell inside the Proxmox GUI or via SSH or other terminal interface).
 
Last edited:
Thanks again. I am planning some maintenance later this evening where I will take a backup of the LXC and then try your suggestion. I will keep the thread up to date when I have any results.
 

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!