Increase the Root Drive Size on an EBS Backed Windows Instance Using the EC2 Web Console

I will clean this up later with some screenshots but I wanted to get it written down before I forgot. If you create a Windows EC2 instance using the web interface it will by default give you a 30GB root drive. This is usually not enough. The OS alone takes a good 20GB. You can use the EC2 command line tools to increase the drive size, or to create an non EBS backed instance but if you are in a hurry or on another machine using the web console is pretty quick and easy.

1. On the EC2 tab of the web console click the “Instances” link from the menu on the left and stop the instance that you want to increase. Do not terminate the instance, and if you want to be careful login first and shut it down correctly. Note the instance ID or name while in this screen.
2. Once the instance has stopped click the “Volumes” link from the menu on the left and find the root volume that is attached to the instance ID above. You will know it is the root volume because in the “Attachment Information” column it will display the instance ID and then /dev/sda1. Select this volume and then “Detach Volume” from the “More” menu at the top.
3. Once the volume has finished detaching select “Create Snapshot” from the more menu and then name the snapshot something useful like “Drive expansion.” You can delete it later once you’re done.
4. Click the “Snapshots” link from the menu on the left and wait a little while the snapshot is created. Once the snapshot is done select it and then select “Create Volume” from the menu above. Fill in the total amount of drive space desired, the availability zone that your instance is in and then hit “Yes Create”.
5. Switch back to the “Volumes” link from the menu on the left and find your new volume. It should be in an “Available” state. Select it and then select “Attach Volume” from the “More” menu at the top. Select your instance from the dropdown list and then in the “Device” field type /dev/sda1 then click “Yes Attach”.
6. Select the “Instances” link from the menu on the left and find your stopped instance, select it and then select “Start” from the “Instance Actions” menu at the top.
7. Once your instance has restarted login and open server manager. From disk management you should now be able to expand the root drive to include the additional space.
8. Once you have verified everything you can now delete the old unattached volume and the snapshot you created. Don’t do this to soon since once the old volume has been deleted you can’t reattach it as a backup plan.

This worked for me.

Advertisements

About Mr_SHeister

Geek, Dad, SharePoint Administrator
This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

2 Responses to Increase the Root Drive Size on an EBS Backed Windows Instance Using the EC2 Web Console

  1. Anuj says:

    I have performed the steps as mentioned form 1-6. But I am not able to extend the space. i can see only Disk 0+ Unallocated space. But after right click i am not getting any option to extend. Please help.

  2. Mr_SHeister says:

    Make sure you are right clicking on the active partition to see the context menu. There you should see an option to extend the volume. Sometimes I’ve seen the option greyed out if there is a partition between the active and the unallocated space.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s