ILM for snapshots

ILM for snapshots can be used to migrate snapshot data.

Similar to the files in the root file system, snapshot data can also be managed by using policy rules. Rules can be written to migrate snapshot data among internal storage pools or generated in specific pools.

Snapshot data migration

Snapshot data can be migrated by using the mmapplypolicy command with simple migration rules. For example, to migrate data of a snapshot with the name snapname from an SSD pool to the Capacity pool, use the following rule:
RULE 'MigToCap' MIGRATE FROM POOL 'SSD' TO POOL 'Capacity'
Then, run the mmapplypolicy command with the -S snapname parameter to complete the migration.
Snapshot data belonging to AFM and AFM DR can also be migrated. Use the following rule:
RULE 'migrate' MIGRATE FROM POOL 'POOL1' TO POOL 'POOL2'
In this example, data is migrated from POOL1 to POOL2. You must exclude files which are internal to AFM while migrating snapshot data. An example of a rule to exclude such files is as under:
RULE 'migrate' MIGRATE FROM POOL 'POOL1' TO POOL 'POOL2' WHERE 
( NOT (PATH_NAME LIKE '/%/.afm%') OR (PATH_NAME LIKE '/%/.ptrash%')
OR (PATH_NAME LIKE '/%/.afmtrash%')OR (PATH_NAME LIKE '/%/.pconflicts%'))
Note:
  • The snapshot data cannot be migrated to external pools.
  • The migration rules for snapshot data cannot be mixed with other rule types.
  • SetXattr file function is not allowed on both the MIGRATE and SET SNAP_POOL rules for snapshot files.

Snapshot data placement

A snapshot placement rule can be used to generate snapshot data in specific internal pools. For example, to generate the snapshot data for all snapshots in the Capacity pool, use the following rule:
RULE 'SnapPlacement' SET SNAP_POOL 'Capacity'
Snapshot data for specific snapshots can be placed in specific pools by using the following rule:
RULE 'SnapPlacement' SET SNAP_POOL 'Capacity' WHERE SNAP_NAME LIKE '%daily%'
Include this rule in the set of rules installed for the file system. Placement of a snapshot file happens when the first data block is copied to it because of the changes made to the file in the root file system.
Note: Snapshot data cannot be placed in external pools.
The placement rule can be applied to snapshot data belonging to AFM and AFM DR. In the following example, snap pool is set as POOL1, for all snapshots having psnap as a sub-pattern in the name.
RULE 'setsnappool' SET SNAP_POOL 'POOL1' WHERE SNAP_NAME LIKE '%psnap%'
Another example is as under -
RULE 'setsnappool' SET SNAP_POOL 'POOL1' WHERE SNAP_NAME LIKE '%afm%'

Ill placement of snapshot files

Deletion of files can result in these files moving to snapshot and then becoming ill-placed or ill-replicated. In these cases, the mmrestripefile command can be used to correct the ill placement and ill replication of snapshot files.