Previous  |  Next  >  
Product: File System Guides   
Manual: File System 4.1 Administrator's Guide   

Using Quotas

You can use quotas to allocate per-user quotas on VxFS file systems.

See Quotas and the following manual pages for more information about the quota, quotaon, quotaoff, and edquota commands and their available options:

    • edquota(1M)
    • quota(1M)
    • quotaon(1M)
    • quotaoff(1M)

How to Turn On Quotas

You can enable quotas at mount time or after a file system is mounted. The root directory of the file system must contain a file named quotas that is owned by root.

To turn on quotas for a mounted file system, use the syntax:


 quotaon mount_point

To mount a file system and turn on quotas at the same time, use the syntax:


  mount -F vxfs -o quota special mount_point

If the root directory does not contain a quotas file, the mount command succeeds, but quotas are not turned on.


Example

To create a quotas file (if it does not already exist) and turn on quotas for a VxFS file system mounted at /mnt, enter:


# touch /mnt/quotas
# quotaon /mnt

To turn on quotas for a file system at mount time, enter:


 # mount -F vxfs -o quota /dev/vx/dsk/fsvol/vol1 /mnt

How to Set Up User Quotas

You can set user quotas with the edquota command if you have superuser privileges. User quotas can have a soft limit and/or hard limit. You can modify the limits or assign them specific values. Users are allowed to exceed the soft limit, but only for a specified time. Disk usage can never exceed the hard limit. The default time limit for exceeding the soft limit is seven days on VxFS file systems.

edquota creates a temporary file for a specified user. This file contains on-disk quotas for each mounted VxFS file system that has a quotas file. The temporary file has one or more lines similar to:


fs /mnt blocks (soft = 0, hard = 0) inodes (soft=0, hard=0)
fs /mnt1 blocks (soft = 100, hard = 200) inodes (soft=10, hard=20)

Quotas do not need to be turned on for edquota to work. However, the quota limits apply only after quotas are turned on for a given file system.

edquota has an option to modify time limits. Modified time limits apply to the entire file system; you cannot set time limits for an individual user.

To invoke the quota editor, use the syntax:


  edquota username

To modify the time limit, use the syntax:


  edquota -t

How to View Quotas

The superuser or individual user can view disk quotas and usage on VxFS file systems using the quota command. To view quotas for a specific user, use the syntax:


 quota -v username

This command displays the user's quotas and disk usage on all mounted VxFS file systems where the quotas file exists. You will see all established quotas regardless of whether or not the quotas are actually turned on.

How to Turn Off Quotas

You can turn off quotas for a mounted file system using the quotaoff command. To turn off quotas for a file system, use the syntax:


  quotaoff mount_point

Example

To turn off quotas for a VxFS file system mounted at /mnt, enter:


 # quotaoff /mnt
 ^ Return to Top Previous  |  Next  >  
Product: File System Guides  
Manual: File System 4.1 Administrator's Guide  
VERITAS Software Corporation
www.veritas.com