If you want to use a data disk on another server in the same region and AZ, you can detach the data disk and then attach it to that server.
If a data disk is no longer required, you can detach it and then delete it.
Data disks can be detached online or offline, meaning that the server using the to-be-detached data disk can either be in the Running or Stopped state.
ECS
Detach a disk from a running server. For details, see Storage > Detaching an EVS Disk from a Running ECS in the Elastic Cloud Server User Guide.
BMS
SCSI disks can be attached to BMSs and used as data disks. You can detach a data disk either from a running or stopped BMS.
Note
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 has been detached from the server, the disk function remains unchanged, the disk status changes to Available for a non-shared data disk, and the disk status changes to Available for a shared data disk after it is detached from all its servers.
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.
Shared EVS disks support batch detachment so that you can select multiple servers at a time.
Click Yes to detach the disk.
The disk list page is displayed. The disk status is Detaching, indicating that the disk is being detached from the server.
If the shared EVS disk has been attached to multiple servers and needs to be detached from only some of its servers, the disk status will go back to In-use after the disk has been detached from the target servers. The disk status changes to Available only when it has been detached from all the servers.