Overview of policies
A policy is a set of rules that describes the life cycle of user data based on the attributes of files. Each rule defines an operation or definition, such as "migrate to a pool and replicate the file."
- Initial file placement
- File management
- Restoring file data
- Encryption-specific uses. For more information, see the topic Encryption in the IBM Spectrum Scale: Administration and Programming Reference.
- File compression and decompression. For more information, see the topic File compression in the IBM Spectrum Scale: Administration and Programming Reference.
The placement policy defining the initial placement of newly created files and the rules for placement of restored data must be installed into GPFS™ with the mmchpolicy command. If a GPFS file system does not have a placement policy installed, all the data is stored in the first data storage pool. Only one placement policy can be installed at a time. If you switch from one placement policy to another, or make changes to a placement policy, that action has no effect on existing files. However, newly created files are always placed according to the currently installed placement policy.
The management policy determines file management operations such as migration, deletion, and file compression or decompression.
File management rules can also be used to control the space utilization of GPFS online storage pools. When the utilization for an online pool exceeds the specified high threshold value, GPFS can be configured, through user exits, to trigger an event that can automatically start mmapplypolicy and reduce the utilization of the pool. Using the mmaddcallback command, you can specify a script that will run when such an event occurs. For more information, see the topic mmaddcallback command in the IBM Spectrum Scale: Administration and Programming Reference.
- When you install a new policy, GPFS checks the basic syntax of all the rules in the policy.
- GPFS also checks all references to storage pools. If a rule in the policy refers to a storage pool that does not exist, the policy is not installed and an error is returned.
- When a new file is created, the rules in the active policy are evaluated in order. If an error is detected, GPFS logs an error, skips all subsequent rules, and returns an EINVAL error code to the application.
- Otherwise, the first applicable rule is used to store the file data.
- Default file placement policy:
- When a GPFS file system is first created, the default
file placement policy is to assign all files to the system storage
pool. You can go back to the default policy by running the command:
mmchpolicy Device DEFAULT
For more information on using GPFS commands to manage policies, see Managing policies.