lvthin pool space reclamation

M-SK

Member
Oct 11, 2016
46
4
13
53
Hello,

So I've been playing with LV thin pools on our Proxmox cluster recently (via iSCSI SAN).

All its features work as expected (snapshots included), however I've been trying to find Proxmox (or lxc) specific info on how to reclaim disk space in the pool after I delete some files inside a CT.

For Instance, I have a 1TB thin pool and I run a single lxc CT that can expand to 1TB.
I then fill it with 30GB of data. After that, I delete 20GB of data, but both thin pool space used and "df" in the machine point to 30GB still being in use.

Any way I can reclaim 20GB to the pool after file deletion inside CT?
Tried fstrim but that did nothing.

Thanks in advance.
 
fstrim needs to be run on the ct's filesystem, so you have to run it from within the container (or mount the container on the host and run fstrim on the path where you mounted it or use the -a switch).
 
Thanks for the reply.

I tried both "fstrim /" inside CT and mounting lvm and issuing fstrim on mount. Is there anything else that needs to be done beforehand or afterwards?

This is the output on the CT:

fstrim -v /

/: 0 bytes were trimmed

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/san--lun02-vm--117--disk--1 986G 467M 935G 1% /
 

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!