• Elastic Cloud Server

ecs
  1. Help Center
  2. Elastic Cloud Server
  3. API Reference
  4. OpenStack Nova APIs
  5. Disk Management
  6. Detaching an EVS Disk from an ECS

Detaching an EVS Disk from an ECS

Function Description

This interface is used to detach an EVS disk from an ECS.

Constraints

The system disk, the device name of which is /dev/sda, or user disk can be detached from an ECS only when the ECS is in the stopped state. There are no requirements on OSs or OTC tools.

When an ECS is in the active state, pay attention to the following restrictions:

  1. Only data disks, the device name of which is not /dev/sda, can be detached from an ECS.
  2. Make sure that OTC tools have been installed and enabled on the ECS. Otherwise, the uninstallation will fail.
  3. For Linux ECSs, you need to log in to the ECS and run the umount command to disassociate the target disk from the file system. In addition, you need to ensure that no data is being written into or being read from the disk. Otherwise, the detachment will fail.
  4. For Windows ECSs, you need to ensure that no data is being written into or being read from the disk.
  5. OSs supporting EVS disk detachment from a running ECS include two parts:
    • For the first part, see section Supported OS Types.
    • Table 1 lists the second part of supported OSs.
      Table 1 OSs supporting EVS disk detachment from a running ECS

      OS

      Version

      CentOS

      7.3 64bit

      7.2 64bit

      6.8 64bit

      6.7 64bit

      Debian

      8.6.0 64bit

      8.5.0 64bit

      Fedora

      25 64bit

      24 64bit

      SUSE

      SUSE Linux Enterprise Server 12 SP2 64bit

      SUSE Linux Enterprise Server 12 SP1 64bit

      SUSE Linux Enterprise Server 11 SP4 64bit

      SUSE Linux Enterprise Server 12 64bit

      OpenSUSE

      42.2 64bit

      42.1 64bit

      Oracle Linux Server release

      7.3 64bit

      7.2 64bit

      6.8 64bit

      6.7 64bit

      Ubuntu Server

      16.04 64bit

      14.04 64bit

      14.04.4 64bit

      Windows (SCSI EVS disks cannot be detached from a running ECS.)

      Windows Server 2008 R2 Enterprise 64bit

      Windows Server 2012 R2 Standard 64bit

      Windows Server 2016 R2 Standard 64bit

      Red Hat Linux Enterprise

      7.3 64bit

      6.8 64bit

URI

DELETE /v2/{project_id}/servers/{server_id}/os-volume_attachments/{volume_id}

DELETE /v2.1/{project_id}/servers/{server_id}/os-volume_attachments/{volume_id}

Table 2 describes the parameters in the URI.
Table 2 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

server_id

Yes

Specifies the ECS ID.

volume_id

Yes

Specifies the volume ID.

Request

N/A

Response

N/A

Examples

  • Example request
    DELETE /v2/6fbe9263116a4b68818cf1edce16bc4f/servers/ab258e25-e351-47c7-b6e3-0749c5d9ed6a/os-volume_attachments/54667652-3029-4af8-9222-2d53066fd61c
    DELETE /v2.1/6fbe9263116a4b68818cf1edce16bc4f/servers/ab258e25-e351-47c7-b6e3-0749c5d9ed6a/os-volume_attachments/54667652-3029-4af8-9222-2d53066fd61c

Returned Values

See General Request Returned Values.