Cyrus Quota vs. du

Andrew Morgan morgan at orst.edu
Wed May 2 12:48:20 EDT 2007


On Wed, 2 May 2007, Peter A. Friend wrote:

> On May 2, 2007, at 8:51 AM, Dana Canfield wrote:
>
>> We've been slowly phasing in mail quotas and I've discovered that the quota 
>> usage reported by cyrus doesn't match a du for that same user.  In fact, I 
>> can't find any user where the reports *do* match.  Is this a sign of quota 
>> corruption, or am I overlooking something about how the quotas work?
>> 
>> Here are some examples to show what I'm checking:
>> 
>> [root at balrog ~]# du -s /var/spool/imap/e/user/efreem
>> 1068664 /var/spool/imap/e/user/efreem
>> [root at balrog ~]# du -s /var/spool/imap/a/user/austin
>> 1178924 /var/spool/imap/a/user/austin
>> 
>> [root at balrog efreem]# cyradm --user cyrus localhost
>> localhost.localdomain> lq user.efreem
>> STORAGE 904193/2000000 (45.20965%)
>> localhost.localdomain>  lq user.austin
>> STORAGE 703056/1000000 (70.3056%)
>
> The du utility reports usage in terms of blocks, not bytes. This is a major 
> drawback of maildir type systems, they can have nasty partial block 
> overheads.

Also, 'du' will include the size of the cyrus.index, cyrus.header, and 
cyrus.cache files.  Cyrus' quota does not include those files.

 	Andy


More information about the Info-cyrus mailing list