mmchpolicy command
Establishes policy rules for a GPFS™ file system.
Synopsis
mmchpolicy Device PolicyFilename [-t DescriptiveName] [-I {yes | test}]
Availability
Available with IBM Spectrum Scale™ Standard Edition or higher.
Description
- File placement at creation time
- Snapshot data placement during file writes and deletes
- Replication factors
- Movement of data between storage pools
- File deletion
Policy changes take effect immediately on all nodes that have the affected file system mounted. For nodes that do not have the file system mounted, policy changes take effect upon the next mount of the file system.
Firstmostis 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.
This change applies only to file systems that were created at or upgraded to V4.1.1 or later. Until a file system is upgraded, if no SET POOL rules are present (set by mmchpolicy) for the file system, all data will be stored in the 'system' pool.
For information on GPFS policies, see the IBM Spectrum Scale: Administration Guide.
Parameters
- Device
- Specifies the device name of the file system for which policy information is to be established or changed. File system names need not be fully-qualified. fs0 is just as acceptable as /dev/fs0. This must be the first parameter.
- PolicyFilename
- Specifies the name of the file that contains the policy rules. If you specify DEFAULT, GPFS replaces the current policy file with a single policy rule that assigns all newly-created files to the system storage pool.
Options
- -I {yes | test}
- Specifies whether to activate the rules in the policy file PolicyFileName.
- yes
- The policy rules are validated and immediately activated. This is the default.
- test
- The policy rules are validated, but not installed.
- -t DescriptiveName
- Specifies an optional descriptive name to be associated with the policy rules. The string must be less than 256 characters in length. If not specified, the descriptive name defaults to the base name portion of the PolicyFileName parameter.
Exit status
- 0
- Successful completion.
- nonzero
- A failure has occurred.
Security
You must have root authority to run the mmchpolicy 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. For more information, see Requirements for administering a GPFS file system.
Examples
- This command validates a policy before it is installed:
The system displays output similar to:mmchpolicy fs2 fs2.pol -I test
Validated policy `fs2.pol': parsed 3 Placement Rules, 0 Restore Rules, 3 Migrate/Delete/Exclude Rules, 0 List Rules, 0 External Pool/List Rules
- This command installs a policy:
The system displays output similar to:mmchpolicy fs2 fs2.pol
Validated policy `fs2.pol': parsed 1 Placement Rules, 0 Restore Rules, 0 Migrate/Delete/Exclude Rules, 1 List Rules, 1 External Pool/List Rules Policy `fs2.pol' installed and broadcast to all nodes.
To confirm the change, issue this command:
The system displays output similar to:mmlspolicy fs2
Policy file for file system '/dev/fs2': Installed by root@k155n11.kgn.ibm.com on Mon Dec 12 16:56:31 2005. First line from original file 'fs2.pol' was: /* This is the policy for the fs2 GPFS file system. */