
23-10-2006, 00:54
|
|
Senior System Administrator
|
|
Join Date: Oct 2006
Posts: 151
|
|
Turning On and Off Per-[url=http://www.eukhost.com/vps-hosting.php]VPS Hosting[/url] Disk Quotas
The parameter that defines whether to use first-level disk quotas is DISK_QUOTA in the Virtuozzo global configuration file (/etc/sysconfig/vz). By setting it to “no”, you will disable Virtuozzo quotas completely. This parameter can be specified in the Virtual Private Server configuration file (/etc/sysconfig/vz-scripts/[veid].conf) as well. In this case its value will take precedence of the one specified in the global configuration file. If you intend to have a mixture of Virtual Private Servers with quotas turned on and off, it is recommended to set the DISK_QUOTA value to “yes” in the global configuration file and to “no” in the configuration file of that VPS Hosting which does not need quotas.
The session below illustrates a scenario when first-level quotas are on by default and are turned off for Virtual Private Server 101:
Quote:
[checking that quota is on]
# grep DISK_QUOTA /etc/sysconfig/vz
DISK_QUOTA=yes
[checking available space on /vz partition]
# df /vz
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/sda2 8957295 1421982 7023242 17% /vz
[editing VPS Hosting configuration file to add DISK_QUOTA=no]
# vi /etc/sysconfig/vz-scripts/101.conf
[checking that quota is off for VPS Hosting 101]
# grep DISK_QUOTA /etc/sysconfig/vz-scripts/101.conf
DISK_QUOTA=no
# vzctl start 101
Starting VPS Hosting ...
VPS Hosting is mounted
Adding IP address(es): 192.168.1.101
Hostname for VPS Hosting set: ve101
VPS Hosting start in progress...
# vzctl exec 101 df
Filesystem 1k-blocks Used Available Use% Mounted on
vzfs 8282373 747060 7023242 10% /
|
As the above example shows, the only disk space limit a Virtual Private Server with the quotas turned off has is the available space and inodes on the partition where the VPS Hosting private area resides.
To view and/or change the DISK_QUOTA parameter using VZMC, do the following:
1 Select the Configuration item under the needed Node in the VZMC left pane:

2 Double-click on the disk_quota parameter in the right pane.
3 Select the needed value and press OK.
VZMC does not let you enable/disable disk quotas for separate Virtual Private Servers, thus overriding the global setting. If the first-level quotas are on by default, there is no way to rescind the calculation of quota data for a VPS Hosting by means of VZMC. However, you can allow this VPS Hosting to have an almost unlimited disk space and the number of inodes by doing the following:
1 Click Virtual Private Servers in the VZMC left pane, right-click the needed VPS Hosting in the right pane, and choose Properties.

2 Click the QoS tab and expand Disk Quota parameters:
3 Double-click the diskinodes parameter, and toggle off/on the Not limited checkbox depending on whether you want to limit or not the number of disk inodes for the given VPS Hosting, respectively.
4 Press OK.
5 If necessary, repeat Steps 3 and 4 for the diskspace parameter to limit the disk space for the given VPS Hosting or allow it to have unlimited disk space.
--------------------------------
Best Regards,
UKShane
http://www.eukhost.com
|