beautypg.com

Ambiguous rules – HP StoreAll Storage User Manual

Page 193

background image

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

There is no guarantee as to the order in which the two rules will be executed; therefore, the final
destination is ambiguous because multiple rules can apply to the same file.

Example 2:

Rules can cause data movement in both directions, which can lead to issues. In the following
example, the rules specify that all .doc files in tier 1 to be moved to tier 2 and all .jpg files in
tier 2 be moved to tier 1. However, this might not succeed, depending on how full the tiers are.

# ibrix_migrator -A -f ifs2 -r ' name = "*.doc" ' -S T1 -D T2
# ibrix_migrator -A -f ifs2 -r ' name = "*.jpg" ' -S T2 -D T1

For example, if tier 1 is filled with .doc files to 70% capacity and tier2 is filled with .jpg files to
80% capacity, then tiering might terminate before it is able to fully "swap" the contents of tier 1
and tier 2. The files are processed in no particular order; therefore, it is possible that more .doc

Writing tiering rules

193