Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

System Administration Guide: Advanced Administration
Previous Next

Changing and Removing Quotas

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

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

Table 7-3 Commands for Changing Quotas and Removing Quotas

Command

Man Page

Description

edquota

edquota(1M)

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

quotaoff

quotaon(1M)

Turns off quotas for specified file systems.

How to Change the Soft 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 can exceed their disk space quotas or inode quotas by using the edquota command.

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  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 that you specify. So, use numbers and the keywords month, week, day, hour, min, or sec.

    Note - This procedure does not affect current quota violators.


Example 7-8 Changing the Soft 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 2 weeks. Also, 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 or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Use the quota editor to open a temporary file that contains 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 - You can specify multiple users as arguments to the edquota command. However, the user that this information belongs to, is not displayed. To avoid confusion, specify only one user name.


  3. Specify 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.

Example 7-9 Changing Quotas for a User

The following example shows the contents of the temporary file opened by the edquota command. This temporary file is opened 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 output shows the same temporary file after quotas have been changed.

fs /files blocks (soft = 0, hard = 500) inodes (soft = 0, hard = 100)
Example 7-10 Verifying That Hard Quotas Have Been Changed

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 or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  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 - You can specify multiple users as arguments to the edquota command. However, the user that this information belongs to, is not displayed. To avoid confusion, specify only one user name.


  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 - Ensure that 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.

Example 7-11 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 or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  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 that you specify. More than one file system is specified by separating each file system name with a space.

Example 7-12 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
Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire