Phase one: Selecting candidate files

In the first phase of the mmapplypolicy job, all the files within the specified GPFS™ file system device, or below the input path name, are scanned. The attributes of each file are read from the file's GPFS inode structure.

Note: mmapplypolicy reads directly from the metadata disk blocks and can therefore lag behind the posix state of the file system. To be sure that MODIFICATION_TIME and the other timestamps are completely up to date, you can use the following suspend-and-resume sequence to force recent changes to disk:
mmfsctl fs-name suspend; mmfsctl fs-name resume;
For each file, the policy rules are considered, in order, from first rule to last:
  • If the rule has a WHEN clause that evaluates to FALSE, the rule is skipped.
  • If the rule has a FROM POOL clause, and the named pool does not match the POOL_NAME attribute of the file, the rule is skipped. A FROM POOL clause that specifies a group pool name matches a file if any pool name within the group pool matches the POOL_NAME attribute of the file.
  • If there is a THRESHOLD clause and the current pool of the file has an occupancy percentage that is less than the HighPercentage parameter of the THRESHOLD clause, the rule is skipped.
  • If the rule has a FOR FILESET clause, but none of the named filesets match the FILESET_NAME attribute of the file, the rule is skipped.
  • If the rule has a WHERE clause that evaluates to FALSE, the rule is skipped. Otherwise, the rule applies.
  • If the applicable rule is a LISTlistname-y rule, the file becomes a candidate for inclusion in the named list unless the EXCLUDE keyword is present, in which case the file will not be a candidate; nor will any following LISTlistname-y rules be considered for the subject file. However, the file is subject to LIST rules naming other list names.
  • If the applicable rule is an EXCLUDE rule, the file will be neither migrated nor deleted. Files matching the EXCLUDE rule are not candidates for any MIGRATE or DELETE rule.
    Note: Specify the EXCLUDE rule before any other rules that might match the files that are being excluded. For example:
    RULE 'Exclude root's file' EXCLUDE where USER_ID = 0
    RULE 'Migrate all but root's files' MIGRATE TO POOL 'pool1' 

    will migrate all the files that are not owned by root. If the MIGRATE rule was placed in the policy file before the EXCLUDE rule, all files would be migrated because the policy engine would evaluate the rules from first to last, and root's files would have to match the MIGRATE rule.

    To exclude files from matching a LIST rule, you must create a separate LIST rule with the EXCLUDE clause and place it before the LIST rule.

  • If the applicable rule is a MIGRATE rule, the file becomes a candidate for migration to the pool specified by the TO POOL clause.

    When a group pool is the TO POOL target of a MIGRATE rule, the selected files are distributed among the disk pools comprising the group pool, with files of highest weight going to the most preferred disk pool up to the occupancy limit for that pool. If there are still more files to be migrated, those go to the second most-preferred pool up to the occupancy limit for that pool (again choosing the highest-weight files from among the remaining selected files); and so on for the subsequent most-preferred pools, until either all selected files have been migrated or until all the disk pools of the group pool have been filled to their respective limits.

  • If the applicable rule is a DELETE rule, the file becomes a candidate for deletion.
  • If there is no applicable rule, the file is not a candidate for migration or deletion.
  • Each candidate file (for migration or deletion) is also associated with a LowPercentage occupancy percentage value, which is taken from the THRESHOLD clause of the applicable rule. If not specified, the LowPercentage value defaults to 0%.
  • Each candidate file is also associated with a numeric weight, either computed from the WeightExpression of the applicable rule, or assigned a default using these rules:
    • If a LowPercentage is specified within a THRESHOLD clause of the applicable rule, the weight of the candidate is taken as the KB_ALLOCATED attribute of the candidate file.
    • If a LowPercentage is not specified within a THRESHOLD clause of the applicable rule, the weight of the candidate is taken as +infinity.