1

I'm considering upgrading from an R3-large to an R3-xlarge instance in EC2. I'm aware that I will lose the contents of the ephemeral drive when I stop my instance. But after I alter the instance type and start it, will the ephemeral drive still be there? Will it be upgraded as well with the larger instance?

0

5 Answers 5

8

No, the data on your ephemeral drive will not be there.

Honestly, though, if you have to ask anything about the resiliency of data on the ephemeral drive, you're doing it wrong. To use EC2 correctly, you must assume that you will lose your ephemeral storage.

0

When you change the EC2 instance type (for example, from r3.large to r3.xlarge), the instance must be stopped and restarted. This is not the same thing as a reboot.

When an EC2 instance is stopped, any data on the ephemeral storage will be lost.

So in your case, your ephemeral data will be discarded.

When you switch EC2 types and restart your instance, you'll have the new increased volume available to you.

1
  • Thanx Matt - Yes, I realize the data will be lost on the stop. When I first created the instance, the ephemeral had to be mounted at creation time and couldn't be later on, so just want to make sure I don't lose the drive itself.
    – Chris
    Jan 29, 2016 at 0:28
0

When changing instance classes, the instance, after restart, should have the same number of instance store volumes as the were attached before the change, assuming it is of a class that offers the same number of volumes, or more. If it offers more, you can't get access to the additional ones. The size of the volumes should match the new instance class's size allotment for ephemeral disks.

0

I'm not sure if this answers your question, but I feel it has the information you seek:

"When you resize an instance, you can't add instance store volumes; the resized instance has the same instance store volumes that you specified when you launched it. If you want to add instance store volumes, you must migrate your application to a new instance with the instance type and instance store volumes that you want. For more information about instance store volumes, see Amazon EC2 Instance Store."

This is from the following AWS doc (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-resize.html)

According to this, it seems that your instance store volumes should remain the same as on your original instance but you can't add any more. I would probably go ahead and test it by making a new temp instance, mounting an ephemeral drive on it and then resizing it to see if the resized instance still has an ephemeral drive on it.

Hope this helps.

0

You will lose that data if you stop and start the instance or change instance sizes. A reboot will not lose the data.

This storage is located on disks that are physically attached to the host computer. If there's a problem with the underlying physical machine and you have to reboot your server (and hence move to another physical machine) you will lose your data. Changing your instance size requires a reboot, so according to the documentation I link and copy below you will lose your data.

You can use it as a cache, but have a strategy to rebuild it if the system reboots.

From this amazon page.

However, data in the instance store is lost under the following circumstances:

  • The underlying disk drive fails
  • The instance stops
  • The instance terminates
3
  • Thanx Tim - I understand I'll lose the data. My concern is I will lose the ephemeral drive itself, as if I had launched it without specifying the mapping. Or will the block mapping carry over to the new instance?
    – Chris
    Jan 29, 2016 at 1:28
  • I'm sorry but I don't know. I thought they had to be specified during the launch of the VM.
    – Tim
    Jan 29, 2016 at 1:33
  • 1
    @Taterhead I knew that... not sure why I wrote that incorrectly. Updated.
    – Tim
    May 12, 2019 at 0:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .