How can I upgrade my 32 bit Amazon EC2 EBS backed

2019-04-09 05:59发布

问题:

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!

回答1:

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.