This topic describes how the lifecycle management feature is implemented in Apsara File Storage NAS.

Background information

Apsara File Storage NAS provides the lifecycle management feature. The feature allows you to transition files that are infrequently accessed to a lower-cost storage class.

Workflow of lifecycle management

The following figure shows the workflow of lifecycle management. File systems (① in the figure) are created and managed in the NASconsole. After a file system is mounted on a server, data is written to the NAS Performance or NAS Capacity storage class (② in the figure). When users attempt to access the data, the data is read from the NAS Performance or NAS Capacity storage class (② in the figure) and returned to the users.
Figure 1. Workflow of lifecycle management
Workflow of lifecycle management

If you need to configure a lifecycle management policy for a General-purpose NAS file system, the workflow of lifecycle management includes the following steps:

  1. A lifecycle management policy (③ in the figure) is created in the NAS console.
  2. Based on the lifecycle management policy, the lifecycle management module checks for cold data in the specified folder at regular intervals.
  3. If cold data is found, the cold data is transitioned to the Infrequent Access (IA) storage class (④ in the figure).
  4. When users attempt to access cold data, the lifecycle management module reads the data from the IA storage class, and caches the data in the NAS Performance or NAS Capacity storage class (② in the figure).

    The latency of access to data in the IA storage class is higher than that of access to data in the NAS Performance or NAS Capacity storage class. However, after the data is cached in the NAS Performance or NAS Capacity storage class, the latency of access to data is the same as that of access to data in the NAS Performance or NAS Capacity storage class.

Additional considerations

When you use lifecycle management policies, note that:
  • Cold data in the IA storage class is charged at a lower rate than hot data. However, data transfer fees are incurred when cold data is accessed. For more information, see Billing of lifecycle management policies.
  • If you delete a lifecycle management policy, the cold data that is identified based on the policy is not immediately transitioned from the IA storage class to the NAS Performance or NAS Capacity storage class.
  • If you need to transition the cold data to the NAS Performance or NAS Capacity storage class, you must copy the cold data to a new folder. After the cold data is transitioned to the NAS Performance or NAS Capacity storage class, the data becomes hot data, and is charged at the rate of the hot data.

Rules in lifecycle management policies

You can configure a lifecycle management policy in the NAS console to manage the lifecycle of files in a specified directory and its subdirectories of a file system that belong to your Alibaba Cloud account. Files that meet the rule specified in the policy are transitioned to the IA storage class.

A file is transitioned to the IA storage class if the file meets the following conditions:
  • A lifecycle management policy is configured for the directory where the file resides.
  • The file is not accessed for the period of time that is configured in the lifecycle management policy.

    The period can be 14 days, 30 days, 60 days, and 90 days, depending on the configurations in the NAS console. For more information, seeCreate a lifecycle management policy.

Example:

A lifecycle management policy is configured for the directory named /DIR in a NAS file system. The rule in the policy is More than 14 days from the most recent access. The directory contains two files: file_A and file_B. The following table lists the information of the two files.
Directory File Most recent access time
/DIR file_A 00:00 on June 1, 2020 (UTC)
file_B 00:00 on June 7, 2020 (UTC)

Analysis:

On June 15, 2020, file_A in the /DIR directory is transitioned to the IA storage class, while file_B remains in the Standard storage class. file_B is not transitioned to the IA storage class because only eight days elapsed since the most recent access. file_B does not meet the rule that requires more than 14 days from the most recent access.

Billing of lifecycle management policies

After a file is transitioned to the IA storage class, the following fees are incurred:
  • IA storage fees. The unit price of IA storage is lower than that of Standard storage. IA storage is billed based on the used IA storage space.
  • Data transfer fees. Fees are incurred when a file in the IA storage class is accessed. Data transfer is billed based on the amount of transferred data.
The new pay-as-you-go billing method includes the following billing items:
  • Standard storage. It is billed by using the pay-as-you-go method on an hourly basis.
    Note Standard storage refers to the storage class other than IA in NAS Performance and NAS Capacity file systems.
  • IA storage. It is billed by using the pay-as-you-go method on an hourly basis. The unit price of IA storage is lower than that of Standard storage.
  • Data transfer. Data transfer fees are incurred when data in the IA storage class is accessed. Data transfer is billed based on the amount of transferred data. It is billed by using the pay-as-you-go method on an hourly basis. The amount of transferred data is reset to zero after a bill is generated, and then the amount is calculated in the next period.

