All Products
Search
Document Center

Elastic Compute Service:Release a disk

Last Updated:Jul 19, 2023

You can release the disks that are longer needed. When a disk is released, all data stored on the disk is also released and billing for the disk is stopped. By default, disks attached to Elastic Compute Service (ECS) instances are released together with the instances. You can disable the Release Disk with Instance feature for disks to retain the disks when their associated instances are released. This topic describes how to release a disk in the ECS console.

Prerequisites

  • If data is stored on the disk that you want to release, we recommend that you create a snapshot of the disk to back up the data. For more information, see Create a snapshot of a disk.

  • The disk is in the Unattached state. If the disk is attached to an instance, you must detach the disk before you can release the disk. For information about how to detach a disk, see Detach a data disk.

Background information

  • Methods used to release disks

    You can manually release a disk or enable the Release Disk with Instance feature for the disk. After the Release Disk with Instance feature is enabled, the disk is automatically released when its associated instance is released. The following table describes how to release different types of disks.

    Disk type

    Subscription

    Pay-as-you-go

    System disk

    System disks can only be automatically released.

    By default, the Release Disk with Instance feature is enabled for system disks. The feature can be disabled for the disks.

    Data disk

    • Subscription data disks can be manually released.

    • Subscription data disks can be automatically released.

      By default, the Release Disk with Instance feature is enabled for subscription data disks. The feature can be disabled for the disks.

    • Pay-as-you-go data disks can be manually released.

    • Pay-as-you-go data disks can be automatically released.

      By default, the Release Disk with Instance feature is enabled for pay-as-you-go data disks except the pay-as-you-go data disks that are separately created. For the pay-as-you-go data disks that are separately created, the feature needs to be manually enabled.

    Note

    The Release Disk with Instance feature cannot be configured for disks that support the multi-attach feature. For more information, see Enable multi-attach.

  • Impacts of release settings

    When you enable or disable the Release Disk with Instance feature for a system disk or a data disk, take note of the following items:

    • If the Release Disk with Instance feature is enabled for a disk, the disk is automatically released when its associated instance is released.

    • If the Release Disk with Instance feature is disabled for a disk, the disk is retained as a pay-as-you-go data disk three days after its associated instance expires, three days after a payment becomes overdue for the instance, or when the instance is automatically released on expiration. If the disk is a system disk, it is detached and retained as a data disk when the instance is released.

      Note
      • If you create a disk in the Chinese mainland, you must complete real-name verification for your account to ensure that the disk can be retained.

      • The retained disks are billed on a pay-as-you-go basis. You can log on to the Billing Management console and view consumption details by disk ID.

    • Snapshots

      • If the Delete Automatic Snapshots While Releasing Disk feature is enabled for a disk, the automatic snapshots of the disk are deleted when the disk is released. You can disable the Delete Automatic Snapshots While Releasing Disk feature for a disk when you attach the disk to an instance. For more information, see Delete automatic snapshots while releasing a disk.

      • Manual snapshots are not released when their associated disks are released.

Manually release a disk

You can perform the following operations to manually release a pay-as-you-go data disk on the Disks page in the ECS console.

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Storage & Snapshots > Disks.
  3. In the upper-left corner of the top navigation bar, select a region. Region
  4. Find the disk that you want to release. In the Actions column, choose 更多 > Release.

  5. In the Release Disk dialog box, confirm the information of associated snapshots and select I am aware of the disks and associated resources to be released and understand the related data risks. Then, click OK.

Enable or disable the Release Disk with Instance feature for disks when you create an instance

If the Release Disk with Instance feature is enabled for a disk, the disk is automatically released when its associated instance is released. You can use one of the following methods to enable or disable the Release Disk with Instance feature for disks.

Enable or disable the Release Disk with Instance feature for disks when you create an instance

You can perform the following operations to enable or disable the Release Disk with Instance feature for the system disk or data disks when you create an instance on the instance buy page in the ECS console.

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Instances.
  3. In the upper-left corner of the top navigation bar, select a region. Region
  4. Click Create Instance.

  5. In the Basic Configurations step, scroll down to the Storage section and optionally clear Release with Instance for the system disk or data disks.

    For information about the other steps in the instance creation wizard, see Create an instance by using the wizard.

Enable or disable the Release Disk with Instance feature for a disk on the Disks page

You can perform the following operations to enable or disable the Release Disk with Instance feature for system disks or data disks on the Disks page in the ECS console.

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Instances.
  3. In the upper-left corner of the top navigation bar, select a region. Region
  4. Find the instance that you want to manage and click the instance ID.

  5. On the Instance Details page, click the Cloud Disk tab.

  6. Find the disk for which you want to enable or disable the feature and choose 更多 > Modify Attributes in the Actions column.

  7. In the Modify Disk Properties dialog box, select or clear Release Disk with Instance and click Confirm.

    Note

    After you clear Release Disk with Instance for a disk, the disk is retained as a pay-as-you-go disk three days after the associated instance expires, three days after a payment becomes overdue for the instance, or when the instance is released on expiration. If the disk is a system disk, it is detached and retained as a data disk when the instance is released.

References

DeleteDisk