AWS Guides: How to resize a EC2 Windows EBS Volume

The following guide will help you resize an EBS volume on a Windows instance inside EC2 on AWS. The task can be a little daunting but is quite easy once you have done it the first time. Remember this guide only helps with increasing the size of the EBS volume not decrease it. Please be sure to also check out my guide on how to increase the root volume size of an Ec2 Linux Volume.

Step 1: Stop the instance that you are going to perform the volume resize on. (Note: This step is recommended but not required).

Step 2: Create a snapshot of the volume attached to the instance. This can be accomplished by navigating to the EC2 section of the AWS Console and selecting volumes, the ‘attachment information’ column will show which instance the volume is attached to. Once you find the volume, right click and select create snapshot. The details of the snapshot can be whatever you want.

Step 3: Navigate to the snapshot section of the EC2 console on the left side. Once the snapshot creation completes (Note: this can take minutes to hours depending on the size of the volume). Right click on the snapshot that you just created and select ‘create volume’. Make sure you create the volume in the same availability zone as the instance. On the next screen you can specify a larger volume size than previously, for example if the original volume was 30gb you can specify 100gb now (Note: You cannot specify a volume size smaller than the original snapshot size).

 

Step 4: Once the new volume is created, detach the original volume from the instance and attach the new volume that was created. (Note: Make sure you mount the volume on the same mount point as it was originally notated by ‘Device’ in the picture below). The root volume is usually /dev/sda1.

Step 5: Start the instance.

Step 6: The new volume size will not be reflected immediately inside the Windows instance so you will have to do one more thing. Connect to your Windows instance with Remote Desktop and open the start menu. In the run menu or the bottom of the start menu on newer versions of Windows type ‘Diskmgmt.msc’ and press enter. On the Disk Management window you want to find the drive you want to resize this is usually the C: drive for the root volume. Right click on the drive and say Extend, follow the wizard and voila you have resized your volume on EC2.

If you enjoyed the guide please like it and share with your friends, please also share your experiences in the comment section below.

AWS Guides is a series where I share my experiences with hosting on Amazon Web Services.

  • Pat

    Great article, thank you! I followed them, and they worked perfectly. Took about 20 mins to increase a root volume from 30 GB to 100 GB.

  • Pat

    Great article, thank you! I followed them, and they worked perfectly. Took about 20 mins to increase a root volume from 30 GB to 100 GB.

  • Thanks, i was missing the last bit, extending the volume using Disk Management.

  • Thibaud_R

    On Linux instance, you may also need to do a “sudo resize2fs /dev/xvd” in order to resize the file system to the the volume size

    • I will type up a linux version sometime. But that is right.

    • I will type up a linux version sometime. But that is right.

  • Thank you. I found an error: you have two sections labeled “Step 2”

    • Thanks I fixed it. Not sure how that happened.

    • Thanks I fixed it. Not sure how that happened.

  • Do you know which instances you need to resize ?

  • Guys – great guide.. will we be able to syndicate that to http://www.newvem.com/amazon-cloud-knowledge-center/how-to-guides/ ? ofir@newvem.com

  • If you want to increase the root volume size and using an elastic IP, I’ve found it’s easier to just create an AMI of the instance and choose the larger root volume size. Switch the ip to point to the new instance, stop the old one, and you’re done. This worked great for me on a Linux instance.

  • If you want to increase the root volume size and using an elastic IP, I’ve found it’s easier to just create an AMI of the instance and choose the larger root volume size. Switch the ip to point to the new instance, stop the old one, and you’re done. This worked great for me on a Linux instance.

  • Biju Alapatt

    Thanks. This helped me to fix the drive space issue. I am wondering why Amazon is not posting a documentation like this?

  • Pingback: AWS Guides: How to increase your EC2 Linux root volume size | TekGoblin()

  • Giridhar

    Thanks, this really helped.

  • Richard

    What a fantastic article, saved me a great deal of time and effort. Thank you…

  • Paul

    Spot on, thanks

  • Johan Nordanfors

    Awesome. You just made my day soooo much easier.

  • oscarc

    Awesome article. Thanks. You saved me a lot of work

  • Chandler Nallakukkala

    You made my day !!

  • danesh

    I have wasted many hours looking for a solution but all forums pointing to LINUX based instances and this one saved my life 🙂 Thanks a lot for sharing this information.

    • edvan

      Hi, this procedure works in Linux instances? thanks.

  • Jacob Pixolut

    Is there a way we can shrink the volume in windows?

    • It would be easier to make a new volume and move your data over.

      • chris rowse

        You can also attach the old volume as /dev/sd2 and map to D: in order to move data across.

  • brahmaiah

    I have successfully expanded the disk

    Thanks a lot.

  • Kevin Frye

    Works like a charm. Thanks for the clear step by step!

  • Michael Brennan-White

    What if I am running SQL Server 2008 r2 on the instance where I need a larger C Drive. Would this cause complications

    • If you are still interested in the answer to this please let me know by contacting me above on my contact us page or leave a comment here.

      • Michael Brennan-White

        I would be very interested still in learning there is a good way to add more space to my c drive

        • chris rowse

          Yes, worked well for me.

  • Vamsi

    Matt that is a very good explanation. It helped me a lot.

    • thanks for the feedback, let me know if you need any other articles.

  • Dương Tôn Bảo

    it is helpful for me, many thanks

  • Paul Keenan

    Excellent help just successfully resized a volume
    Some comments
    For those of you wondering the impact, should I do this. Everything worked as normal after the resizing.
    You do need to stop the instance.
    Not at step 1 but you cannot detach a volume if the instance is running (step 4).
    This will stop the service so you need to plan and advise users the service will be down. Having done it once I could now do it in 20 mins. Allow more time as you hesitate when doing it the first time.
    IP Address
    The new volume will have a different IP address by default.
    If you are using elastic IP addresses you can associate the IP address with the updated instance. Open Elastic IPs – select the IP address right click, select associate and select the instance.
    If you are not using elastic IPs I don’t know if you can keep the same IP address.

  • Rambo

    I followed each and every step just as specified but when I try to start my instance it would not start(the status shows running for some time and then automatically stops) and the status check just shows as initializing. what do i do?

  • Lenny Joseph

    Hi
    Very helpful post.
    After going through the steps what seemed mandatory was a restart of instance for it to see the fresh added volume. Hence, I resized the volume online which took sometime to rebalance and once it was over the resized space was not visible to the machine , so I just restarted it and the increased space was visible and I had to just extend it in the Windows Disk Management. I believe we can reduce the outage duration to just a reboot period rather than include the time we take to work on the EBS snapshot , since the step for EBS snapshot does not seem mandatory.