tencent cloud

Cloud Block Storage

Step 1: Expanding Cloud Disks

Download
フォーカスモード
フォントサイズ
最終更新日: 2026-08-04 18:55:20
AI翻訳

Overview

A cloud disk is an expandable storage device on cloud. You can expand its capacity at any time without losing any data in it.
After expanding the cloud disk, you need to expand the partitions and file systems. You can allocate the capacity of the expanded part to an existing partition or format it into a new partition.

Note

The cloud disks only support expanding and do not support shrinking.
Only cloud disks with normal lifecycle support expanding, and isolated cloud disks do not support expanding.
After expanding the cloud disk, you also need to complete operations such as scaling out partitions and file systems before the new capacity can be used by instances.

Operation Methods

Expanding Cloud Disks via the console

Note:
If multiple cloud disks of the same capacity and type are attached to the CVM, you can identify them using the method shown in Distinguishing data disks. Select a data disk and expand its capacity as instructed below.
Expanding via the CVM console (recommended)
Expanding via the CBS console
1. Log in to the CVM console.
2. Choose More > Resource adjustment > Expand cloud disks in the Operation column.
3. Select the data disk to be expanded in the pop-up window, and click Next.
4. In the Adjust Capacity step, set the target capacity (must be greater than the current capacity), and click Next.
5. In the Extend Partition and File System step, view the precautions, and click OK.
6. Depending on the billing method, you may need to select a payment method and confirm the payment.
7. According to the operating system type of the target cloud service, you need to proceed with Extending Partitions and File Systems (Windows) or Extending Partitions and File Systems (Linux) to utilize the new capacity.
1. Log in to the CBS console.
2. Choose More > Expand for the target cloud disk.
3. In the Adjust Capacity step, set the target capacity (must be greater than the current capacity), and click Next.
4. In the Extend Partition and File System step, view the precautions, and click OK.
5. Depending on the billing method, you may need to select a payment method and confirm the payment.
6. According to the operating system type of the target cloud service, you need to proceed with Extending Partitions and File Systems (Windows) or Extending Partitions and File Systems (Linux) to utilize the new capacity.

Expanding Cloud Disks via API

If the CBS to be expanded is elastic data disk, you can use the ResizeDisk API to expand the specified cloud disks. For more information, see ResizeDisk.
If the CBS to be expanded is system disk or
non-elastic data disks created in or before 2018
, you can use the ResizeInstanceDisks API to expand the specified non-elastic cloud disk. For specific operations, see ResizeInstanceDisks.

Related Operations

Distinguishing data disks

Check cloud disks according to the operating system of the CVM.
Linux
Windows
2. Run the following command to view the relationship between the elastic cloud disks and the device name.
ls -l /dev/disk/by-id
The following information will appear:

Note that disk-xxxx is the ID of a cloud disk. You can use it to view cloud disk details on the CBS console.
2. Right-click

, and select Run.
3. View the mapping between CBS and device names.
wmic diskdrive get caption,deviceid,serialnumber
The following information will appear:

Note that disk-xxxx is the ID of a cloud disk. You can use it to view cloud disk details on the CBS console.
Note: Versions below Windows Server 2012 (such as 2008 R2) do not support this command. Please use the CMD command wmic diskdrive get caption,deviceid,serialnumber instead.

Checking the cloud-init configuration

Check cloud disks according to the operating system of the CVM.
Checking the cloudinit configuration for Linux instances
Checking the cloudinit configuration for Windows instances
After the system disk is expanded, log in to the Linux instance and check whether the /etc/cloud/cloud.cfg file contains the growpart and resizefs configuration items.
If yes, If the system disk is expanded and online expansion cannot be performed, you need to restart the machine. During system startup, cloud-init will call the growpart/resizefs command to complete expansion. As shown below:

growpart: Expands the partition to the disk size.
resizefs: Expands or adjusts the file system in the / partition to the partition size.
If no, you need to manually expend the file system and partitions according to the operating system type of the target cloud service. You need to perform Expand Partitions and File System (Linux) to utilize the expanded capacity.
After the system disk is expanded, log in to the Windows instance and check whether the ExtendVolumesPlugin configuration item exists under plugin in C:\\Program Files\\Cloudbase Solutions\\Cloudbase-Init\\conf\\cloudbase-init.conf.
If yes, If the cloudbase-init configuration file cloudbase-init.conf contains the ExtendVolumesPlugin configuration item, you need to restart the machine cloudbase-init before automatically expanding the volume and adding the blank space behind partition C to partition C. And there should be no other partition interference between the C partition and the blank space. If there are no other partitions between the C partition and the blank space, and you do not want to restart, or a third-party security software intercepts cloudbase-init so that it cannot complete the extend volume, you need to manually implement the following powershell command.
$DiskOps="@
select disk 0
select volume c
extend
exit
@"
$DiskOps | diskpart.exe | Out-Null
If no, manually extend partitions and file systems (Windows) according to the operating system, and assign its extended capacity to an existing partition, or format it into an independent new partition.


ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック