You can run that command until you grow old and on openVz unless second level quotas are enabled - nothing. I ran into this dilema on my machines and fixed it easily. If you do not run the box (dedi) have your host apply these commands. I would suggest the users be set to the possible maximum clients for that box.
Turning On and Off Second-Level Quotas for Container
The parameter that controls the second-level disk quotas is
QUOTAUGIDLIMIT in the Container configuration file.
By default, the value of this parameter is zero and this
corresponds to disabled per-user/group quotas.
If you assign a non-zero value to the
QUOTAUGIDLIMIT parameter, this action brings about
the two following results:
1. Second-level (per-user and per-group) disk quotas are enabled for
the given Container;
2. The value that you assign to this parameter will be the limit for the
number of file owners and groups of this Container, including
Linux system users. Note that you will theoretically be able to create extra users of this Container, but if the number of file
owners inside the Container has already reached the limit, these
users will not be able to own files.
Enabling per-user/group quotas for a Container requires restarting
the Container. The value for it should be carefully chosen; the
bigger value you set, the bigger kernel memory overhead this
Container creates. This value must be greater than or equal to the
number of entries in the Container /etc/passwd and /etc/group files. Taking into account that a newly created
Red Hat Linux-based CT has about 80 entries in total, the typical
value would be 100. However, for Containers with a large number
of users this value may be increased.
REMEMBER in kloxo - client = user!
The session below turns on second-level quotas for Container 101:
# vzctl set 101 --quotaugidlimit 100 --save
Unable to apply new quota values: ugid quota not initialized
Saved parameters for CT 101
# vzctl restart 101
Restarting container
Stopping container ...
Container was stopped
Container is unmounted
Starting container ...
Container is mounted
Adding IP address(es): 192.168.16.123
Setting CPU units: 1000
Configure meminfo: 65536
File resolv.conf was modified
Container start in progress...
Setting Up Second-Level Disk Quota Parameters
In order to work with disk quotas inside a Container, you should
have standard quota tools installed:
# vzctl exec 101 rpm -q quota
quota-3.12-5
This command shows that the quota package is installed into the
Container. Use the utilities from this package (as is prescribed in
your Linux manual) to set OpenVZ second-level quotas for the
given CT. For example:
# ssh ve101
root@ve101's password:
Last login: Sat Jul 5 00:37:07 2003 from 10.100.40.18
[root@ve101 root]# edquota root
Disk quotas for user root (uid 0):
Filesystem blocks soft hard inodes soft hard
/dev/simfs 38216 50000 60000 45454 70000 70000
[root@ve101 root]# 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 — 38218 50000 60000 45453 70000 70000
[the rest of repquota output is skipped]
[root@ve101 root]# dd if=/dev/zero of=test
dd: writing to `test': Disk quota exceeded
23473+0 records in
23472+0 records out
[root@ve101 root]# 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 +- 50001 50000 60000 none 45454 70000 70000
[the rest of repquota output is skipped]
The above example shows the session when the root user has the
disk space quota set to the hard limit of 60,000 1Kb blocks and to
the soft limit of 50,000 1Kb blocks; both hard and soft limits for
the number of inodes are set to 70,000.
It is also possible to set the grace period separately for block limits
and inodes limits with the help of the /usr/sbin/setquota
command. For more information on using the utilities from the
quota package, please consult the system administration guide
shipped with your Linux distribution or manual pages included in
the package.
So essentially - you need to issue three commands for the container. EASY to do and magically all quotas will work on the OpenVZ vps. Verified
Hope this helps Mustafa. Would really like quota use in Kloxo - fast and real-time disk usage statistics would be available.