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.