JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Sun QFS File System 5.3 Configuration and Administration Guide     Sun QFS and Sun Storage Archive Manager 5.3 Information Library
search filter icon
search icon

Document Information

Preface

1.  File System Overview

2.  About the Master Configuration File

3.  mcf File Examples

4.  Configuring the File System

5.  Configuring a Shared File System

6.  Administering File System Quotas

About File System Quotas

Types of Quotas, Quota Files, and Quota Records

Soft Limits and Hard Limits

Disk Blocks and File Limits

Enabling Quotas

Guidelines for Setting Up Quotas

How to Configure a New File System to Use Quotas

How to Configure an Existing File System to Use Quotas

How to Assign Admin Set IDs to Directories and Files

Setting Infinite Quotas

Enabling Default Quota Values

Enabling Limits

How to Enable or Change Limits for Users, Groups, or Admin Sets Using an Existing Quota File

Checking Quotas

Changing and Removing Quotas

How to Change the Grace Period

Changing the Grace Period Expiration

Inhibiting Additional File System Resource Allocations

How to Inhibit Additional File System Resource Allocations

How to Remove the Quotas for a File System

How to Correct Quotas

7.  Advanced File System Topics

8.  SMB Service in SAM-QFS

9.  Configuring WORM-FS File Systems

10.  Tunable Parameters

11.  Using QFS File Systems with SANergy (SAN-QFS)

12.  Mount Options in a Shared File System

13.  Using the samu Operator Utility

Changing and Removing Quotas

You can change quotas to adjust the amount of disk space or number of inodes allocated to users. You can also remove quotas from users or from an entire file system.

How to Change the Grace Period

  1. Retrieve quota statistics for a user, group, or admin set.

    See How to Enable or Change Limits for Users, Groups, or Admin Sets Using an Existing Quota File for instructions.

    The following example retrieves information about group sam and shows that this group is over its soft limit.

    # samquota -G sam /sam6
    
                             Online Limits                Total Limits
    Type    ID    In Use     Soft     Hard    In Use     Soft     Hard
    /sam6
    Files  group   101        32     2000     2000        32     2000     2000
    Blocks group   101     41888*   40000 60000000     43208 60000000 60000000
    Grace period                    1w                          1w
    ---> Online soft limits under enforcement (since 30s ago)
  2. Examine the output and determine the new limits.
  3. Change the soft time limit grace period. The following example shows the samquota command options to use.
    # samquota -U user-ID -t interval file
    # samquota -G group-ID -t interval file
    # samquota -A admin-ID -t interval file

    The arguments for these commands are as follows:

    • user-ID is the numeric user ID or user name of the user whose quotas are being changed.

    • group-ID is the numeric group ID or the group name for the group of users whose quotas are being changed.

    • admin-ID is the numeric admin set ID of the administrator set whose quotas are being changed.

    • interval is the duration of the grace period. Specify an integer to indicate the quantity and specify a unit of time, if desired. The default unit is s, which indicates seconds. You can specify w for weeks, d for days, h for hours, or m for minutes.

    • file is the file system for the specified user, group, or admin set. The file argument can also be the name of any file in the file system. Typically, file is the name of the root directory of the file system.

Example 6-1 Changing the Grace Period

  1. To change the grace period for user memil, first verify the quotas.

    # samquota -U memil /sam6
    
                             Online Limits                Total Limits
    Type    ID    In Use     Soft     Hard    In Use     Soft     Hard
    /sam6
    Files   user 130967         4      500      750         4      500      750
    Blocks  user 130967     41016+   40000    50000     41016    50000    50000
    Grace period                    3d                          0s
    ---> Warning:  online soft limits to be enforced in 2d23h59m7s
  2. Shorten the grace period.

    # samquota -U memil -t 1d /sam6
  3. Verify the new quotas.

    # samquota -U memil /sam6
                             Online Limits                Total Limits
    Type    ID    In Use     Soft     Hard    In Use     Soft     Hard
    /sam6
    Files   user 130967         4      500      750         4      500      750
    Blocks  user 130967     41016+   40000    50000     41016    50000    50000
    Grace period                    1d                          0s
    ---> Warning:  online soft limits to be enforced in 23h58m31s

Changing the Grace Period Expiration

If a user has exceeded the soft quota limit, changing the grace period itself does not modify the expiration timer of any grace periods that have already started. If the grace period is already in effect, you can use the samquota command to modify the grace period in one of the following ways:

Inhibiting Additional File System Resource Allocations

