DEV Community

How to Increase the Size of an AWS EBS Volume Without Downtime

To increase the size of an EBS volume without downtime, follow these steps. First, create a snapshot of the volume as a backup in case something goes wrong. Navigate to the EBS Volumes section in the EC2 Dashboard, right-click the volume, select Create Snapshot, and add a description. Wait for the snapshot process to complete. Once the snapshot is complete, right-click the volume, select Modify Volume, and enter the new desired size. Confirm the changes and extend the OS file system. To extend the OS file system on an Ubuntu instance, connect to the EC2 instance via SSH and check the current volume size using the df -h command. List available disk partitions using lsblk, extend the partition using sudo growpart, and resize the file system using sudo resize2fs. Finally, verify the new size using df -h. By following these steps, you can increase an EBS volume's size without downtime and ensure your EC2 instance can fully utilize the increased storage capacity.
favicon
dev.to
dev.to
Create attached notes ...