Scenarios
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 partition and file system. You can allocate the capacity of the expanded part to an existing partition or format it into a new partition.
Note:
MBR partition supports disk with a maximum capacity of 2 TB. When you partition disk with a capacity greater than 2 TB, we recommend that you create and mount a new data disk and use the GPT partition format to copy data.
Expanding Data Disks
If the cloud disk is a data disk, you can expand it using the following three methods.
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. Expand in the CVM console (recommended)
Expand in the CBS console
2. Select 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. Select a new capacity (it must be greater than or equal to the current capacity) and click Next.
5. Read the notes and click Adjust Now, as shown below:
2. Select More > Expand for the target cloud disk.
3. Select a new capacity. It must be greater than or equal to the current capacity.
4. Complete the payment.
You can use the ResizeDisk
API to expand the specified cloud disks. For more information, see ResizeDisk. Expanding System Disks
1. Log in to the CVM console. Locate the target CVM, and select More > Resource Adjustment > Expand Cloud Disks in the Operation column. 2. Select the system disk to expand in the pop-up window, and click Next.
3. Select a new capacity (it must be greater than or equal to the current capacity) and click Next.
4. Expand the cloud disk as instructed below.
Expand in the CVM console
Expand in the CBS console
Note:
CVM supports expanding a cloud system disk without shutting down the instance.
1. In the Expand partition and file system tab, read the notes and click Adjust Now.
2. Complete the capacity expansion in the console and log in to the instance to check whether the file system has been extended automatically. If not, extend the partition and file system as instructed in Extending System Disk and File System Online. 2. Select More > Expand for the target cloud disk.
3. Select a new capacity. It must be greater than or equal to the current capacity.
4. Complete the payment.
You can use the ResizeInstanceDisks
API to expand the non-elastic disks. For more information, see ResizeInstanceDisks. Relevant operations
Distinguishing data disks
Check cloud disks according to the operating system of the CVM.
2. Run the following command to view the relationship between the elastic cloud disks and the device name.
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. Enter cmd
in the pop-up window and press Enter.
4. Run the following command to view the relationship between the elastic cloud disks and the device name.
wmic diskdrive get caption,deviceid,serialnumber
You can also run the following command.
wmic path win32_physicalmedia get SerialNumber,Tag
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. Checking the cloudinit configuration
Check cloud disks according to the operating system of the CVM.
After the expansion, log in to the Linux instance and check whether the /etc/cloud/cloud.cfg
file contains the growpart
and resizefs
configuration items. If yes, ignore other operations.
growpart: Expands the partition to the disk size.
resizefs: Expands or adjusts the file system in the /
partition to the partition size.
After the system disk is expanded, log in to the Windows instance and check whether the ExtendVolumesPlugin
configuration item under plugin
exists in C:\\Program Files\\Cloudbase Solutions\\Cloudbase-Init\\conf\\cloudbase-init.conf
. If yes, reboot the machine. cloudbase-init
will automatically extend the volume, adding the empty space behind the C partition to the C partition. Note that there must be no other partition between partition C and the blank space. If you don't want to reboot the machine, there are other partitions between the C partition and the blank space, or cloudbase-init
is blocked by third-party security software, you need to execute the following powershell command manually.
$DiskOps="@
select disk 0
select volume c
extend
exit
@"
$DiskOps | diskpart.exe | Out-Null
Was this page helpful?