This topic describes how to use an Elastic Compute Service (ECS) snapshot to create a cloud disk and attach the cloud disk to an RDS Custom instance in the ApsaraDB RDS console or by calling API operations.
Prerequisites
An ECS snapshot is created. The name and size of the ECS snapshot are recorded. For example, a snapshot named
test_snapshotis created and provides a storage capacity of 100 GiB. For more information, see Create a snapshot.An RDS Custom instance is created. For more information, see Create an RDS Custom instance.
Procedure
Console Operations
Step 1: Create a cloud disk
Log on to the ApsaraDB RDS console. In the navigation pane on the left, click choose RDS Custom > Storage and Snapshots.
On the Custom Disk tab, click Create Cloud Disk.
On the Create Cloud Disk page, configure the required parameters. For more information about parameter settings, see Create a cloud disk.
Parameter
Description
Region
The region of the cloud disk.
You must set this parameter to the region of the RDS Custom instance to which you want to attach the cloud disk.
Zone
The zone of the cloud disk.
You must set this parameter to the zone of the RDS Custom instance to which you want to attach the cloud disk.
Cloud Disk
The type and capacity of the cloud disk.
Type: Only Enterprise SSDs (ESSDs) are supported.
Capacity: The capacity varies based on the performance level (PL). The capacity of the cloud disk must be greater than or equal to the size of the ECS snapshot. In this example, this parameter is set to 100 GiB.
Performance: PL0, PL1, PL2, and PL3 are supported.
Settings: You must enter the name of the ECS snapshot. In this example,
test_snapshotis entered.
Confirm the parameter settings and fees and complete the payment as prompted.
Step 2: Attach the cloud disk to an RDS Custom instance
On the Custom Disk tab, find the cloud disk that you want to attach and click Attach in the Actions column.
In the dialog box that appears, select the RDS Custom instance to which you want to attach the cloud disk and click OK.
The disk attachment is an asynchronous operation and requires several seconds to complete.
After a few seconds, the status of the cloud disk changes from Pending to In Use. You can click the ID of the RDS Custom instance to go to the instance details page. In the navigation pane on the left, click Storage Information to view the data disks attached to the instance.
API operations
Call the CreateRCDisk operation to create a custom disk and record the ID of the cloud disk in the response.
The following table describes the key parameters that you must specify.
Parameter
Description
SnapshotId
The name of the ECS snapshot. In this example, this parameter is set to
test_snapshot.Size
The capacity of the cloud disk must be greater than or equal to the size of the ECS snapshot. In this example, this parameter is set to 100 GiB. You need to enter a value without the unit.
ZoneId
You must set this parameter to the zone of the RDS Custom instance to which you want to attach the cloud disk.
Call the AttachRCDisk operation to attach the cloud disk to an RDS Custom instance.