When the file system detects that quota values are not consistent for a user, group, or admin set, it prevents that user, group, or admin set from using any more system resources. You can inhibit file system resource allocations by creating inconsistent quota values. For example, you can inhibit further allocation if the hard block or file limits are lower than the soft block or file limits, or if a user's soft limit is larger than the user's hard limit.

The file system treats an inconsistent quota setting as a special quota. You can set inconsistent quota values into record zero of the user, group, or admin set ID quota files. They can then become the default values for new users, groups, or admin set IDs.

How to Inhibit Additional File System Resource Allocations

  1. Become superuser.
  2. Obtain, save, and examine current quota information.

    The following example shows how to retrieve current group quota information for group sam and write it to a backup file.

    # samquota -G sam -e /sam6 | & tee restore.quota.sam
    
    # Type  ID
    #                Online Limits                          Total   Limits
    #            soft            hard                    soft            hard
    # Files
    # Blocks
    # Grace Periods
    # samquota -G 101 \
          -f     2000:s:o -f     2000:h:o         -f     2000:s:t -f     2000:h:t \
          -b    40000:s:o -b 60000000:h:o         -b 60000000:s:t -b 60000000:h:t \
                     -t  1w:o                               -t 1w:t \
          -x 51w6d23h59m:o                       -x clear     /sam6

    To obtain quota information about a user quota, specify the -U user-ID option in place of the -G option. To obtain quota information about an admin set quota, specify the -A admin-ID option in place of the -G option.

  3. Use the samquota command to set soft quotas to nonzero quotas and hard quotas to zero quotas.

    The following command sets the quotas for group sam to be inconsistent.

    # samquota -G sam -f 1:s -f 0:h -b 1:s -b 0:h /sam6

    To make the quotas for users or admin sets inconsistent, specify the -U userID or-A adminID option in place of the -G option.

  4. Verify your changes, as in the following example:
    # samquota -G sam /sam6
    
    Online Limits                Total Limits
    Type    ID    In Use     Soft     Hard    In Use     Soft     Hard
    /sam6
    Files  group   101        32!       1        0        32!       1        0
    Blocks group   101     41888!       1        0     43208!       1        0
    Grace period                    1w                          1w
    ---> Quota values inconsistent; zero quotas in effect.

    In this output, a zero quota is in effect. The exclamation point characters (!) indicate the over-quota condition in the output.

  5. Restore the group's quota to what it was before the file/block allocation was inhibited and then to verify the changed quotas.

    The following example shows these commands.

    # sh restore.quota.sam
    Setting Grace Timer:  continue? y
    Setting Grace Timer:  continue? y
    # samquota -G sam /sam6
    Online Limits                Total Limits
    Type    ID    In Use     Soft     Hard    In Use     Soft     Hard
    /sam6
    Files  group   101        32     2000     2000        32     2000     2000
    Blocks group   101     41888+   40000 60000000     43208 60000000 60000000
    Grace period                    1w                          1w
    ---> Warning:  online soft limits to be enforced in 6d23h59m54s

    To perform this operation on a user quota, specify the -U user-ID option in place of the -G option. To perform this operation on an admin set quota, specify the -A admin-ID option in place of the -G option.

How to Remove the Quotas for a File System

To remove or disable quotas for a file system, disable quotas in the mount process.

  1. Become superuser.
  2. (Optional) Add the noquota mount option to the /etc/vfstab or samfs.cmd file.

    As an alternative, you can specify noquota as an option when you issue the mount command. See Step 4.

  3. If the file system is mounted, use the umount command to unmount the file system. For example:
    # umount /myfs

    For more information, see Unmounting File Systems in Sun QFS and Sun Storage Archive Manager 5.3 Installation Guide.

  4. Remount the file system.

    If you did not perform Step 2, include the noquota option with the mount command. For example:

    # mount -o noquota /myfs
  5. Manage the quota files by doing one of the following:
    • If you expect to reinstate the quota feature later and therefore do not want to destroy the quota files, unmount the file system, run the samfsck command with its -F option on the file system, and remount the file system with the noquota option removed.

    • If you do not expect to reinstate the quota feature or if you want to reclaim the space consumed by the quota files, use the rm command to remove the .quota_u, .quota_g, and .quota_a files. For example:

      # rm /myfs/.quota_[agu]

How to Correct Quotas

  1. Become superuser.
  2. If the file system is mounted, unmount the file system.

    For example:

    # umount /myfs

    If you have difficulty unmounting the file system, see Unmounting File Systems in Sun QFS and Sun Storage Archive Manager 5.3 Installation Guide.

  3. Perform a file system check.

    The samfsck command updates records allocated in the quota files with correct, current usage information. For example:

    # samfsck -F myfs
  4. Remount the file system.

    For example:

    # mount /myfs