Increase disk size for an EC2 instance in AWS

While using Amazon Web Services (AWS) you may find that, when using one of the Amazon Machine Images (AMIs) provided, you may run out of disk space. There does not appear to be any way to “resize” an Elastic Block Store (EBS) volume; however, you can create a new one based on an existing snapshot and replace the current drive with a larger one. I have provided the instructions for doing so below.

  1. Log into the AWS Management Console
  2. Make sure that the Instance that you wish to change is not currently running
  3. Navigate to Elastic Block Store > Volumes
  4. Check the box next to the Volume that needs more space
  5. Click the More… drop down list and select Create Snapshot
  6. Enter a Name and a Description
  7. Navigate to Elastic Block Store> Snapshots
  8. Monitor the progress of the Snapshot for completion
  9. Once complete, navigate back to Elastic Block Store > Volumes
  10. Click Create Volume
  11. Enter the desired size for the new volume
  12. Make sure that you select the same Availability Zone for your instance
  13. Select the Snapshot that you just created
  14. Click Yes, Create
  15. Monitor the progress of the Volume for completion
  16. Once complete, Check the box next to the Volume that is currently connected to the Instance
  17. Make sure that no other Volumes are selected
  18. Click the More… drop down list and select Click the More… drop down list and select Detach Volume
  19. Uncheck the box selected and check the box next to the new Volume
  20. Click the More… drop down list and select Click the More… drop down list and select Attach Volume
  21. Select the Instance that you wish to change
  22. Change the value in Device from xvdf  to /dev/sda1
  23. Click Yes, Attach
  24. Navigate to Instances and start your Instance
  25. Once you are satisfied that the volume works, feel free to delete the Snapshot and old Volume if you like

You will need to take additional steps to extend the size of your partition to use the rest of the allocated space. The process for doing so will vary depending on the operating system that you are using.

15 thoughts on “Increase disk size for an EC2 instance in AWS”

  1. Thanks for your article

    I followed your article but still i have not success to increase disk space of instance.

    Then type command after login instnace:
    df -h

    Filesystem Size Used Avail Use% Mounted on
    /dev/xvda1 99G 88G 6.9G 93% /
    none 4.0K 0 4.0K 0% /sys/fs/cgroup
    udev 3.7G 4.0K 3.7G 1% /dev
    tmpfs 749M 340K 748M 1% /run
    none 5.0M 0 5.0M 0% /run/lock
    none 3.7G 0 3.7G 0% /run/shm
    none 100M 0 100M 0% /run/user
    /dev/xvdb 30G 45M 28G 1% /mnt

    Same 100 GB nothing change.

    Also type command:
    >> resize2fs /dev/xvda1

    O/P: resize2fs 1.42.9 (4-Feb-2014) The filesystem is already 26212055 blocks long. Nothing to do!

    Display message “Nothing to do!”

    What is issue dont know if you have any idea please share asap.

  2. Thanks for this- very useful. For windows systems, there is one additional step that is required once the instance is up. You need to go to computer management > Disk Management > right click the c: drive and select Extend Volume and extend it using the unallocated space. I imagine it would be the same on a *nix system where you have to grow the FS.

  3. Thanks a lot for this Article. You don’t know how much you were helped me. I am very new to this kind of tasks. Initially I got fear if I did some thing wrong what will do. I followed your blog step by step all works as a charm. I expanded my disk size from 8GB to 16GB without lose any existing items.

    Once again thank you so much 🙂

  4. Harshad/ All

    You need to modify file system in your windows to see the volume reflected.


  5. This was an excellent guide; concise and complete.

    The only two points I’d make are:

    1. Entering the snapshot against the new volume: it took quite a while for the snapshot ID to be recognised and for the very large list to shrink to one.

    2. I had to change the device to /dev/xvda when attaching the volume for the instance to start.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: