Possible to exclude some folders from disk calcualtion?

ozgurerdogan

Verified User
Joined
Apr 20, 2008
Messages
343
Some users have heavy traffic and thus their logs' size are high. Same with email usage with only webmail or imap.

Is it possible to exclude /stats or /logs or even /imap folders' sizes from calculation for some or all users hosting package?

Thanks
 
Last edited:
Hello,

What would be the main goal in hiding this disk usage from the User?

If it's to lower the disk load during the tally, you can use the "simple disk usage" option, to rely 100% on the system quotas.
Several areas will not be counted, saving disk i/o, but this will give a potentially incorrect value as a side effect.
http://www.directadmin.com/features.php?id=996

John
 
Not hiding, I want to exclude from total disk usage calculation. I do not want to include total logs folder size to totatl disk usage amount. There might be times user only have 5-10 MB hosting files whereas logs are 200 300 MB. So they complain about this.
 
It will not only hide, but exclude as well. Since rotated logs and awstats data are owned by root, their size won't be included in disk quotas and won't be reported by repquota. Isn't it what you need?
 
It will not only hide, but exclude as well. Since rotated logs and awstats data are owned by root, their size won't be included in disk quotas and won't be reported by repquota. Isn't it what you need?

Yes but how do I check if my installation is like that. I see users disk quotas also counts logs folder.
 
Enable simple_disk_usage as it was already mentioned by John

Code:
simple_disk_usage=1

restart directadmin, and re-calculate quotas for users:

Code:
echo "action=quotatally&value=all" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d800

or for any particular:

Code:
echo "action=quotatally&value=bob&type=user" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d800

Note to replace bob with your real username.

In both cases it might take time to finish the task. As soon as it will finish just check quotas in directadmin.
 
Will simple_disk_usage=1 exclude logs and stats folder from calculation you mean? I am going to do it now... Thanks
 
It will exclude everything in userdir which is not owned by the user. If logs and stats files are owned by root, then their size won't be counted.
 
Back
Top