Quota

GPFS provides three types of Quota:

  • Per User
  • Per Group
  • Per Fileset

In addition, quotas can also be appplied to specific users and groups within a Fileset.

Quotas per fileset are only available for Independent Filesets (or globally)

Quotas can either be created independently, or via their parent Filesystem or Fileset object. (See Quotas collection)

Note

Quotas for per-user-per-fileset and per-group-per-fileset are not supported via the API, although this form of quota can be set interactively using the mmedquota command

Important

Due to a bug in GPFS, if the filesystem or cluster manager is changed, any subsequent quota operation will fail. If the operation is repeated, the operation will be successful.

This issue has been resolved in the following versions and subsequent releases:

  • 3.5.0.33
  • 4.1.1.9
  • 4.2.0.4
  • 4.2.1.1

Description

class arcapix.fs.gpfs.quota.GroupQuota(name, filesystemName, filesetName=None, **kwargs)

Represents a quota which is applied to a group

Construct a quota object. Params are:

Parameters:
  • name (str) – The name of the quota. This is either the user, group, or fileset.
  • filesystemName (str) – The name of the filesystem this quota is on
  • filesetName (str) – Optional - store a copy of the fileset name this user or group quota applies to.

Other optional parameters include:

blockSoftLimit, blockHardLimit, filesSoftLimit, filesHardLimit

or

blockQuota, blockLimit, filesQuota and filesLimit

filesetName

Name of the fileset this quota applies to, or None if filesystem wide

Return type:str
blockGracePeriod

The number of seconds between a user exceeding the soft blocks limit (aka blockQuota), and being unable to write further data.

Returns None if no grace period is set

Return type:long
blockHardLimit

The limit on the number of allocated blocks

AKA Hard Limit - Space which cannot be exceeded

Synonym for blockLimit

Return type:long
blockInDoubt

The number of blocks which are uncertain.

blockUsage+blockInDoubt < blockHardLimit

Return type:long
blockLimit

The limit on the number of allocated blocks

AKA Hard Limit - Space which cannot be exceeded

Synonym for blockHardLimit

Return type:long
blockQuota

The number of allocated blocks at which point quota warning will trigger.

i.e. the grace period will commence.

Synonym for blockSoftLimit

Return type:long
blockSoftLimit

The number of allocated blocks at which point quota warning will trigger.

i.e. the grace period will commence.

Synonym for blockQuota

Return type:long
blockUsage

Number of blocks in use

Return type:long
change(**kwargs)

Performs changes to an existing quota object.

Possible parameters are:

blockSoftLimit, blockHardLimit, filesSoftLimit, filesHardLimit

or

blockQuota, blockLimit, filesQuota and filesLimit

Return type:None
create()

Creates the quota, based on the values which were passed in during construction.

NOTE: Quotas for per-user-per-fileset and per-group-per-fileset are not supported via the API, although this form of quota can be set interactively using the mmedquota command

Return type:None
delete()

Removes the quota

filesGracePeriod

The number of seconds between a user exceeding the soft files limit (aka filesQuoata), and being unable to create further files.

Returns None if no grace period is set

Return type:long
filesHardLimit

The limit on the total number of files which cannot be exceeded.

Synonym for filesLimit

Return type:long
filesInDoubt

Number of files which are uncertain

Return type:long
filesLimit

The limit on the total number of files which cannot be exceeded.

Synonym for filesHardLimit

Return type:long
filesQuota

The number of files at which quota operations (i.e. grace period) will be trigged.

Synonym for filesSoftLimit

Return type:long
filesSoftLimit

The number of files at which quota operations (i.e. grace period) will be trigged.

Synonym for filesQuota

Return type:long
filesUsage

Number of files currently created.

Return type:long
filesystemName

Returns the filesystem Name

Return type:str
name

Name of this quota - user, group or fileset

Return type:str
class arcapix.fs.gpfs.quota.UserQuota(name, filesystemName, filesetName=None, **kwargs)

Represents a quota which is applied to a user

Construct a quota object. Params are:

Parameters:
  • name (str) – The name of the quota. This is either the user, group, or fileset.
  • filesystemName (str) – The name of the filesystem this quota is on
  • filesetName (str) – Optional - store a copy of the fileset name this user or group quota applies to.

Other optional parameters include:

blockSoftLimit, blockHardLimit, filesSoftLimit, filesHardLimit

or

blockQuota, blockLimit, filesQuota and filesLimit

filesetName

Name of the fileset this quota applies to

Returns None if filesystem wide

Return type:str
blockGracePeriod

The number of seconds between a user exceeding the soft blocks limit (aka blockQuota), and being unable to write further data.

Returns None if no grace period is set

Return type:long
blockHardLimit

The limit on the number of allocated blocks

AKA Hard Limit - Space which cannot be exceeded

Synonym for blockLimit

Return type:long
blockInDoubt

The number of blocks which are uncertain.

blockUsage+blockInDoubt < blockHardLimit

Return type:long
blockLimit

The limit on the number of allocated blocks

AKA Hard Limit - Space which cannot be exceeded

Synonym for blockHardLimit

Return type:long
blockQuota

The number of allocated blocks at which point quota warning will trigger.

i.e. the grace period will commence.

Synonym for blockSoftLimit

Return type:long
blockSoftLimit

The number of allocated blocks at which point quota warning will trigger.

i.e. the grace period will commence.

Synonym for blockQuota

Return type:long
blockUsage

Number of blocks in use

Return type:long
change(**kwargs)

Performs changes to an existing quota object.

Possible parameters are:

