You can mount an elastic cloud disk (used as a data disk for the CVM) to any CVM in the same availability zone. Each CVM can have up to 20 data disks mounted to it. You can use the following methods to mount a cloud disk.
When launching a new CVM, specify the corresponding custom image and data disk snapshot.
After automatic mounting, reads and writes on the data disk can be directly performed without disk initialization operations such as partitioning and formatting.
For an independently purchased cloud disk, the elastic cloud disk can be manually mounted to an existing CVM instance in the same availability zone through the console or API.
Some Linux CVMs may not recognize elastic cloud disks. You can first enable the disk hot swapping function on the CVM. For details, see Enable disk hot swapping function.
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 mounted. The custom image in use and the data disk snapshot must meet the following requirements:
ntfs
or fat32
before you create a snapshot.onlineAll
.Public images for Windows that are currently provided by Tencent Cloud have been configured by default, but we still recommend that you check the configuration before creating any custom images by following the steps below:
If you use a custom image to create a Linux CVM instance, the cloud disk created from the corresponding data disk snapshot will be automatically mounted. The custom image in use and the data disk snapshot must meet the following requirements:
/etc/rc.local
to write the data disk mounting point to the file.mkdir -p <mount-point>
mount <device-id> <mount-point>
The parameter descriptions for these commands are as follows:<mount-point>
must be set to the mounting point of the file system, such as /mydata
.<device-id>
must be set to the actual file partition location. For example, enter /dev/vdb
when there is no partition in the file system, and /dev/vdb1
when there is a partition in the file system.Creation Mode | Cloud disk capacity | Subsequent Operations |
---|---|---|
Create directly | Cloud disk capacity< 2TB | Initializing cloud disks (smaller than 2TB) |
Cloud disk capacity ≥ 2TB | Initializing cloud disks (larger than or equal to 2TB) | |
Create from a snapshot | Cloud disk capacity = snapshot capacity |
|
Snapshot capacity < cloud disk capacity ≤ 2TB or 2TB < snapshot capacity < cloud disk capacity |
|
|
Snapshot capacity ≤ 2TB < cloud disk capacity |
|
You can use the AttachDisks API to mount a cloud disk. For more information, see Mounting cloud disks.
All images that are currently provided already support the mounting and unmounting operations of elastic cloud disks. To unmount a cloud disk, you must first execute the umount
(Linux) or offline (Windows) operations. Otherwise, the CVM may not recognize the elastic cloud disk next time it is mounted.
However, if you have previously purchased a CVM with one of the following operating systems and plan to mount it with elastic cloud disks, we recommend that you first add the related driver to the CVM to get the hot swapping function:
CVM operating system types | 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
If you need to load the
acpiphp
module when shutting down or re-starting the CVM, we recommend you execute Step 3 to set theacpiphp
module to load automatically when starting up.
acpiphp
module to load automatically when starting up:acpiphp.modules
file.vi /etc/sysconfig/modules/acpiphp.modules
b. Add the following content to the file, and save.#!/bin/bash
modprobe acpiphp >& /dev/null
c. Execute the following command to add execution permissions.chmod a+x /etc/sysconfig/modules/acpiphp.modules
vi /etc/modules
b. Add the following content to the file, and save.acpiphp
vi /etc/sysconfig/kernel
b. Add the following content to the file, and save.MODULES_LOADED_ON_BOOT="acpiphp"
Was this page helpful?