Problem Description
The disk capacity does not increase after the cloud disk is expanded online in ECS
problem causes
ECS console operation expansion only expands the storage capacity of the cloud disk, and does not expand the file system of the ECS instance
solution
- Precautions
- If there are risky operations such as modifying or changing the instance or data, be sure to pay attention to the disaster recovery and fault tolerance capabilities of the instance to ensure data security
- If you want to modify the configuration and data of instances (including but not limited to ECS, RDS), etc., it is recommended to create snapshots in advance or enable RDS log backup and other functions
- Steps
-
Query the mounted hard disk
df -lh
It shows only 40G, but my side has been expanded to 60G
fdisk -l
Through the fdisk -l command, you can see that the capacity has been expanded, but the disk information has not been changed.
-
Perform file system expansion
#安装growpart yum -y install cloud-utils-growpart #自适应分区扩容 growpart /dev/vda 1 #重设分区大小 resize2fs /dev/vda1
-
Use the df -h command to verify
df -lh
-