RELOCATE statement examples

Article:HOWTO59530  |  Created: 2011-10-12  |  Updated: 2011-10-12  |  Article URL http://www.symantec.com/docs/HOWTO59530
Article Type
How To

Product(s)

Environment

Subject


RELOCATE statement examples

The following example illustrates an unconditional relocation statement, which is the simplest form of the RELOCATE policy rule statement:

 <RELOCATE>
   <FROM>
     <SOURCE>
       <CLASS>tier1</CLASS>
     </SOURCE>
   </FROM>
   <TO>
     <DESTINATION>
       <CLASS>tier2</CLASS>
     </DESTINATION>
   </TO>
 </RELOCATE>

The files designated by the rule's SELECT statement that reside on volumes in placement class tier1 at the time the fsppadm enforce command executes would be unconditionally relocated to volumes in placement class tier2 as long as space permitted. This type of rule might be used, for example, with applications that create and access new files but seldom access existing files once they have been processed. A CREATE statement would specify creation on tier1 volumes, which are presumably high performance or high availability, or both. Each instantiation of fsppadm enforce would relocate files created since the last run to tier2 volumes.

The following example illustrates a more comprehensive form of the RELOCATE statement that uses access age as the criterion for relocating files from tier1 volumes to tier2 volumes. This rule is designed to maintain free space on tier1 volumes by relocating inactive files to tier2 volumes:

 <RELOCATE>
   <FROM>
     <SOURCE>
       <CLASS>tier1</CLASS>
     </SOURCE>
   </FROM>
   <TO>
     <DESTINATION>
       <CLASS>tier2</CLASS>
      </DESTINATION>
   </TO>
   <WHEN>
     <SIZE Units="MB">
       <MIN Flags="gt">1</MIN>
       <MAX Flags="lt">1000</MAX>
     </SIZE>
     <ACCAGE Units="days">
       <MIN Flags="gt">30</MIN>
     </ACCAGE>
   </WHEN>
 </RELOCATE>

Files designated by the rule's SELECT statement are relocated from tier1 volumes to tier2 volumes if they are between 1 MB and 1000 MB in size and have not been accessed for 30 days. VxFS relocates qualifying files in the order in which it encounters them as it scans the file system's directory tree. VxFS stops scheduling qualifying files for relocation when when it calculates that already-scheduled relocations would result in tier2 volumes being fully occupied.

The following example illustrates a possible companion rule that relocates files from tier2 volumes to tier1 ones based on their I/O temperatures. This rule might be used to return files that had been relocated to tier2 volumes due to inactivity to tier1 volumes when application activity against them increases. Using I/O temperature rather than access age as the relocation criterion reduces the chance of relocating files that are not actually being used frequently by applications. This rule does not cause files to be relocated unless there is sustained activity against them over the most recent two-day period.

 <RELOCATE>
   <FROM>
     <SOURCE>
       <CLASS>tier2</CLASS>
     </SOURCE>
   </FROM>
   <TO>
     <DESTINATION>
       <CLASS>tier1</CLASS>
     </DESTINATION>
   </TO>
   <WHEN>
     <IOTEMP Type="nrbytes">
       <MIN Flags="gt">5</MIN>
       <PERIOD>2</PERIOD>
     </IOTEMP>
   </WHEN>
 </RELOCATE>

This rule relocates files that reside on tier2 volumes to tier1 volumes if their I/O temperatures are above 5 for the two day period immediately preceding the issuing of the fsppadm enforce command. VxFS relocates qualifying files in the order in which it encounters them during its file system directory tree scan. When tier1 volumes are fully occupied, VxFS stops scheduling qualifying files for relocation.

VxFS file placement policies are able to control file placement across any number of placement classes. The following example illustrates a rule for relocating files with low I/O temperatures from tier1 volumes to tier2 volumes, and to tier3 volumes when tier2 volumes are fully occupied:

 <RELOCATE>
   <FROM>
     <SOURCE>
       <CLASS>tier1</CLASS>
     </SOURCE>
   </FROM>
   <TO>
     <DESTINATION>
       <CLASS>tier2</CLASS>
     </DESTINATION>
     <DESTINATION>
       <CLASS>tier3</CLASS>
     </DESTINATION>
   </TO>
   <WHEN>
     <IOTEMP Type="nrbytes">
       <MAX Flags="lt">4</MAX>
       <PERIOD>3</PERIOD>
     </IOTEMP>
   </WHEN>
 </RELOCATE>

This rule relocates files whose 3-day I/O temperatures are less than 4 and which reside on tier1 volumes. When VxFS calculates that already-relocated files would result in tier2 volumes being fully occupied, VxFS relocates qualifying files to tier3 volumes instead. VxFS relocates qualifying files as it encounters them in its scan of the file system directory tree.

The <FROM> clause in the RELOCATE statement is optional. If the clause is not present, VxFS evaluates files designated by the rule's SELECT statement for relocation no matter which volumes they reside on when the fsppadm enforce command is issued. The following example illustrates a fragment of a policy rule that relocates files according to their sizes, no matter where they reside when the fsppadm enforce command is issued:

 <RELOCATE>
   <TO>
     <DESTINATION>
       <CLASS>tier1</CLASS>
     </DESTINATION>
   </TO>
   <WHEN>
     <SIZE Units="MB">
       <MAX Flags="lt">10</MAX>
     </SIZE>
   </WHEN>
 </RELOCATE>
 <RELOCATE>
   <TO>
     <DESTINATION>
       <CLASS>tier2</CLASS>
     </DESTINATION>
   </TO>
   <WHEN>
     <SIZE Units="MB">
       <MIN Flags="gteq">10</MIN>
       <MAX Flags="lt">100</MAX>
     </SIZE>
   </WHEN>
 </RELOCATE>
 <RELOCATE>
   <TO>
     <DESTINATION>
       <CLASS>tier3</CLASS>
     </DESTINATION>
   </TO>
   <WHEN>
     <SIZE Units="MB">
       <MIN Flags="gteq">100</MIN>
     </SIZE>
   </WHEN>
 </RELOCATE>

This rule relocates files smaller than 10 megabytes to tier1 volumes, files between 10 and 100 megabytes to tier2 volumes, and files larger than 100 megabytes to tier3 volumes. VxFS relocates all qualifying files that do not already reside on volumes in their DESTINATION placement classes when the fsppadm enforce command is issued.

See RELOCATE statement


Legacy ID



uxrt-51sp1_v40222346_v63475671


Article URL http://www.symantec.com/docs/HOWTO59530


Terms of use for this information are found in Legal Notices