Re: [Dovecot] AIX mail quota plugin problems + dotlock problem resolved
On Tue, 2007-06-05 at 12:30 -0400, Stewart Dean wrote:
quotactl(Q_GETQUOTA, /) failed: Invalid argument
So apparently this quotactl() call is wrong with AIX:
if (quotactl(root->mount->mount_path, QCMD(Q_GETQUOTA, USRQUOTA),
root->uid, (void *)&dqblk) < 0) {
I don't know why though. You could try changing root->mount->mount_path to some actual mbox file path to see if it returns errors then.
Except weren't your mailboxes NFS mounted? quotactl() doesn't work for NFS mounts at all. For NFS you could try this instead http://dovecot.org/patches/quota-rquotad.c
- The AIX quotactl subroutine is defined here....(put it in the search box) http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp Partial cut and paste of it:
*#include
* *int quotactl (*/Path/*,*/ Cmd/*,*/ ID/*,*/ Addr/*)* *int* /Cmd/ http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.base...*,* /ID/ http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.base...*;* *char ** /Addr/ http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.base...*, ** /Path/ http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.base...*;*
Description
The *quotactl* subroutine enables, disables, and manipulates disk quotas for file systems on which quotas have been enabled.
On AIX, disk quotas are supported by the legacy Journaled File System (JFS) and the enhanced Journaled File System (JFS2).
The /Cmd/ parameter is constructed through use of the *QCMD(*/Qcmd/*,*/ type/*)* macro contained within the *sys/fs/quota_common.h* file. The /Qcmd/ parameter specifies the quota control command. The /type/ parameter specifies either user (*USRQUOTA*) or group (*GRPQUOTA*) quota type.
The valid values for the /Cmd/ parameter in all supported file system types sare:
*Q_QUOTAON* Enables disk quotas for the file system specified by the /Path/ parameter. The /Addr/ parameter specifies a file from which to take the quotas. The quota file must exist; it is normally created with the *quotacheck* http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.cmds... command. The /ID/ parameter is unused. Root user authority is required to enable quotas. By specifying the new quota file path in the /Addr/ parameter, the *quotactl* command can also be used to change the quota file that is being used without first disabling disk quotas. *Q_QUOTAOFF* Disables disk quotas for the file system specified by the /Path/ parameter. The /Addr/ and /ID/ arguments are unused. Root user authority is required to disable quotas.
Additional JFS specific values for the /Cmd/ parameter are as follows:
*Q_GETQUOTA* Gets disk quota limits and current usage for a user or group specified by the /ID/ parameter. The /Addr/ parameter points to a *dqblk* buffer to hold the returned information. The *dqblk* structure is defined in the *jfs/quota.h* file. Root user authority is required if the /ID/ value is not the current ID of the caller.
Did the trace hold any more information? Note that I didn't attach it the first time I sent it to you, the second time I did. I also resent the note with the trace attached to mailing list, but the mailman software said it was too big, so I canceled the second post.
- No, nothing is remote here:
- dovecot is running here on mercury
- mercury is where all the inboxes and home/folder dirs physically reside
- These /are/ exported to other machines by mercury.
- The quotaing is running on here mercury itself as part of O/S and FSes; it is enabled during boot
- rquotad runs to provide quota info to the remote machines where the inboxes and home/folder dirs are NFS client imported and mounted
Timo Sirainen wrote:
On Tue, 2007-06-05 at 12:30 -0400, Stewart Dean wrote:
quotactl(Q_GETQUOTA, /) failed: Invalid argument
So apparently this quotactl() call is wrong with AIX:
if (quotactl(root->mount->mount_path, QCMD(Q_GETQUOTA, USRQUOTA), root->uid, (void *)&dqblk) < 0) {
I don't know why though. You could try changing root->mount->mount_path to some actual mbox file path to see if it returns errors then.
Except weren't your mailboxes NFS mounted? quotactl() doesn't work for NFS mounts at all. For NFS you could try this instead http://dovecot.org/patches/quota-rquotad.c
--
Stewart Dean, Unix System Admin, Henderson Computer Resources
Center of Bard College, Annandale-on-Hudson, New York 12504
sdean@bard.edu voice: 845-758-7475, fax: 845-758-7035
On Tue, 2007-06-05 at 14:29 -0400, Stewart Dean wrote:
- The AIX quotactl subroutine is defined here....(put it in the search box) http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp Partial cut and paste of it: .. Did the trace hold any more information?
It only confirms that it should work the way I'm using it.
Note that I didn't attach it the first time I sent it to you, the second time I did. I also resent the note with the trace attached to mailing list, but the mailman software said it was too big, so I canceled the second post.
I didn't notice anything wrong in the trace either. You could try running truss for some command that reports the current user's quota and see what's different between it and how Dovecot calls quotactl().
participants (2)
-
Stewart Dean
-
Timo Sirainen