Previous page

Next page

Locate page in Contents

Print this page

Managing Quota Parameters

Virtuozzo provides the standard Linux quota package for working inside Containers:

# prlctl exec 101 rpm -q quota

quota-3.17-16.el6.x86_64

This command shows that the quota package installed in the Container is built and shipped by Virtuozzo. Use the utilities from this package (as is prescribed in your Linux manual) to set second-level quotas for the given Container. For example:

# prlctl enter 101

CT-101-bash-4.1# edquota root

Disk quotas for user root (uid 0):

Filesystem blocks soft hard inodes soft hard

/dev/ploop1p1 38216 50000 60000 45454 70000 70000

CT-101-bash-4.1# repquota -a

*** Report for user quotas on device /dev/ploop1p1

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]

CT-101-bash-4.1# dd if=/dev/zero of=test

dd: writing to `test': Disk quota exceeded

23473+0 records in

23472+0 records out

CT-101-bash-4.1# repquota -a

*** Report for user quotas on device /dev/ploop1p1

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 1-KB 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, consult the system administration guide shipped with your Linux distribution or online manual pages included in the package.