What happens when you reboot your EC2 instance?

We had to answer this question yesterday when our EC2 instance stopped responding and was constantly showing 100% CPU load. SSH wasn’t working and neither was apache responding. The CPU was hung at 100% load for a full day.

Hence, we decided that a reboot was the only solution.

I had a notion (and had read it as well) that a reboot wipes your disk clean and you start from a brand new AMI.
I was wrong. And I’m happy that I was wrong :D

We found, rebooting an EC2 instance does not affects your disk state. Your data is preserved.
But, if you terminate the instance and fire it up again, you’ll start form scratch.

Post reboot, we have recovered all our data (it was intact).

Threads to see – here and here.

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

  • http://intensedebate.com/profiles/gauravmishra Gaurav

    had some similar experiences ..had wiped my office date on my colleague machine EC2
    still remember that day :P

  • Vivek Khurana

    It is clearly mentioned in the EC2 docs that reboot does not wipes the disk state. Halting your machine will wipe it because machine is deleted when halted.
    Btw, Amazon reserved instances preserve data when you halt a machine.

  • Shlomo Swidler

    @Vivek Khurana,

    Reserved Instances do not preserve anything. Reserved Instances are not really instances – they're a billing feature, giving you a lower hourly rate for any running instance that matches the availability zone and OS and instance type of the reservation. You still need to launch the instances and manage their lifecycles.

    You can boot from an EBS-backed AMI. EBS-backed instances can be "stopped" and "started", which allows you to keep them off but intact. The contents of disk are preserved while "stopped", and to the OS it looks like a power off (stopping it) and power on (restarting it).

  • http://intensedebate.com/people/makuchaku makuchaku

    Next objective… move over to an EBS backed instance!