You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Linux operating system issue
What do I do if the root partition of the system disk does not expand automatically after I expand a volume of a Linux instance?
Copy page
Download PDF
What do I do if the root partition of the system disk does not expand automatically after I expand a volume of a Linux instance?
Issue description​
After I expand the system disk of a Linux instance, the root partition of the system disk does not expand automatically.​
Causes​
Automatic partition expansion for ECS instances on the platform is performed by Cloud-init. The issue may stem from a lack of tools such as growpart in the Linux instance or incorrect configuration of the cloud.cfg file.​
Solutions​
  1. Execute the following command in the faulty instance to check whether growpart is installed.​
  • ​
    which growpart​
    ​
  • If no output is displayed, the tool is not installed. Execute the following command to install the automatic expansion dependency tool.​
  • ​
    CentOS
    Debian/Ubuntu
    ​
    ​
    sudo yum -y install cloud-utils-growpart​
    ​
    ​
  • If an output is displayed, the tool is installed. Continue with the follow-up procedures.​
  1. Execute the following command to check whether information about the growpart and resizefs tools exists in the /etc/cloud/cloud.cfg file.​
  • ​
    cat /etc/cloud/cloud.cfg​
    ​
  • Correct sample output:​
  • ​​​
  • If no relevant content is displayed in the output, follow the following steps to supplement the content.​
  1. Execute the following command to open the Cloud-init configuration file.​
  • ​
    vim /etc/cloud/cloud.cfg​
    ​
  1. In the cloud_init_modules module, add information about the growpart and resizefs tools (as shown in the preceding Correct sample output).​
  1. Press the Esc key to exit edit mode, enter :wq, and then press Enter to save and exit the file.​
  • If relevant content is displayed in the output, the issue is resolved.​
Last updated: 2026.04.13 16:50:02