View Full Version : Quota not working correctly
ethanhoo
05-10-2005, 01:10 AM
Hi,
On my system, quota is enabled. But in directadmin, not all the quota statistics are tallied correctly. It works for most, but not all.
I have two users whose quota statistics are not reported correctly in directadmin. After:
echo "action=tally&value=all" >> /usr/local/directadmin/data/task.queue
cat /var/log/directadmin/system.log
It shows:
Tally User user Begin
Tally User user Complete
for all users. But the timestamp for the 2 users mentioned above is a dated back few months ago.
jmstacey
05-10-2005, 04:34 PM
Is quota working on the server itself? i.e. Does repquota return the proper usage for those two users?
ethanhoo
05-10-2005, 05:48 PM
Originally posted by jmstacey
Is quota working on the server itself? i.e. Does repquota return the proper usage for those two users?
Yes, the quota is working on the server itself and repquota return the proper usage for those 2 users.
jmstacey
05-10-2005, 10:29 PM
Hmm, then it sounds like it might be a problem with DirectAdmin's parser. But since it's not working for two specific users I'm not sure.
Might drop DirectAdmin a line on this issue.
ethanhoo
05-11-2005, 12:30 AM
Originally posted by jmstacey
Hmm, then it sounds like it might be a problem with DirectAdmin's parser. But since it's not working for two specific users I'm not sure.
Might drop DirectAdmin a line on this issue.
The disk space usage shows zero for the one of the user, while the other user has the disk space usage in directadmin quota statistic far lower than he actually used.
jmstacey
05-11-2005, 12:34 AM
Might give this a look and make sure everything checks out.
http://help.directadmin.com/item.php?id=42
I'm out of ideas with the provided information.
Do any logs make reference to this problem, more than system.log?
ethanhoo
05-11-2005, 12:50 AM
Originally posted by jmstacey
Might give this a look and make sure everything checks out.
http://help.directadmin.com/item.php?id=42
I'm out of ideas with the provided information.
Do any logs make reference to this problem, more than system.log?
Yes, have done those already. But no, still no luck :(
Just a thought, is there a configuration file in directadmin that tells which user's quota to monitor and which not?
jmstacey
05-11-2005, 05:28 PM
I think the quota partition can be set in the configuration file or it might be the home directory that is used when creating users home directories. Search the forums to verify.
ethanhoo
05-11-2005, 06:06 PM
Originally posted by jmstacey
I think the quota partition can be set in the configuration file or it might be the home directory that is used when creating users home directories. Search the forums to verify.
No, you don't get what I mean. I don't mean to set the quota partition. What I mean is - is there a configuration file in directadmin (not the system) to tell it which user's quota to tally?
As far as I can tell, the quota is working perfectly on the system. But directadmin is not reading the quota for that 2 particular users.
jmstacey
05-11-2005, 07:32 PM
Oh,
As far as I know it just gets the list of users from /usr/local/directadmin/data/users and applies the new usage to the user.usage file in each users data directory.
You might ask DirectAdmin about this since they will know exactly how DirectAdmin collect it's usage, how it applies it, and what could possibly cause this.
DirectAdmin Support
05-11-2005, 10:25 PM
Hello,
For the tally, DA goes through each resller, then each adimin. For each of those accounts, it gets the users.list file, then goes through those users. *so*... since you see:
Tally User user Begin
Tally User user Complete
in the /var/log/directadmin/system.log, it would mean that the admin list and reseller list are empty:
/usr/local/directadmin/data/admin/admin.list
/usr/local/directadmin/data/admin/reseller.list
eg, admin.list should have the "admin" user in it. The reseller.list should have all resellers in it.
You can rebuild the reseller.list file by doing:
grep "usertype=reseller" /usr/local/directadmin/data/users/*/user.conf | cut -d/ -f7 > /usr/local/directadmin/data/admin/reseller.list
chown diradmin:diradmin /usr/local/directadmin/data/admin/reseller.list
chmod 600 /usr/local/directadmin/data/admin/reseller.listA similar technique can be used for the admin.list:
grep "usertype=admin" /usr/local/directadmin/data/users/*/user.conf | cut -d/ -f7 > /usr/local/directadmin/data/admin/admin.list
chown diradmin:diradmin /usr/local/directadmin/data/admin/admin.list
chmod 600 /usr/local/directadmin/data/admin/admin.list
Hope this helps ;)
John
ethanhoo
05-11-2005, 10:37 PM
Originally posted by DirectAdmin Support
Hello,
For the tally, DA goes through each resller, then each adimin. For each of those accounts, it gets the users.list file, then goes through those users. *so*... since you see:
Tally User user Begin
Tally User user Complete
in the /var/log/directadmin/system.log, it would mean that the admin list and reseller list are empty:
/usr/local/directadmin/data/admin/admin.list
/usr/local/directadmin/data/admin/reseller.list
Hi,
Thanks for the reply. The admin.list and reseller.list files are not empty. They are, in fact, having the same content as :
grep "usertype=reseller" /usr/local/directadmin/data/users/*/user.conf | cut -d/ -f7
grep "usertype=admin" /usr/local/directadmin/data/users/*/user.conf | cut -d/ -f7
In /var/log/directadmin/system.log, where I have posted
Tally User user Begin
Tally User user Complete
I mean "user" as in each of the user being tallied. For example, say I have user1, user2, user3, user4, and user5. It'll be:
Tally User user1 Begin
Tally User user1 Complete
Tally User user2 Begin
Tally User user2 Complete
etc.
Directadmin did tally the statistics, but not for all users as mentioned in previous posts.
clintox
05-11-2005, 11:12 PM
Make sure that /home/tmp exists. I had removed it and it broke my quotas.
ethanhoo
05-11-2005, 11:14 PM
Originally posted by clintox
Make sure that /home/tmp exists. I had removed it and it broke my quotas.
It exists.
clintox
05-11-2005, 11:18 PM
One more quick thing to check, because this stumped me once. Make sure that the files in the user's home directories are actually owned by the user and not root or some other user. Quota won't count those if they are owned by someone else. I know you've said that repquota is working, so this is probably not the problem.
ethanhoo
05-11-2005, 11:24 PM
Originally posted by clintox
One more quick thing to check, because this stumped me once. Make sure that the files in the user's home directories are actually owned by the user and not root or some other user. Quota won't count those if they are owned by someone else. I know you've said that repquota is working, so this is probably not the problem.
Yes. I've checked those before. It's not the problem.
ethanhoo
05-12-2005, 12:00 AM
I've found out the problem. In /usr/local/directadmin/data/users/admin/users.list,
the 2 users are not listed in the file.
ethanhoo
05-12-2005, 12:57 AM
Thanks :)
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.