Offset by using a storage plan

  • If the used Standard storage space is larger than or equal to the capacity of your storage plan, additional resources are billed.
    • The additional Standard storage space that is billed equals the used Standard storage space minus the capacity of the storage plan.
    • The billing method of IA storage remains unchanged.
    • The billing method of data transfer remains unchanged.
  • If the used Standard storage space is smaller than the capacity of the storage plan, additional resources are billed.
    • No additional Standard storage space is billed.
    • Additional IA storage space that is billed = [Used IA storage space - (Capacity of the storage plan - Used Standard storage space) × Coefficient]. A result less than zero is taken as zero. The coefficient in the formula varies with the file system type. For NAS Performance, the coefficient is 12.333. For NAS Capacity, the coefficient is 2.333.
      Note Storage plans cannot be used to offset the amount of data transfer from or to the IA storage class.
    • The billing method of data transfer remains unchanged.

Examples

User A has Performance NAS File System B in the China (Beijing) region. The used storage space in File System B is 1,000 GB from 10:00 to 11:00 on January 1, 2020. Among the 1,000 GB of data, 200 GB is stored in the Standard storage class, and 800 GB is stored in the IA storage class. The amount of data that is read from the IA storage class is 1 GB within the hour, and the amount of data that is written to the IA storage class is 2 GB within the hour.

Pay-as-you-go:
  • Standard storage space = 200 GB. Standard storage fees = Price per month/Number of hours per month × Standard storage space = 1.85/(24 × 30) × 200 = 0.514 CNY
  • IA storage space = 800 GB. IA storage fees = Price per month/Number of hours per month × IA storage space = 0.15/(24 × 30) × 800 = 0.167 CNY.
  • Amount of data that is read from the IA storage class = 1 GB. Fees of data reads = Unit price × Amount of data that is read from the IA storage class = 0.06 × 1 = 0.06 CNY. Amount of data that is written to the IA storage class = 2 GB. Fees of data writes = Unit price × Amount of data that is written to the IA storage class = 0.06 × 2 = 0.12 CNY.
  • Total fees = 0.514 + 0.167 + 0.06 + 0.12 = 0.861 CNY.
Offset based on a storage plan whose capacity is 100 GB:
  • Additional Standard storage space = 200 - 100 = 100 GB. Standard storage fees = Price per month/Number of hours per month × Standard storage space = 1.85/(24 × 30) × 100 = 0.257 CNY.
  • IA storage space = 800 GB. IA storage fees = Price per month/Number of hours per month × IA storage space = 0.15/(24 × 30) × 800 = 0.167 CNY.
  • Amount of data that is read from the IA storage class = 1 GB. Fees of data reads = Unit price × Amount of data that is read from the IA storage class = 0.06 × 1 = 0.06 CNY. Amount of data that is written to the IA storage class = 2 GB. Fees of data writes = Unit price × Amount of data that is written to the IA storage class = 0.06 × 2 = 0.12 CNY.
  • Total fees = 0.257 + 0.167 + 0.06 + 0.12 = 0.604 CNY.
Offset based on a storage plan whose capacity is 250 GB:
  • Fees of additional Standard storage space = 0 CNY.
    Note The remaining 50 GB (250 - 200 = 50) of the storage plan can be used to offset the used IA storage space of 616.65 GB (50 × 12.333 = 616.65).
  • Additional IA storage space = 800 - 616.65 = 183.35 GB. IA storage fees = Price per month/Number of hours per month × IA storage space = 0.15/(24 × 30) 183.35 = 0.038 CNY.
  • Amount of data that is read from the IA storage class = 1 GB. Fees of data reads = Unit price × Amount of data that is read from the IA storage class = 0.06 × 1 = 0.06 CNY. Amount of data that is written to the IA storage class = 2 GB. Fees of data writes = Unit price × Amount of data that is written to the IA storage class = 0.06 × 2 = 0.12 CNY.
  • Total fees = 0 + 0.038 + 0.06 + 0.12 = 0.218 CNY.

For more information about the billing of NAS, see Billing of NAS.