On Fri, Aug 09, 2019 at 12:44:42PM -0400, Frank R wrote: > I have an all RBD pool/cluster. I am interested in tracking how much disk > space is being used by each RBD image on every OSD drive. > > The OSDs are Filestore. > > Does anyone know of any existing scripts that accomplish this task? > > If not, what commands can be used to generate this info? 1) use `rbd info $pool/$image` to get object name prefix for this image (block_name_prefix field); 2) use `rados -p $pool ls | grep "^$block_name_prefix"` to generate a list of all existing objects for this image; 3) for every object from the list use `rados -p $pool stat $object` to get its size; 4) for every object from the list use `ceph osd map $pool $object` to get its location; 5) group obtained data by osd. Though I expect it will be very slow. For Filestore, instead of using `rados` and `ceph osd map` you could ssh to every osd node and use e.g. find+stat to get necessary data for all files (objects) with $block_name_prefix in their name. -- Mykola Golub _______________________________________________ ceph-users mailing list -- ceph-users@xxxxxxx To unsubscribe send an email to ceph-users-leave@xxxxxxx