Updated on 2024-10-24 GMT+08:00

Detaching an EVS Disk

Scenarios

Disk Function

Server Status

Scenarios

System disk

Only offline detachment is supported.

You can only detach a system disk when the server status is Stopped.

  • If the file system on your system disk is damaged and the server cannot be started, you can detach the system disk and attach it to another server as a data disk. After the file system is fixed, you can re-attach the disk to the original server as the system disk.
  • If you no longer need a system disk or want to replace it with a new one, you can detach it.

Data disk

Both online detachment and offline detachment are supported.

You can detach a data disk when the server status is Stopped or Running.

  • If you want to use a data disk on another server in the same region and AZ, you can detach it and then attach it to that server.
  • If a data disk is no longer required, you can detach it and then delete it.
  • For an attached system disk, the disk function is displayed as System disk, and the disk status is displayed as In-use in the disk list. After the system disk is detached, the disk function changes to Bootable disk, and the status changes to Available.
  • Bootable disks are the system disks detached from servers. A bootable disk can be re-attached to a server to be used as a system disk or data disk depending on the disk function selected.
  • For an attached data disk, the disk function is displayed as Data disk, and the disk status is displayed as In-use in the disk list. After the data disk is detached, the disk function remains unchanged, and the status changes to Available. For a shared disk, the status changes to Available only after it is detached from all its servers.
  • A detached disk will not be automatically deleted, and it will still be billed. To avoid unintended charges, you can delete or unsubscribe from it if it is no longer needed.

Notes and Constraints

  • After a system disk is detached, some operations cannot be performed on the original server and the system disk. The restrictions are as follows:
    • Server: starting the server, remote login, resetting the password, changing server billing mode, changing server specifications, changing the OS, reinstalling the OS, creating images, creating backups, adding disks, changing the security group, and changing the VPC
    • System disk: changing disk billing mode

Prerequisites

  • Before detaching an EVS disk from a running Windows ECS, ensure that no programs are reading data from or writing data to the disk. Otherwise, data will be lost.
  • Before detaching an EVS disk from a running Linux ECS, you must log in to the ECS and run the umount command to cancel the association between the disk and the file system. In addition, ensure that no programs are reading data from or writing data to the disk. Otherwise, detaching the disk will fail.
  1. Log in to the management console.
  2. Choose Compute > Elastic Cloud Server.

    The Elastic Cloud Server page is displayed.

  3. In the server list, locate the row that contains the server whose system disk is to be detached, click More in the Operation column, and choose Stop.

    When the server status changes to Stopped, the server has been stopped.

  4. Click the name of this server.

    The server details page is displayed.

  5. Click the Disks tab to view the system disk attached to the server.
  6. Locate the row that contains the system disk and click Detach.

    The Detach Disk dialog box is displayed.

  7. Click Yes to detach the disk.

    After the operation had succeeded, the detached system disk is no longer displayed under the Disks tab.

  8. (Optional) Re-attach the bootable disk to a server. You can use it as a system disk or data disk depending on the disk function you select.
  1. Log in to the management console.
  2. Click in the upper left corner and choose Storage > Elastic Volume Service.

    The Elastic Volume Service page is displayed.

  3. Choose a way to detach the disk by determining whether you want to check server information first.

    • If yes, perform the following procedure:
      1. In the disk list, click the name of the to-be-detached disk.

        The disk details page is displayed.

      2. Click the Servers tab to view the server where the disk has been attached.
      3. Click to select the server and click Detach Disk.

        The Detach Disk dialog box is displayed.

      4. Click Yes to detach the disk.
    • If no, perform the following procedure:
      1. In the disk list, locate the row that contains the target disk and choose More > Detach in the Operation column.

        The Detach Disk dialog box is displayed.

      2. Click Yes to detach the disk.

    In the disk list, the disk status is Detaching, indicating that the disk is being detached from the server.

    When the status changes to Available, the disk has been detached.

Helpful Links

To check out more detachment FAQs, see Detachment.