If you no longer need a disk and want to stop billing for it, you can release the disk. When a disk is released, the disk and its data are deleted, and billing for the disk stops. This topic describes how to manually release a disk or configure a disk to be automatically released with its associated instance.
Disk release methods
You can manually release a disk or configure the disk to be automatically released with its associated instance. If you enable the Release with Instance feature for a disk, the disk is automatically released when you release the associated ECS instance.
System disk:
Can only be released with its instance.
By default, the Release with Instance feature is enabled when you create a system disk. You can disable this feature. If you disable the feature, the system disk is detached and retained as a data disk when the instance is released.
Data disk:
Can be manually released or automatically released with its associated instance.
By default, the Release with Instance feature is disabled when you create a pay-as-you-go data disk separately. In other cases, the feature is enabled by default. You can disable this feature.
Prerequisites
When you release a disk, its data is permanently deleted. Before you release the disk, create a snapshot to back up its data. For more information, see Create a snapshot.
To manually release a disk, the disk must be in the Available state.
Confirm whether to retain the automatic snapshots of the disk. If the Release with Disk property is enabled for automatic snapshots, the automatic snapshots are released when the disk is released. For more information, see Enable release with disk for automatic snapshots.
NoteManual snapshots are not affected by disk releases.
If you want to configure a disk to be released with its associated instance, make sure that the multi-attach feature is disabled for the disk.
NoteThe Release with Instance feature is not supported for disks for which the multi-attach feature is enabled. For more information, see Enable the multi-attach feature for a disk.
Manually release a disk
The following steps describe how to manually release a data disk on the Disks page.
Go to ECS console - Block Storage.
In the top navigation bar, select the region and resource group of the resource that you want to manage.
Find the disk that you want to release. The disk must be in the Available state. In the Operation column, choose .
WarningWhen you release a disk, its data is permanently deleted. Create a snapshot to back up data before you release the disk. Creating snapshots incurs fees. For more information about the billing of snapshots, see Snapshot pricing.
In the Release Disk dialog box, confirm the information about associated snapshots, select I understand that the selected resources and their associated resources will be released, and I am aware of the related data risks., and then click OK.
Release a disk with its instance
You can enable or disable the Release with Instance feature for an existing disk.
You can also enable or disable the Release with Instance feature for a system disk or data disk when you purchase a new instance or disk.
Impact of release
Disk type | Enable Release Disk With Instance | Disable Release With Instance |
System disk | The disk belongs to the source instance. If release with instance is enabled, the system disk is automatically released with the source instance, even if the disk is detached or attached to another instance as a data disk. | When the instance is released, the disk is detached and retained as a data disk. |
Data disk | When the ECS instance is released, the disk is automatically released with the currently attached instance. Note If the disk is in the Available state, the disk is not affected by the instance release. |
Note
|
Procedure
Go to ECS console - Block Storage.
In the top navigation bar, select the region and resource group of the resource that you want to manage.
Find the disk that you want to modify. In the Operation column, choose .
In the Edit Attribute dialog box, enable or disable Release Disk with Source Instance, and then click Confirm.
References
You can also call the following API operations:
DeleteDisk: Releases a pay-as-you-go data disk.
ModifyDiskAttribute: Sets whether to release a disk with its associated instance.
> Release