mmdefedquota command
Sets default quota limits.
Synopsis
mmdefedquota {-u | -g | -j} Device
or
mmdefedquota {-u | -g} Device:Fileset
Availability
Available on all IBM Spectrum Scale editions. Available on AIX® and Linux.
Description
Use the mmdefedquota command to set or change default quota limits. 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.
Default quota limits can be set or changed only if the -Q yes option is in effect for the file system and if quotas are enabled with the mmdefquotaon command. To set default quotas at the fileset level, the --perfileset-quota option must also be in effect. If --perfileset-quota is in effect, all users and groups in the fileset root are not impacted by default quota unless they are explicitly set. The -Q yes and --perfileset-quota options are specified when you create 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.
- The current block usage: The amount of disk space that is used by this user, group, or fileset, in 1 KB units; display only.
- The current inode usage: Display only.
- Inode soft limit.
- Inode hard limit.
- Block soft limit: The amount of disk space that this user, group, or fileset is allowed to use during normal operation.
- Block hard limit: The amount of disk space that this user, group, or fileset is allowed to use
during the grace
period.Note on block limits:
- The command displays the current block limits in KB.
- When you specify a block limit, you can add a suffix to the number to indicate the unit of measure: g, G, k, K, m, M, p, P, t, or T. If you do not specify a suffix, the command assumes that the number is in bytes.
- The maximum block limit is 999999999999999 K (about 931322 T). For values greater than 976031318016 K (909 T) you must specify the equivalent value with the suffix K, M, or G or without any suffix.
Note: A block or inode limit of 0 indicates no limit.
The mmdefedquota command waits for the edit window to be closed before it checks and applies new values. If an incorrect entry is made, reissue the command and enter the correct values.
When you set quota limits for a file system, consider replication within the file system. For more information, see Listing quotas.
export EDITOR=/bin/vi
Parameters
- Device
- The device name of the file system to have default quota values set for.
File system names need not be fully qualified.
- Fileset
- The name of a fileset in the file system to have default quota values set for.
Options
- -g
- Specifies that the default quota value is to be applied for new groups that access the specified file system or fileset.
- -j
- Specifies that the default quota value is to be applied for new filesets in the specified file system.
- -u
- Specifies that the default quota value is to be applied for new users that access the specified file system or fileset.
- The maximum files limit is 2147483647.
- See the Note on block limits earlier in this topic.
- If you want to display the current grace period, issue the command mmrepquota -t.
Exit status
- 0
- Successful completion.
- Nonzero
- A failure has occurred.
Security
You must have root authority to run the mmdefedquota command.
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.
GPFS must be running on the node from which the mmdefedquota command is issued.
Examples
- To set default quotas for new users of the file system gpfs1, issue
the following command:
The system displays the following information:mmdefedquota -u gpfs1
The following code block shows how to change the soft block limit to 19 GB, the hard block limit to 20 GB, the inode soft limit to 1 KB, and the inode hard limit to 20 KB:*** Edit quota limits for USR DEFAULT entry NOTE: block limits will be rounded up to the next multiple of the block size. block units may be: K, M, G, T or P, inode units may be: K, M or G. gpfs1: blocks in use: 0K, limits (soft = 0K, hard = 0K) inodes in use: 0, limits (soft = 0, hard = 0)
After the edit window is closed, issue the following command to confirm the change:*** Edit quota limits for USR DEFAULT entry NOTE: block limits will be rounded up to the next multiple of the block size. block units may be: K, M, G, T or P, inode units may be: K, M or G. gpfs1: blocks in use: 0K, limits (soft = 19G, hard = 20G) inodes in use: 0, limits (soft = 1K, hard = 20K)
The system displays the following information:mmlsquota -d -u gpfs1
Default Block Limits(KB) | Default File Limits Filesystem type quota limit | quota limit Remarks gpfs1 USR 19922944 20971520 | 1024 20480
- To set default quotas for new users of fileset fset1 in file system
gpfs1, issue the following
command:
The system displays the following information in your default editor:mmdefedquota -u gpfs1:fset1
Change the soft block limit to 3 GB and the hard block limit to 6 GB, as shown in the following code block:*** Edit quota limits for USR DEFAULT entry for fileset fset1 NOTE: block limits will be rounded up to the next multiple of the block size. block units may be: K, M, G, T or P, inode units may be: K, M or G. gpfs1: blocks in use: 0K, limits (soft = 0K, hard = 31457280K) inodes in use: 0, limits (soft = 0, hard = 0)
After the edit window is closed, issue this command to confirm the change:*** Edit quota limits for USR DEFAULT entry for fileset fset1 NOTE: block limits will be rounded up to the next multiple of the block size. block units may be: K, M, G, T or P, inode units may be: K, M or G. gpfs1: blocks in use: 0K, limits (soft = 3G, hard = 6G) inodes in use: 0, limits (soft = 0, hard = 0)
The system displays the following information:mmlsquota -d gpfs1:fset1
Default Block Limits(KB) | Default File Limits Filesystem Fileset type quota limit | quota limit entryType gpfs1 fset1 USR 3145728 6291456 | 0 0 default on gpfs1 fset1 GRP 0 0 | 0 0 default on