Ceph usage space

vaschthestampede

Well-Known Member
Oct 21, 2020
133
8
58
39
I'm just starting to experiment with Ceph.
For now I have excellent feedback but also some things I don't understand.
The occupation of the pool is one of them.

For example, in the test station I have two virtual machines, one a clone of the other.
Both have a 320GB drive and the occupied space is 23.4GB.
Ceph reports me a used space of 28.95GB.

It occurs to me that Ceph has some native deduplication, is that right?
Where can I check the files (in this case the disk images) present in the Ceph pools?

I run Proxmox VE 6.3-2 and Ceph 15.2.
 
If you run rbd -p <pool> du you will get a list of VM images, their set size and how much of it is used. Ceph RBD images are thin provisioned. Meaning that only actually used blocks in the VM disk will use space in Ceph. If you enabled "discard" for the VM disks, you can run discard/trim in the VM which will tell the underlying storege (Ceph in that case) which parts can be nulled once you remove files.
 
We made a test VM, with 13 GB utilization in it - Windows Server 2022

checked the space in the ceph

1706154565419.png

copied some 2GB of data into it.. now it reports

1706154311367.png

I deleted the copied data to verify its usage, but no impovement, it still reports 15GB

1706154451477.png

I ran disk optimisation inside the OS to trim (maybe I am wrong in this procedure)

1706154671661.png

But again after this the same result, the storage utilization did not reduce in ceph after the deletion of the 2GB files and optimization in windows. But strangely the space utilized by windows is 25.4G but only 15 GB in CEPH, which is confusing me further.

1706154506639.png

any ideas, the VM has - Discard on and SSD emulation on as well.

Thanks in Advance

Team Deepcloud
 
Is the "discard" option enabled for the disk disk image of the VM? Otherwise discard/trim operations are not passed through to the storage layer.
 
With a linked clone, only the deltas are written into the new image, so the assignment in CEPH will also be correct.

The usage in CEPH also decreases as soon as a trim has run.
You can simply write 2 GB again and see whether the usage then goes to 17 GB or stays at 15 GB because the old blocks were used again.
 
With a linked clone, only the deltas are written into the new image, so the assignment in CEPH will also be correct.

The usage in CEPH also decreases as soon as a trim has run.
You can simply write 2 GB again and see whether the usage then goes to 17 GB or stays at 15 GB because the old blocks were used again.
Let me try
and do this test without a linked clone too and report the findings
 
Let me try
and do this test without a linked clone too and report the findings
I created a fresh Windows 2019 VM now and did updates, and it consumed about 20 GB space, also reflected by ceph usage.

I downloaded a 10 GB DVD ISO image and the utilization jumped to 37 GB in ceph (why 37G and not 30G is a different story), now I deleted this image but the ceph utilization remains at 37 GB.
I optimized the drive in Windows to initiate trim, still no luck, ceph usage remains at 37 GB. I have discard enabled on it.

any bright ideas, anyone. I can share screenshots if required