mmcheckquota command
Checks file system user, group and fileset quotas.
Synopsis
mmcheckquota [-v] [-N {Node[,Node...] | NodeFile | NodeClass}]
[--qos QosClass] {-a | Device [Device ...]}
or mmcheckquota {-u UserQuotaFile | -g GroupQuotaFile | -j FilesetQuotaFile}
[--qos QosClass] Device
ormmcheckquota --backup backupDir Device
Availability
Available on all IBM Spectrum Scale™ editions. Available on AIX® and Linux.
Description
- Count inode and space usage in a file system by user, group and
fileset, and write the collected data into quota files. Note: In cases where small files do not have an additional block allocated for them, quota usage may show less space usage than expected.
- Replace either the user, group, or fileset quota files, for the file system designated by Device, thereby restoring the quota files for the file system. These files must be contained in the root directory of Device. If a backup copy does not exist, an empty file is created when the mmcheckquota command is issued.
- MMFS_QUOTA error log entries. This error log entry is created when the quota manager has a problem reading or writing the quota file.
- Quota information is lost due to a node failure. A node failure could leave users unable to open files or deny them disk space that their quotas should allow.
- The in-doubt value is approaching
the quota limit.
The sum of the in-doubt value and the current usage may not exceed the hard limit. Consequently, the actual block space and number of files available to the user of the group may be constrained by the in-doubt value. If the in-doubt value approaches a significant percentage of the quota, use the mmcheckquota command to account for the lost space and files.
- User, group, or fileset quota files are corrupted.
The mmcheckquota command is I/O-intensive and should be run when the system load is light. When issuing the mmcheckquota command on a mounted file system, negative in-doubt values may be reported if the quota server processes a combination of up-to-date and back-level information. This is a transient situation and can be ignored.
If a file system is ill-replicated, the mmcheckquota command will not be able to determine exactly how many valid replicas actually exist for some of the blocks. If this happens, the used block count results from mmcheckquota will not be accurate. It is recommended that you run mmcheckquota to restore accurate usage count after the file system is no longer ill-replicated.
Parameters
- -a
- Checks all GPFS™ file systems in the cluster from which the command is issued.
- --backup BackupDirectory
- Specifies a backup directory, which must be in the same GPFS file system as the root directory
of Device.
In IBM Spectrum Scale V4.1.1 and later, you can use this parameter to copy quota files. The command copies three quota files to the specified directory.
- Device
- Specifies the device name of the file system. File system names do not need to be fully-qualified. fs0 is as acceptable as /dev/fs0.
- -g GroupQuotaFileName
- Replaces the current group quota file with the file indicated.
When replacing quota files with the -g option, the quota file must be in the root directory of the GPFS file system.
- -j FilesetQuotaFilename
- Replaces the current fileset quota file with the file indicated.
When replacing quota files with the -j option, the quota file must be in the root directory of the GPFS file system.
- -N {Node[,Node...] | NodeFile | NodeClass}
- Specifies the nodes that will participate in a parallel quota
check of the system. This command supports all defined node classes.
The default is all or the current value
of the defaultHelperNodes parameter of the mmchconfig command.
For general information on how to specify node names, see Specifying nodes as input to GPFS commands.
- -u UserQuotaFilename
- Replaces the current user quota file with the file indicated.
When replacing quota files with the -u option, the quota file must be in the root directory of the GPFS file system.
- --qos QOSClass
- Specifies the Quality of Service for I/O operations (QoS) class
to which the instance of the command is assigned. If you do not specify
this parameter, the instance of the command is assigned by default
to the maintenance QoS class. This parameter has
no effect unless the QoS service
is enabled. For more information, see the topic mmchqos command. Specify one of the following QoS classes:
- maintenance
- This QoS class is typically configured to have a smaller share of file system IOPS. Use this class for I/O-intensive, potentially long-running GPFS commands, so that they contribute less to reducing overall file system performance.
- other
- This QoS class is typically configured to have a larger share of file system IOPS. Use this class for administration commands that are not I/O-intensive.
Options
- -v
- Reports discrepancies between calculated and recorded disk quotas.
Exit status
- 0
- Successful completion.
- nonzero
- A failure has occurred.
Security
You must have root authority to run the mmcheckquota 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 mmcheckquota command is issued.
Examples
- To check quotas for file system fs0,
issue this command:
The system displays information only if a problem is found.mmcheckquota fs0
- To check quotas for all file systems, issue this command:
The system displays information only if a problem is found or if quota management is not enabled for a file system:mmcheckquota -a
fs2: no quota management installed fs3: no quota management installed
- To report discrepancies between calculated and recorded disk quotas,
issue this command:
The system displays information similar to:mmcheckquota -v fs1
fs1: Start quota check 1 % complete on Fri Apr 17 13:07:47 2009 6 % complete on Fri Apr 17 13:07:48 2009 11 % complete on Fri Apr 17 13:07:49 2009 17 % complete on Fri Apr 17 13:07:50 2009 22 % complete on Fri Apr 17 13:07:51 2009 28 % complete on Fri Apr 17 13:07:52 2009 33 % complete on Fri Apr 17 13:07:53 2009 38 % complete on Fri Apr 17 13:07:54 2009 44 % complete on Fri Apr 17 13:07:55 2009 49 % complete on Fri Apr 17 13:07:56 2009 55 % complete on Fri Apr 17 13:07:57 2009 61 % complete on Fri Apr 17 13:07:58 2009 66 % complete on Fri Apr 17 13:07:59 2009 72 % complete on Fri Apr 17 13:08:00 2009 78 % complete on Fri Apr 17 13:08:01 2009 83 % complete on Fri Apr 17 13:08:02 2009 89 % complete on Fri Apr 17 13:08:03 2009 94 % complete on Fri Apr 17 13:08:04 2009 Finished scanning the inodes for fs1. Merging results from scan. fs1: quota check found the following differences: USR 0: 288400 subblocks counted (was 288466); 24 inodes counted (was 81) USR 60011: 50 subblocks counted (was 33); 2 inodes counted (was 20) USR 60012: 225 subblocks counted (was 223); 9 inodes counted (was 4) USR 60013: 175 subblocks counted (was 146); 7 inodes counted (was 26) USR 60014: 200 subblocks counted (was 178); 8 inodes counted (was 22) USR 60015: 275 subblocks counted (was 269); 11 inodes counted (was 0) USR 60019: 0 subblocks counted (was 9); 0 inodes counted (was 5) USR 60020: 0 subblocks counted (was 1); 0 inodes counted (was 3) GRP 0: 28845098 subblocks counted (was 28844639); 14 inodes counted (was 91) FILESET 0: 28849125 subblocks counted (was 28848717); 105 inodes counted (was 24)