[Dovecot] 1.0 roadmap - fs quota problem

Dumitru Negara dumitru at itcnetworks.ro
Mon Jun 12 21:48:09 EEST 2006


Timo Sirainen wrote:
> On Mon, 2006-06-12 at 17:56 +0300, Dumitru Negara wrote:
>> Timo Sirainen wrote:
>>> On Mon, 2006-06-12 at 17:12 +0300, Dumitru Negara wrote:
>>>> # repquota -u /dev/sda9
>>> Could you run it through strace and show me the quotactl() call it does?
>>> Or does it do a quotactl() call at all?
>
> So I looked through repquota's sources and it looks like XFS has its own
> Q_XGETQSTAT quota command which needs to be used with it. I think I'm
> not going to bother figuring out how it's supposed to be used. Patches
> welcome.
>
OK, let's do it again :) ... with ext3 partition.

I copied my home to /var which is an ext3 fs.

# mount|grep sda6
/dev/sda6 on /var type ext3 (rw,usrquota)

# cat /etc/mtab |grep sda6
/dev/sda6 /var ext3 rw,usrquota 0 0

# quotaoff -p /var
group quota on /var (/dev/sda6) is off
user quota on /var (/dev/sda6) is on

# repquota -u /dev/sda6|grep dumitru
dumitru   --  559868 5242880 5451776          16397     0     0


/etc/dovecot/dovecot.conf:
...
mail_executable = /usr/bin/strace -o /tmp/dovecot.log /usr/lib/dovecot/imap
...
Output of strace:
==============================================
...
gettimeofday({1150135839, 275393}, {4294967116, 0}) = 0
read(0, "3 getquotaroot \"INBOX.ITC\"\r\n", 4074) = 28
setsockopt(1, SOL_TCP, TCP_CORK, [1], 4) = 0
stat64("/var/home/dumitru/Maildir/.INBOX.ITC", 
{st_mode=S_IFDIR|S_ISGID|0700, st_size=4096, ...}) = 0
lstat64("/var/home/dumitru/Maildir/.INBOX.ITC/cur", 
{st_mode=S_IFDIR|S_ISGID|0700, st_size=4096, ...}) = 0
lstat64("/var/home/dumitru/Maildir/.INBOX.ITC/new", 
{st_mode=S_IFDIR|S_ISGID|0700, st_size=4096, ...}) = 0
lstat64("/var/home/dumitru/Maildir/.INBOX.ITC/tmp", 
{st_mode=S_IFDIR|S_ISGID|0700, st_size=4096, ...}) = 0
stat64("/var/home/dumitru/Maildir/.INBOX.ITC", 
{st_mode=S_IFDIR|S_ISGID|0700, st_size=4096, ...}) = 0
stat64("/var/home/dumitru/Maildir/.INBOX.ITC", 
{st_mode=S_IFDIR|S_ISGID|0700, st_size=4096, ...}) = 0
stat64("/var/home/dumitru/Maildir/.INBOX.ITC/dovecot-shared", 
0xbfd4bdb0) = -1 ENOENT (No such file or directory)
time(NULL)                              = 1150135839
quotactl(Q_GETQUOTA|USRQUOTA, "/dev/sda6", 1048, {0, 135123624, 
3086145476, 3086145476, 135123520, 135078840, 3218390664, 134938342}) = 
-1 EINVAL (Invalid argument)
write(2, "\1Equotactl(Q_GETQUOTA, /dev/sda6"..., 59) = 59
gettimeofday({1150135839, 276398}, NULL) = 0
write(1, "* QUOTAROOT \"INBOX.ITC\" \"\"\r\n* BA"..., 101) = 101
setsockopt(1, SOL_TCP, TCP_CORK, [0], 4) = 0
gettimeofday({1150135839, 276578}, NULL) = 0
...
==============================================

Log:
Jun 12 21:10:39 debian dovecot: imap-login: Login: user=<dumitru>, 
method=plain, rip=10.2.5.3, lip=10.2.5.4
Jun 12 21:10:39 debian dovecot: IMAP(dumitru): quotactl(Q_GETQUOTA, 
/dev/sda6) failed: Invalid argument


Dumitru



More information about the dovecot mailing list