I have been using Amazon’s cloud services for a large project I am working on, and I have to say…it is pretty sweet! Here is a little gotcha, however, that might help someone down the road.
The issue I had was that the default instance I was using had only 15Gb of EBS storage and, since I was storing a lot of videos, that ended up being chewed up pretty quickly. The process to grow and EBS volume is not exactly written out in the FAQs I saw (even thought that seems a pretty obvious newbie kind of thing to want to do). I figure out that you can create a new volume, and attach it to an instance. Furthermore, I found that you can take a snapshot of an existing volume and use it as the basis for the new volume. In the EC2 control panel, the steps are:
- Stop (not Terminate) your running instance.
- Create a snapshot of the volume used by your instance.
- Create a new volume from the snapshot, increasing the size to whatever you want.
- Detach the existing volume from your instance.
- Attach the new volume to your instance, to the same mount point.
- Restart your instance, and reattach your elastic IP (odd that it does not keep it attached).
At this point, you have your new volume running, but here is the trick. Since you used a smaller snapshot to clone your new volume, the file system still thinks the size is the smaller volume size. To prove, and fix, this, use ssh to get into your instance, then do the following:
- #df -h (to see the current volume size)
- #sudo resize2fs /dev/sda1 (or whatever your mount point is, to resize the file system)
- #df -h (to see the new volume size)
I hope this helps someone, as it helped me when I read it on the Alestic web site.
Comments are closed on this post.