Relocating old archive logs to tier two storage using SmartTier

A busy database can generate few hundred gigabytes of archivelogs per day. Restoring these archive logs from tape backup is not ideal because it increases database recovery time. Regulatory requirements could mandate that these archive logs be preserved for several weeks.

To save storage costs, you can relocate archive logs older than two days (for example) into tier two storage. To achieve this you must create a policy file, for example, archive_policy.xml.

Note:

The relocating archive logs use case applies for DB2 environments.

To relocate archive logs that are more than two days old to Tier-2

  1. Create a policy file. A sample XML policy file is provided below.
    <?xml version="1.0"?>
    <!DOCTYPE PLACEMENT_POLICY SYSTEM "/opt/VRTSvxfs/etc\
    			/placement_policy.dtd">
    <PLACEMENT_POLICY Version="5.0" Name="access_age_based">
        <RULE Flags="data" Name="Key-Files-Rule">
             <COMMENT>
                This rule deals with key files such as archive logs.
             </COMMENT>
        <SELECT Flags="Data">
             <COMMENT>
                 You want all files. So choose pattern as '*'
             </COMMENT>
             <PATTERN>  *  </PATTERN>
         </SELECT>
        <CREATE>
            <ON>
                <DESTINATION>
                    <CLASS> tier1 </CLASS>
                </DESTINATION>
            </ON>
        </CREATE>
        <RELOCATE>
        <TO>
              <DESTINATION>
                  <CLASS> tier2 </CLASS>
              </DESTINATION>
        </TO>
    	         <WHEN>
                      <ACCAGE Units="days">
                          <MIN Flags="gt">2</MIN>
                      </ACCAGE>
              </WHEN>
        </RELOCATE>
        </RULE>
    </PLACEMENT_POLICY>

    Notice the ACCAGE units in the WHEN clause.

  2. To locate additional sample policy files, go to /opt/VRTSvxfs/etc.

    The access age-based policy is appropriate for this use case. Pay attention to the CREATE ON and RELOCATE TO sections of the XML file.

To apply a policy file

  1. As root, validate archive_policy.xml
    # fsppadm validate /DBarch archive_policy.xml
  2. If the validation process is not successful, correct the problem. Validate archive_policy.xml successfully before proceeding.
  3. Assign the policy to /DBarch filesystem
    # fsppadm assign /DBarch archive_policy.xml
  4. Enforce the policy. The relocation of two day old archive logs happens when the enforcement step is performed. The policy enforcements must be done every day to relocate aged archive logs. This enforcement can be performed on demand as needed or by using a cron- like scheduler.
    # fsppadm enforce /DBarch