RESOLUTION
If you see the following messages reported by
/scripts/fixquotas script inside a VE with CPanel installed in it
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.
Virtuozzo 2.6.2:
1. Please make sure that SWsoft's 'quota' package from OS template is
installed in the VE:
# 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 VE from OS template. Please find below an example for VE #101 based on Fedora Core 2 OS template:
# /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 VE:
# ln -sf /bin/true /sbin/quotacheck Please note, that upgrading quota package to non-SWsoft's one will break this workaround.
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:
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 VE as root:
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 {} / \; Keywords: quota cpanel whm fixquotas aquota.group aquota.user