This section describes how to create a migration policy. A migration policy determines the disk pool to which specific files are migrated.
Prerequisites
A namespace has been created.
Precautions
For a directory, if it is created with a migration policy, such policy is applied preferentially. If the directory is not created with a migration policy, it inherits the policy created for its parent directory.
Procedure
- Choose Resources > Tuning > SmartTier.
By default, the SmartTier feature is disabled by the storage system. When you go to the
SmartTier page for the first time, you need to click
Enable to enable the SmartTier feature. After the SmartTier feature is enabled, you can log in to the CLI and run the following command to disable it.
change tier_global_parameter tier_switch=off service_type=Service type
- Select the desired account from the Account drop-down list in the upper left corner.
- Click Create Policy.
The Create Policy page is displayed.
- Set Policy Type to Migration.
Table 1 describes related parameters.
Table 1 Migration policy parameters
Parameter |
Description |
Name |
Indicates the name of the migration policy.
NOTE:
- The name must be unique.
- The name can contain only letters, digits, hyphens (-), and underscores (_).
- The name contains 1 to 63 characters.
|
Execution Mode |
Indicates the execution mode of the migration policy. Possible options are Periodical or One-off.
NOTE:
If the value is set to Periodical, the migration policy is executed based on the configured period. The default execution period is 00:00 every day. You can modify the execution period in Setting a Migration Period. If the value is set to One-off, the migration policy is executed immediately.
|
Namespace |
Indicates the namespace for which the migration policy takes effect. Click Select. On the Namespace page that is displayed, select a desired namespace and click OK. |
Dtree |
Indicates the dtree for which the migration policy takes effect. Click Select. On the Dtree page that is displayed, select a desired dtree and click OK. |
File Directory |
Indicates the file directory for which the migration policy takes effect. If you do not select a dtree or file directory, the migration policy takes effect for the entire namespace. If you select a dtree but do not select a file directory, the migration policy takes effect for the entire dtree.
NOTE:
This parameter is available only when Execution Mode is set to One-off.
|
Filter Policy |
Indicates the file filtering policy. Possible values are By file name, By file size, By file operation time, and By user or user group.
- By file name
Select Including or Excluding in File Name Filtering to determine whether files with the specified names are included or excluded in the migration policy. Then, specify the file names to be filtered for or filtered.
NOTE:
- 1 to 1023 characters can be entered in the text box.
- Wildcard (*) can match any character. The following formats are supported: example, *, *example*, *example, example*, and example*example.
- Multiple file names are separated using commas (,).
- By file size
Specify the size of files to be filtered for.
- By file operation time
Specify a specific operation time. Possible options are crtime, mtime, ctime, and atime.
- crtime: indicates the file creation time.
- mtime: indicates the file modification time.
- ctime: indicates the file property modification time.
- atime: indicates the last file access time.
- By user or user group
Select the type of the desired user or user group from the User or User Group Type drop-down list and then select Including or Excluding in User Name Filtering to determine whether files of the specified user or user group are included or excluded in the migration policy.
- If you select LDAP domain user, LDAP domain user group, NIS domain user, or NIS domain user group in User or User Group Type, specify the user or user group name in Username or User Group Name.
- If you select Local UNIX authentication user or Local UNIX authentication user group, click Select next to Username or User Group Name. On the Local UNIX Authentication User or Local UNIX Authentication User Group page that is displayed, select the desired user or user group and click OK.
NOTE:
- The migration policy takes effect for the files that meet all filtering policies.
- It is recommended that the ≤ condition of the file operation time be used together with other time policies. For example:
Set crtime to >, 7, and days, and atime to ≤, 1, and days. That is, the files that are created one week ago and accessed in the last day are migrated.
- After a migration task is started, files in the directories for which migration policies have been configured are migrated one by one. Whether a file meets the conditions is determined during file processing. To prevent a condition from changing with the task execution time (for example, the value of crtime is less than or equal to 1 hour when the task is started but the value of crtime changes to be greater than 1 hour when the file is being processed), set the condition value of ≤ to the one greater than the migration period in Setting a Migration Period.
|
Tier Grade |
Indicates the tier grade of the migration policy. That is, the grade of the disk pool to which files are migrated. A disk pool's tier grade is specified during disk pool creation. |
- Click OK.