Creating a Migration Policy

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

Procedure

  1. Choose Resources > Dataflow > 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 SmartTier 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

  2. Select a desired account from the Account drop-down list in the upper left corner.
  3. Click Create Policy.

    The Create Policy page is displayed.

  4. Set Policy Type to Migration.

    Table 1 describes related parameters.

    Table 1 Migration policy parameters

    Parameter

    Description

    Name

    Name of the migration policy.

    NOTE:
    • The name must be unique.
    • The name can contain only letters, digits, special characters !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~, and spaces, and cannot start or end with a space.
    • The value contains 1 to 255 characters.

    Execution Mode

    Execution mode of the migration policy. Possible options are Periodical or One-off.

    NOTE:

    If you set Execution Mode to Periodical, the migration policy is executed based on the configured period. The default execution time is 00:00 every day. You can modify the execution period in Setting a Migration Period. If you set Execution Mode to One-off, the migration policy will be executed immediately.

    Namespace

    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

    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

    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 no 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.

    Scenario-Specific SmartCompression Mode

    Whether to compress or decompress specified files based on scenarios.
    • None: Files are not compressed or decompressed.
    • Compression: compresses specified files. The files after compression occupy less space but cannot be read or written.
    • Decompression: decompresses the compressed files. The files after decompression are restored to the original size and can be read and written.
    NOTE:
    • If Execution Mode is set to Periodical, Decompression cannot be selected.
    • If you set Execution Mode to Periodical, the periodical policy also takes effect for compression tasks.
    • When Service Type is set to General, scenario-specific SmartCompression modes can be configured only after an advanced license is imported. When Service Type is set to Intelligent video and image or Media, no scenario-specific SmartCompression mode can be configured.
    • When Tier Grade is set to Heterogeneous device, Scenario-Specific SmartCompression Mode is automatically set to None and cannot be manually modified.

  5. Set a filtering policy. Table 2 describes related parameters.

    • Intelligent tiering and Custom cannot be selected at the same time. If you select Custom, you can combine the parameters in Custom to configure the policy. The migration policy takes effect for files that meet all the filtering parameters.
    • If no filtering policy is set, the migration policy takes effect for all files in the selected path.
    • When Execution Mode is set to One-off, the policy type can only be Custom.
    Table 2 Filtering policy parameters

    Policy Type

    Description

    Intelligent tiering

    The system executes the migration task by identifying hot and cold files based on attributes such as file access frequency, operation time, and file sizes.

    If you select Intelligent tiering, only files whose hot and cold grades match the tier grade can be migrated.

    Custom

    • By file name

      Select Including or Excluding in File Name Filtering to determine whether files with specified names are included or excluded in the policy. Then, specify the file names to be filtered for or filtered.

      NOTE:
      • In the text box, 1 to 1023 characters can be entered.
      • 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. The 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.
        NOTE:

        If the object protocol is enabled for the selected namespace, the crtime parameter is not supported.

    • 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 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.
    • By prefix

      Specify a specific prefix.

    • By tag

      Specify a specific tag. You can click to add multiple tags.

    NOTE:
    • If you select Custom, you can set the filtering policy to the By prefix or By tag type only when the object protocol is enabled for the selected namespace.
    • 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 set to , 1, and hours when the task is started but the value of crtime changes to >, 1, and hours when the file is being processed), set the condition value of to the one greater than the migration period in Setting a Migration Period.

  6. If the object protocol is enabled for the selected namespace, you can set the object version migration policy.

    1. Enable Migration Policy for Object Versions.
    2. Set an object version migration policy. Table 3 describes related parameters.
      Table 3 Object version migration policy parameters

      Parameter

      Description

      Current version

      Set a migration policy for objects of the current version. Possible options are By days after creation and By specified date.

      • By days after creation

        When you select By days after creation, objects of the current version will be migrated after being created for the specified number of days. The value ranges from 1 to 3653 days.

      • By specified date
        • If the specified date is earlier than or is the current date, objects of the current version uploaded earlier than the specified date will be migrated.
        • If the specified date is later than the current date, objects of the current version uploaded earlier than the specified date will be migrated after the specified date is reached. This option applies to policies whose execution mode is Periodical.

      Noncurrent version

      Set a migration policy for objects of noncurrent version. Objects will be migrated after becoming noncurrent version for the specified number of days. The value ranges from 1 to 3653 days.

      The migration policy takes effect for files that meet all filter policies and object version migration policies.

  7. Select a storage type.

    1. Select a tier grade for the migration policy. Possible options include:
      • Cold, Warm, and Hot: the grade of the disk pool to which files are migrated. A disk pool's tier grade is specified during disk pool creation.
      • Heterogeneous device: If tiered storage is enabled for the selected namespace, you can migrate files to other heterogeneous devices.

      Heterogeneous device can be selected only when Tiered Storage is enabled for the selected namespace and a heterogeneous device is bound to the namespace.

    2. When Tier Grade is set to Heterogeneous device, you need to set migration parameters. Table 4 describes related parameters.
      Table 4 Heterogeneous device migration parameters

      Migration Type

      Associated Parameter

      Description

      Migrate to a heterogeneous device

      Compression

      After this function is enabled, files to be migrated will be compressed before being stored on the heterogeneous device.

      Aggregation

      After this function is enabled, small files will be aggregated before being stored on the heterogeneous device.

      Data Encryption

      After this function is enabled, software-based encrypted files will be stored in ciphertext on the heterogeneous device.

      NOTE:
      • Before enabling the data encryption function, enable the data encryption function for the account.
      • Data encryption cannot be enabled when a migration policy is configured for a cross-site DR replication bucket.

      Retrieve from a heterogeneous device

      Retention Period After Retrieval

      Retention duration for files retrieved from the heterogeneous device. If no modification is made to the file data, after the retention period expires, the local data is deleted and the data on the heterogeneous device is retained. Otherwise, the data on the heterogeneous device is deleted, and the local data is retained.

      NOTE:
      • Retrieve from a heterogeneous device is available only when Execution Mode is set to One-off.
      • If the Task Status for retrieving data back from a heterogeneous device is Failed, generally it is because the heterogeneous device fails to be connected. For example, the network connection is abnormal, the network is unstable, or the heterogeneous device's bucket associated with the namespace is deleted, or you do not have the permission to access the bucket.

  8. Click OK.