Quota not working correctly

ethanhoo

Verified User
Joined
Apr 28, 2005
Messages
32
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.
 
Is quota working on the server itself? i.e. Does repquota return the proper usage for those two users?
 
jmstacey said:
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.
 
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.
 
jmstacey said:
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 said:
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?
 
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.
 
jmstacey said:
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.
 
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.
 
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:
Code:
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.list
A similar technique can be used for the admin.list:
Code:
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
 
DirectAdmin Support said:
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.
 
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.
 
clintox said:
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.
 
I've found out the problem. In /usr/local/directadmin/data/users/admin/users.list,
the 2 users are not listed in the file.
 
Back
Top