How to fix problems with /scripts/fixquotas script from CPanel installed in
VPS Hosting ?
If you see the following messages reported by /scripts/fixquotas script inside a
VPS Hosting with cPanel installed in it.
Quote:
Updating Quota Files......
quotacheck: WARNING - Quota file info was corrupted.
quotacheck: Block 0: Reference to illegal block 1
quotacheck: Block 1: Reference to illegal block 3
|
and as a result cPanel is showing "unlimited" quota reports for all users in the system you may fix them using the ways described below.
For Virtuozzo 2.6.2:
1. Please make sure that SWsoft's 'quota' package from OS template is installed in the
VPS Hosting:
Quote:
# rpm -q quota
quota-3.XX-X.X.swsoft
|
quota' package should have 'swsoft' in its suffix. If 'quota' package does not have 'swsoft' suffix you may reinstall it into a
VPS Hosting from OS template. Please find below an example for
VPS Hosting #101 based on Fedora Core 2 OS template:
Quote:
|
# /usr/share/vzpkgtools/vzrpm/bin/rpm --root /vz/root/101 --veid 101 --dbpath /var/lib/rpm -ihv --force /vz/template/fedora-core-2/quota-3.10-2.2.swsoft.i386.vz.rpm
|
2. Issue the following command inside
VPS Hosting:
Quote:
|
# ln -sf /bin/true /sbin/quotacheck
|
Please note that upgrading quota package to non-SWsoft's one will break this workaround.
For Virtuozzo 3.0 and higher:
There is no need to install SWsoft's 'quota' package in VE running on Virtuozzo 3.0 node, the reason of problem is that CPanel has a tendency to overwrite the special quota files in the VE context:
Quote:
lrwxr-xr-x 1 root root 39 Jun 8 17:27 aquota.group -> /proc/vz/vzaquota/00000073/aquota.group
lrwxr-xr-x 1 root root 38 Jun 8 17:27 aquota.user -> /proc/vz/vzaquota/00000073/aquota.user
|
A solution to this is to run these commands from within the
VPS Hosting as root:
Quote:
rm -rf /aquota.user 2>/dev/null
rm -rf /aquota.group 2>/dev/null
unlink /aquota.user 2>/dev/null
unlink /aquota.group 2>/dev/null
ln -sf /bin/true /sbin/quotacheck
find /proc/vz/vzaquota/*$(stat -c %t%T /dev/vzfs)/* -type f -exec ln -sf {} / \;
|