Restoring quota files

The method that is used for restoring GPFS quota files depends on the version of GPFS.

The three scenarios for restoring GPFS quota files follow.
  1. The file system version is lower than 4.1.0.0.

    In scenario 1, quota files can be backed up directly by copying visible quota files and then restored using the mmcheckquota command. The newly-specified backup quota files are transferred from normal files to quota files (metadata). Old quota files are converted from metadata to "normal" files, so these old quota files can be deleted.

  2. The file system version is 4.1.0.0 or higher, but lower than 4.1.1.0.

    In scenario 2, quota files cannot be restored using the mmcheckquota command.

  3. The file system version is 4.1.1.0 (or higher).

    In scenario 3, quota files can be restored using the mmcheckquota command. Use the mmcheckquota --backup command to back up quota files. You can restore quota files from the former backup quota files. The mmcheckquota command copies data from specified backup quota files to "invisible" quota files. You cannot view or delete the original quota files. You can delete specified backup quota files only.

Additional details about the three scenarios for restoring GPFS quota files follow.

In scenarios 1 and 3:
  • User, group, and fileset quota files can be restored from a backup copy of the original quota file. When restoring quota files, the backup file must be in the root directory of the GPFS file system.

    In scenario 1, if a backup copy of the original quota file does not exist, an empty file will be created when the mmcheckquota command is issued.

    In scenario 3, the mmcheckquota command does nothing and prints an error.

  • The user, group, or fileset files can be restored from backup copies by issuing the mmcheckquota command with the appropriate options.
    1. To restore the user quota file for the file system fs1 from the backup file userQuotaInfo, enter:
      mmcheckquota -u userQuotaInfo fs1
      This command must be run offline (that is, no nodes are mounted).
    2. This will restore the user quota limits set for the file system, but the usage information will not be current. To bring the usage information to current values, the command must be reissued:
      mmcheckquota fs1
In scenario 1, if you want to nullify all quota configuration and then reinitialize it, follow these steps:
  1. Remove the existing quota files that are corrupted.
    1. Disable quota management:
      mmchfs fs1 -Q no
    2. Remove the user.quota, group.quota, and fileset.quota files.
  2. Enable quota management.
    1. Issue the following command:
      mmchfs fs1 -Q yes
  3. Reestablish quota limits by issuing the mmedquota command or the mmdefedquota command.
  4. Gather the current quota usage values by issuing the mmcheckquota command.

In scenario 2, quota files do not exist externally. Therefore, use mmbackupconfig and mmrestoreconfig to restore quota configurations.

For complete usage information, see mmcheckquota command, mmdefedquota command and mmedquota command.