A disk attached to a BMS can be detached.
If a BMS is stopped, disks can be detached from it without any limitation on the OS. If a BMS is running, the constraints are as follows:
The following APIs are required:
URI format: GET /v2/{project_id}/servers/{server_id}/os-volume_attachments
For details, see section "Querying Information About the Disks Attached to a BMS (Native OpenStack API)" in the Bare Metal Server API Reference.
GET https://{ECS Endpoint}/v2/000efdc5f9064584b718b181df137bd7servers/9ab74d89-61e7-4259-8546-465fdebe4944/os-volume_attachments
{ "volumeAttachment": { "device": "/dev/vdb", "serverId": "9ab74d89-61e7-4259-8546-465fdebe4944", "id": "b53f23bd-ee8f-49ec-9420-d1acfeaf91d6", "volumeId": "b53f23bd-ee8f-49ec-9420-d1acfeaf91d6" } }
URI format: DELETE /v2.1/{project_id}/servers/{server_id}/os-volume_attachments/{volume_id}
For details, see section "Detaching an EVS Disk from a BMS (Native OpenStack API)" in the Bare Metal Server API Reference.
DELETE https://{ECS Endpoint}/v2.1/000efdc5f9064584b718b181df137bd7/servers/9ab74d89-61e7-4259-8546-465fdebe4944/os-volume_attachments/b53f23bd-ee8f-49ec-9420-d1acfeaf91d6