Questions about adding space to an Amazon EC2 Instance

amazon ec2

I have an Amazon EC2 instance that is running a simple LAMP stack with Amazon's flavor of linux. I want to stop it and add more disk space. We will need more than our current 8 gigabytes.

I was wondering:

  1. When I stop my instance what will be lost? Will the content of /var/www be lost? What does this mean? I am sure my instance isn't a spot instance.

    1. What is an ephemeral disk? Is my instance completely ephemeral? Are parts of it ephemeral? When I press "stop", probably, not everything is cleared. So what is cleared?
  2. Amazon has tools in the Management Console to facilitate enlarging an instance?

  3. Will I have to re-partition the instance? Can an instance expand the partition it is running on?

Best Answer

Since your instance currently has 8 GB on the root disk, it is probably an EBS boot instance. This means that your file system will be kept intact through a "stop"/"start" cycle, but you will (by default) lose everything if you "terminate" the instance.

Here's an article I wrote that describes what happens when you stop/start an instance (and when you simply reboot):

Rebooting vs. Stop/Start of Amazon EC2 Instance
http://alestic.com/2011/09/ec2-reboot-stop-start

Here's an article I wrote that describes how to increase the size of your EBS root volume:

Resizing the Root Disk on a Running EBS Boot EC2 Instance
http://alestic.com/2010/02/ec2-resize-running-ebs-root

These articles should answer most of the questions your list.

Related Topic