Disk quota vs panel disk usage

Hi,

I applied disk quota to a user to be 74000 MB in the web panel. But their incoming emails got deferred, while they see approximately only 60 gb disk usage (at top bar menu of web panel).

74000 / 1024 = still 72.3 GiB

60 gb is as the result I ran the following command manually to update their last disk usage info.
/usr/local/hestia/bin/v-update-sys-queue disk

Why is 74000 MB (disc quota limit setting) which not even close to 60 gb (usage reported in web panel) - already causing disk quota hit their disk usage limit? - This happened yesterday.

Ok now this gets more weird, Today I just now ran v-update-sys-queue disk, and the result:

du -sh /home/user-1 = 75 G
–vs–
user-1 panel shows 62.1 gb (does not match)
I set 80.000 MB disk quota (was 74.000 MB yesterday)
This is the user had disk quota limit issue above.

BUT
du -sh /home/user-2 = 297 G
–vs–
user-2 panel shows 296.9 gb (match)
I set no disc limit to this user.

Thanks for any feedback.

I don’t know how exactly but it coverts 74000 first to bytes:

soft=$(echo “$quota * 1024”|bc |cut -f 1 -d .) So more losses are there…

But I have no clue won’t supprise me that some conversions are going wrong…

Hi Eris,

Thanks for your feedback. Then I will check the bash scripts related to user disk usage calculation. This issue causes me to have hard time to explain to my customers :grin: So fixing this issue is important to me and probably for some others. If anything I can find I will report back here.

Hello,

It turns out that Hestia excludes suspended email accounts from disk usage calculation!

# Starting loop
dom_disk=0
for account in $(search_objects "mail/$domain" 'SUSPENDED' "no" 'ACCOUNT'); do
    home_dir=$HOMEDIR/$user/mail/$domain/$account

Function search_objects accepts 4 parameters which the 2nd and 3rd will be constructed as SUSPENDED=no (therefore suspended email accounts get excluded from disk usage calculation)

The user suspends several email accounts which occupies 10 GB disk spaces. So Hestia does not “see” 10 GB disk usage at all.

I believe this is completely wrong because suspended web domain or mail accounts still occupy disk spaces.

Please submit a bug report / pull request it is indeed not correct.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.