[ceph-users] Re: easy way to find out the number of allocated objects for a RBD image

2024-01-29 Thread Ilya Dryomov
On Sat, Nov 25, 2023 at 7:01 PM Tony Liu wrote: > > Thank you Eugen! "rbd du" is it. > The used_size from "rbd du" is object count times object size. > That's the actual storage taken by the image in backend. Somebody just quoted this sentence out of context, so I feel like I need to elaborate.

[ceph-users] Re: easy way to find out the number of allocated objects for a RBD image

2023-11-25 Thread Anthony D'Atri
If there’s a filesystem on the volume, running fstrim or mounting with the discard option might significantly reduce usage and block count. > On Nov 25, 2023, at 1:02 PM, Tony Liu wrote: > > Thank you Eugen! "rbd du" is it. > The used_size from "rbd du" is object count times object size. >

[ceph-users] Re: easy way to find out the number of allocated objects for a RBD image

2023-11-25 Thread Tony Liu
Thank you Eugen! "rbd du" is it. The used_size from "rbd du" is object count times object size. That's the actual storage taken by the image in backend. For export, it actually flattens and also sparsifies the image. In case of many small data pieces, the export size is smaller than du size.

[ceph-users] Re: easy way to find out the number of allocated objects for a RBD image

2023-11-25 Thread Eugen Block
Maybe I misunderstand, but isn’t ’rbd du‘ what you're looking for? Zitat von Tony Liu : Hi, Other than get all objects of the pool and filter by image ID, is there any easier way to get the number of allocated objects for a RBD image? What I really want to know is the actual usage of an