OpenVZ Forum - RDF feed
type: channel
items: cPanel Quotas
items: Re: cPanel Quotas

cPanel Quotas
type: item
description: 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
creator: liamw
date: 2006-05-31T22:56:30-00:00

Re: cPanel Quotas
type: item
description: --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.
creator: dim
date: 2006-06-01T07:40:53-00:00

Re: cPanel Quotas
type: item
description: Hmm.... Still lost. Any extra help with that ? Thanks Liam
creator: liamw
date: 2006-06-01T07:51:14-00:00

Re: cPanel Quotas
type: item
description: Please provide output of the following commands inside VPS: 1) cat /etc/mtab 2) repquota -a
creator: dim
date: 2006-06-01T07:53:36-00:00

Re: cPanel Quotas
type: item
description: [root@new ~]# vzctl enter 50 entered into VPS 50 -bash-3.00# cat /etc/mtab /dev/simfs / reiserfs rw,usrquota,grpquota 0 0 proc /proc proc rw,nodiratime 0 0 devpts /dev/pts devpts rw 0 0 /tmp /var/tmp none rw,noexec,nosuid,bind 0 0 -bash-3.00# repquota -a *** Report for user quotas on device /dev/simfs Block grace time: 00:00; Inode grace time: 00:00 Block limits File limits User used soft hard grace used soft hard grace ------------------------------------------------------------ ---------- root -- 1877380 0 0 59072 0 0 bin -- 22896 0 0 97 0 0 daemon -- 500 0 0 50 0 0 nobody -- 12 0 0 6 0 0 named -- 52 0 0 13 0 0 rpm -- 13744 0 0 109 0 0 mailnull -- 132 0 0 31 0 0 apache -- 8 0 0 2 0 0 exim -- 8 0 0 2 0 0 mysql -- 21364 0 0 108 0 0 mailman -- 60652 0 0 4071 0 0 cpanel -- 79724 0 0 4426 0 0 liamtest -- 188 0 0 53 0 0 #500 -- 2088 0 0 107 0 0 #501 -- 7320 0 0 751 0 0 #502 -- 60 0 0 13 0 0 #1000 -- 44336 0 0 3779 0 0 #1001 -- 2016 0 0 165 0 0 #253 -- 268 0 0 30 0 0 #39957 -- 52 0 0 10 0 0 ------- THANK YOU Liam
creator: liamw
date: 2006-06-01T07:56:36-00:00

Re: cPanel Quotas
type: item
description: 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
creator: youp
date: 2006-06-01T08:00:57-00:00

Re: cPanel Quotas
type: item
description: 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
creator: liamw
date: 2006-06-01T08:08:23-00:00

Re: cPanel Quotas
type: item
description: stop the vps and delete your quota.50 file first , and restart the command fixquota, it's work for me
creator: youp
date: 2006-06-01T08:13:02-00:00

Re: cPanel Quotas
type: item
description: [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
creator: liamw
date: 2006-06-01T08:21:39-00:00

Re: cPanel Quotas
type: item
description: 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
creator: youp
date: 2006-06-01T08:28:11-00:00

Re: cPanel Quotas
type: item
description: 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.
creator: dim
date: 2006-06-01T08:28:31-00:00

Re: cPanel Quotas
type: item
description: Tried what youp said but still the problem remains Have PM'd dim Thanks guys Liam
creator: liamw
date: 2006-06-01T11:20:13-00:00

Re: cPanel Quotas
type: item
description: 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.
creator: dim
date: 2006-06-01T11:46:59-00:00

Re: cPanel Quotas
type: item
description: Great - it's fixed. Thanks very much. Do you have any instructions for future cPanel VPS like this ? Thanks Liam
creator: liamw
date: 2006-06-01T14:14:53-00:00

Re: cPanel Quotas
type: item
description: 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.
creator: dim
date: 2006-06-01T14:43:07-00:00

Re: cPanel Quotas
type: item
description: 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
creator: liamw
date: 2006-06-01T19:35:37-00:00

Re: cPanel Quotas
type: item
description: 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
creator: RapidVPS
date: 2006-06-02T12:44:15-00:00

Re: cPanel Quotas
type: item
description: it is also possible to replace quotacheck and fixquota tools with symlinks to /bin/true
creator: dev
date: 2006-06-03T06:37:20-00:00

Re: cPanel Quotas
type: item
description: 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.
creator: RapidVPS
date: 2006-06-03T06:41:59-00:00

Re: cPanel Quotas
type: item
description: 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?
creator: dev
date: 2006-06-04T04:45:01-00:00

Re: cPanel Quotas
type: item
description: 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"); }
creator: RapidVPS
date: 2006-06-04T05:25:00-00:00

Re: cPanel Quotas
type: item
description: 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.
creator: dev
date: 2006-06-04T07:57:19-00:00

Re: cPanel Quotas
type: item
description: 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!!!
creator: gral
date: 2006-09-25T14:17:37-00:00

Re: cPanel Quotas
type: item
description: 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
creator: gral
date: 2006-09-25T15:25:41-00:00

Re: cPanel Quotas
type: item
description: 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
creator: sachin
date: 2007-09-19T06:06:56-00:00

Re: cPanel Quotas
type: item
description: ls -al / | grep quota what does this show?
creator: rickb
date: 2007-09-19T06:28:19-00:00

Re: cPanel Quotas
type: item
description: 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
creator: sachin
date: 2007-09-19T10:15:28-00:00

Re: cPanel Quotas
type: item
description: 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 ?
creator: pjssms
date: 2007-10-03T01:33:35-00:00

Re: cPanel Quotas
type: item
description: UGIDLIMIT=3000 in VE config and restart VE.
creator: dev
date: 2007-10-03T07:46:46-00:00

Re: cPanel Quotas
type: item
description: 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,
creator: pjssms
date: 2007-10-03T17:37:35-00:00

Re: cPanel Quotas
type: item
description: vzctl set 130 --quotaugidlimit 3000 --save
creator: pjssms
date: 2007-10-04T01:06:23-00:00