mmstartpolicy command
Synopsis
mmstartpolicy EventType Device [PolicyOptions]
Availability
Available on all IBM Storage Scale editions. Available on AIX® and Linux®.
Description
The mmstartpolicy script is intended to be the user-defined command that the IBM Storage Scale daemon executes when a local lowDiskSpace or noDiskSpace event occurs.
The script invokes the IBM Storage Scale policy engine to migrate or delete data to resolve the low or no disk space event.
You must register this script by using the mmaddcallback command or by using the IBM Storage Scale GUI.
It is recommended that when the mmstartpolicy script is used as the callback script for the lowDiskSpace and noDiskSpace events, you pass the --single-instance option as policy option.
Without the use of the --single-instance mmapplypolicy option, it is likely that concurrent executions of the mmstartpolicy script will cause many instances of the mmapplypolicy command to run concurrently and will impact system performance. For more information, see Using thresholds to migrate data between pools.
It is important to note where the -g GlobalWorkDirectory or sharedTmpDir attribute is defined for the file system being monitored for noDiskSpace. If it is in the file system itself, the mmstartpolicy may fail because the temporary policy files cannot be written to the full file system. You should pass in a different -g value via the PolicyOptions.
Results
Upon successful completion of the mmstartpolicy script, the data migration as defined by the provided policy rules will have completed.
Parameters
- EventType
- The type of event that caused the script to be invoked by the callback mechanism. This is defined by the --parms %eventName option to mmaddcallback. It should be either noDiskSpace or lowDiskSpace.
- Device
- The name of the file system that generated the event. This is defined by the --parms %fsName option to mmaddcallback.
- PolicyOptions
- Additional options that are passed to the policy engine. This parameter is optional. It is recommended that at least the --single-instance flag is passed to mmapplypolicy.
Exit status
- 0
- Successful completion.
- nonzero
- A failure has occurred. Errors are written to /var/adm/ras/mmpolicy.log.$DATE.$HOST
Security
You must have root authority to run the mmstartpolicy command.
The node on which the command is issued must be able to execute remote shell commands on any other node in the cluster without the use of a password and without producing any extraneous messages.
Examples
See Using thresholds to migrate data between pools for examples using the mmaddcallback command to define callbacks calling the mmstartpolicy command.
See also
Location
/usr/lpp/mmfs/bin