[lustre-discuss] Size difference between du and quota

Laifer, Roland (SCC) roland.laifer at kit.edu
Thu May 21 03:38:41 PDT 2015


Hi all,

I want to make you aware that a Lustre bug might be the reason for
wrong Lustre quotas, see LU-4345.

With this bug chgrp or chown with only UID or GID specified can create
an arbitrary GID or UID for OST objects on the ldiskfs level.
This causes wrong Lustre quotas because they are computed from
ldiskfs quotas. As administrator you can check with debugfs if the
problem exists for a special OST object. However, fixing a file system
with millions of objects is hardly possible. According to our
discussions with support the filesystem check of Lustre 2.6 is able
to repair the owner/group of OST objects.

Note that only block (capacity) quotas are affected by the problem
reported above. You can also check the number of directories with the
find command. Adding this to the number of files should provide the
value in the file column of the lfs quota command. If this does not
match I would follow Scott's recommendation and search for an
outside directory.

Regards,
   Roland

Am 20.05.2015 um 16:50 schrieb Scott Nolin:
> Another thing to think about is does he perhaps own files outside of his
> directory? The quota is on the volume but you are only doing du on the
> directory.
>
> Even if he's not aware of it, things can happen like people using rsync
> and preserving ownership. The original owner's usage then goes up.
>
> Scott
>
> On 5/20/2015 3:50 AM, Phill Harvey-Smith wrote:
>> Hi all,
>>
>> One of my users is reporting a massive size difference between the
>> figures reported by du and quota.
>>
>> doing a du -hs on his directory reports :
>>   du -hs .
>> 529G    .
>>
>> doing a lfs quota -u username /storage reports
>> Filesystem  kbytes   quota   limit   grace   files   quota   limit
>> grace
>> /storage 621775192  640000000 640010000       -  601284  1000000 1100000
>>        -
>>
>> Though this user does have a lot of files :
>>
>> find . -type f | wc -l
>> 581519
>>
>> So I suspect that it is the typical thing that quota is reporting used
>> blocks whilst du is reporting used bytes, which can of course be wildly
>> different due to filesystem overhead and wasted unused space at the end
>> of files where a block is allocated but only partially used.
>>
>> Is this likely to be the case ?
>>
>> I'm also not entirely sure what versions of lustre the client machines
>> and MDS / OSS servers are running, as I didn't initially set the
>> system up.
>>
>> Cheers.
>>
>> Phill.
>>
>> _______________________________________________
>> lustre-discuss mailing list
>> lustre-discuss at lists.lustre.org
>> http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org


More information about the lustre-discuss mailing list