Previous page

Next page

Locate page in Contents

Print this page

Setting Up Second-Level Disk Quota Parameters

Parallels Server Bare Metal provides the standard Linux quota package for working inside Containers:

# pctl exec 101 rpm -q quota

quota-3.03-1.1.parallels

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

# ssh ct101

root@ct101's password:

Last login: Sat Jul 5 00:37:07 2009 from 10.100.40.18

[root@ct101 root]# edquota root

Disk quotas for user root (uid 0):

Filesystem blocks soft hard inodes soft hard

/dev/vzfs 38216 50000 60000 45454 70000 70000

[root@ct101 root]# repquota -a

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

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@ct101 root]# dd if=/dev/zero of=test

dd: writing to `test': Disk quota exceeded

23473+0 records in

23472+0 records out

[root@ct101 root]# repquota -a

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

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