View Full Version : disk quota error
shin0bi
02-26-2004, 12:12 PM
Hi all,
I have a user who's disk quota isn't correct. The quota is currently reporting 835.9 / 250. However when I run 'qouta username' the machine reports 355776 k used. I'm unsure as to what may be causing the problem.
Thanks in advance. :)
DirectAdmin Support
02-27-2004, 09:01 AM
Hello,
Try running this:
echo "action=tally&value=all" >> /usr/local/directadmin/data/task.queueSo that DA recounts everything.
John
shin0bi
02-27-2004, 11:25 AM
Thanks John,
I've tried that, however the quota count for the user is still incorrect. According to DA total web space used is 118.2 MB and disk space used is 374.7 MB, however when manually checking mail, web space, database usage, etc. for the user I come up with a total usage of 159MB. In addition when I run quota -v username, I get
Filesystem blocks quota limit grace files quota limit grace
/dev/sda7 0 0 0 0 0 0
/dev/sda8 355776* 256000 256000 19364 0 0
I'm a little confused, does DA also calculate other directories associated with each user besides the ones I listed.
Thanks,
shin0bi
02-27-2004, 11:42 AM
du -sm /home/customer /home/mysql/customer_db
/var/spool/mail/customer
/var/spool/virtual/customer.com
/etc/virtual/customer.com
These values are returned:
129 /home/customer
16 /home/mysql/customer_db
0 /var/spool/mail/customer
14 /var/spool/virtual/customer.com
1 /etc/virtual/customer.com
Also here is what DA is reporting
cat /usr/local/directadmin/data/users/customer/user.usage
bandwidth=18.4
domainptr=0
ftp=3
mysql=1
nemailf=-1
nemailml=0
nemailr=0
nemails=6
nsubdomains=0
quota=374.8
vdomains=1
NOTE: quota does not match actual du output. Why the descrepency?
Again, Thanks in advance. :)
DirectAdmin Support
02-28-2004, 05:28 PM
Hello,
If the system quotas are returning 355 meg of usage, then somewhere on that partition, the users' file should be visible.. If you quota partition is /, the all files on that partition owned by the user will be added. Files owned by the user could exist in:
/home/username
/home/tmp
/tmp
/var/spool/mail/username
/var/spool/virtual/*
so.. those are where the quota files should be found.. Since quota is returning the large value, we can discard the possibility of the databases or any other files not owned by the use using the space.
Now, sometime the aquota.user file gets corrupted and needs to be repaired.
Redhat:
/sbin/quotaoff -a
/sbin/quotacheck -avugmf
/sbin/quotaon -a
FreeBSD:
/usr/sbin/quotaoff -a
/sbin/quotacheck -avug
/usr/sbin/quotaon -a
John
ClayRabbit
03-01-2004, 04:47 PM
Oh. That's very common problem :)
You can list all files owned by that user with command:
find / -user <uid>
Maybe some of those files have that user's UID by mistake.(Probably they was extracted by you from some .tar archive with "preserve attributes" option.)
So find and chown them.
shin0bi
03-03-2004, 01:23 PM
Thanks everyone, there were a bunch of files owned by the user which contributed to the usage. :)
shin0bi
03-03-2004, 01:28 PM
Also can you tally/recalculate quota for a specific user using echo "action=tally&value=all" >> /usr/local/directadmin/data/task.queue? Can I change the value=all variable to use the username or uid?
Thanks again,
l0rdphi1
03-03-2004, 01:59 PM
echo 'action=tally&value={username}&type=user' >> /usr/local/directadmin/data/task.queuewhere {username} is the user's name :)
shin0bi
03-03-2004, 02:51 PM
Thanks. :)
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.