Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Switch Amazon EC2 instance from small to large, reusing block device

Tags:

amazon-ec2

I created a small Amazon EC2 instance like this:

ec2-run-instances --group default --block-device-mapping "/dev/sda1=:16:off" \
  --instance-initiated-shutdown-behavior stop ami-cb97c68e

That created a fixed disk for the instance in Amazon's Elastic Block Store. Now I find I would like to upgrade to a large instance of EC2... but I would like to continue using the fixed disk I created for the small instance.

How do I switch it over? (For the record, that AMI is for the US West Ubuntu image.)

like image 776
Dan Fabulich Avatar asked Dec 07 '25 12:12

Dan Fabulich


1 Answers

Coincidentally, Eric Hammond has just written an article about this exact topic. I think it should answer your question perfectly.

like image 81
Adrian Petrescu Avatar answered Dec 09 '25 18:12

Adrian Petrescu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!