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
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.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%'))
- 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 theMIGRATE
andSET SNAP_POOL
rules for snapshot files.
Snapshot data placement
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.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.
After the SNAP_POOL variable is defined in the placement policy, the data blocks for files that are deleted from the file system remain there as ill-placed. These files are not copied to the storage pool defined by the SNAP_POOL variable. Additionally, users must run the mmrestripefs command (or possibly the mmrestripefs) command to move the ill-placed data blocks to the pool defined by the SNAP_POOL variable.