- Newest
- Most votes
- Most comments
Hi
After you increase the size of an EBS volume, you must extend the partition and file system to the new, larger size. You can do this as soon as the volume enters the optimizing state.
How do I extend my Linux file system after I increase my EBS volume on my EC2 instance?
There are two steps you need to take to make the additional space available to the Linux server:
Resize the partition: You can use the growpart command to resize the partition that contains the file system. You can find instructions on how to do this in the AWS documentation https://docs.aws.amazon.com/ebs/latest/userguide/recognize-expanded-volume-linux.html
Resize the file system: Once the partition has been resized, you can use the resize2fs command to resize the file system. You can find instructions on how to do this in the AWS documentation https://docs.aws.amazon.com/ebs/latest/userguide/recognize-expanded-volume-linux.html
Resize File System: After increasing the volume size on AWS, the next step is to resize the file system on your Linux server to utilize the additional space. You can do this using the resize2fs command if you're using ext3/ext4 filesystems.
bash sudo resize2fs /dev/[your_volume]
Ensure that the partition table reflects the increased volume size. You can use the fdisk command to check and potentially resize partitions if necessary.
sudo fdisk -l
Relevant content
- Accepted Answerasked 8 months ago
- asked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 5 years ago