5.6 HP StorageWorks X9000 File Serving Software User Guide (TA768-96035, June 2011)

Migration rule examples
When you write a rule, identify the following components:
File system (-f)
Source tier (-S)
Destination tier (-D)
Use the following command to write a rule. The rule portion of the command must be enclosed in
single quotes.
ibrix_migrator -A -f FSNAME -r 'RULE' -S SOURCE_TIER -D DEST_TIER
Examples:
The rule in the following example is based on the file’s last modification time, using a relative time
period. All files whose last modification date is more than one month in the past are moved.
# ibrix_migrator -A -f ifs2 -r 'mtime older than 1 month' -S T1 -D T2
In the next example, the rule is modified to limit the files being migrated to two types of graphic
files. The or expression is enclosed in parentheses, and the * wildcard is used to match filename
patterns.
# ibrix_migrator -A -f ifs2 -r 'mtime older than 1 month and
( name = "*.jpg" or name = "*.gif" )' -S T1 -D T2
In the next example, three conditions are imposed on the migration. Note that there is no space
between the integer and unit that define the size threshold (10M):
# ibrix_migrator -A -f ifs2 -r 'ctime older than 1 month and type = file
and size >= 10M' -S T1 -D T2
The following example uses the path keyword. It moves files greater than or equal to 5M that are
under the directory /ifs2/tiering_test from TIER1 to TIER2:
ibrix_migrator -A -f ifs2 -r "path = tiering_test and size >= 5M" -S
TIER1 -D TIER2
Rules can be group- or user-based as well as time- or data-based. In the following example, files
associated with two users are migrated to T2 with no consideration of time. The names are quoted
strings.
# ibrix_migrator -A -f ifs2 -r 'type = file and ( uname = "ibrixuser"
or uname = "nobody" )' -S T1 -D T2
Conditions can be combined with and and or to create very precise tiering rules, as shown in the
following example.
# ibrix_migrator -A -f ifs2 -r ' (ctime older than 3 weeks and ctime younger
than 4 weeks) and type = file and ( name = "*.jpg" or name = "*.gif" )
and (size >= 10M and size <= 25M)' -S T1 -D T2
Ambiguous rules
It is possible to write a set of ambiguous rules, where different rules could be used to move a file
to conflicting destinations. For example, if a file can be matched by two separate rules, there is
no guarantee which rule will be applied in a tiering job.
Ambiguous rules can cause a file to be moved to a specific tier and then potentially moved back.
Examples of two such situations follow.
Example 1:
In the following example, if a .jpg file older than one month exists in tier 1, then the first rule
moves it to tier 2. However, once it is in tier 2, it is matched by the second rule, which then moves
the file back to tier 1.
# ibrix_migrator -A -f ifs2 -r ' mtime older than 1 month ' -S T1 -D T2
# ibrix_migrator -A -f ifs2 -r ' name = "*.jpg" ' -S T2 -D T1
114 Using data tiering