[ceph-users] vfs_ceph ignoring quotas

Sergey Malinin hell at newmail.com
Tue Oct 9 05:15:22 PDT 2018


cat /path/to/dir | grep rbytes | awk {'print $2'}
assuming cephfs mount has dirstat option.

Here is the script I used in my environment:

#!/bin/sh

if [ -f "$1/.quota" ]; then
	TOTAL=`cat $1/.quota`
	USED=`cat $1 | grep rbytes | awk {'print $2'}`
	USED=$((USED/1000))
	echo $TOTAL $((TOTAL-USED))
else
	df -k $1 | tail -1 | awk {'print $2,$4'}
fi

> On 9.10.2018, at 13:50, Felix Stolte <f.stolte at fz-juelich.de> wrote:
> 
> That's bad news, but maybe there is a workarround. Samba offers the opportunity to define a custom df command. If I could extract the current utilization or size of a directory with a quota, i think i should be able to write a little df command. The quota is stored as an extended attribute, where can i get its utilization?
> 
> Regards Felix
> 
> 
> On 10/09/2018 10:59 AM, John Spray wrote:
>> On Tue, Oct 9, 2018 at 9:14 AM Felix Stolte <f.stolte at fz-juelich.de> wrote:
>>> Hi folks,
>>> 
>>> i'm running a luminous cluster on Ubuntu 18.04 an want to share folders
>>> on cephfs with samba using the vfs_ceph. Sharing works fine, but the
>>> quotas I set on the directories is ignored and every share reports its
>>> size as the total size of the cephfs. Anyone got this working? Or is the
>>> vfs lacking quota support?
>> Looks like the Samba VFS is always mounting CephFS at the root[1],
>> including if you're exporting a subdir (nfs ganesha used to be this
>> way too) -- CephFS can only do the "magic" quota-based statfs if it
>> knows it's mounting a particular subdir.
>> 
>> John
>> 
>> 1. https://github.com/samba-team/samba/blob/master/source3/modules/vfs_ceph.c#L123
>> 
>>> Regards Felix
>>> 
>>> --
>>> Forschungszentrum Jülich GmbH
>>> 52425 Jülich
>>> Sitz der Gesellschaft: Jülich
>>> Eingetragen im Handelsregister des Amtsgerichts Düren Nr. HR B 3498
>>> Vorsitzender des Aufsichtsrats: MinDir. Dr. Karl Eugen Huthmacher
>>> Geschäftsführung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
>>> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
>>> Prof. Dr. Sebastian M. Schmidt
>>> 
>>> 
>>> _______________________________________________
>>> ceph-users mailing list
>>> ceph-users at lists.ceph.com
>>> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
> 
> -- 
> Felix Stolte
> IT-Services
> Tel.: +49 2461 61-9243
> Email: f.stolte at fz-juelich.de <mailto:f.stolte at fz-juelich.de>
> 
> Forschungszentrum Jülich GmbH
> 52425 Jülich
> Sitz der Gesellschaft: Jülich
> Eingetragen im Handelsregister des Amtsgerichts Düren Nr. HR B 3498
> Vorsitzender des Aufsichtsrats: MinDir. Dr. Karl Eugen Huthmacher
> Geschäftsführung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
> Prof. Dr. Sebastian M. Schmidt
> 
> 
> _______________________________________________
> ceph-users mailing list
> ceph-users at lists.ceph.com <mailto:ceph-users at lists.ceph.com>
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com <http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ceph.com/pipermail/ceph-users-ceph.com/attachments/20181009/3deda86e/attachment.html>


More information about the ceph-users mailing list