Using thresholds to migrate data between pools
With the use of storage pools, the potential for a pool to exhaust its available space while other pools have free space can occur.
To assist administrators in managing all available space in storage pools, and to mitigate the potential of a pool to become full, resulting in out of space errors on file system operations, the policy engine supports migration rules. Migration policies are implemented with the MIGRATE rule and are controlled via the THRESHOLD parameter to the MIGRATE rule.
The THRESHOLD values define the percentage of available space which will trigger a lowDiskSpace event, and the percentage of available space at which point the lowDiskSpace event will no longer be triggered. There is an additional event, noDiskSpace, which is triggered when a storage pool is out of space but this event occurs without the need to define it in a policy rule. The MIGRATE rule, and the associated THRESHOLD values can be used to implement ILM policies.
- Define an appropriate policy using the MIGRATE rule and THRESHOLD parameters.
- Install the defined policy into the file system policy rules using the mmchpolicy command. For more information, see mmchpolicy command.
- Create a callback script that will be invoked for the lowDiskSpace or
noDiskSpace events (they can be different scripts) and then register that
script using the mmaddcallback command.
For more information, see mmaddcallback command.Note: IBM Storage Scale provides the mmstartpolicy script which can be used as the callback script for the lowDiskSpace and noDiskSpace events, or customers can choose to implement their own callback script.
A callback must be added to trigger the policy run when the low space event is generated. The mmstartpolicy command is provided to start the mmapplypolicy run from the administrator-defined callback.
mmaddcallback lowSpaceHandler --event LowDiskSpace --command /usr/lpp/mmfs/bin/mmstartpolicy --parms "%eventName %fsName --single-instance"
The --single-instance flag is required to avoid running multiple migrations on the file system at the time.