Settings

Theme

Quick fix – Increase the size of your EC2 volume

steam.io

4 points by yuvalo 13 years ago · 2 comments

Reader

tedchs 13 years ago

What I would do instead is one of a few things. First, "data" of any size (> 100 MB) should never be on the system volume... always have a separate data volume for exactly this reason. All these options allow the EC2 instance to stay powered on.

1. If you're using Linux with Logical Volume Manager (LVM), you can create a new EBS volume and and attach it as an additional disk device, then stop the file-related processes, unmount the filesystem, add a new Physical Volume (PV) to your Volume Group (VG), extend the Logical Volume (LV), and resize the filesystem (e.g. e2resize), then re-mount the filesystem.

2. Without LVM, attach a new, larger EBS volume, create a filesystem on it, mount it somewhere (/mnt), cp your data to it, unmount it, rm your old files from the / volume, then use the old, empty directory as the mountpoint for your new filesystem.

3. If you already had a separate data volume, and you don't want to split it across multiple EBS volumes, you could unmount it, snapshot it, re-constitute it as a new, larger EBS volume, resize the filesystem, and mount it in place of the old one.

Making an AMI and a whole new instance is totally unnecessary since resizing the system volume is an indication that you need a separate data volume.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection