Home >Operation and Maintenance >Linux Operation and Maintenance >How to mount a data disk to an ECS instance
The content of this article is about how to mount a data disk for an ECS instance. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
AttachDisk
Description
When calling this interface, you need to pay attention to:
To be mounted The status of the ECS instance must be Running or Stopped.
When mounting a data disk, the status of the cloud disk must be available (Available).
The OperationLocks of the ECS instance controlled by security cannot be marked as "LockReason": "security".
Even if you set DeleteWithInstance to false when mounting a cloud disk, once the ECS instance is under security control and OperationLocks is marked with "LockReason" : "security", the cloud disk will be ignored when releasing the ECS instance. The DeleteWithInstance property is released at the same time.
Request parameters
##Return parameters
are all public return parameters. See Public Return Parameters.Example
Request example
https://ecs.aliyuncs.com/?Action=AttachDisk &InstanceId=i-23jggx34b &DiskId=d-23jbf2v5m &<公共请求参数>
Return example
XML format
<AttachDiskResponse> <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId> </AttachDiskResponse>
JSON format
{ "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E" }
Error code
The following are error codes unique to this interface. For more error codes, please visit the API Error Center.The above is the detailed content of How to mount a data disk to an ECS instance. For more information, please follow other related articles on the PHP Chinese website!