OpenVZ Forum


Home » General » Support » cPanel Quotas
icon2.gif  cPanel Quotas [message #3505] Wed, 31 May 2006 22:56 Go to next message
liamw is currently offline  liamw
Messages: 9
Registered: May 2006
Junior Member
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
Re: cPanel Quotas [message #3514 is a reply to message #3505] Thu, 01 June 2006 07:40 Go to previous messageGo to next message
dim is currently offline  dim
Messages: 344
Registered: August 2005
Senior Member
--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.

http://static.openvz.org/openvz_userbar_en.gif
Re: cPanel Quotas [message #3515 is a reply to message #3505] Thu, 01 June 2006 07:51 Go to previous messageGo to next message
liamw is currently offline  liamw
Messages: 9
Registered: May 2006
Junior Member
Hmm....

Still lost. Any extra help with that ?

Thanks
Liam
Re: cPanel Quotas [message #3516 is a reply to message #3515] Thu, 01 June 2006 07:53 Go to previous messageGo to next message
dim is currently offline  dim
Messages: 344
Registered: August 2005
Senior Member
Please provide output of the following commands inside VPS:
1) cat /etc/mtab
2) repquota -a


http://static.openvz.org/openvz_userbar_en.gif

[Updated on: Thu, 01 June 2006 07:54]

Report message to a moderator

Re: cPanel Quotas [message #3517 is a reply to message #3516] Thu, 01 June 2006 07:56 Go to previous messageGo to next message
liamw is currently offline  liamw
Messages: 9
Registered: May 2006
Junior Member
[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
Re: cPanel Quotas [message #3518 is a reply to message #3517] Thu, 01 June 2006 08:00 Go to previous messageGo to next message
youp is currently offline  youp
Messages: 82
Registered: September 2005
Location: Belgium
Member

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
Re: cPanel Quotas [message #3519 is a reply to message #3518] Thu, 01 June 2006 08:08 Go to previous messageGo to next message
liamw is currently offline  liamw
Messages: 9
Registered: May 2006
Junior Member
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
Re: cPanel Quotas [message #3520 is a reply to message #3519] Thu, 01 June 2006 08:13 Go to previous messageGo to next message
youp is currently offline  youp
Messages: 82
Registered: September 2005
Location: Belgium
Member

stop the vps and delete your quota.50 file first , and restart the command fixquota, it's work for me
Re: cPanel Quotas [message #3521 is a reply to message #3520] Thu, 01 June 2006 08:21 Go to previous messageGo to next message
liamw is currently offline  liamw
Messages: 9
Registered: May 2006
Junior Member
[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

[Updated on: Thu, 01 June 2006 08:22]

Report message to a moderator

Re: cPanel Quotas [message #3523 is a reply to message #3521] Thu, 01 June 2006 08:28 Go to previous messageGo to next message
youp is currently offline  youp
Messages: 82
Registered: September 2005
Location: Belgium
Member

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
Re: cPanel Quotas [message #3524 is a reply to message #3521] Thu, 01 June 2006 08:28 Go to previous messageGo to next message
dim is currently offline  dim
Messages: 344
Registered: August 2005
Senior Member
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.


http://static.openvz.org/openvz_userbar_en.gif
Re: cPanel Quotas [message #3529 is a reply to message #3524] Thu, 01 June 2006 11:20 Go to previous messageGo to next message
liamw is currently offline  liamw
Messages: 9
Registered: May 2006
Junior Member
Tried what youp said but still the problem remains

Have PM'd dim Smile

Thanks guys
Liam
Re: cPanel Quotas [message #3530 is a reply to message #3529] Thu, 01 June 2006 11:46 Go to previous messageGo to next message
dim is currently offline  dim
Messages: 344
Registered: August 2005
Senior Member
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.


http://static.openvz.org/openvz_userbar_en.gif
Re: cPanel Quotas [message #3534 is a reply to message #3530] Thu, 01 June 2006 14:14 Go to previous messageGo to next message
liamw is currently offline  liamw
Messages: 9
Registered: May 2006
Junior Member
Great - it's fixed.

Thanks very much.

Do you have any instructions for future cPanel VPS like this ?

Thanks
Liam
Re: cPanel Quotas [message #3535 is a reply to message #3534] Thu, 01 June 2006 14:43 Go to previous messageGo to next message
dim is currently offline  dim
Messages: 344
Registered: August 2005
Senior Member
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.


http://static.openvz.org/openvz_userbar_en.gif
Re: cPanel Quotas [message #3537 is a reply to message #3505] Thu, 01 June 2006 19:35 Go to previous messageGo to next message
liamw is currently offline  liamw
Messages: 9
Registered: May 2006
Junior Member
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
Re: cPanel Quotas [message #3544 is a reply to message #3505] Fri, 02 June 2006 12:44 Go to previous messageGo to next message
RapidVPS is currently offline  RapidVPS
Messages: 32
Registered: January 2006
Member
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

Re: cPanel Quotas [message #3552 is a reply to message #3544] Sat, 03 June 2006 06:37 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

it is also possible to replace quotacheck and fixquota tools with symlinks to /bin/true Smile


http://static.openvz.org/userbars/openvz-developer.png
Re: cPanel Quotas [message #3553 is a reply to message #3552] Sat, 03 June 2006 06:41 Go to previous messageGo to next message
RapidVPS is currently offline  RapidVPS
Messages: 32
Registered: January 2006
Member
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.

Re: cPanel Quotas [message #3555 is a reply to message #3553] Sun, 04 June 2006 04:45 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

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?


http://static.openvz.org/userbars/openvz-developer.png
Re: cPanel Quotas [message #3556 is a reply to message #3555] Sun, 04 June 2006 05:25 Go to previous messageGo to next message
RapidVPS is currently offline  RapidVPS
Messages: 32
Registered: January 2006
Member
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");
}

[Updated on: Sun, 04 June 2006 05:25]

Report message to a moderator

Re: cPanel Quotas [message #3557 is a reply to message #3556] Sun, 04 June 2006 07:57 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

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.


http://static.openvz.org/userbars/openvz-developer.png
Re: cPanel Quotas [message #6854 is a reply to message #3505] Mon, 25 September 2006 14:17 Go to previous messageGo to next message
gral is currently offline  gral
Messages: 34
Registered: May 2006
Member

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!!!



Argentina
--Vz--
icon14.gif  Re: cPanel Quotas [message #6858 is a reply to message #3505] Mon, 25 September 2006 15:25 Go to previous messageGo to next message
gral is currently offline  gral
Messages: 34
Registered: May 2006
Member

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 Very Happy


Argentina
--Vz--
Re: cPanel Quotas [message #20493 is a reply to message #3505] Wed, 19 September 2007 06:06 Go to previous messageGo to next message
sachin is currently offline  sachin
Messages: 27
Registered: September 2007
Junior Member
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

Re: cPanel Quotas [message #20495 is a reply to message #20493] Wed, 19 September 2007 06:28 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
ls -al / | grep quota

what does this show?


-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: cPanel Quotas [message #20505 is a reply to message #3505] Wed, 19 September 2007 10:15 Go to previous messageGo to next message
sachin is currently offline  sachin
Messages: 27
Registered: September 2007
Junior Member
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
Re: cPanel Quotas [message #21174 is a reply to message #3505] Wed, 03 October 2007 01:33 Go to previous messageGo to next message
pjssms is currently offline  pjssms
Messages: 3
Registered: October 2007
Junior Member
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 ?

[Updated on: Wed, 03 October 2007 02:13]

Report message to a moderator

Re: cPanel Quotas [message #21179 is a reply to message #21174] Wed, 03 October 2007 07:46 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

UGIDLIMIT=3000 in VE config and restart VE.


http://static.openvz.org/userbars/openvz-developer.png
Re: cPanel Quotas [message #21243 is a reply to message #21179] Wed, 03 October 2007 17:37 Go to previous messageGo to next message
pjssms is currently offline  pjssms
Messages: 3
Registered: October 2007
Junior Member
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,
Re: cPanel Quotas [message #21264 is a reply to message #21243] Thu, 04 October 2007 01:06 Go to previous message
pjssms is currently offline  pjssms
Messages: 3
Registered: October 2007
Junior Member
vzctl set 130 --quotaugidlimit 3000 --save
Previous Topic: problem with openvpn
Next Topic: * SOLVED 2 VLAN'd IPs in 1 VPS
Goto Forum:
  


Current Time: Sat Nov 09 01:46:05 GMT 2024

Total time taken to generate the page: 0.03251 seconds