[Dovecot] NFS quota: hard or soft

Timo Sirainen tss at iki.fi
Mon Oct 20 13:32:51 EEST 2008


On Oct 20, 2008, at 1:21 PM, Edgar Fuß wrote:

>> Dovecot doesn't try to enforce filesystem quota limits.
> I'm admittedly feeling utterly stupid in trying to tell an author  
> what his programm is doing, but ...
>
>> It just handles the EDQUOT error from write().
> ... I ktrace'd imap and there was no failing write(), only  
> suspicious rpcs to the file server.
>
>> So the only thing that the fs quota plugin does is report the  
>> limits and
>> current usage to clients via IMAP QUOTA commands.
> I thought the latter was the job of the imap-quota plugin?
>
> I read the code and verified by attaching gdb to a running imap  
> proces that there is the following code path leading to enforcement  
> of NFS soft quotas:
>
> v.copy -> quota_copy() -> quota_check() -> quota_try_alloc() ->  
> quota_test_alloc() -> quota_tracsaction_set_limits() ->  
> quota_get_resource() -> fs_quota_get_resource() -> do_quota().
>
> I don't see an easy way to fix this. If one wants the IMAP GETQUOTA  
> command to report the soft limits (which I find reasonable) but  
> continue allowing allocation up to the hard limit (which I find  
> mandatory), one must either teach the whole quota system about hard/ 
> soft limits or keep it from enforcing the (soft) limits if the fs is  
> going to enforce them anyway.

Oh, right, I forgot there is nowadays also quota checking so that  
clients don't have to waste time uploading messages only to have the  
rejected. It's an easy fix though:

quota = fs:user:noenforcing

I guess I should add all these extra parameters to the wiki page..
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20081020/7d512d03/attachment.bin 


More information about the dovecot mailing list