How to migrate your EC2 instance to SSD storage


Amazon Web Services has made SSD the default storage type for its EBS volumes and it’s actually pretty cheap. However, to take advantage of this, you’ll need to migrate your production storage volumes to SSD.

I had been putting this off for awhile but it went surprisingly smoothly. The steps I took:

  • Create snapshots of all (magnetic) EBS volumes
  • Create new (SSD) volumes from those snapshots in the same availability zone
  • Stop the EC2 instance
  • Detach the old (magnetic) volumes from the instance
  • Attach the new (SSD) volumes to the instance, making sure to use the same device names as the original volumes (e.g., /dev/sda1, /dev/sdb)
  • Start the EC2 instance
  • Reconfigure swap (mine disappeared after the stop/start for some reason)

You should be good-to-go at this point, the only gotchas for me were that /dev/sda is not the same as /dev/sda1 and that my swap partition disappeared as a side effect. Our total downtime was less than 5 minutes, not bad!

Written on November 30, 2014