[Dovecot] AIX mail quota plugin problems + dotlock problem resolved
Stewart Dean
sdean at bard.edu
Tue Jun 5 21:29:55 EEST 2007
1) 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 <jfs/quota.h>*
>
> *int quotactl (*/Path/*,*/ Cmd/*,*/ ID/*,*/ Addr/*)*
> *int* /Cmd/
> <http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.basetechref/doc/basetrf2/quotactl.htm#a2qk21b0bob>*,* /ID/
> <http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.basetechref/doc/basetrf2/quotactl.htm#bqk2d0bob>*;*
> *char ** /Addr/
> <http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.basetechref/doc/basetrf2/quotactl.htm#oqk2310bob>*,
> ** /Path/
> <http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.basetechref/doc/basetrf2/quotactl.htm#xpk2250bob>*;*
>
>
> 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/doc/aixcmds4/quotacheck.htm#a84c12e>
> 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.
2) No, nothing is remote here:
1) dovecot is running here on mercury
2) mercury is where all the inboxes and home/folder dirs physically reside
3) These /are/ exported to other machines by mercury.
4) The quotaing is running on here mercury itself as part of O/S and
FSes; it is enabled during boot
5) 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 at bard.edu voice: 845-758-7475, fax: 845-758-7035
More information about the dovecot
mailing list