File management policy syntax

This topic describes the syntax conventions for file-management rules. These rules can specify how and when the system should automatically move certain files among storage pools, and can, optionally, specify when the system should automatically delete certain files.

You can create a file containing policy rules for automatically moving or deleting files. You can then use this rule file as input to the file-management script that is run at a specified time. See Moving and deleting files automatically for information about running the script.

You can also add comments to the policy. All comments must start with /* and end with */ (for example, /* comment */).

Read syntax diagramSkip visual syntax diagram
>>-RULE--+-------------+---------------------------------------->
         '-'rule_name'-'

>--+-MIGRATE-FROM-POOL----'source_pool_name'--TO-POOL--'target_pool_name'-+-->
   '-DELETE-FROM-POOL----'source_pool_name'-------------------------------'

>--+--------------------------------------------+--------------->
   |                      .-,--------------.    |
   |                      V                |    |
   '-FOR----FILESET----(----'fileset_name'-+--)-'

>--+----------------------------------------------------------------------+-><
   '-WHERE--AGE--+->--+--integer--DAYS--AND--SIZE--+-<--+--integer-+-KB-+-'
                 '->=-'                            +-<=-+          +-MB-+
                                                   +->--+          '-GB-'
                                                   +->=-+
                                                   '-=--'

Parameters

RULE
Initiates the rule statement.
'rule_name'
Identifies the rule. This parameter is optional.
source_pool_name'
Identifies the storage pool from which you want to move or delete files that match the rule criteria (fileset and SQL expression).
target_pool_name'
Identifies the storage pool to which you want to move files that match the rule criteria (fileset and SQL expression).
FOR FILESET ('fileset_name')
Identifies one or more filesets in which the file is created.
WHERE SQL_expression
Compares the file attributes specified in the rule with the attributes of the file to determine whether the file should be moved or deleted. The SQL_expression can include the standard SQL-syntax AND expression to specify a compound of the following conditions:
AGE operator integer DAYS
The age of a file, specified as less than (<), less than or equal (<=), greater than (>) or greater than or equal (>=) to a number of days since the file was last accessed.
SIZE operator integer KB | MB | GB
The size of a file, specified as less than (<), less than or equal (<=), greater than (>), greater than or equal (>=), or equal (=) to a number of kilobytes, megabytes, or gigabytes.

Examples

The following example shows a sample file.

RULE 'MyRule1' MIGRATE FROM POOL 'Premium' TO POOL 'Cheap' WHERE AGE > 30 DAYS AND SIZE > 500MB
RULE 'MyRule2' MIGRATE FROM POOL 'Premium' TO POOL 'Cheap' WHERE AGE > 60 DAYS AND SIZE <= 500MB
RULE 'MyRule3' MIGRATE FROM POOL 'Cheap' TO POOL 'Premium' WHERE AGE <=  7 DAYS AND SIZE <= 500MB

RULE DELETE FROM POOL 'Cheap' FOR FILESET ('temp') WHERE AGE > 365 DAYS

Parent topic: Policy syntax

Library | Support | Terms of use | Feedback
(C) Copyright IBM Corporation 2003, 2004. All Rights Reserved.
IBM TotalStorage SAN File System v2.2