Attaching a Non-Shared Disk
Scenarios
This section describes how to attach a non-shared EVS disk to a cloud server. Disks supporting this operation include:
- Separately created data disks
- Detached data disks
- Detached system disks
After a system disk is detached from an ECS, the disk function changes to Bootable disk, and the status changes to Available. You can attach a bootable disk to an ECS to be used as a system disk or data disk depending on the device name selected.
Prerequisites
- The non-shared disk status is Available.
- To attach a data disk, the status of the server must be Running or Stopped.
- To attach a system disk, the status of the server must be Stopped.
- The account is not in arrears.
Notes and Constraints
- Cloud servers created from ISO images are only used for OS installation. They have limited functions and cannot have EVS disks attached.
- A non-shared disk can only be attached to one server.
- The disk and the server must be in the same region and AZ.
- A detached, non-shared yearly/monthly data disk purchased together with a server can only be re-attached to the original server to be used as a data disk.
- A shared disk can be attached only when the servers' statuses are Running or Stopped.
- A frozen disk cannot be attached.
- A detached, yearly/monthly system disk purchased together with a server can be re-attached and used as a data disk for any server. If you want to use it again as a system disk, you must attach it to the original server.
- A detached, pay-per-use system disk purchased together with a server can be re-attached and used as a data disk for any server. If you want to use it again as a system disk, you must attach it to a server that uses the same image as the original server.
Attaching the Disk on the EVS Console
- Log in to the management console.
- Click in the upper left corner and choose Storage > Elastic Volume Service.
The Elastic Volume Service page is displayed.
- In the disk list, locate the disk and click Attach.
- Select the server and then select the disk function from the drop-down list. Ensure that the disk and server are in the same AZ.
One device name can be used for one disk only. For how to obtain the disk name in the OS, see FAQ "How Do I Obtain My Disk Name in the ECS OS Using the Device Identifier Provided on the Console?" in the Elastic Cloud Server FAQs.
Figure 1 Attach Disk
- Click OK.
A dialog box is displayed, showing "The disk has been attached but still needs to be initialized before it can be used".
If you are attaching an EVS disk with data on it, initializing the disk will erase the existing data.
- Click OK to go back to the disk list page.
The status of the disk is Attaching, indicating that the disk is being attached to the server. When the disk status changes to In-use, the disk is successfully attached.
Attaching the Disk on the ECS Console
- Log in to the management console.
- Click in the upper left corner and select your region and project.
- Click . Under Compute, choose Elastic Cloud Server.
- In the search box above the upper right corner of the ECS list, enter the ECS name, IP address, or ID for search.
- Click the name of the target ECS.
The page providing details about the ECS is displayed.
- Click the Disks tab. Then, click Attach Disk.
The Attach Disk dialog box is displayed.
- Select the target disk and specify it as the system disk or a data disk.
- For KVM ECSs, you can specify the disk as the system disk or a data disk but cannot specify a specific device name.
- For Xen ECSs, you can specify a specific device name, such as /dev/vdb.
- If no disks are available, click Create Disk in the lower part of the list.
- For the restrictions on attaching disks, see What Are the Requirements for Attaching an EVS Disk to an ECS?
- Click OK.
After the disk is attached, you can view information about it on the Disks tab.
Follow-Up Operations
- If you are attaching a new disk, you need then log in to the server and initialize the disk before it can be used. To learn how to initialize disks, see Initializing EVS Data Disks.
- If you are attaching an EVS disk with data on it, you do not need to initialize it because initializing the disk will erase the existing data.
To mount a disk partition on a specific directory of the server, run the following command on the server:
mount Disk partition Mount point
Helpful Links
If your disk cannot be attached to a server, see Why Can't I Attach My Disk to a Server?
If the attached data disk is not showing up, see Why Can't I View the Attached Data Disk on the Server?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.