How to increase disk volume on AWS EC2? AWS

AWS EC2 or Amazon Elastic Compute Cloud is a web service that provides secure, resizable compute capacity in the cloud. AWS EC2’s simple web service interface allows you configure capacity with minimal intervention. It provides complete control of your computing resources. AWS EC2 offers the broadest and deepest compute platform with choice of processor, storage, networking, operating system.

We would suggest you to take a snapshot or AMI (Amazon Machine Images) as a rollback plan before making changes to the EC2 volumes.

Linux (without downtime) – Option 1

Step1: Open EC2 -> Elastic Block Store -> Volumes. Identify the volume you want to increase by looking at the attachment information column

Step 2: Select the volume and click Actions ->Modify Volume, then select the new volume size.

Step 3: Choose Modify, and choose Yes. Refresh the console page. In the Description tab, the state shows the progress of optimization until the modification is complete.

Step 4: Use the resize2fs command to automatically extend the size of the /dev/volume file system to the full space of the volume

In case Filesystem is either ext2, ext3 or ext4 –

                $ sudo resize2fs /dev/sda1

In case you have XFS

                $ sudo apt-get install –y xfsprogs

                $ sudo xfs_growfs

Linux (with a restart) – Option 2

The disk space is automatically increased on boot for any modern EC2 Ubuntu Server.

Step 1: Open EC2 -> Elastic Block Store -> Volumes. Select the volume you want to increase and look at the Attachment Information column.

Step 2: Select the volume and click Actions -> Modify Volume and select the new size.

Step 3: Open EC2 -> Instances -> Instances, select your EC2 instance and click on Actions -> Instance state -> Reboot

Note: We would recommend the option 1 as it does not require a downtime.

Windows

Step 1: Open EC2 -> Elastic Block Store -> Volumes. Select the volume and increase by looking at the Attachment Information Column

Step 2: Select the volume and click Actions -> Modify Volume and select the new volume size.

Step 3: Select Modify and choose Yes. Refresh the console page. The Description tab would show the state and progress of the optimization till the increase is completed.

Step 4: Connect to the EC2 windows instance using Remote Desktop Protocol (RDP)

Step 5: Open Disk Management (run diskmgmt.msc) and refresh

Step 6: Open the context (right click) menu for the Volume and then choose Extend Volume.

Step 7: Repeat the steps for any additional volumes.

The Windows server would show the new volume size once the extending of volume process is completed.

At Velan, our server support engineers can help you increase disk volume on AWS EC2. We troubleshoot problems like these for our clients every day. If you are interested in our service, please fill the Quick connect form to get in touch with us

Credentials

Quick Connect With Us

captcha reload