mmsetquota command
Sets quota limits.
Synopsis
mmsetquota Device{[:FilesetName]
[--user IdOrName[,IdOrName]] [--group IdOrName[,IdOrName]]}
{[--block SoftLimit[:HardLimit]] [--files SoftLimit[:HardLimit]]}
or
mmsetquota Device[:FilesetName] --default {user | group}
{[--block SoftLimit[:HardLimit]] [--files SoftLimit[:HardLimit]]}
or
mmsetquota Device --default fileset
{[--block SoftLimit[:HardLimit]] [--files SoftLimit[:HardLimit]]}
or
mmsetquota Device --grace {user | group | fileset}
{[--block GracePeriod] [--files GracePeriod]}
or
mmsetquota -F StanzaFile
Availability
Available on all IBM Spectrum Scale™ editions. Available on AIX® and Linux.
Description
The mmsetquota command sets quota limits, default quota limits, or grace periods for users, groups, and file sets in the specified file system.
When setting quota limits for a file system, replication within the file system should be considered. For explanation, see Listing quotas.
Parameters
- Device
- Specifies the device name of the file system.
- FilesetName
- Specifies the name of a fileset located on Device for which quota information is to be set.
- IdOrName
- Specifies a numeric ID, user name, or group name.
- SoftLimit
- Specifies the amount of data or the number of files the user, group, or fileset will be allowed to use.
- HardLimit
- Specifies the amount of data or the number of files the user, group, or fileset will be allowed to use during a grace period. If omitted, the default is no limit. See note.
- GracePeriod
- Specifies the file-system grace period during which quotas can exceed the soft limit before it is imposed as a hard limit. See note.
- StanzaFile
- Specifies a file containing quota stanzas.
- --block
- Specifies the quota limits or grace period for data.
- --files
- Specifies the quota limits or grace period for files.
- --default
- Sets the default quota for the user, group, or fileset.
- --grace
- Sets the grace period for the user, group, or fileset.
- -F StanzaFile
- Specifies a file containing the quota stanzas for set quota, set default quota, or set grace
period.Quota stanzas have this format:
%quota: device=Device command={setQuota|setDefaultQuota|setGracePeriod} type={USR|GRP|FILESET} id=IdList fileset=FilesetName blockQuota=Number blockLimit=Number blockGrace=Period filesQuota=Number filesLimit=Number filesGrace=Period
where:- device=Device
- The device name of file system.
- command={setQuota|setDefaultQuota|setGracePeriod}
- Specifies the command to be executed for this stanza.
- setQuota
- Sets the quota limits. This command ignores blockGrace and filesGrace attributes.
- setDefaultQuota
- Sets the default quota limits. This command ignores id, blockGrace and filesGrace attributes.
- setGracePeriod
- Sets the grace periods. The command ignores id, fileset, and quota limit attributes. Grace periods can be set for each quota type in the file system.
- type={USR|GRP|FILESET}
- Specifies whether the command applies to user, group, or fileset.
- id=IdList
- Specifies a list of numeric IDs or user, group, or fileset names.
- fileset=FilesetName
- Specifies the fileset name for the perfileset quota setting. This attribute is ignored for type=FILESET
- blockQuota=Number
- Specifies the block soft limit. The number can be specified using the suffix K, M, G, or T. See note.
- blockLimit=Number
- Specifies the block hard limit. The number can be specified using the suffix K, M, G, or T. See note.
- filesQuota=Number
- Specifies the inode soft limit. The number can be specified using the suffix K, M, or G. See note.
- filesLimit=Number
- Specifies the inode hard limit. The number can be specified using the suffix K, M, or G. See note.
- blockGrace=Period
- Specifies the file-system grace period during which the block quotas can exceed the soft limit before it is imposed as a hard limit. The period can be specified in days, hours, minutes, or seconds.
- filesGrace=Period
- Specifies the file-system grace period during which the files quota can exceed the soft limit before it is imposed as a hard limit. The period can be specified in days, hours, minutes, or seconds.
- The maximum files limit is 2147483647.
- The maximum block limit is 999999999999999K. For values greater than 976031318016K (909T) and up to the maximum limit of 999999999999999K (about 931322T), you must specify the equivalent value with the suffix K, M, or G.
- If you want to check the grace period that is set, specify mmrepquota -t
Exit status
- 0
- Successful completion.
- nonzero
- A failure has occurred.
Security
You must have root authority to run the mmsetquota command.
GPFS™ must be running on the node from which the mmsetquota command is issued.
You may issue the mmsetquota command only from a node in the GPFS cluster where the file system is mounted.
The node on which the command is issued must be able to execute remote shell commands on any other node in the cluster without the use of a password and without producing any extraneous messages. For more information, see Requirements for administering a GPFS file system.
Examples
- The following command sets the block soft and hard limit to 25G
and 30G and files soft and hard limit to 10K and 11K, respectively
for user user234:
# mmsetquota fs1 --user user234 --block 25G:30G --files 10K:11K
To verify the change, issue the following command:# mmlsquota -u user234 fs1 Block Limits | File Limits Filesystem Fileset type KB quota limit in_doubt grace | files quota limit in_doubt grace Remarks fs1 root USR 143688 26214400 31457280 0 none | 1 10240 11264 0 none fs1 mkfiles2 USR no limits fs1 ifset1 USR no limits fs1 1111 USR no limits fs1 ifset2 USR no limits
- If perfileset quota is enabled, the following command sets block
soft and hard limit to 5G and 7G, respectively, for group fvt090 and
for fileset ifset2:
# mmsetquota fs1:ifset2 --group fvt090 --block 5G:7G
To verify the change, issue the following command:# mmlsquota -g fvt090 fs1 Disk quotas for group fvt090 (gid 2590): Block Limits | File Limits Filesystem Fileset type KB quota limit in_doubt grace | files quota limit in_doubt grace Remarks fs1 root GRP none fs1 mkfiles2 GRP none fs1 ifset1 GRP none fs1 1111 GRP none fs1 ifset2 GRP 143704 5242880 7340032 0 none | 1 0 0 0 none
- To change the user grace period for block data to 10 days, issue
the following command:
# mmsetquota fs1 --grace user --block 10days
- All of the previous examples can be done in one invocation of mmsetquota by
using quota stanza file. The stanza file /tmp/quotaExample may
look like this:
%quota: device=fs1 command=setquota type=USR id=user234 blockQuota=25G blockLimit=30G filesQuota=10K filesLimit=11K %quota: device=fs1 command=setquota type=GRP id=fvt090 fileset=ifset2 blockQuota=5G blockLimit=7G %quota: device=fs1 command=setgraceperiod type=user blockGrace=10days
Then issue the command:# mmsetquota –F /tmp/quotaExample