System Administration Guide: Advanced Administration

Changing and Removing Quotas

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

The following table describes the commands you use to change quotas or remove quotas.

Table 17–3 Commands for Changing Quotas and Removing Quotas

Command 

Man Page 

Description 

edquota

edquota

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

quotaoff

quotaoff(1M)

Turns off quotas for specified file systems.  

How to Change the Soft Time Limit Default

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

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

  1. Become superuser.

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


    # edquota -t
    

    Where the -t option specifies the editing of the soft time limits for each file system.

  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.


    Note –

    This procedure does not affect current quota violators.


Examples—Changing the Soft Time Limit Default

The following example shows the contents of the temporary file opened by the edquota command on a system where /export/home is the only mounted file system with quotas. The default value, 0, 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 two weeks, and the time limit for exceeding the number of files has been changed to 16 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 the file system's root directory.


    # edquota username
    

    Where username specifies the user name whose quota you want to change.


    Caution – Caution –

    Although you can specify multiple users as arguments to the edquota command, the information displayed does not show which user this information 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. Verify that a user's quota has been correctly changed.


    # quota -v username
    

    -v

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

    username

    Specifies the 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 the edquota command on a system where /files is the only mounted file system containing a quotas file in the file system's root 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
    

    Where username specifies the user name whose quota you want to disable.


    Caution – Caution –

    Although you can specify multiple users as arguments to the edquota command, the information displayed does not show which user this information 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.


    Note –

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


  4. Verify that you have disabled a user's quota.


    # quota -v username
    

    -v

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

    username

    Specifies the 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 the edquota command on a system where /files is the only mounted file system that contains a quotas file in the file system's root 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 = 0)

How to Turn Off Quotas

  1. Become superuser.

  2. Turn off file system quotas.


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

    -v

    Displays a message from each file system when quotas are turned off. 

    -a

    Turns off quotas for all file systems. 

    filesystem

    Turns off quotas for one or more file systems you specify. More than one file system is specified by separating each file system name with a space. 

Example—Turning Off Quotas

The following example shows how to turn off the quotas for the /export/home file system.


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