Disk quota exceeded

Hello guys, I can’t login to panel, when I enter user and passord nothing happend, same login page

in nginx-error.log file is this many lines:

[error] 420731#0: *220 FastCGI sent in stderr: “; PHP message: PHP Warning: PHP Request Shutdown: Write failed: Disk quota exceeded (122) in Unknown on line 0; PHP message: PHP Warning: PHP Request Shutdown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/usr/local/hestia/data/sessions) in Unknown on line 0

after that I add command v-delete-sys-quota and find this message

sed: -e expression #1, char 1: missing command
rm: cannot remove ‘//aquota.user’: Operation not permitted
rm: cannot remove ‘//aquota.group’: Operation not permitted

is that possible to fix this?

1 Like

Hello @osmaster,

Could you check whether those files are immutable?

lsattr /aquota.*

If you see an i in the output, something like this:

----i--A------e------- /aquota.group
----i--A------e------- /aquota.user

then the files are immutable and you need to remove that immutable condition to be able to remove them.

chattr -i /aquota.user
chattr -i /aquota.group

And launch again v-delete-sys-quota

Good luck,
sahsanu

Hello @sahsanu, thank you so much for helping, yes exactly like this:

----i--A------e------- /aquota.group
----i--A------e------- /aquota.user

after commands chattr -i /aquota.user and chattr -i /aquota.group

this message:

chattr: Operation not permitted while setting flags on /aquota.user

chattr: Operation not permitted while setting flags on /aquota.group

I’m wondering whether quotaoff worked from v-delete-sys-quota. Could you please show the contents of /etc/fstab?

cat /etc/fstab

yes sure, here it is:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=7e3b9937-a509-4b94-aa0d-90dea464dbc9 /               ext4    errors=remount-ro,usrquota,grpquota,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 0       0
# /boot was on /dev/sda1 during installation
UUID=7c581c10-0deb-41d0-bb08-063536a68556 /boot           ext4    defaults,noatime        0       0

There is a bug in v-delete-sys-quota it is not geting the right line where root dir / is mounted

It is checking both lines:

# / was on /dev/sda2 during installation

and

UUID=7e3b9937-a509-4b94-aa0d-90dea464dbc9 / ext4 errors=remount-ro,usrquota,grpquota,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 0 0

If you are in a hurry you can remove quotas manually (step by step like it is doing the script) or let me check whether I can solve it but I’m a bit bussy now, anyways, let me check.

Ok, let’s fix it… or try to do it :stuck_out_tongue:

Backup original script:

cp $HESTIA/bin/v-delete-sys-quota $HESTIA/bin/v-delete-sys-quota.original

Now edit file $HESTIA/bin/v-delete-sys-quota and modify line 34:

This is what you will see in line 34:

lnr=$(cat -n /etc/fstab | awk '{print $1,$3}' | grep "$mnt$" | cut -f 1 -d ' ')

and you need to change that line by this:

lnr=$(cat -n /etc/fstab | awk '{print $1,$2,$3}' | grep -E "^[0-9]{1,}\s[^#].+$mnt$" | cut -f 1 -d ' ')

Edit: just in case you view above line splitted, above change is only 1 line.

Save the file and try to launch it again v-delete-sys-quota

same thing

rm: cannot remove '//aquota.user': Operation not permitted
rm: cannot remove '//aquota.group': Operation not permitted

/etc/fstab has been modified?

cat /etc/fstab

no, only opened once

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=7e3b9937-a509-4b94-aa0d-90dea464dbc9 /               ext4    errors=remount-ro 0       0
# /boot was on /dev/sda1 during installation
UUID=7c581c10-0deb-41d0-bb08-063536a68556 /boot           ext4    defaults,noatime        0       0

Yes. it has been modified, seems the script has more bugs and it is not turning off quota in /.

Do these steps manually, if any of them fail, stop.

1.- Turn off quota in /

quotaoff /

2.- Delete aquota files

rm -f /aquota.user
rm -f /aquota.group

3.- Edit file /usr/local/hestia/conf/hestia.conf and replace DISK_QUOTA='yes' by DISK_QUOTA='no' and save the file.

And that should be all.

1 Like

in hestia.conf there is already DISK_QUOTA='no'

after quotaoff / nothing happens and also after delete commands too, files must have been deleted.

but it worked! ))) thank you very much @sahsanu !!!

2 Likes

could this problem still be later?

You are welcome. I’m glad it is working fine now.

Apart from the first bug that we corrected, there is another bug in the way quotaoff is checked so quotaoff is not executed by the script and when it tries to remove the aquota files it can’t because quota is on yet. After that, it also changes hestia.conf so that is the reason it was alreay as no.

Sorry, I forgot one step, please remove this file:

rm -f /etc/cron.daily/quotacheck

It should work fine from now on, if you want to be sure, just restart the server and check that all is working fine.

if I want bring quotas back that in hestia.conf line gonna be changed to DISK_QUOTA=‘yes’?

now i’ve checked, one user set quotas to mails and it overfill, is that possible to block quotas that users cant change it?

No, you should use v-add-sys-quota command but it has the same problems as v-delete-sys-quota so don’t use it till the bugs are fixed.

Are you sure you are no using an admin user to view/modify the quotas of another user?

maybe I set few limits long time ago and forget it, now I clear all quotas for every user and if “they” change quotas this not will be problem yes?