When you find that the disk space of the purchased CVM is insufficient, you can purchase and attach elastic cloud disks to use as data disks to meet your storage needs.
You can purchase and attach elastic cloud disks to use them as data disks when you purchase a CVM without additional data disks.
When Server A has 10GB of important data on an elastic cloud disk that needs to be shared with Server B, you can directly detach the disk from Server A and then attach it to Server B.
When a single maximum-sized cloud disk cannot meet your storage requirements, you can purchase multiple cloud disks with equal capacity and configure LVM logical volumes to provide a larger disk capacity.
If the I/O performance of a single disk cannot meet business requirements, you can purchase multiple cloud disks and configure RAID 0, RAID 10, and so on to enhance the I/O performance.
Determine your use cases before selecting a disk type.
For general use cases including Web/APP applications, logical processing, and small and medium sites, we recommend that you select Premium Cloud Disk for a higher cost efficiency.
For medium-sized databases and image processing users, we recommend SSD for a better performance.
For use cases with high requirements for workloads and performance, including large databases, video business, NoSQL, and Elasticsearch, we recommend that you select Enhanced SSD for optimal performance and minimum storage latency.
What are the precautions for using cloud disks?
For independently purchased cloud disks, when using fstab to configure static file system information, the file system identifier should use the UUID or label of the file system to prevent changes in the kernel name of the cloud disk in the CVM due to multiple mounts/unmounts of multiple cloud disks on the same CVM.
If the cloud disk expires before the cloud server, it will be throttled, detached, or even reclaimed after a period of time. To prevent any impact on your business, please ensure to renew it in a timely manner.
If unmounting a cloud disk from a CVM does not severely impact your critical business, consider using the nofail option when configuring fstab to prevent errors during system restart after the cloud disk is unmounted from the CVM.
We recommend that you execute the san policy=OnlineAll operation in diskpart before using the cloud disk under the Windows operating system.
When detaching a cloud disk from a Windows operating system, it is recommended that you first interrupt all read and write operations to the disk and perform an offline operation.
If a custom image and a data disk snapshot is used, how do I automatically attach the data disk when starting a new instance?
For specific operations, please refer to the "Automatic Mounting" section in Attaching Cloud Disks.
How do I purchase a cloud disk?
You can create cloud disks via the console or API. For specific operations, please refer to Creating Cloud Disks.
2. At the top of the Cloud Block Storage page, select the region where the disk you want to view resides.
3. Locate the disk in the list, and view disk information. See below:
To view more information, click the ID/Name of the disk to enter the details page.
How do I view the cloud disk usage on the console?
Tencent Cloud activates the TCOP service by default when creating a CVM, so you can view the usage of cloud disks that have been attached to the CVM and initialized through the console. The steps are as follows:
Why can't I locate the CVM to which I want to attach a cloud disk?
Cloud disks cannot be mounted across different availability zones. Please ensure that your CVM instance and cloud disk are in the same region and availability zone, and that your CVM has not been released.
Why am I unable to view the new cloud disk capacity that I attached to a CVM instance?
Some Linux CVMs may not recognize elastic cloud disks. You need to enable the hot swapping feature in the CVM first. For more information, see Enabling Disk Hot Swapping.
After manually attaching a cloud disk, you must perform subsequent operations shown below to make it usable.
To attach to a Windows CVM: After logging in to the instance, go to Server Manager > Storage > Disk Management, and the disk will be available for use once it is online.
To attach to a Linux CVM: After logging in to the instance, run the mount <disk partition> <mount point> command, for example, mount /dev/vdb /mnt to use it.
What is the relationship between data writing and partition formatting?
A new data disk or data disk partition must be formatted and have its data structure recorded on it before it can be used normally. The purpose of formatting is to establish the file system of the data disk. Therefore, establishing a file system on the data disk implies writing data to the disk. Moreover, different file systems write files of different sizes during formatting:
Formatting a Windows System
Formatting in Linux System
Quick Format: This only assigns a file system to the partition and rewrites the directory table. The actual space occupied by a quick format is relatively small.
Normal formatting: In addition to performing quick formatting tasks, it also scans each sector of the partition to identify and mark bad sectors, filling the empty blocks of the cloud disk, which is equivalent to writing the full data volume of the cloud disk. At this point, the first snapshot will be approximately equal to the capacity of the cloud disk.
After the cloud disk is formatted and before the instance is written with data, the capacity of the first snapshot depends on the format of the disk file system.
Can the data disk capacity and the system disk capacity be aggregated?
Merging is not supported. You can expand the capacity of your data or system disk by expanding the cloud disk to increase storage space.
After expanding my cloud disk, do I need to unmount existing partitions when creating a new independent partition on Linux?
Yes. To do this, follow the steps to unmount the partition:
1. Run the following command to unmount the data disk:
umount<mount point>
If the mount point is /data, execute the following:
umount /data
2. Please unmount all file systems from all partitions on the cloud disk before proceeding with subsequent operations. You can repeatedly run the following command to confirm that all file systems on this disk have been unmounted.
mount|grep'<disk path>'
If the return is null, then all file systems have been unmounted from partitions on the cloud disk.
Can multiple CVMs access one cloud disk?
This is currently not supported. You can attach up to 20 cloud disks to a single CVM, but multiple CVMs cannot share the same cloud disk simultaneously. Data sharing can only be achieved by detaching from CVM A and then attaching to CVM B.
The cloud disks attached to the CVM is of the same size and type. How can I distinguish them?
Linux OS
Windows OS
Check the relationship between the elastic cloud disks and the device name by running the following command:
ls -l /dev/disk/by-id
Check the relationship between the elastic cloud disks and the device name by running the following command:
wmic diskdrive get caption,deviceid,serialnumber
Or:
wmic path win32_physicalmedia get SerialNumber,Tag
Can I change a CVM system disk from a local disk to a cloud disk?
Can I unmount a data disk that I purchased along with a CVM?
Since November 2017, data disks purchased with CVMs support detachment and reattachment. To avoid lifecycle management difficulties caused by detaching and reattaching to another CVM with a different expiration time, we provide several options during attachment, such as aligning expiration times and setting auto-renewal. Please choose an appropriate lifecycle management method to avoid data loss due to disk expiration.
I purchased a cloud disk independently to the CVM. But when I terminate the CVM, the cloud disk is released as well.
You can set whether a cloud disk is automatically released with the instance when attaching it. This can be done through the Cloud Disk Console or by using the Modify Cloud Disk Attributes API to enable or disable the automatic release feature for the cloud disk.
What should I do if I lost my data after restarting my Linux instance?
If you find that all data in a certain directory (such as /data) is lost after performing a restart operation, and it is known that the cause is due to the data disk partition not being mounted, please follow the steps below to resolve this issue:
1. Run the fdisk -l command to view the unmounted data disk partitions.
2. Execute the mount /dev/vdb /data command to mount the data disk partition.
3. Execute the df -h command to verify if the mount was successful.
4. By following the steps in Automatic Mounting, you can set up your Linux instance to automatically mount the corresponding cloud disk at startup.
Will data be lost during cloud disk unmounting?
Data within cloud disks remains unaltered during the process of mounting or unmounting. To maintain data consistency, we strongly advise:
In Linux, log in to the CVM instance and run the umount command on the cloud disk. After the command is successfully executed, go to the console to unmount the disk.
In Windows, stop read and write operations on all file systems on the disk before unmounting. Otherwise, data that has not been read or written will be lost.
What happens to the system after my cloud disk expires?
The following instructions are only applicable to elastic cloud disks that support detachment. Non-elastic cloud disks that do not support detachment have the same lifecycle as CVMs. For more information, see Payment Overdue.
Monthly-subscribed cloud disk
Pay-as-you-go Cloud Disk
7 days before the resources expiration date, you will receive an expiration alert and a renewal reminder.
If your account balance is sufficient and auto-renewal is enabled, cloud disk will be auto-renewed on the expiry date.
If your cloud disk is not renewed before it expires or on the expiration date, the system limits its performance from the point in time of its expiration. Then, you will notice a significant decrease in performance when using the cloud disk.
If you do not renew your cloud disk within 7 x 24 hours after it expires, the system will suspend the service (the cloud disk will be unavailable, but the data will be retained) and forcibly disassociate it from the cloud server (if any), and the cloud disk will enter the recycle bin. You can still renew and retrieve the cloud disk from the recycle bin, but the start date of the renewal period for the retrieved cloud disk will be the expiration date of the previous period.
If your cloud disk is not renewed and retrieved within 7 x 24 hours after entering the recycle bin, the system will begin to release resources. The data in the expired cloud disk will be erased and cannot be retrieved.
You can continue to use the pay-as-you-go cloud disk for 2 hours from the moment your account balance becomes negative. You will be billed for this period. After 2 hours, the services will be suspended and cloud disk will only store data. Until data is completely deleted, you will still be billed according to the billing standard even if the account balance is negative.
If your Tencent Cloud account is topped up to a positive balance within 15 days after the cloud disk has its services suspended, the disk can be restored.
If the cloud disk service is suspended and the balance remains negative for more than 15 days, the system will reclaim the pay-as-you-go cloud disk. The creator and all collaborators of the Tencent Cloud account will be notified via email, SMS, and in-app messages. All data will be deleted and cannot be recovered during the reclaiming process.
Please call 4009100100 if you need further information.
Can I change the cloud disk type after a successful purchase?
No. However, you can create a snapshot for data backup and then use the snapshot to create a cloud disk of your needed type.
Can I adjust the cloud disk capacity after a successful purchase?
Yes, cloud disks support capacity adjustment. They can be scaled up but not scaled down.
Do I have to shut down the CVM instance before a cloud disk expansion?
No shutdown is required. Please note that after the expansion is complete, depending on the operating system type of your cloud service, you need to perform the Extending Partitions and File Systems (Windows) or Extending Partitions and File Systems (Linux) operation to allocate the expanded capacity to an existing partition, or format the expanded capacity into a new independent partition.
What are the requirements for extending the file system?
Only cloud disks support expansion, local disks cannot be expanded. For specific operation guidelines, please refer to Expansion Scenario Introduction.
Note
We strongly recommend that you create a snapshot before expansion to ensure data security.
The maximum disk capacity supported by MBR partition format is 2TB. If your disk partition is in MBR format and needs to be expanded to more than 2TB, it is recommended to create and mount a new data disk, use the GPT partition method, and copy the data to the new disk.
Why does the capacity seem unchanged after I expanded my data disk?
After successfully expanding the storage capacity of the data disk through the console, you still need to log in to the cloud server to expand the partition and file system. For more information, see:
If the system disk of the CVM is a cloud disk, you can adjust its CPU and memory.
What should I do if the cloud disk is partitioned in MBR format and cannot be expanded?
The maximum disk capacity supported by MBR partition format is 2TB. If your disk partition is in MBR format and needs to be expanded to more than 2TB, it is recommended to create and mount a new data disk, use the GPT partition method, and copy the data to the new disk.
What should I do if a cloud disk cannot meet my business requirements even at its maximum capacity?
What happens to the data when a CVM is terminated?
The lifecycle of a system disk completely follows that of a CVM. When the CVM is terminated, the data stored in the system disk will also be terminated.
The lifecycle of a data disk (that is, an elastic cloud disk) is independent from that of a CVM. You can choose whether to retain the elastic cloud disk and its data outside of the CVM lifecycle.
Therefore, we recommend that you use elastic cloud disks to store data that needs to be saved for a long term.
How can cloud disks be recovered after being formatted?
Cloud disks cannot be recovered after formatting. We recommend you to create a snapshot before formatting.
How do I delete a cloud disk?
The lifecycle of the system disk follows that of the CVM and can only be deleted when the instance is terminated.
The lifecycle of a data disk (i.e., an elastic cloud disk) is independent of the CVM and can be deleted separately. For specific operations, please refer to Destroying Cloud Disks.
Can my system disk be partitioned?
Supported, but partitioning the system disk is not recommended.
Forcing partitioning with third-party tools may lead to system crashes, data loss, and other unknown risks. You can perform partition expansion after enlarging the system disk. For detailed instructions, see Online Expansion of System Disk Partition and File System.
How do I update the mounting information at the mount point?
Due to the characteristics of the systemd mount action in the Linux system, a systemd-related mount configuration file will be generated during the mount. If the existing .mount configuration information is not deleted, it will interfere with the mounting of the same directory (path: /run/systemd/generator/).
Issue
For instance, the data disk vdb (mounted to the directory /opt/apps using the disk uuid method mount -a in the fstab file) is now being replaced and another data disk vdc is being mounted to the same directory. If you mount the directory directly, you will not be able to read the data from vdc in the directory.
Solution
1. Delete the configuration for the corresponding mount point (for example, rm /run/systemd/generator/opt-apps.mount).
2. Execute the reload command (for example, systemctl daemon-reload).
3. Execute the mount command (for example, mount /dev/vdc /opt/apps).
How do I perform 4 KiB alignment for a cloud disk in a Linux instance?
Checking whether the cloud disk is 4 KiB-aligned.
Run the following command to check whether the cloud disk is 4KiB-aligned.
fdisk -lu
As shown below, if the Start value in the command output is divisible by 8, then the disk is 4 KiB-aligned.
Instructions
Note
The alignment operation will erase the existing data on the cloud disk. Please proceed with caution! If necessary, please create a snapshot in advance to prevent the loss of your business data.
fdisk tool (supports MBR partitioning)
Parted Tool (Supports GPT Partitioning)
1. Run the following command to access the fdisk tool.
fdisk /dev/vdb
2. Enter n and press Enter to start creating a new partition. As shown below:
The returned information indicates that there are two types of disk partitions:
p denotes the primary partition.
e denotes an extended partition.
3. Taking the creation of a primary partition as an example, enter p and press Enter to start creating a primary partition, as shown below:
In the echoed information, Partition number represents the primary partition number, and you can choose between 1 - 4, as shown below:
4. For example, to select partition number 1, enter the primary partition number 1 and press Enter. As shown in the following figure:
In the echo information, First sector represents the initial cylinder area, which can be selected from 2048 to 125829119, with 2048 as the default.
5. For example, select the default initial cylinder number 2048 and press Enter. As shown in the figure below:
In the echo information, Last sector indicates the end of the cylinder area. You can choose from 2048 to 20971519, with 20971519 being the default.
6. For instance, select the default ending cylinder number 20971519 and press Enter, as illustrated below:
7. Enter p and press Enter to view the details of the newly created partition. As shown in the figure below, this indicates that it has been aligned to 4KiB.
8. Enter w and press Enter to write the partition results into the partition table.
1. Run the following command to access the parted tool:
parted /dev/vdb
2. Run the following command to set the disk partition format to GPT.
mklabel gpt
3. Enter unit s and press Enter to set the disk's measurement unit to cylinders.
4. For instance, to create a partition for the entire disk, enter mkpart opt 2048s 100% and press Enter. Here, 2048s represents the starting capacity of the disk, and 100% represents the ending capacity. This is just a reference, and you can plan the number and capacity of disk partitions according to your business needs.
5. Enter p and press Enter to check whether the disk partition format has been successfully set. As shown in the figure below, this indicates that it is 4KiB-aligned.
6. Enter q and press Enter to exit the parted partition tool.