[ceph-users] Re: cephfs quota used

2021-12-17 Thread Jesper Lykkegaard Karlsen
Thanks Konstantin, Actually, I went a bit further and made the script more universal in usage: ceph_du_dir: # usage: ceph_du_dir $DIR1 ($DIR2 .) for i in $@; do if [[ -d $i && ! -L $i ]]; then echo "$(numfmt --to=iec --suffix=B --padding=7 $(getfattr --only-values -n ceph.dir.rbytes $i

[ceph-users] Re: cephfs quota used

2021-12-17 Thread Konstantin Shalygin
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 wrote: >

[ceph-users] Re: cephfs quota used

2021-12-16 Thread Jesper Lykkegaard Karlsen
sen Sendt: 16. december 2021 23:07 Til: Jean-Francois GUILLAUME Cc: Robert Gallop ; ceph-users@ceph.io Emne: [ceph-users] Re: cephfs quota used Brilliant, thanks Jean-François Best, Jesper -- Jesper Lykkegaard Karlsen Scientific Computing Centre for Structural Biol

[ceph-users] Re: cephfs quota used

2021-12-16 Thread Jesper Lykkegaard Karlsen
Fra: Jean-Francois GUILLAUME Sendt: 16. december 2021 23:03 Til: Jesper Lykkegaard Karlsen Cc: Robert Gallop ; ceph-users@ceph.io Emne: Re: [ceph-users] Re: cephfs quota used Hi, You can avoid using awk by passing --only-values to getfattr. This should look

[ceph-users] Re: cephfs quota used

2021-12-16 Thread Jesper Lykkegaard Karlsen
Biology and Genetics Aarhus University Gustav Wieds Vej 10 8000 Aarhus C E-mail: je...@mbg.au.dk Tlf:+45 50906203 Fra: Jesper Lykkegaard Karlsen Sendt: 16. december 2021 14:37 Til: Robert Gallop Cc: ceph-users@ceph.io Emne: [ceph-users] Re: cephfs quota used

[ceph-users] Re: cephfs quota used

2021-12-16 Thread Jesper Lykkegaard Karlsen
: ceph-users@ceph.io Emne: [ceph-users] Re: cephfs quota used Just tested: getfattr -n ceph.dir.rbytes $DIR Works on CentOS 7, but not on Ubuntu 18.04 eighter. Weird? Best, Jesper -- Jesper Lykkegaard Karlsen Scientific Computing Centre for Structural Biology Department

[ceph-users] Re: cephfs quota used

2021-12-16 Thread Jesper Lykkegaard Karlsen
Wieds Vej 10 8000 Aarhus C E-mail: je...@mbg.au.dk Tlf:+45 50906203 Fra: Robert Gallop Sendt: 16. december 2021 13:42 Til: Jesper Lykkegaard Karlsen Cc: ceph-users@ceph.io Emne: Re: [ceph-users] Re: cephfs quota used >From what I understand you used to be a

[ceph-users] Re: cephfs quota used

2021-12-16 Thread Jesper Lykkegaard Karlsen
Thanks everybody, That was a quick answer. getfattr -n ceph.dir.rbytes $DIR Was the answer that worked for me. So getfattr was the solution after all. Is there some way I can display all attributes, without knowing them in forehand? I have tried: getfattr -d -m 'ceph.*' $DIR which gives me

[ceph-users] Re: cephfs quota used

2021-12-16 Thread Sebastian Knust
Hi Jasper, On 16.12.21 12:45, Jesper Lykkegaard Karlsen wrote: Now, I want to access the usage information of folders with quotas from root level of the cephfs. I have failed to find this information through getfattr commands, only quota limits are shown here, and du-command on individual

[ceph-users] Re: cephfs quota used

2021-12-16 Thread Loic Tortay
On 12/16/21 12:45 PM, Jesper Lykkegaard Karlsen wrote: > Hi all, > > Cephfs quota work really well for me. > A cool feature is that if one mounts a folder, which has quotas enabled, then > the mountpoint will show as a partition of quota size and how much is used > (e.g. with df command), nice!