You can attach elastic cloud disks to a CVM instance in the same availability zone as a data disk. Up to 20 data disks can be attached to a CVM instance.
This document describes how to attach cloud disks to a CVM instance in the console and by using an API.
NoteSome Linux CVMs may not recognize an elastic cloud disk. You must first enable the disk hot swapping feature in the CVM. For more information, see Enabling the disk hot swapping feature.
Select the target instance, and complete the parameters Billing options.
Creation mode | Cloud disk capacity | Subsequent operations |
---|---|---|
Manually created | Cloud disk capacity < 2 TB | Initializing cloud disks (< 2 TB) |
Cloud disk capacity ≥ 2 TB | Initializing cloud disks (≥ 2 TB) | |
Created from a snapshot | Cloud disk capacity = Snapshot capacity |
|
Snapshot capacity < Cloud disk capacity ≤ 2 TB
or 2 TB < Snapshot capacity < Cloud disk capacity |
|
|
Snapshot capacity ≤ 2 TB < Cloud disk capacity |
|
You can use the AttachDisks
API to attach cloud disks. For more information, see AttachDisks.
All existing images already support attaching and detaching elastic cloud disks. To detach a cloud disk, you must first run the umount
command in Linux CVM or perform offline operations in Windows CVM. Otherwise, the reattached elastic cloud disk may not be recognized.
NoteHot swapping is only recommended for CVMs with the following operating systems.
Operating system | Version |
---|---|
CentOS | 5.11 64-bit |
5.11 32-bit | |
5.8 64-bit | |
5.8 32-bit | |
Debian | 6.0.3 32-bit |
Ubuntu | 10.04 64-bit |
10.04 32-bit | |
openSUSE | 12.3 64-bit |
12.3 32-bit |
modprobe acpiphp
acpiphp
module automatically after shutting down or re-starting the CVM, run the following command according to the operating system.acpiphp.modules
file.vi /etc/sysconfig/modules/acpiphp.modules
#!/bin/bash
modprobe acpiphp >& /dev/null
chmod a+x /etc/sysconfig/modules/acpiphp.modules
If you specify a custom image and data disk snapshot while creating a CVM instance, the cloud disk created at the same time is automatically attached to the CVM and can be read and written without being initialized by partitioning, formatting and other operations. However, the specified custom images and data disk snapshots must meet the following requirements.
If you use a custom image to create a Windows CVM instance, the cloud disk created from the corresponding data disk snapshot will be automatically attached. The custom image and the data disk snapshot must meet the following requirements:
ntfs
or fat32
before you create a snapshot.onlineAll
.Tencent Cloud provides pre-configured public images for Windows by default, but we still recommend that you perform the following steps to check configurations before creating a custom image. Please run the following commands in order and check the returned results.
diskpart
san
Was this page helpful?