Last updated:2021-07-01 14:34:04
After you expand the capacity of an EBS volume that has no partitions but a file system, you can directly resize the file system.
Operating environment
Resource | Description |
---|---|
Operating system | CentOS 6.5 64-bit |
Data disk | /dev/vdb: has no partitions and uses an ext4 file system. The capacity of the disk has been expanded from 200 GB to 2,200GB. /dev/vdc: has no partitions and uses an xfs file system. The capacity of the disk has been expanded from 2,400 GB to 3,000 GB. |
df -Th
The following figure shows the output.
The following table describes the information extracted from the figure.
Data disk | File system type | Mount point |
---|---|---|
/dev/vdb | ext4 | Mounted to /mnt/data_disk01 |
/dev/vdc | xfs | Mounted to /mnt/data_disk02 |
In the operating system of your KEC instance, resize a file system by running one of the following commands based on the type of the file system.
resize2fs /dev/vdb
The following figure shows the output.Note: In the preceding command,
/dev/vdb
is the name of the data disk for which you want to allocate the expanded capacity. You must change it based on your business requirements.
mount | grep /dev/vdc
Resize the file system on the /dev/vdc data diskxfs_growfs /mnt/data_disk02
The following figure shows the output.Note: In the preceding commands,
/mnt/data_disk02
is the mount point of the/dev/vdc
data disk. You must change it based on your business requirements.
Run the following command to check the resizing results:
df -Th
The following figure shows the output.
The figure shows that the resizing succeeded. When you check the results, compare the results with the original capacities.
Did you find the above information helpful?
Please give us your feedback.
Thank you for your feedback.