Determining the Expansion Method

Last updated: 2021-05-06 17:20:10

    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 expanding cloud disk capacity on the console, you need to log in to the CVM instance to assign its expanded capacity to an existing partition using an appropriate method as needed. This document describes how to determine the expansion method on a Linux CVM.

    Note:

    Extending the file system may affect the existing data. We strongly recommend you to manually create a snapshot to back up your data before the operation.

    Prerequisites

    Directions

    1. Run the following command as the root user to view the partition format of the cloud disk.
      fdisk -l
      
    • If the result only shows /dev/vdb without a partition, you need to extend the file system.
    • If the result is as shown in the following two figures (which may vary according to the operating system), the GPT partition format should be used.

    • If the result is as shown in the following figure (which may vary according to the operating system), the MBR partition format should be used.
    1. Choose the expansion method corresponding to the partition format obtained in step 1.

      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.
      Partition format Expansion method Description
      - Extending file systems Applicable to scenarios where a file system is created directly on a bare device and no partition is created.
      GPT Assigning the expanded capacity to an existing GPT partition Applicable to scenarios of direct formatting when no partition is created.
      Formatting the expanded capacity into an independent new GPT partition Applicable to scenarios where the original partitions remain unchanged and a new GPT partition is created for expansion.
      MBR Assigning the expanded capacity to an existing MBR partition Applicable to scenarios of direct formatting when no partition is created.
      Formatting the expanded capacity into an independent new MBR partition Applicable to scenarios where the original partitions remain unchanged and a new MBR partition is created for expansion.