Steps to Increase AWS Disk Size
1. Login to AWS Console
2. Click EC2 and navigate to your currently running instances.
3. Click the instance and note down your Root device and Block Device
4. Click on Block Devices then click EBS ID to navigate to your volume page.
In other way, you can directly click the volumes under Elastic Block Storage and reach the same page:
5. Click the Actions -> Modify Volume and Increase the size then click yes to confirm.
6. Login to your aws console through SSH and Run lsblk command and note down the volumn names
- xvda is the recently changed volume size
- ` – xvdal previous size, 50G, we are trying to increase the size from 50GB to 80GB in this case.
If you run df -h now you will be able to see your existing volumn sizes only.
Now Run the below command to increase to the volume you entered in the aws console.
This below /dev/xvda may be different in your case, so accordingly change the command run it.
sudo growpart /dev/xvda 1
here /dev/xvda is file system and 1 means partition
Still the df -h command did not reflect the size as 80GB, it is still 50GB only.
Now run the below command to increase to your original size:
sudo resize2fs /dev/xvda1
here mention the file system and partition without space like /dev/xvda1 instead of /dev/xvda 1.
Now df -h also reflects the available size as 80GB.
Finally we increased the AWS disk size successfully and even lsblk now reflects the same.
Thanks for reading this post and Feel free to write your comments if any.
1,164 total views, 4 views today