mmlspolicy command

Displays policy information.

Synopsis

mmlspolicy Device [-L] [-Y]

Availability

Available on all IBM Spectrum Scale editions.

Description

The mmlspolicy command displays policy information for a given file system. The information displayed includes:
  • When the policy file was installed.
  • The user who installed the policy file.
  • The node on which the policy file was installed.
  • The first line of the original policy file.

For information about GPFS policies and file placement, see Information lifecycle management for IBM Spectrum Scale.

Parameters

Device
The device name of the file system for which policy information is to be displayed. File system names need not be fully-qualified. fs0 is just as acceptable as /dev/fs0.
-L
Displays the entire original policy file. If this flag is not specified, only the first line of the original policy file is displayed.
-Y
Displays the command output in a parseable format with a colon (:) as a field delimiter. Each column is described by a header.
Note: Fields that have a colon (:) are encoded to prevent confusion. For the set of characters that might be encoded, see the command documentation of mmclidecode. Use the mmclidecode command to decode the field.

Exit status

0
Successful completion.
nonzero
A failure has occurred.

Security

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

  1. This command displays basic information for the policy installed for file system fs2:
    mmlspolicy fs2
    The system displays output similar to:
    Policy for file system '/dev/fs2':
       Installed by root@c103rp12.gpfs.net on Tue Mar 30 15:06:20 2010.
       First line of policy 'policy' is:
    /* This is the policy for the fs2 GPFS file system. */
  2. This command displays extended information for the policy installed for file system fs2:
    mmlspolicy fs2 -L
    The system displays output similar to:
    /* This is the policy for the fs2 GPFS file system. */
    
    /* File Placement Rules */
    RULE SET POOL 'sp4' WHERE name like '%sp4%'
    RULE SET POOL 'sp5' WHERE name like '%sp5%'
    RULE 'default' SET POOL 'system'
    
    /* Snapshot Placement Rules*/
    RULE SET SNAP_POOL 'sp1' WHERE SNAP_NAME LIKE '%daily%'
    RULE SET SNAP_POOL 'sp2'
    
    /* Exclude Rule */
    RULE 'Exclude root users files' EXCLUDE WHERE USER_ID = 0 AND
     name like '%org%'
    
    /* Delete Rule */
    RULE 'delete files' DELETE WHERE PATH_NAME like '%tmp%'
    
    /* Migrate Rule */
    RULE 'sp4.files' MIGRATE FROM POOL 'sp4' TO POOL 'sp5' WHERE
     name like '%sp4%'
    
    /* End of Policy */
  3. In this example, no policy file was installed for the specified file system:
    mmlspolicy fs4 -L
    The system displays output similar to:
    No policy file was installed for file system 'fs4'.
    Data will be stored in pool 'system'.

Location

/usr/lpp/mmfs/bin