Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I upgrade my 32 bit Amazon EC2 EBS backed instance into 64 bit one?

I am hosting a Wave in a Box server on Ubuntu EC2 instance. I started with a 32 bit micro one and then gradually upgraded to a small and now to a medium. However, as the number of users and stored data grows - the machine runs out of memory, so I want to upgrade to a large instance. The problem is - it's not possible to do by merely stopping the instance, changing the type and restarting. I guess I would need to create a 64 bit large instance and attach to it the volume from the medium instance. The questions are: 1. Is it possible? If so - can someone please help me to write a EC2 console commands based script to do it? 2. Is there some other, easier way to upgrade 32 bit medium instance to a 64 bit large one? Thanks!

like image 402
Yuri Avatar asked Jun 18 '11 19:06

Yuri


People also ask

Can we change EC2 instance type?

You can't change the instance type of a Spot Instance. If your instance is in an Auto Scaling group, the Amazon EC2 Auto Scaling service marks the stopped instance as unhealthy, and may terminate it and launch a replacement instance.

Can you increase EBS size?

With Amazon EBS Elastic Volumes, you can increase the volume size, change the volume type, or adjust the performance of your EBS volumes. If your instance supports Elastic Volumes, you can do so without detaching the volume or restarting the instance.


1 Answers

Unfortunately, like other OS's, I don't think there is a way to upgrade 32 bit to 64 bit. You'll almost certainly need to do a reinstall.

This is how I would do it:

  1. Backup your important (everything that is required) data.
    1. Create an EBS volume.
    2. Attach it to EC2 machine.
    3. Dump all my valuable/important data on it.
    4. Detach it from the EC2 machine.
  2. Blow the current EC2 machine.
    1. I would create a snapshot of the root-device, in-case if it's useful in future.
  3. Launch an EBS backed 64-bit Ubuntu instance.
    1. Attach the above EBS volume to this machine.
    2. Copy your data to it's place.
    3. Make sure things are working.
    4. Detach it from the new machine
    5. Kill the EBS volume.
like image 70
Rakesh Sankar Avatar answered Oct 31 '22 17:10

Rakesh Sankar