Expanding Cloud Disk Capacity

Last updated: 2021-07-20 16:17:38

    Overview

    A cloud disk is an expandable storage device on cloud. After a cloud disk is created, you can expand its capacity at any time to increase its storage capacity without losing any data in it.
    After a cloud disk is expanded, you need to either assign its expanded capacity to an existing partition, or format it into an independent new partition. For more information, see Extending Partitions and File Systems (Windows) or Determining the Expansion Method.

    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 attach 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.

    1. Log in to the CVM console.
    2. Locate the CVM on which you want to expand the data disk, and select More > Resource Adjustment > Expand Data Disk 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.
    6. Assign its expanded capacity to an existing partition, or format it into an independent new partition. Depending on the operating system of the CVM, see Extending Partitions and File Systems (Windows) or Determining the Expansion Method.

    Expanding system disks

    1. Log in to the CVM console. Locate the CVM on which you want to expand the system disk, and select More > Resource Adjustment > Expand System Disk in the Operation column.
    2. Select the system disk to be expanded 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. Read the notes, select Agree to a forced shutdown, and click Adjust Now.
    5. After the expansion is completed on the console, check the cloudinit configuration for Linux instances or Windows instances according to the operating system of the CVM. Then extend partitions and file systems as needed.

    Operations

    Distinguishing data disks

    Check cloud disks according to the operating system of the CVM.

    1. Log in to a Linux instance
    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.

    Checking the cloudinit configuration

    Check cloud disks according to the operating system of the CVM.

    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, 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.
    • If no, manually extending partitions and file systems (Linux) according to the operating system, and assign its expanded capacity to an existing partition, or format it into an independent new partition.