0
votes

I have and ec2 medium instance, 64bit, windows server, with ebs 50gb, and 450gb ephemeral storage. Some or lots of my vital data are stored in drive D which is ephemeral storage.

Now i want to upgrade to a large instance. I've already search for guides like

"Right-Click on the instance Instance Lifecycle > Stop Wait... Instance Management > Change Instance Type"

or

"create a snapshot of your current image, then once its done you'll see it as an option when launching new instances. Simply launch it as a large instance at that point"

or

http://alestic.com/2011/02/ec2-change-type?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+alestic+%28Alestic.com+-+Ubuntu+on+EC2%29

However it is stated in the link above that any files on ephemeral storage (e.g., /mnt) will be lost.

How can i safely upgrade without losing my drive D (ephemeral storage)?

2

2 Answers

0
votes

You will need to mount an EBS volume and copy all the data to that volume. If you stop your instance to upgrade, all the data on the instance store volume will be lost.

0
votes

You can create a new instance with your old ephemeral storage. Take note of the steps below:

  1. Create a new instance, ideally with the same key that you used to launch the old instance. This is just a precautionary measure. Even if you launch the new instance with a new key it should not be a problem.
  2. Once your new instance is up and running, note the volume id that is attached to this instance. If you have not attached any additional volumes then it should be just one volume id listed in the instance details tab and take a note of that volume id. This volume id is your root volume id.
  3. go to volumes and select that volume id and now 'Detach' it. After detaching this new instance is now unreachable.
  4. Now go to your old instance details tab and repeat steps 2 and 3.
  5. Now you have old and new instance with their root volumes detached.
  6. NOw 'attach' the root volume of your old instance and attach it to your new instance.
  7. Once it is attached, you can now access your new machine with the key that you used to create your 'old' machine (now you understand what i meant in step 1). You will have to use this key because now the root volume contains the ssh key of the old instance.

Now you have a new instance with ephemeral storage of old instance.

Note: Please take a snapshot of your old instance before doing anything. Also, please understand that old instance refers to the instance who's ephemeral storage you want to preserve and use for the new instance and of course the new instance is your new large machine that you created.