Menu
Amazon Elastic Compute Cloud
User Guide for Windows Instances

Appendix: Starting and Stopping an Instance to Modify an EBS Volume

If you are using a previous generation Amazon EC2 instance and you need to modify the root (boot) volume, you must stop the instance, apply the modifications, and then restart the instance. The procedure described here can be used to modify any EBS volume on any instance type.

When you stop and start an instance, be aware of the following:

  • If your instance is running in a VPC and has a public IPv4 address, we release the address and give it a new public IPv4 address. The instance retains its private IPv4 addresses and any Elastic IP addresses.

  • If your instance is running in EC2-Classic, we give it new public and private IPv4 addresses, and disassociate any Elastic IP address that's associated with the instance. You must re-associate any Elastic IP address after you restart your instance.

  • If your instance is in an Auto Scaling group, Auto Scaling marks the stopped instance as unhealthy, and may terminate it and launch a replacement instance. To prevent this, you can temporarily suspend the Auto Scaling processes for the group. For more information, see Suspend and Resume Auto Scaling Processes in the Auto Scaling User Guide.

To modify the root volume of an instance

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, choose Instances and select the instance with the volume to expand.

  3. Verify that Shutdown Behavior is set to Stop and not Terminate.

    1. Select the instance.

    2. From the context (right-click) menu, choose Instance Settings, Change Shutdown Behavior.

    3. If Shutdown behavior is set to Terminate, choose Stop, Apply.

      If Shutdown behavior is already set to Stop, choose Cancel.

  4. Stop the instance. For more information, see Stopping and Starting Your Instances.

    Warning

    When you stop an instance, the data on any instance store volumes is erased. Therefore, if you have any data on instance store volumes that you want to keep, be sure to back it up to persistent storage.

  5. Modify your EBS volume as described in Modifying an EBS Volume from the Console or Modifying an EBS Volume from the Command Line.

  6. Restart the instance.

    1. In the navigation pane, choose Instances and then select the instance to restart.

    2. From the context (right-click) menu, choose Instance State, Start.

    3. In the Start Instances dialog box, choose Yes, Start. If the instance fails to start, and the volume being expanded is a root volume, verify that you attached the expanded volume using the same device name as the original volume, for example /dev/sda1.

After the instance has started, you can check the file system size to see if your instance recognizes the larger volume space.

If the size does not reflect your newly expanded volume, you must extend the file system of your device so that your instance can use the new space. For more information, see Extending a Windows File System after Resizing the Volume.

You may have to bring the volume online in order to use it. For more information, see Making an Amazon EBS Volume Available for Use. You do not need to reformat the volume.