Or you can mount with 'dirstat' option and use 'cat .' for determine CephFS 
stats:

alias fsdf="cat . | grep rbytes | awk '{print \$2}' | numfmt --to=iec 
--suffix=B"

[root@host catalog]# fsdf
245GB
[root@host catalog]#


Cheers,
k

> On 17 Dec 2021, at 00:25, Jesper Lykkegaard Karlsen <je...@mbg.au.dk> wrote:
> 
> Anyway, I just made my own ceph-fs version of "du".
> 
> ceph_du_dir:
> 
> #!/bin/bash
> # usage: ceph_du_dir $DIR
> SIZE=$(getfattr -n ceph.dir.rbytes $1 2>/dev/null| grep "ceph\.dir\.rbytes" | 
> awk -F\= '{print $2}' | sed s/\"//g)
> numfmt --to=iec-i --suffix=B --padding=7 $SIZE
> 
> Prints out ceph-fs dir size in "human-readble"
> It works like a charm and my god it is fast!.....
> 
> Tools like that could be very useful, if provided by the development team 🙂

_______________________________________________
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-le...@ceph.io

Reply via email to