PDA

View Full Version : All cPanel accounts unlimited disk quota on an OpenVZ VPS issue - fixing



Fli
11-13-2014, 05:56 PM
On an OpenVZ VPS i got issue with cpanel accounts which all got unlimited disk quotas and cpanel account modiffiation did not changed the quota.

The /scripts/fixquotas command did not fixed the quotas on that OpenVZ VPS (WHM server)

the result:

Installing Default Quota Databases......Done
journaled quota support: not available with vzaquota (disabled)
Warning virtual file systems are mounted. Quotas may be counted as double
for users who are currently logged in. Please have jailshell users logout
before running quotacheck in the future!

All jailed users will be logged out in 60 seconds!

jailshell: no process killed
checking out /backup
checking out /backup
Quotas have been enabled, however they may not be up to date as quotacheck has been skipped.
Reading package prefix_myhosting.com_mypackagename
Resetting quota for aazbiwmm to 100 M
edquota: Quota write failed (id 708): Invalid argument
...and so on for all accounts.....


quota aazbiwmm

Disk quotas for user aazbiwmm (uid 708): none

/sbin/quotacheck -vguma

quotacheck: Your kernel probably supports journaled quota but you are not using it. Consider switching to journaled quota to avoid running quotacheck after an unclean shutdown.
quotacheck: Scanning /dev/simfs [/] done
quotacheck: Checked 350839 directories and 3124862 files
quotacheck: Quota file //aquota.user has IMMUTABLE flag set. Clearing.
quotacheck: Failed to remove IMMUTABLE flag from quota file //aquota.user: Inappropriate ioctl for device
quotacheck: Quota file //aquota.group has IMMUTABLE flag set. Clearing.
quotacheck: Failed to remove IMMUTABLE flag from quota file //aquota.group: Inappropriate ioctl for device

From OpenVZ configuration file:
QUOTAUGIDLIMIT="10000"
there someone advicing command from node (i have access to it): "vzctl set 101 --quotaugidlimit 80 --save"
The VPS is using slightly more than 100gb disk space..
DISKSPACE="204800000:204800000"
DISKINODES="102400000:102400000"
QUOTATIME="0"

How it was fixed?
Here is an OpenVZguide: http://wiki.openvz.org/Cpanel_quotas
i did commands they mention from within my OpenVZ VPS:


rm -f /aquota.user 2>/dev/null;rm -f /aquota.group 2>/dev/null;for x in `find /proc/vz/vzaquota/ | tail -2 `; do ln -s $x / ; done

and then i did next command from within my Dedicated node server on which VPS is hosted:


vzctl set 860 --quotaugidlimit 200000 --save
860=id of the vps

then modiffication of cpanel disk quota limits started working..

Even cpanel/whm "/scripts/fixquotas" script fixed all unlimited cpanel quotas so they have proper quotas limitted

----
someone also recommended this:
from host node:
vzctl set CTID --quotaugidlimit XXXXXX --save

from vps:
quotaoff -av
quotaon -av
/scripts/fixquotas

------
this is third approach on how to try to fix the issue from within VPS:

# quotacheck -vagum

v : quotacheck report its operation as it progresses
g : Only group quotas listed in /etc/mtab or on the filesystems specified are to be checked
u : Only user quotas listed in /etc/mtab or on the filesystems specified will be checked
m : Don't try to re-mount file system as Readonly.
a : Check all mounted non-NFS filesystems in /etc/mtab

It will take a long time to complete the quotacheck. After completing the quotacheck, run: /scripts/fixquotas