• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

[Plesk 12.5, CentOS 7] Bug: Softquota vs Hardquota

Boindil

New Pleskian
Hi,
it seems the softquota calculated by plesk every night is different to the hardquota.

One of our subscriptions has been blocked tonight because limits were reached. Plesk says the following:
Code:
Disk usage: 5127 MB used of 5 GB

Via console I get the following hardquota > limits were not reached (and one should not be able to overuse disk space and thus never get blocked if I got the meaning of hard quota right).

Code:
[root@server ~]# repquota -a | grep username
username -- 4507316  0 5242880  28952  0  0

Please fix this error :)
Thanks in advance
 
Last edited:
Hi,
Plesk calculates size of subscription directory and compares it with configured quota value.
Did you check the real size of directory? Like below:
# du -sh /var/www/vhosts/<subscription_name>
 
Hi,
yes the softquota calculation seems correct, whilst the hardquota is not.

Since the hard quota should be more low level than the hard quota I guess the hard quota and soft quota calculation are different. Maybe the statistics could be the reason? They are included in our soft quota, but are a symlink in every subscription to a folder that belongs to root.
 
Hi,
I've been pretty busy lately and forgot this thread until now - this has happened again and thus I'd like to discuss this further.

Tonight an account got blocked with the following details:

E-Mail:
Code:
The following resources were overused by subscription 'X', owned by user 'X':

Speicherplatz:    5 GB grenze / 5282.4 MB (103%) verwendet / 0 MB (0%) verbleibend

The subscription was suspended.

The hard quota limit is set to 5120 MB in panel and can be confirmed using command line:
Code:
repquota -a | grep user
user    -- 5242880       0 5242880          56947     0     0

As one can see, the hard limit is equal to used and as such no more space can be used. However the used space in the vhost is shown as following:
Code:
du -csh --block-size=1M .
5611    .

As one can see there are different calculations:
1) Plesk's nightly calculation: 5282.4 MB
2) Vhost's directory: 5611 MB (Difference of 330M can be explained through chroot libs and binaries - I dont want them to be counted, so this is fine!)
3) Hard quota (of course only for subscription user): 5120 MB

My best guess is that it has something to do with the log files that belong to root and thus don't count in user's hard quota (but I want to count them since any customer that generates big error logs for example should care to minimize these).

Looking at the full output of
Code:
du -ch --block-size=1M . --max-depth=1 | sort -h
the folder size of the logs folder seems to match the difference of Plesk's nightly calculation and the hard quota.

A possible solution would be to have all log files use the appropriate user as owner and only leave root as group. A user could even delete his own logs via FTP then. Would that result in any problems?

The reason for me setting up a hard quota is preventing the soft quota to trigger. I dont want the subscription to be suspended (this should be only the last solution) and using a har quota that doesnt allow further writing could handle this.

I can't open a ticket since the license has been purchased via a plesk partner.
 
Last edited:
Back
Top