Creating a policy

Create a text file for your policy by following these guidelines.

About this task

  • A policy must contain at least one rule.
  • A policy file is limited to a size of 1 MB.
  • When a file placement policy is applied to a file, the policy engine scans the list of rules in the policy in order, starting at the top, to determine which rule applies to the file. When the policy engine finds a rule that applies to the file, it stops processing the rules and assigns the file to the appropriate storage pool. If no rule applies, the policy engine returns an EINVAL error code to the application.
    Note: The last placement rule of a policy rule list should be in the following form so that the file is assigned to a default pool if no other placement rule applies:
    RULE ‘DEFAULT’ SET POOL ‘default-data-pool’
    For file systems that are upgraded to V4.1.1 or later: If there are no SET POOL policy rules installed to a file system by mmchpolicy, the system acts as if the single rule SET POOL 'first-data-pool' is in effect, where first-data-pool is the firstmost non-system pool that is available for file data storage, if such a non-system pool is available. (Firstmost is the first according to an internal index of all pools.) However, if there are no policy rules installed and there is no non-system pool, the system acts as if SET POOL 'system' is in effect.
    For file systems that are upgraded to V4.1.1: Until a file system is upgraded, if no SET POOL rules are present (set by mmchpolicy) for the file system, all data is stored in the 'system' pool.
  • Comments within a policy must start with a /* and end with a */:
     /* This is a comment */
For more information, see the topic Policy rules.