H-Sphere Documentation Sysadmin Guide

For more information contact us at info@psoft.net

VPS Quota Reconfiguration
(version 2.3.1 RC2 and higher)

 

Related Docs:  

VPS Installation

VPS quota allows you to specify limits on two aspects of disk storage for your Virtual Private Server:
- the number of inodes a user or a group of users may have;
- the number of disk blocks that may be allocated to a user or a group of users.

To enable VPS quota for all Virtual Private Servers, you need to have:
- new kernel (build 1056256121) installed on the host box (steps 4-9 of VPS update guide);
- new Virtual Private Server tools (hsphere-vps-0.98-25 package) installed on the host box (steps 10-13 of VPS update guide);
- new quota-3.03-2 package for Virtual Private Servers installed on all VPS (step 13 of VPS update guide).
Remember that this package is only for VPS installation!

Virtual Private Servers update (see VPS update guide) installs quota-3.03-2 on all existing Virtual Private Servers, enables quota on root partition (/) and configures VPS to turn on/off quotas at the VPS start/stop.

To reconfigure quota on Virtual Private Server:
  1. Enter Virtual Private Server:
    # cd /hsphere/shared/scripts/
    # ./vps-enter VPS_NAME
    or log into it with SSH:
    # ssh root@VPS_NAME (or # ssh root@VPS_IP_ADDRESS)
  2. here VPS_NAME - name of Virtual Private Server (VPS_IP_ADDRESS - VPS IP address)
  3. Modify /etc/fstab
    Partitions where quota is not yet enabled normally look like:
    /dev/hdv1 / ext2 defaults 1 1

    To enable user quota on a file system (for example, on the root partition), add "usrquota" to the fourth column - the one that contains the word "defaults" (refer to man fstab for details):
    /dev/hdv1 / ext2 defaults,usrquota 1 1

    To enable both user quota and group quota on a file system:
    /dev/hdv1 / ext2 defaults,usrquota,grpquota 1 1

    By default, your Virtual Private Servers are to be configured with user and group quota enabled on the root partition (/).
  4. Activate the quota software by running quotacheck. That will generate the files to maintain the quota databases (refer to man quotacheck for more details):
    # /sbin/quotacheck -avugm
    Here:
    -a - check quota for all mount points specified in /etc/fstab
    -m - creates quota files
    -u - check user quota
    -g - check on group quota
    -f - forces check
  5. quotaon and quotaoff
    quotaon is used to turn on quota accounting:
    # quotaon -augv
    Run quotaoff to turn it off:
    # quotaoff -augv
    These commands are executed at the Virtual Private Server start and stop, respectively.
  6. Check the quota information for mountpoints:
    # repquota -a
    or
    # quotastats

Related Docs:  

VPS Installation



Home   Products   Services   Partners   Support   News   Contact   Forum
© Copyright 1998-2003. Positive Software Corporation.
All rights reserved.