Disk usage issue

jigster

Verified User
Joined
Jul 23, 2021
Messages
90
Disk usage stats don't seem to be updating correctly for the admin user. I'm new to DirectAdmin (we're moving from cpanel) so I'm not sure what's normal with DA.

OS = AlmaLinux 8.7
Quotas are enabled for the filesystem.
realtime_quota=2 is enabled in DirectAdmin settings.

But usage stats are NOT being updated in real-time, at least for the admin DirectAdmin user. E.g. when a user receives a large email or deleted emails to clear space, it can take hours for the usage stats to update.

repquota "/"; returns up-to-date values for all users, and updates immediately.
doveadm quota get -u [email protected] returns up-to-date email usage values, and updates immediately.
The disk usage value given in the user's DirectAdmin updates correctly.
BUT the disk usage value given in cat /usr/local/directadmin/data/users/user/user.usage | grep quota and the values shown in the admin's DirectAdmin is NOT updated in real-time and can take hours to update.

Running echo "action=quotatally&value=all" >> /usr/local/directadmin/data/task.queue updates the usage in admin's DirectAdmin, but from what I have read that shouldn't be needed and quotas are supposed to be updated in real-time with realtime_quota=2??

Can someone please confirm if the above is normal, and if not, what could be causing this?

As a last resort but not ideal, I could add the task.queue tally as a cron say every 15 minutes to get the stats for the admin user up-to-date. Would running it for all users "action=quotatally&value=all" be a big resource hog?

Thanks
 
Last edited:
The client is seeing realtime stats in their DirectAdmin which is good, so I'm reluctant to change realtime_quota. I just wondered if it's normal for admin user to take longer to update stats? Does this happen for anyone else? I can live with it as I've written a script to show real-time disk usage stats from the command line so we can just ignore the stats given in DA when logged in as admin and use the command line instead.

As long as DA does not limit users based on the stats in /usr/local/directadmin/data/users/user/user.usage? If it does, we may have to do something else.
 
Back
Top