growpart and resize2fs to extend disk size
Alibaba CLoud Elastic Compute Service (ECS) is a high-performance, stable, reliable, and scalable IaaS-level service provided by Alibaba Cloud. ECS eliminates the need for upfront investments in IT hardware and allows you to scale computing resources on demand. This makes ECS instances more convenient and efficient than physical servers. ECS provides a variety of instance types that suit various business needs and helps boost business growth.
This article provides instructions on how to use tools such as
resize2fs to extend the partition and file system of the Linux system disk.
Before extending the system disk partition and file system, please complete the following tasks in advance.
A snapshot backup data has been created.
To prevent data loss due to operational errors, it is recommended that you use snapshots to back up data before operations.
The cloud disk has been expanded on the console.
Connect to the ECS instance remotely.
xfsprogs according to your OS.
growpart <DeviceName> <PartionNumber> command to resize disk.
growpart /dev/vda 1
resize2fs <PartitionName> command to resize file system.
Run the following commands to show disk size.