All Products
Search
Document Center

:What do I do if I cannot extend a GPT partition on a disk by using the growpart utility after the disk is extended?

Last Updated:Nov 18, 2025

Problem description

After you extend a GUID Partition Table (GPT) disk and use the growpart utility to extend a partition or file system on the disk, such as the /dev/vdb1 partition, error messages appear, as shown in the following figure. As a result, the disk is extended but the available space of the partition or file system does not increase. In this topic, the /dev/vdb1 partition is used to describe how to resolve the preceding issue.分区失败

Cause

When you initialized the disk, you did not run the mkpart primary 1 100% command as recommended to create a primary partition on the disk and specify the start and end positions of the partition. In the following example, the /dev/vdb disk is used.

To check whether a partition is aligned, run the following commands:

  • fdisk -l: checks whether the Start value for the partition is 2048. If the Start value for the partition is not 2048, the partition is not aligned.

  • parted -l: checks whether the Start value for the partition is 1049 kB. If the Start value for the partition is not 1049 kB, the partition is not aligned, as shown in the following figure.查看起始分区

Solution

To resolve the preceding issue, repartition the disk and then extend the partition.

  1. Connect to the Elastic Compute Service (ECS) instance to which the disk is attached.

    For more information, see Connection method overview.

  2. Run the following command to query information about the /dev/vdb1 partition in the etc/fstab file:

    cat /etc/fstab

    The following figure shows sample information about the /dev/vdb1 partition.查看分区信息

  3. Run the following command to modify the etc/fstab file and delete the information of the /dev/vdb1 partition:

    vim /etc/fstab
  4. Run the following command to unmount the /dev/vdb1 partition:

    umount /dev/vdb1

    卸载分区

  5. Repartition the disk and mount the file system in the new partition.

    Important

    After you repartition the disk, the data stored on the original partition is lost. We recommend that you create a snapshot to back up all data on the disk in advance. After you repartition the disk and mount the file system of the new partition to the disk, you can use the snapshot to restore data on the disk. For information about how to create a snapshot, see Create a snapshot for a disk.

    For more information, see Initialize a data disk (Linux).

  6. Extend partitions and file systems (Linux) again.