Errors encountered with policies

The analysis of those errors, which might be encountered while dealing with the policies.

These are errors that are encountered with policies and how to analyze them:
  • Policy file never finishes, appears to be looping.

    The mmapplypolicy command runs by making two passes over the file system - one over the inodes and one over the directory structure. The policy rules are applied to each file to determine a list of candidate files. The list is sorted by the weighting that is specified in the rules, then applied to the file system. No file is ever moved more than once. However, due to the quantity of data involved, this operation might take a long time and appear to be hung or looping.

    The time required to run the mmapplypolicy command is a function of the number of files in the file system, the current load on the file system, and on the node in which the mmapplypolicy command is run. If this function appears to not finish, you might need to reduce the load on the file system or run the mmapplypolicy command on a less loaded node in the cluster.

  • Initial file placement is not correct.

    The placement rules specify a single pool for initial placement. The first rule that matches the file's attributes selects the initial pool. If that pool is incorrect, then the placement rules must be updated to select a different pool. You might see current placement rules by running the mmlspolicy -L command. For existing files, the file can be moved to its desired pool by using the mmrestripefile or the mmchattr commands.

    For examples and more information on the mmlspolicy -L command, see The mmapplypolicy -L command.

  • Data migration, deletion, error exclusion not working properly.
    The mmapplypolicy command selects a list of candidate files to be migrated or deleted. The list is sorted by the weighting factor that is specified in the rules, then applied to a sufficient number of files on the candidate list to achieve the utilization thresholds specified by the pools. The actual migration and deletion are done in parallel. The following are the possibilities for an incorrect operation:
    • The file was not selected as a candidate for the expected rule. Each file is selected as a candidate for only the first rule that matched its attributes. If the matched rule specifies an invalid storage pool, the file is not moved. The -L 4 option on the mmapplypolicy command displays the details for candidate selection and file exclusion.
    • The file was a candidate, but was not operated on. Only the candidates necessary to achieve the desired pool utilization are migrated. Using the -L 3 option displays more information on candidate selection and files that are chosen for migration.

      For more information on the mmlspolicy -L command, see The mmapplypolicy -L command.

    • The file was scheduled for migration but was not moved. In this case, the file is shown as 'ill-placed' by the mmlsattr -L command, indicating that the migration did not succeed. This occurs if the new storage pool assigned to the file did not have sufficient free space for the file when the actual migration was attempted. Since migrations are done in parallel, it is possible that the target pool had files that were also migrating, but had not yet been moved. If the target pool now has sufficient free space, then files can be moved by using the mmrestripefs, mmrestripefile, mmchattr commands.
  • Asserts or error messages indicating a problem.

    The policy rule language can only check for some errors at runtime. For example, a rule that causes a divide by zero cannot be checked when the policy file is installed. Errors of this type generate an error message and stop the policy evaluation for that file.

    Note: I/O errors while migrating files indicate failing storage devices and must be addressed like any other I/O error. The same is true for any file system error or panic that is encountered while migrating files.