All Products
Document Center

:Failed to Alibaba Cloud Linux 2 the system disk of the ECS instance

Last Updated:May 19, 2023

Problem description

For Alibaba Cloud Linux 2 instances that meet the following conditions, when the system disk setting is not set to 20GB, the system disk fails to be expanded, and the system disk size remains set to the default value of 20GB.

  • Image: aliyun_2_1903_x64_20G_alibase_20200114.qboot.vhd image (qboot image).
  • Kernel version: 4.19.81-17.al7.x86 _64.

For example, the system disk size is 300GB. If the vda1 partition size is 20GB, the system disk size is still 20GB.

Check the corresponding /var/log/cloud-init.log logs, and find that disk resizing failed.


The cause of this problem is that qboot Image startup optimization removes the initramfs process, resulting in the following situations after the instance is started:

  1. In /proc/mounts /The Mount device of the root directory is /dev/root.
  2. However, the system did not correctly create the soft link /dev/root.

Therefore, during instance startup, cloud-init applications cannot identify the root partition information.



Alibaba Cloud reminds you that:

  • Before you perform operations that may cause risks, such as modifying instance configurations or data, we recommend that you check the disaster recovery and fault tolerance capabilities of the instances to ensure data security.
  • You can modify the configurations and data of instances including but not limited to Elastic Compute Service (ECS) and Relational Database Service (RDS) instances. Before the modification, we recommend that you create snapshots or enable RDS log backup.
  • If you have authorized or submitted sensitive information such as the logon account and password in the Alibaba Cloud Management Console, we recommend that you modify such information in a timely manner.

Temporary solution

Perform the following steps to resize a disk:

  1. Run the following command to resize the first partition of the system disk.
    growpart /dev/vda 1
  2. Run the following command to resize the /dev/vda1 partition file system of the system disk.
    resize2fs /dev/vda1

    Note: the preceding command resizes an EXT4 file system. If you are using an XFS file system, run the xfs_growfs/dev/vda1 command to resize the file system.

Solidification solution

This problem has been fixed in the qboot image of aliyun_2_1903_x64_20G_qboot_alibase_20200904.vhd. You can use a new image.

Application scope

  • Elastic Compute Service