Hey I've just started to get the hang of OpenVZ and have read through the forum and it has helped me on a lot of things but I could only find 2 posts on this and they didn't help... I installed cPanel on a CentOS VPS created using OpenVZ. But the quotas are broken.. I was reading something about second level quotas ? I tried to enable them using this and then restarting but it didnt work... vzctl set 50 --quotaugidlimit 1000 --save All of the quotas show as unlimited. Any ideas? Thanks Liam
--quotaugidlimit sets limit on the number of users/groups, for which second level quota is supported. Use edquota command inside VPS or vzquota on hardware node. `man vzquota` and `man edquota` will help.
Hmm.... Still lost. Any extra help with that ? Thanks Liam
Please provide output of the following commands inside VPS: 1) cat /etc/mtab 2) repquota -a
stop the VPS, and delete the file quota.50 in /var/vzquota/ and restart the VPS. when the vps is started, start the script /scripts/fixquota BR
I did that... fixquotas did run without all of the "illegal" errors.... but it's still showing as unlimited in cPanel: -bash-3.00# /scripts/fixquotas Installing Default Quota Databases......Done Quotas are now on Updating Quota Files...... quotacheck: Scanning /dev/simfs [/] done quotacheck: Checked 5801 directories and 69024 files quotacheck: Cannot turn user quotas off on /dev/simfs: Invalid argument Kernel won't know about changes quotacheck did. quotacheck: Cannot turn group quotas off on /dev/simfs: Invalid argument Kernel won't know about changes quotacheck did. quotacheck: Scanning /dev/simfs [/] done quotacheck: Checked 5801 directories and 69024 files ....Done Resetting quota for liamtest to 50 M ------------ Thanks Liam
stop the vps and delete your quota.50 file first , and restart the command fixquota, it's work for me
[root@new ~]# vzctl stop 50 Stopping VPS ... VPS was stopped VPS is unmounted quota.50 deleted from /var/vzquota/ [root@new ~]# vzctl restart 50 Restarting VPS Starting VPS ... Initializing quota ... VPS is mounted Adding IP address(es): 66.199.236.252 Setting CPU units: 1000 Set hostname: testvps.domain.com File resolv.conf was modified Setting quota ugidlimit: 1000 VPS start in progress... *Entered into VPS 50 and ran /scripts/fixquotas* quotacheck: Block 1: Reference to illegal block 0 quotacheck: Block 1: Reference to illegal block 0 quotacheck: Block 1: Reference to illegal block 0 quotacheck: Block 1: Reference to illegal block 0 quotacheck: Block 1: Reference to illegal block 0 *Re-running /scripts/fixquotas for a 2nd time* -bash-3.00# /scripts/fixquotas Installing Default Quota Databases......Done Quotas are now on Updating Quota Files...... quotacheck: Scanning /dev/simfs [/] done quotacheck: Checked 5806 directories and 69026 files quotacheck: Cannot turn user quotas off on /dev/simfs: Invalid argument Kernel won't know about changes quotacheck did. quotacheck: Cannot turn group quotas off on /dev/simfs: Invalid argument Kernel won't know about changes quotacheck did. quotacheck: Scanning /dev/simfs [/] done quotacheck: Checked 5806 directories and 69026 files ....Done Resetting quota for liamtest to 50 M *Quotas still show as unlimited in cPanel* Any ideas? Appreciate your help Liam
could you restest with this commands : # vzctl stop $VPSID # vzquota drop $VPSID # vzctl start $VPSID and ran fixquota after ... you could check the quota with edquota edquota $username BR
did you try `edquota` inside VPS? If you'll provide access to your node (in PM please, or by email to dim_at_openvz_org), I could check what's wrong myself.
Tried what youp said but still the problem remains Have PM'd dim Thanks guys Liam
In our VPS, when the sesond level quota is enabled, files /aquota.{user,group} are symlinks to /proc/vz/vzaquota/*/aquota.{user,group} files. They are created by vzctl on the VPS start. Seems that CPanel somehow brokes them, rewriting by the regular file. Fixed for VPS 50.
Great - it's fixed. Thanks very much. Do you have any instructions for future cPanel VPS like this ? Thanks Liam
I don't use CPanel. Probably, if it asks to recreate user/group quotas, you shoudl answer no. Anyway, if the above problem arises, just remove /aquota.* files and make them to be symlinks to respective /proc/vz/vzaquota/* files.
Hmm Thanks for that. There doesn't seem to be any files in /proc/vz/vzaquota/.... Any clues for creating the symlinks ? Trying to fix it on another VPS now Thanks Liam
Heres what I do, there may be a more elegant solution, but its free: 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 for x in `find /proc/vz/vzaquota/ | tail -1 | xargs find | tail -2 `; do ln -s $x /; done
it is also possible to replace quotacheck and fixquota tools with symlinks to /bin/true
Quote: it is also possible to replace quotacheck and fixquota tools with symlinks to /bin/true Smile Bad solution because all of the files in /scripts are frequently freshened during a cpanel update.
does CPanel ship its own version of quotacheck? sounds unbelievable for me. Can you strace fixquota please to check whether it recalculates quota itself or simply executes std /sbin/quotacheck?
Cpanel uses standard linux quota tools, it has many scripts which wrap the tools you are used to. /scripts/initquotas: print "Updating Quota Files......"; if ($val =~ /quota-format/ || $val =~ /Utility for checking/) { quotarun("/sbin/quotacheck","-guvamf","-F","vfsv0"); quotarun("/sbin/quotacheck","-guvamf","-F","vfsold"); } elsif ($val =~ /invalid option/ || $val =~ /usage: quotacheck -a/) { quotarun("/sbin/quotacheck","-guva"); } else { quotarun("/sbin/quotacheck","-Ffguva"); }
Ok, in this case I suggest to replace /sbin/quotacheck (which is not part of CPanel) with /bin/true. This tool is really rare to be updated.
i still with problems, i try everything in this thread but my quotas continue unlimited, question... The quotas must be enabled in the hardware node right? Cheers!!!
Fix it! Heres what I do, there may be a more elegant solution, but its free: 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 for x in `find /proc/vz/vzaquota/ | tail -1 | xargs find | tail -2 `; do ln -s $x /; done But why do it this, the WHM take the correct quota??, and this fix my repquota -a too, because before that the repquota show the hard and the soft limit in 0 and now the limits are correct! Thanks
i did the above steps but when i check in list account it is still showing unlimited do i have to restart vps or run fixquota? Thank you
ls -al / | grep quota what does this show?
ls -al / | grep quota lrwxrwxrwx 1 root root 18 Sep 19 14:05 vzaquota -> /proc/vz/vzaquota// we are facing this issue when we transfered vps from old server to new server. Thank you
I use hypervm. How do i stop and restart the vps ?. I have found it. with the root access. Now, i am getting this error: vzquota : (warning) ugid_limit [1000] < ugid_current_usage [1041] vzquota : (warning) ugid_limit [1000] < ugid_current_usage [1041] vzquota : (warning) Quotas were not loaded for some users/groups for id 130 due to ugid limit VE is mounted How do i increase this ugid limit ?
UGIDLIMIT=3000 in VE config and restart VE.
thank you for your answer. But where is VE config ? Is a parameter ? A file ? or some program i must run ?. After stoping the vps or when ? Thank you,
vzctl set 130 --quotaugidlimit 3000 --save