blockSoftLimit, blockHardLimit, filesSoftLimit, filesHardLimit

or

blockQuota, blockLimit, filesQuota and filesLimit

Return type:None
create()

Creates the quota, based on the values which were passed in during construction.

NOTE: Quotas for per-user-per-fileset and per-group-per-fileset are not supported via the API, although this form of quota can be set interactively using the mmedquota command

Return type:None
delete()

Removes the quota

filesGracePeriod

The number of seconds between a user exceeding the soft files limit (aka filesQuoata), and being unable to create further files.

Returns None if no grace period is set

Return type:long
filesHardLimit

The limit on the total number of files which cannot be exceeded.

Synonym for filesLimit

Return type:long
filesInDoubt

Number of files which are uncertain

Return type:long
filesLimit

The limit on the total number of files which cannot be exceeded.

Synonym for filesHardLimit

Return type:long
filesQuota

The number of files at which quota operations (i.e. grace period) will be trigged.

Synonym for filesSoftLimit

Return type:long
filesSoftLimit

The number of files at which quota operations (i.e. grace period) will be trigged.

Synonym for filesQuota

Return type:long
filesUsage

Number of files currently created.

Return type:long
filesystemName

Returns the filesystem Name

Return type:str
name

Name of this quota - user, group or fileset

Return type:str
class arcapix.fs.gpfs.quota.FilesetQuota(name, filesystemName, **kwargs)

Represents a quota which is applied to a specific fileset.

NB. One can also have quotas for users within a fileset

Construct a quota object. Params are:

Parameters:
  • name (str) – The name of the quota. This is either the user, group, or fileset.
  • filesystemName (str) – The name of the filesystem this quota is on
  • filesetName (str) – Optional - store a copy of the fileset name this user or group quota applies to.

Other optional parameters include:

blockSoftLimit, blockHardLimit, filesSoftLimit, filesHardLimit

or

blockQuota, blockLimit, filesQuota and filesLimit

blockGracePeriod

The number of seconds between a user exceeding the soft blocks limit (aka blockQuota), and being unable to write further data.

Returns None if no grace period is set

Return type:long
blockHardLimit

The limit on the number of allocated blocks

AKA Hard Limit - Space which cannot be exceeded

Synonym for blockLimit

Return type:long
blockInDoubt

The number of blocks which are uncertain.

blockUsage+blockInDoubt < blockHardLimit

Return type:long
blockLimit

The limit on the number of allocated blocks

AKA Hard Limit - Space which cannot be exceeded

Synonym for blockHardLimit

Return type:long
blockQuota

The number of allocated blocks at which point quota warning will trigger.

i.e. the grace period will commence.

Synonym for blockSoftLimit

Return type:long
blockSoftLimit

The number of allocated blocks at which point quota warning will trigger.

i.e. the grace period will commence.

Synonym for blockQuota

Return type:long
blockUsage

Number of blocks in use

Return type:long
change(**kwargs)

Performs changes to an existing quota object.

Possible parameters are:

blockSoftLimit, blockHardLimit, filesSoftLimit, filesHardLimit

or

blockQuota, blockLimit, filesQuota and filesLimit

Return type:None
create()

Creates the quota, based on the values which were passed in during construction.

NOTE: Quotas for per-user-per-fileset and per-group-per-fileset are not supported via the API, although this form of quota can be set interactively using the mmedquota command

Return type:None
delete()

Removes the quota

filesGracePeriod

The number of seconds between a user exceeding the soft files limit (aka filesQuoata), and being unable to create further files.

Returns None if no grace period is set

Return type:long
filesHardLimit

The limit on the total number of files which cannot be exceeded.

Synonym for filesLimit

Return type:long
filesInDoubt

Number of files which are uncertain

Return type:long
filesLimit

The limit on the total number of files which cannot be exceeded.

Synonym for filesHardLimit

Return type:long
filesQuota

The number of files at which quota operations (i.e. grace period) will be trigged.

Synonym for filesSoftLimit

Return type:long
filesSoftLimit

The number of files at which quota operations (i.e. grace period) will be trigged.

Synonym for filesQuota

Return type:long
filesUsage

Number of files currently created.

Return type:long
filesystemName

Returns the filesystem Name

Return type:str
name

Name of this quota - user, group or fileset

Return type:str

Examples

Creating a Quota entry directly

>>> from arcapix.fs.gpfs import UserQuota, GroupQuota, FilesetQuota
>>>
>>> # Create a specific quota for a user
... myquota = UserQuota('pixuser', 'mmfs1', blockHardLimit=65536, blockSoftLimit=32768)
>>> myquota.create()
>>>
>>> # Create a group quota within a specific fileset
... myquota = GroupQuota('pixgroup', 'mmfs1', filesetName='independent1', filesSoftLimit=100, filesHardLimit=200)
>>> myquota.create()
>>>
>>> # Create a per fileset Quota
... myquota = FilesetQuota('independent1', 'mmfs1', blockHardLimit=128000)
>>> myquota.create()

Creating a Quota entry via the cluster object directly

>>> from arcapix.fs.gpfs import Cluster
>>>
>>> # Create a quota on a specific fileset.
... fset = Cluster().filesystems["mmfs1"].filesets["val"]
>>> fset.quotas.user.new("pixuser", blockSoftLimit=16384, blockHardLimit=32768)
>>>
>>> # Modify an existing quota
... fset.quotas.user['pixuser'].change(blockHardLimit=65536)
>>>
>>> # Modify a fileset quota via the fileset object
... fset.change(blockSoftLimit=16384, blockHardLimit=32768)