Veritas File System 5.0 Administrator's Guide (September 2006)
will never apply to any file. This fault can be remedied by exchanging the order
of the two rules. If the DatabaseRule rule occurs first in the policy document,
VxFS encounters it first when determining where to new place files whose names
follow the pattern *.db, and correctly allocates space for them on tier1 volumes.
For files to which the DatabaseRule rule does not apply, VxFS continues scanning
the policy and allocates space according to the specification in the CREATE
statement of the GeneralRule rule.
A similar consideration applies to statements within a placement policy rule. VxFS
processes these statements in order, and stops processing on behalf of a file when
it encounters a statement that pertains to the file. This can result in unintended
behavior.
The following XML snippet illustrates a RELOCATE statement and a DELETE
statement in a rule that is intended to relocate if the files have not been accessed
in 30 days, and delete the files if they have not been accessed in 90 days:
<RELOCATE>
<TO>
<DESTINATION>
<CLASS>tier2</CLASS>
</DESTINATION>
</TO>
<WHEN>
<ACCAGE Units="days">
<MIN Flags="gt">30</MIN>
</ACCAGE>
</WHEN>
</RELOCATE>
<DELETE>
<WHEN>
<ACCAGE Units="days">
<MIN Flags="gt">90</MIN>
</ACCAGE>
</WHEN>
</DELETE>
As written with the RELOCATE statement preceding the DELETE statement, files
will never be deleted, because the <WHEN> clause in the RELOCATE statement applies
to all selected files that have not been accessed for at least 30 days. This includes
those that have not been accessed for 90 days. VxFS ceases to process a file against
a placement policy when it identifies a statement that applies to that file, so the
DELETE statement would never occur. This example illustrates the general point
that RELOCATE and DELETE statements that specify less inclusive criteria should
181Dynamic Storage Tiering
File placement policy rule and statement ordering