Creating a Quota

By creating quotas, you can control and collect statistics on the size and number of files in namespaces, dtrees, and subdirectories of namespaces or dtrees.

Prerequisites

Procedure

  1. Choose Resources > Tuning > SmartQuota > Custom Quotas.
  2. Select a desired account from the Account drop-down list in the upper left corner.
  3. Click Create.

    The Create Quota page is displayed.

  4. Select a desired namespace, dtree, or directory.

    • When creating a directory quota for a namespace, leave the Dtree parameter blank.
    • If you want to create a directory quota for each dtree in a namespace (set Dtree to All dtrees), you need to create the directory quota after the namespace is created and ensure that the namespace does not contain any dtree. After the directory quota is created, it takes effect for all newly-created dtrees in the namespace, and each dtree is limited separately.
    • When setting a quota for a namespace or dtree, retain the / setting for Directory. When setting a quota for a sub-directory of a namespace or dtree, click Browse. On the Browse Directory page that is displayed, select a directory of the namespace or dtree.
      • You can click Create to create a directory. The directory name contains 1 to 255 characters, including only digits, letters, hyphens (-), and underscores (_).
      • Click the search bar and enter the full path of the parent directory. The value contains 1 to 4096 characters, including only digits, letters, hyphens (-), and underscores (_). The value must start with a slash (/) and cannot use consecutive slashes (/).
      • Click Modify in the row where a directory is located. On the Modify Directory page that is displayed, modify the access permissions of the directory.
      • You can create a multi-level directory. Click in the row where a directory is located to go to the directory and create a sub-directory for it, or click to return to the upper-level directory.
      • Click to refresh the directory information.
      • Enter a directory name and click to search for the required directory information.

  5. In Quota Type, select a quota type. Possible options are Directory quota, User quota, and User group quota.

    • Directory quota: limits the space usage or file quantity of the namespace or dtree.
    • User quota: limits the space usage or file quantity used by a single user.
      1. Click Choose.

        The Select User page is displayed.

      2. Select the users for which you want to create a quota.
        • If you select All users, the quota will control the space usage or file quantity of each user, respectively.
        • If you select Specified users, the quota will control the space usage or file quantity of each specified user. Click Add. On the Add User page that is displayed, add users, including UNIX Users and Windows Users. Then, click OK.
          • UNIX Users include Local authentication user, LDAP domain user, and NIS domain user. Windows Users include Local authentication user and AD domain user.
          • When adding users, if you set User Type to Local authentication user, select the users to be added in the list below.
          • When adding users, if you set User Type to LDAP domain user, NIS domain user, or AD domain user, enter the user names in the Name text box.
          • To remove added users, click Remove on the right of a desired user, or select one or more desired users and click Remove.
        • If you select Specified user groups, the quota will control the space usage or file quantity of each user in specified user groups, respectively. Click Add. On the Add User Group page that is displayed, add user groups. Then, click OK.
          • When adding user groups, if you set User Group Type to Local authentication user group, select the user groups to be added in the list below.
          • When adding user groups, if you set User Group Type to LDAP domain user group or NIS domain user group, enter the user group names in the Name text box.
          • To remove added user groups, click Remove on the right of a desired user group, or select one or more desired user groups and click Remove.
      3. Click OK.
    • User group quota: controls the space usage or file quantity used by a single user group.
      1. Click Select.

        The Select User Group page is displayed.

      2. Select the user groups for which you want to create a quota.
        • If you select All user groups, the quota will control the space usage or file quantity of each user group, respectively.
        • Specified user groups: controls the space usage or file quantity of each specified user group. Click Add. On the Add User Group page that is displayed, add user groups. Then, click OK.
          • If you set User Group Type to Local authentication user group, select the user groups to be added in the list below.
          • If you set User Group Type to LDAP domain user group or NIS domain user group, enter the user group names in the Name text box.
          • To remove added user groups, click Remove on the right of a desired user group, or select one or more desired user groups and click Remove.
      3. Click OK.

  6. Set quota parameters. Table 1 describes related parameters.

    Table 1 Quota parameters

    Parameter

    Description

    Space Quota

    Hard Quota

    If the used file space reaches the space hard quota, the system immediately forbids writes and reports an alarm. The file space that exceeds the hard quota cannot be used.

    [Value range]

    1 KB to 256 PB

    The value must be greater than those of Soft Quota and Advisory Quota.

    NOTE:

    If the used file space reaches the hard quota, the system forbids writes. If you want the system to report an alarm before writes are forbidden, set a soft quota and an advisory quota.

    Soft Quota

    If the used file space reaches the space soft quota, the system reports an alarm but still allows writes. If the soft quota grace period elapses or hard quota is reached, the system immediately forbids writes and reports an alarm.

    [Value range]

    1 KB to 256 PB

    The value must be greater than that of Advisory Quota and less than that of Hard Quota.

    Advisory Quota

    If the used file space reaches the space advisory quota, the system reports an alarm but still allows writes.

    [Value range]

    1 KB to 256 PB

    The value must be less than those of Soft Quota and Hard Quota.

    Collect Snapshot Space Statistics

    Whether to collect statistics of the snapshot space included in the used file space.

    NOTE:

    This parameter is displayed only when Directory is set to root directory / and Quota Type is set to Directory quota.

    File Quantity Quota

    Hard Quota (K)

    If the number of files reaches the file quantity hard quota, the system reports an alarm and new files cannot be added. However, operations on existing files are not affected. The unit is thousands.

    [Value range]

    1 to 100,000,000

    The value must be greater than those of Soft Quota (K) and Advisory Quota (K).

    NOTE:

    If the number of files reaches the hard quota, the system forbids file adding. If you want the system to report an alarm before files cannot be added, set a soft quota and an advisory quota.

    Soft Quota (K)

    If the number of files reaches the file quantity soft quota, the system reports an alarm but new files can still be added. If the soft quota grace period elapses or hard quota is reached, new files cannot be added and an alarm is reported. The unit is thousands.

    [Value range]

    1 to 100,000,000

    The value must be greater than that of Advisory Quota (K) and less than that of Hard Quota (K).

    Advisory Quota (K)

    If the number of files reaches the advisory quota, the system reports an alarm but new files can still be added.

    [Value range]

    1 to 100,000,000

    The value must be less than those of Soft Quota (K) and Hard Quota (K).

    Grace Period

    Soft Quota Grace Period (Days)

    If the used file space or number of files reaches the soft quota, the system generates an alarm but still allows writes or new files can still be added within this period. If this period elapses, the system immediately forbids writes and new files cannot be added. In addition, an alarm is reported.

    [Value range]

    1 to 4,294,967,294.

    If this parameter is not specified, the grace period is unlimited. In this case, if the used file space or number of files reaches the soft quota, the system reports an alarm but does not restrict users' writing data or adding new files.

    NOTE:

    This parameter can be set only when Soft Quota or Soft Quota (K) is set.

    If you do not set any quota for the space usage or file quantity, the system does not control the space usage or file quantity.

  7. Click OK.