Default quotas

Default quota limits can be set for new users, groups, and filesets for a specified file system. Default quota limits can also be applied at a more granular level for new users and groups in a specified fileset.

When default quotas are managed at the fileset level, those quotas have a higher priority than those set at the file system level. If the status of the fileset-level defaults for one fileset is Initial, they will inherit default limits from global fileset-level defaults. The status of newly added fileset-level default quotas can be one of the following:
Initial
When the fileset is created, it will be in this state. All user and group quota accounts under the fileset will not follow the fileset defaults.
Quota on
All user and group quota accounts under the fileset that are created later will follow the fileset quota limits.
Quota off
All user and group quota accounts under the fileset that are created later will not follow the fileset quota limits. The users and groups will follow global fileset-level defaults if they are valid. If those defaults are not valid, the status will be initial.
Specific default quota recommendations for protocols:
  • Since the protocols may have vastly different fileset requirements, it is not recommended to use default quotas at the fileset level. Rather, set explicit quotas and limits for each fileset in use by any and all protocols on a case-by-case basis.
  • NFS: Prepare a default quota stanza file template, and at NFS export creation time, apply the default user or group quotas to the export path (assuming the export is an independent fileset) using per-fileset default quotas.
  • SMB: Prepare a default quota stanza file template, and at SMB share creation time, apply the default user or group quotas to the share path (assuming the export is an independent fileset) using per-fileset default quotas.
  • Object: IBM® recommends using a single independent fileset, objectfs, for the object container. See IBM Redpaper: A Deployment Guide for IBM Spectrum Scale Object for details. With regard to quotas, here are the relevant sections from the Redpaper™:
    • GPFS™ quotas: The amount of disk space and the number of inodes that are assigned as upper limits for a specified user, group of users, or fileset. With OpenStack Swift, GPFS user quotas are not used; instead, the system relies on OpenStack Swift quotas to provide a similar type of service. However, GPFS fileset quotas can still be defined (for example, for inodes, to limit the resources that are consumed by the fileset). See Chapter 1.3 Key concepts and terminology of the IBM Redpaper for details.
    • Swift quotas: Allows specification of the amount of disk space or number of objects that can be consumed by either an account (and subsequently all of its containers) or to an individual container. The interaction between Swift quotas and GPFS quotas are described in more detail in Chapter 6 Swift feature overview and Chapter 1.3 Key concepts and terminology of the IBM Redpaper.
    • Quotas: Swift quotas allow a specific amount of disk capacity to be allocated to either containers or accounts by using Swift quotas. They also allow a limit on the maximum number of objects to be specified for containers or accounts. See Chapter 6 Swift feature overview of the IBM Redpaper for details.
      Note: Although GPFS quotas do not explicitly interact with Swift quotas, it still might be useful to employ GPFS quotas to limit the amount of space or the number of inodes that is consumed by the object store. To do this, define GPFS quotas on the top-level independent fileset by specifying the maximum size or maximum inode usage that the object store can consume. See Chapter 6 Swift feature overview of the IBM Redpaper for details.
To enable default quota values:
  1. Ensure the file system is configured correctly to use quotas:
    1. The -Q yes option must be in effect for the file system.
    2. To set default quotas at the fileset level, the --perfileset-quota option must also be in effect.
      Note: If --perfileset-quota is in effect, all users and groups in the fileset root will not be impacted by default quota unless they are explicitly set.
    The -Q yes and --perfileset-quota options are specified when creating a file system with the mmcrfs command or changing file system attributes with the mmchfs command. Use the mmlsfs command to display the current settings of these quota options.
  2. Enable default quotas with the mmdefquotaon command.
  3. Specify default quota values for new users, groups, and filesets by issuing the mmdefedquota command using a default quota stanza file. A single invocation of the mmsetquota command using a quota stanza file can perform the following operations:
    • Set default user quotas on a file system.
    • Set default group quotas on a file system.
    • Set a default perfileset user quota on a fileset (if --perfileset-quota is in effect).
    The stanza file /tmp/defaultQuotaExample may look like this:
    %quota: 
     device=fs1
     command=setDefaultQuota
     type=USR
     blockQuota=25G 
     blockLimit=30G
     filesQuota=10K
     filesLimit=11K
    %quota: 
     device=fs1
     command=setDefaultQuota
     type=GRP
     blockQuota=75G 
     blockLimit=90G
     filesQuota=30K
     filesLimit=33K
    %quota: 
     device=fs1
     command=setDefaultQuota
     type=USR
     fileset=fset0
     blockQuota=25G 
     blockLimit=30G
     filesQuota=10K
     filesLimit=11K
    Then issue the command:
    # mmsetquota –F /tmp/defaultQuotaExample
  4. To activate quota checking, use the mmquotaon command.
  5. To list quotas, use the mmlsquota command:

The default quotas can be deactivated by issuing the mmdefquotaoff command.

For fileset recommendations, see Filesets and quotas.

For complete usage information, see mmchfs command, mmcrfs command, mmdefedquota command, mmdefquotaoff command, mmdefquotaon command, mmedquota command, mmlsfs command, and mmsetquota command.