Ceph Thin Provisioning

gdi2k

Renowned Member
Aug 13, 2016
83
1
73
I installed a DVR virtual machine to record some CCTV cameras on my PVE 4.4-13/7ea56165 cluster, using Ceph (Hammer) as the storage backend. I created a 1.5 TB disk on Ceph, allocated to the VM.

Over time, the disk began to fill with recordings (over 1 TB), and I found myself lower on storage than I expected on Ceph (it displays raw storage, not usable storage in the graphs and charts).

So I set the DVR software to always leave 1 TB free, which it did. Now the disk is only 500 GB full, with 1 TB free. I was expecting to gain back that 1 TB in usable space on Ceph due to thin provisioning, but that doesn't seem to have happened.

Is there anything I need to do to enable thin provisioning on the guest or something like that so the space is reallocated back to the cluster so it can be used?
 
You need to make sure within Proxmox discard is enabled on the disk in question.

Then within the VM run a fstrim to clear the 0 space, this will take a while for 1TB to clear.
 

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!