Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I got started with Eric Hammond's great article over at where he goes through installing MySQL and configuring it to use EBS. I got that going.

I also have a lot of other stuff installed on that EC2 instance: Rails, a bunch of gems, Nginx+Passenger and so on - my understanding is that unless I explicitly configure it to use EBS, all of this sits on the EC2 instance's ephemeral storage - right? How can I move all the software I have installed to EBS - or better yet how can I set up such that going forward also any new gems etc that I install also go to the EBS volume?

share|improve this question

Start with an ebs root based instance to begin with.

I've converted most of mine to these.

I did try to convert some existing ones to ebs only,but after 3 or 4 hours, I found out I could just re-install all the needed binary packages, and copy across our folks code,data,etc


(the launch instance button),

  1. click the "Viewing" drop-down that defaults to all images and pick EBS images. Many Fedora,Ubuntu, Amazon-Linux, to pick from. Note: on all these it shows "Root Device: EBS"...

  2. Boot it with your other choices, certs, region, architecture,etc.

  3. login to it,customize it, fix it up as you see fit.

  4. stop it. NOT TERMINATE

  5. start it again, and everything on root is as you left it.

There are some startup scripts amazon or somebody supplies that re-init /mnt each time, but I just have separate EBS backups of our base software.

This setup is ideal for us, where we do not have huge load spikes,but instead have occasional tasks that take 2 x our regular hosts, and so I've got half a dozen instances that are "STOPPED" and not getting any CPU charges (but they do take up minuscule S3 storage charges).

So this leaves you with permanent root stuff,not transient,and you stop,start,as you need.

Any of the EBS instances, you can "boot more like this", if you need 20 in a hurry.

Note2: If you attach big EBS volumes, to an EBS based AMI and pick Boot more like this it makes copies of those attached volumes. and that can take a while to have it boot, as well as unexpected storage charges with all these funky snapshots laying about.

You can probably do this thru the cli tools also,but I found the console easy enough.

share|improve this answer
Thanks dianevm. I understand that if I stop and re-start it, everything is retained but if for some reason, the instance stops responding or terminates unexpectedly it takes the stuff on the EBS root device down with it ie Rails, gems, nginx etc. are all gone. Note that as per the MySQL DB itself is on another volume and therefore that survives termination. If everything survived termination then it would just be a matter of mounting another instance to it and we're done in the time it takes to boot and we'll get an exact replica. How can I accomplish that? – drhyde Mar 21 '11 at 20:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.