Monday, April 30, 2012

vzquota

This command is used to configure and see disk quota statistics for Containers. vzquota is also
used to turn on the possibility of using per-user/group quotas inside the Container. It allows you to
configure per-user or per-group quota inside the Container as well. vzctl uses vzquota
internally to configure quotas and you usually do not have to use vzquota except for checking the
current quota statistics. The syntax of vzquota command is as follows:
vzquota [options] command <CT_ID> [command-options]
General options available to all vzquota commands are:
-v Verbose mode.
-q Quiet mode. 


[root@tester ~]# vzquota -v show 50 -t
vzquota : (warning) Quota is running, so data reported from quota file may not reflect current values
   resource          usage       softlimit      hardlimit    grace
  1k-blocks         886472        20000000       20000000
     inodes          19529          200000         220000


User/group quota: off,inactive
Ugids: loaded 0, total 0, limit 0
Ugid limit was exceeded: no

User/group grace times and quotafile flags:
 type block_exp_time inode_exp_time  dqi_flags
 user                                       0h
group                                       0h


[root@tester ~]# vzquota -v stat 50
   resource          usage       softlimit      hardlimit    grace
  1k-blocks         844332        20000000       20000000
     inodes          19573          200000         220000


vzquota understands the following commands:
init Before you can use quota, the current disk space and inode usage should be counted. For
the init command, you must specify all the limits as well as the file tree where you want
to initialize the quota.
drop Removes the quota file.
on Turns on quota accounting on the specified quota ID.
off Turns off quota accounting on the specified quota ID.
setlimit Allows you to change quota limits for the running quota.
setlimit2 Set the second-level quota parameters.
stat Shows quota statistics for the running quota.
show Shows quota usage from the quota file




No comments: