Solved Quotas in DA are incorrect

CrazyFrog

Verified User
Joined
Aug 28, 2019
Messages
43
Hi everyone,

We are getting some messages such as:

User -redacted- has used up 4.98% of their bandwidth and 95.0% of their allocated disk space

In the example you can see that DA thinks they use 950MB out of 1000MB. (See first attachment)

But when I actually check out their home directory, they use much more than 950MB, in fact they have 5.8GB of mail! (See second attachment)

I tried to do the following but that did not help: echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue

Anyone has the golden tip? I would like the DA quotas to reflect the actually used files on the filesystem. (I guess it will cause me some work, to get clients to upgrade their plans, but I hope it will pay for itself 😉)

My OS is Ubuntu 18.04 LTS.
DirectAdmin is at 1.63.5.

Thanks!
CrazyFrog
 

Attachments

  • Screenshot 2022-02-05 at 16.47.14.png
    Screenshot 2022-02-05 at 16.47.14.png
    58.3 KB · Views: 15
  • Screenshot 2022-02-05 at 16.50.04.png
    Screenshot 2022-02-05 at 16.50.04.png
    34.3 KB · Views: 14
Last edited:
Hi Richard, Thanks for your reply.

I tried repquota and it also reports the incorrect values!

# repquota / | grep [username] [username] -- 976376 1024000 1126400 2977 0 0

It's all around 1GB, but the homedir is 5GB. And I checked a bit inside the maildir that the files are actually owned by the user (find . -not -user username)

I'll try the tip from the documentation: quotaoff -a; quotacheck -avugm; quotaon -a

Now repquota is correct!

# repquota / | grep [username] [username] +- 6080068 1024000 1126400 6days 13701 0 0

DirectAdmin still displays the old numbers so I am going to run the following and wait a while...

echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue

Now the quotas are shown correctly in DirectAdmin.

Thanks! 😊
 
Is it safe to run quotaoff -a; quotacheck -avugm; quotaon -a
What this command exactly do?

After executing the command, I got the below warning:
quotacheck: Your kernel probably supports journaled quota but you are not using it. Consider switching to journaled quota to avoid running quotacheck after an unclean shutdown.
 
What this command exactly do?
It's safe to run that yes. It turns all quota off (hence the -a) then checks the quota and after that turns all quota on again.

The warning you got you can ignore, it's not a warning it's a notice, so only to let you know, not that something is wrong.

You can read about the differences in the answer given here:
 
Back
Top