System Administration Guide

Changing and Removing Quotas

You can change quotas to adjust the amount of disk space or number of inodes users can consume. You can also remove quotas for individual users or from entire file systems as needed.

Table 58-4 describes the commands you use to change or remove quotas.

Table 58-4 Commands for Changing and Removing Quotas

Command 

Task 

edquota(1M)

Change the hard and soft limits on the number of inodes or disk space for each user. Also, change the soft quota time limit for each file system with a quota.  

quotaoff(1M) 

Turn off quotas for specified file systems. See the quotaoff(1M) man page for more information. 

How to Change the Soft Time Limit Default

Users can exceed the soft time limits for their quotas for one week, by default. This means that after a week of repeated violations of the soft time limits of either disk space or inode quotas, the system prevents users from using any more inodes or disk blocks.

You can change the length of time that users may exceed their disk space or inode quotas by using the edquota command.

  1. Become superuser.

  2. Use the quota editor to create a temporary file containing soft time limits.


    # edquota -t
    
  3. Change the time limits from 0 (the default) to the time limits you specify by numbers and the keywords month, week, day, hour, min, or sec.

  4. Exit the editor, saving your changes.


    Note -

    This procedure doesn't affect current quota violators.


Examples--Changing the Soft Time Limit Default

The following example shows the contents of the temporary file opened by edquota on a system where /export/home is the only mounted file system with quotas. The 0 (default) value means that the default time limit of one week is used.


fs /export/home blocks time limit = 0 (default), files time limit = 0 (default)

The following example shows the same temporary file after the time limit for exceeding the blocks quota has been changed to one week, and the time limit for exceeding the number of files has been changed to ten days.


fs /export/home blocks time limit = 2 weeks, files time limit = 16 days

How to Change Quotas for a User

  1. Become superuser.

  2. Use the quota editor to open a temporary file containing one line for each mounted file system that has a quotas file in its top-level directory.


    # edquota username
    

    username

    User name whose quota will be modified. 


    Caution - Caution -

    Although you can specify multiple users as arguments to the edquota command, the information displayed does not show which user it belongs to, which could create some confusion.


  3. Enter the number of 1-Kbyte disk blocks, both soft and hard, and the number of inodes, both soft and hard.

  4. Exit the editor, saving your changes.

  5. Verify that a user's quota has been correctly changed by using the quota command.


    # quota -v username
    

    -v

    Displays user quota information on all mounted file systems with quotas enabled. 

    username

    User name whose quota you want to check. 

Examples--Changing Quotas for a User

The following example shows the contents of the temporary file opened by edquota on a system where /files is the only mounted file system containing a quotas file in its top-level directory.


fs /files blocks (soft = 0, hard = 0) inodes (soft = 0, hard = 0)

The following example shows the same temporary file after quotas have been changed.


fs /files blocks (soft = 0, hard = 500) inodes (soft = 0, hard = 100)

The following example shows how to verify that the hard quotas for user smith have been changed to 500 1-Kbyte blocks, and 100 inodes.


# quota -v smith
Disk quotas for smith (uid 12):
Filesystem  usage  quota  limit  timeleft  files  quota  limit  timeleft
 
  /files     1       0     500              1       0     100

How to Disable Quotas for a User

  1. Become superuser.

  2. Use the quota editor to create a temporary file containing one line for each mounted file system that has a quotas file in its top-level directory.


    # edquota username
    

    username

    User name whose quota will be disabled. 


    Caution - Caution -

    Although you can specify multiple users as arguments to the edquota command, the information displayed does not show which user it belongs with, which could create some confusion.


  3. Change the number of 1-Kbyte disk blocks, both soft and hard, and the number of inodes, both soft and hard, to 0 (zero).


    Note -

    Be sure you change the values to zero. Do not delete the line from the text file.


  4. Exit the editor, saving your changes.

  5. Verify that you have disabled a user's quota by using the quota command.


    # quota -v username
    

    -v

    Displays user quota information on all mounted file systems with quotas enabled. 

    username

    User name (UID) whose quota you want to check. 

Examples--Disabling Quotas for a User

The following example shows the contents of the temporary file opened by edquota on a system where /files is the only mounted file system containing a quotas file in its top-level directory.


fs /files blocks (soft = 50, hard = 60) inodes (soft = 90, hard = 100)

The following example shows the same temporary file after quotas have been disabled.


fs /files blocks (soft = 0, hard = 0) inodes (soft = 0, hard = 10)
 

How to Turn Quotas Off

  1. Become superuser.

  2. Turn file system quotas off.


    # quotaoff [ -v ] -a | filesystem ...
    

    -v

    (Optional) Verbose option. 

    -a

    Turns quotas off for all file systems. 

    filesystem1, 2, 3 ...

    Turns quotas off for one or more file systems you specify. 

Example--Turning Quotas Off

The following example turns the quotas off for the /export/home file system.


# quotaoff -v /export/home
/export/home: quotas turned off