Page 1 of 1

Disk space of a user not being calculated

Posted: Thu 16. May 2019, 15:11
by webmedia
Hello,
one of the users on the server is a site we run internally. Now, I know that the site has a lot of content, at least a gigabye of content. However, it is not showing up (the used space). As you can see in the attachemnt, the webspace says 0, but as you can see, the websitehas generated almost 70 GB of traffic.

And this is not limited to this site/users, no. Webspace is not being calculated on ANY user account. Webmail and database space is, not not webspace....help?

Re: Disk space of a user not being calculated

Posted: Thu 16. May 2019, 16:41
by Alexander
Hello,

Did any errors occur during installation? Especially quota related errors?

What does the console command "repquota /" say?

Re: Disk space of a user not being calculated

Posted: Thu 16. May 2019, 17:10
by webmedia
Alexander wrote: Thu 16. May 2019, 16:41 Hello,

Did any errors occur during installation? Especially quota related errors?

What does the console command "repquota /" say?
There were no errors, at least, nothing that I know of, since I did not install the OS and KeyHelp. (running on a Hetzer cloud server, with Ubuntu 18.04)
I calculcated all of the user space of all users, and it totals to aprox 7.5 GB. But in the dashboard, it says almost 30 GB used, while on the right of that, it says 7.57 of consumed disk space...
And repquota says..

root@wm:~# repquota /
*** Report for user quotas on device /dev/sda1
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 2148764 0 0 51009 0 0
daemon -- 64 0 0 4 0 0
man -- 1428 0 0 146 0 0
www-data -- 20 0 0 5 0 0
syslog -- 5472 0 0 6 0 0
_apt -- 44 0 0 4 0 0
lxd -- 4 0 0 1 0 0
landscape -- 8 0 0 3 0 0
pollinate -- 4 0 0 2 0 0
keyhelp -- 32024 0 0 10345 0 0
bind -- 12 0 0 3 0 0
mysql -- 184444 0 0 236 0 0
ftp -- 4 0 0 1 0 0
postfix -- 96 0 0 54 0 0
vmail -- 180 0 0 38 0 0
opendkim -- 16 0 0 6 0 0
clamav -- 234184 0 0 9 0 0
postgrey -- 10332 0 0 8 0 0
debian-spamd -- 24 0 0 6 0 0
amavis -- 64 0 0 22 0 0
#62583 -- 4 0 0 2 0 0

Re: Disk space of a user not being calculated

Posted: Fri 17. May 2019, 09:23
by Alexander
There is no quota set up for your KeyHelp users.

Try to set the quota manually via console and have a look, if there are any errors. This is the command to set the quota to 5 GB. Replace the <USERNAME> with the name of your faulty user.

Code: Select all

setquota -u '<USERNAME>' '5242880' '5242880' '873813' '873813' /
If there aren't any errors, run the following command, to trigger disk space calculation.

Code: Select all

php /home/keyhelp/www/keyhelp/cronjob/mastercronjob.php --force-diskspace

Re: Disk space of a user not being calculated

Posted: Fri 17. May 2019, 14:23
by webmedia
Alexander wrote: Fri 17. May 2019, 09:23 There is no quota set up for your KeyHelp users.

Try to set the quota manually via console and have a look, if there are any errors. This is the command to set the quota to 5 GB. Replace the <USERNAME> with the name of your faulty user.

Code: Select all

setquota -u '<USERNAME>' '5242880' '5242880' '873813' '873813' /
If there aren't any errors, run the following command, to trigger disk space calculation.

Code: Select all

php /home/keyhelp/www/keyhelp/cronjob/mastercronjob.php --force-diskspace
Did that. Nothing changed. In the console, it says (for every user)
quotatool: Error while detecting kernel quota version: No such process
And it says it failed to collect webspace data

Re: Disk space of a user not being calculated

Posted: Wed 22. May 2019, 11:29
by webmedia
Nobody? ;_; :(

Re: Disk space of a user not being calculated

Posted: Wed 22. May 2019, 15:54
by Alexander
Quota is running?

Code: Select all

service quota status
Can you please post something about your system specs. OS, virtualization (if any) and so on.

Re: Disk space of a user not being calculated

Posted: Thu 23. May 2019, 14:07
by webmedia
Alexander wrote: Wed 22. May 2019, 15:54 Quota is running?

Code: Select all

service quota status
Can you please post something about your system specs. OS, virtualization (if any) and so on.
After running that command, I get that, posted in the attachment.
The server is running Ubuntu 18.04.2 LTS. The server has 32GB of RAM, 240 GB storage (no virtualization, just one partition/drive), 32 GB of RAM, and 8 vCPUs.
To be more precise, it is a cloud server, from Hetzner. That is all I know.

Re: Disk space of a user not being calculated

Posted: Thu 23. May 2019, 14:19
by Alexander
So then, can you start quota with the following?

Code: Select all

service quota start

Re: Disk space of a user not being calculated

Posted: Tue 28. May 2019, 02:34
by webmedia
Alexander wrote: Thu 23. May 2019, 14:19 So then, can you start quota with the following?

Code: Select all

service quota start
Hello...
First, sorry for the long absence.
I did try that, however, still no success. I am still getting the same error, ERROR --> webspace: failed to collect data, for every user. I have ran the command you suggested, and then checked the status again. Here is what it shows (attachment).
I also manually started the webspace checking service on keyhelp, but with no luck.

Re: Disk space of a user not being calculated

Posted: Tue 28. May 2019, 02:37
by webmedia
Alexander wrote: Thu 23. May 2019, 14:19 So then, can you start quota with the following?

Code: Select all

service quota start
I also did this...

Re: Disk space of a user not being calculated

Posted: Sun 2. Jun 2019, 23:17
by Blackmoon
Hey,
To be more precise, it is a cloud server, from Hetzner. That is all I know.
An important information.

First thing:

Code: Select all

service quota stop
Then follow the article:
https://blog.wydler.eu/2018/12/02/keyhe ... ert-nicht/

This based also on an cloud server from hetzner.

@Alex
könnte das Installationskript dem entsprechend erweitert werden, dass die Ausgabe bzw. Fehler von quotaon -avug abgefangen wird?!

/Dani

Re: Disk space of a user not being calculated  [SOLVED]

Posted: Sat 15. Jun 2019, 14:45
by webmedia
Blackmoon wrote: Sun 2. Jun 2019, 23:17 Hey,
To be more precise, it is a cloud server, from Hetzner. That is all I know.
An important information.

First thing:

Code: Select all

service quota stop
Then follow the article:
https://blog.wydler.eu/2018/12/02/keyhe ... ert-nicht/

This based also on an cloud server from hetzner.

@Alex
könnte das Installationskript dem entsprechend erweitert werden, dass die Ausgabe bzw. Fehler von quotaon -avug abgefangen wird?!

/Dani
Welp, this ended up working for me. Thanks y'all <3

Re: Disk space of a user not being calculated

Posted: Tue 28. Jan 2020, 19:59
by pb81
For those wondering, this also works at Digital Ocean

Stop the service

Code: Select all

service quota stop
Install linux-image-generic (keep existing files)

Code: Select all

apt-get -y install linux-image-generic
Activate Quota

Code: Select all

quotaon -avug
Reboot the server

Check if the statistics have been updated

Code: Select all

repquota /
If it has not been updated, run the following code:

Code: Select all

php /home/keyhelp/www/keyhelp/cronjob/mastercronjob.php --force-diskspace