Hi,
I've seen you commited a lot of quota work tonight. I'm still unable to get the filesystem quota working, and I wonder if it's just me that is stupid, or if theres a bug somewhere.
I enable quota and imap_quota plugins, I set fs in my ldap-base for quota, and logons. I then get this:
dovecot: imap(ingvild): fs quota add storage dir = /home/ingvild/Maildir dovecot: imap(ingvild): fs quota: mount path for /home/ingvild/Maildir not found from /etc/mtab
In my logs...
Anyone knows the problem?
Best regards, Stian
On Mon, 2006-03-06 at 22:51 +0100, Stian Jordet wrote:
Hi,
I've seen you commited a lot of quota work tonight. I'm still unable to get the filesystem quota working, and I wonder if it's just me that is stupid, or if theres a bug somewhere.
I enable quota and imap_quota plugins, I set fs in my ldap-base for quota, and logons. I then get this:
dovecot: imap(ingvild): fs quota add storage dir = /home/ingvild/Maildir dovecot: imap(ingvild): fs quota: mount path for /home/ingvild/Maildir not found from /etc/mtab
What OS? Does /home exist in /etc/mtab? What filesystem is it?
I get this far in my Debian (I don't have quota enabled):
quotactl(Q_GETQUOTA, /dev/hda1) failed: Invalid argument
man, 06,.03.2006 kl. 23.58 +0200, skrev Timo Sirainen:
On Mon, 2006-03-06 at 22:51 +0100, Stian Jordet wrote:
Hi,
I've seen you commited a lot of quota work tonight. I'm still unable to get the filesystem quota working, and I wonder if it's just me that is stupid, or if theres a bug somewhere.
I enable quota and imap_quota plugins, I set fs in my ldap-base for quota, and logons. I then get this:
dovecot: imap(ingvild): fs quota add storage dir = /home/ingvild/Maildir dovecot: imap(ingvild): fs quota: mount path for /home/ingvild/Maildir not found from /etc/mtab
What OS? Does /home exist in /etc/mtab? What filesystem is it?
I get this far in my Debian (I don't have quota enabled):
quotactl(Q_GETQUOTA, /dev/hda1) failed: Invalid argument
It's Debian as well, on x86. And yes, /home is in mtab
root@buick:~/cvs/dovecot# cat /etc/mtab /dev/hdb1 / ext3 rw,errors=remount-ro 0 0 proc /proc proc rw 0 0 sysfs /sys sysfs rw 0 0 usbfs /proc/bus/usb usbfs rw 0 0 tmpfs /dev/shm tmpfs rw 0 0 devpts /dev/pts devpts rw,gid=5,mode=620 0 0 /dev/hdc1 /backup xfs rw 0 0 /dev/hda1 /home ext3 rw,usrquota 0 0 tmpfs /dev tmpfs rw,size=10M,mode=0755 0 0 root@buick:~/cvs/dovecot#
The filesystem is (as you can see) ext3. I was previously using xfs, but found out it had a different quota api, so I migrated to give dovecot a fair chance of working ;)
Thanks for your incredibly great work on dovecot!
Best regards, Stian
On Mon, 2006-03-06 at 23:01 +0100, Stian Jordet wrote:
dovecot: imap(ingvild): fs quota add storage dir = /home/ingvild/Maildir dovecot: imap(ingvild): fs quota: mount path for /home/ingvild/Maildir not found from /etc/mtab .. /dev/hda1 /home ext3 rw,usrquota 0 0
So, what do these say:
stat /dev/hda1 stat /home stat /home/ingvild/Maildir
søn, 02,.04.2006 kl. 20.33 +0300, skrev Timo Sirainen:
So, what do these say:
stat /dev/hda1 stat /home stat /home/ingvild/Maildir
root@buick:~# stat /dev/hda1 File: �/dev/hda1� Size: 0 Blocks: 0 IO Block: 4096 block special file Device: ch/12d Inode: 10349 Links: 1 Device type: 3,1 Access: (0660/brw-rw----) Uid: ( 0/ root) Gid: ( 6/ disk) Access: 2006-03-26 20:47:23.000000000 +0200 Modify: 2006-03-26 22:46:19.997425750 +0200 Change: 2006-03-26 22:46:19.000000000 +0200 root@buick:~# stat /home File: �/home� Size: 4096 Blocks: 8 IO Block: 4096 directory Device: 301h/769d Inode: 2 Links: 14 Access: (2775/drwxrwsr-x) Uid: ( 0/ root) Gid: ( 50/ staff) Access: 2006-04-02 18:25:33.000000000 +0200 Modify: 2006-03-26 20:47:23.000000000 +0200 Change: 2006-03-26 20:47:23.000000000 +0200 root@buick:~# stat /home/ingvild/Maildir/ File: �/home/ingvild/Maildir/� Size: 4096 Blocks: 8 IO Block: 4096 directory Device: 301h/769d Inode: 2916357 Links: 18 Access: (0700/drwx------) Uid: ( 1001/ ingvild) Gid: ( 500/ users) Access: 2006-03-31 08:00:27.000000000 +0200 Modify: 2006-04-02 12:36:39.000000000 +0200 Change: 2006-04-02 12:36:39.000000000 +0200 root@buick:~#
On Sun, 2006-04-02 at 19:36 +0200, Stian Jordet wrote:
søn, 02,.04.2006 kl. 20.33 +0300, skrev Timo Sirainen:
So, what do these say:
stat /dev/hda1 stat /home stat /home/ingvild/Maildir
Will this patch help? diff -u -r1.10 quota-fs.c --- src/plugins/quota/quota-fs.c 6 Mar 2006 15:48:33 -0000 1.10 +++ src/plugins/quota/quota-fs.c 2 Apr 2006 17:41:12 -0000 @@ -139,7 +139,7 @@ strcmp(ent.mnt_fstype, MNTTYPE_IGNORE) == 0) continue; - if (stat(ent.mnt_special, &st2) == 0 && + if (stat(ent.mnt_mountp, &st2) == 0 && CMP_DEV_T(st.st_dev, st2.st_dev)) { device_path = ent.mnt_special; mount_path = ent.mnt_mountp; @@ -158,7 +158,7 @@ strcmp(ent->mnt_type, MNTTYPE_IGNORE) == 0) continue; - if (stat(ent->mnt_fsname, &st2) == 0 && + if (stat(ent->mnt_dir, &st2) == 0 && CMP_DEV_T(st.st_dev, st2.st_dev)) { device_path = ent->mnt_fsname; mount_path = ent->mnt_dir;
søn, 02,.04.2006 kl. 20.41 +0300, skrev Timo Sirainen:
Will this patch help?
Yes indeed :D
Apr 2 20:01:26 buick dovecot: imap(ingvild): fs quota add storage dir = /home/ingvild/Maildir Apr 2 20:01:26 buick dovecot: imap(ingvild): fs quota block device = /dev/hda1 Apr 2 20:01:26 buick dovecot: imap(ingvild): fs quota mount point = /home
But still a little (!) problem:
a getquota ""
- QUOTA "" (STORAGE 1518927872 80000000) a OK Getquota completed.
which doesn't really make sense. But it's the same as I got when I tested the fs-quota by hardcoding the device in quota-fs.c earlier. (See mail from 6th March).
Quota output:
root@buick:~# quota ingvild Disk quotas for user ingvild (uid 1001): Filesystem blocks quota limit grace files quota limit grace /dev/hda1 370848 20000000 22000000 1732 0 0 root@buick:~#
Thanks for looking into this!
Best regards, Stian
søn, 02,.04.2006 kl. 20.04 +0200, skrev Stian Jordet:
søn, 02,.04.2006 kl. 20.41 +0300, skrev Timo Sirainen:
Will this patch help? But still a little (!) problem:
a getquota ""
- QUOTA "" (STORAGE 1518927872 80000000) a OK Getquota completed.
The first number is 4096 times to big, while the second one is four times to big... Weird, but it happens on all accounts.
Best regards, Stian
On Mon, 2006-04-03 at 00:34 +0200, Stian Jordet wrote:
søn, 02,.04.2006 kl. 20.04 +0200, skrev Stian Jordet:
søn, 02,.04.2006 kl. 20.41 +0300, skrev Timo Sirainen:
Will this patch help? But still a little (!) problem:
a getquota "" * QUOTA "" (STORAGE 1518927872 80000000) a OK Getquota completed.
The first number is 4096 times to big, while the second one is four times to big... Weird, but it happens on all accounts.
Does the patch below help? Index: src/plugins/quota/quota-fs.c =================================================================== RCS file: /var/lib/cvs/dovecot/src/plugins/quota/quota-fs.c,v retrieving revision 1.11 diff -u -r1.11 quota-fs.c --- src/plugins/quota/quota-fs.c 2 Apr 2006 17:42:30 -0000 1.11 +++ src/plugins/quota/quota-fs.c 9 Apr 2006 15:05:19 -0000 @@ -284,8 +284,10 @@ return -1; } #endif - *value_r = dqblk.dqb_curblocks * root->mount->blk_size / 1024; - *limit_r = dqblk.dqb_bsoftlimit * root->mount->blk_size / 1024; + *value_r = (uint64_t)dqblk.dqb_curblocks * + (uint64_t)root->mount->blk_size / 1024; + *limit_r = (uint64_t)dqblk.dqb_bsoftlimit * + (uint64_t)root->mount->blk_size / 1024; return 1; }
søn, 09,.04.2006 kl. 18.07 +0300, skrev Timo Sirainen:
On Mon, 2006-04-03 at 00:34 +0200, Stian Jordet wrote:
søn, 02,.04.2006 kl. 20.04 +0200, skrev Stian Jordet:
søn, 02,.04.2006 kl. 20.41 +0300, skrev Timo Sirainen:
Will this patch help? But still a little (!) problem:
a getquota ""
- QUOTA "" (STORAGE 1518927872 80000000) a OK Getquota completed.
The first number is 4096 times to big, while the second one is four times to big... Weird, but it happens on all accounts.
Does the patch below help?
No, sorry. Still the same...
Best regards, Stian
man, 06,.03.2006 kl. 23.58 +0200, skrev Timo Sirainen:
On Mon, 2006-03-06 at 22:51 +0100, Stian Jordet wrote:
Hi,
I've seen you commited a lot of quota work tonight. I'm still unable to get the filesystem quota working, and I wonder if it's just me that is stupid, or if theres a bug somewhere.
I enable quota and imap_quota plugins, I set fs in my ldap-base for quota, and logons. I then get this:
dovecot: imap(ingvild): fs quota add storage dir = /home/ingvild/Maildir dovecot: imap(ingvild): fs quota: mount path for /home/ingvild/Maildir not found from /etc/mtab
What OS? Does /home exist in /etc/mtab? What filesystem is it?
I get this far in my Debian (I don't have quota enabled):
quotactl(Q_GETQUOTA, /dev/hda1) failed: Invalid argument
Just for the fun of it, I tried hardcoding device_path and mount_path in quota-fs.c (note, I can't really code c...) And then it actually worked. Kind of:
- QUOTA "" (STORAGE 1507344384 8000000)
Which is obviously crazy.
root@buick:~/cvs/dovecot# quota ingvild Disk quotas for user ingvild (uid 1001): Filesystem blocks quota limit grace files quota limit grace /dev/hda1 368004 2000000 2200000 1471 0 0 root@buick:~/cvs/dovecot#
That's more like it :)
Best regards, Stian
participants (2)
-
Stian Jordet
-
Timo Sirainen