If you no longer use a cloud disk and you want billing for the disk to stop, you can release the disk. After you release a cloud disk, the disk and the data that is stored on the disk are deleted, and billing for the disk stops. This topic describes how to manually release a cloud disk and configure a cloud disk to be automatically released when the Elastic Compute Service (ECS) instance to which the disk is attached is released.
Methods for releasing cloud disks
You can manually release cloud disks. Alternatively, you can enable the Release Disk with Instance feature for cloud disks. This way, the cloud disks are automatically released when the ECS instances to which the disks are attached are released.
System disks:
System disks can only be automatically released when the ECS instances to which the disks are attached are released.
The Release Disk with Instance feature is automatically enabled for system disks when you create the disks. You can disable the Release Disk with Instance feature for system disks at any time. Once the feature is disabled, the disk is detached from the ECS instance and retained as a data disk when the instance is released.
Data disks:
You can manually release data disks or enable the Release Disk with Instance feature for data disks.
When you separately create pay-as-you-go data disks, the Release Disk with Instance feature is automatically disabled for the disks. In other scenarios, the Release Disk with Instance feature is automatically enabled for data disks. You can disable the Release Disk with Instance feature for data disks at any time.
Prerequisites
When a cloud disk is released, the data that is stored on the disk is deleted. Before you release a cloud disk, we recommend that you create snapshots to back up disk data. For more information, see Create a snapshot.
The cloud disk that you want to manually release is in the Unattached state.
Check whether the Delete Automatic Snapshots While Releasing Disk feature is enabled for the cloud disk that you want to release. If the Delete Automatic Snapshots While Releasing Disk feature is enabled for the cloud disk, the automatic snapshots of the disk are deleted when the disk is released. For information about how to enable the Delete Automatic Snapshots While Releasing Disk feature, see the Enable or disable Delete Automatic Snapshots While Releasing Disk section of the "Modify an automatic snapshot policy" topic.
NoteThe manual snapshots of the cloud disks for which the Delete Automatic Snapshots While Releasing Disk feature is enabled are not affected when the disks are released.
The multi-attach feature is disabled for a cloud disk if you want to enable the Release Disk with Instance feature for the disk.
NoteYou cannot enable the Release Disk with Instance feature for cloud disks for which the multi-attach feature is enabled. For more information, see Multi-attach for cloud disks.
Manually release a cloud disk
You can perform the following steps to manually release a data disk on the Block Storage (Disks) page in the ECS console:
Log on to the ECS console.
In the left-side navigation pane, choose .
In the top navigation bar, select the region and resource group to which the resource belongs.
Find the cloud disk in the Unattached state that you want to release. In the Actions column, choose .
In the Release Cloud Disk dialog box, confirm the information about the associated snapshots, select I am aware of the disks and associated resources to be released and understand the related data risks, and then click Confirm.
Enable the Release Disk with Instance feature
You can enable or disable the Release Disk with Instance feature for existing cloud disks.
You can also enable or disable the Release Disk with Instance feature for system disks or data disks based on your business requirements when you create ECS instances or cloud disks.
Impacts of release settings
Disk type | Enable the Release Disk with Instance feature | Disable the Release Disk with Instance feature |
System disk | If you enable the Release Disk with Instance feature for the system disk of an ECS instance, the system disk is automatically released when the ECS instance is released, regardless of when the disk is detached from the ECS instance or is attached as a data disk to a different ECS instance. | If you disable the Release Disk with Instance feature for the system disk of an ECS instance, the disk is detached from the ECS instance and retained as a data disk when the instance is released. |
Data disk | If you enable the Release Disk with Instance feature for a data disk of an ECS instance, the disk is automatically released when the instance is released. Note If the data disk is detached from the ECS instance and enters the Unattached state, the disk is not released when the instance is released. |
Note
|
Procedure
Log on to the ECS console.
In the left-side navigation pane, choose .
In the top navigation bar, select the region and resource group to which the resource belongs.
Find the cloud disk that you want to release. In the Actions column, choose .
In the Modify Disk Properties dialog box, select or clear Release Disk with Instance and click Confirm.
References
You can call the following API operations:
DeleteDisk: releases a pay-as-you-go data disk.
ModifyDiskAttribute: modifies the attributes of cloud disks, including enabling or disabling the Release Disk with Instance feature.