Ok so you storage your database on Amazon EBS, when you want to add additional storage,

you will need to

  • 1) take a snapshot, then wait forever for it to take the snapshot
  • 2) create a new larger volume from the snapshot, and again wait forever for it to create your volume.
  • 3) stop your instant
  • 4) Detach the old volume, and reattach the new volume.
  • 5) start your instant

Isn't there a easier and faster way without downtime?


Yes. Use LVM.

Using Logical Volume Manager, your volumes can span multiple partitions on multiple devices. You can expand a logical volume by adding a new device to it, then grow your file system into the new space. Your file system will be one contiguous space across multiple devices.

First, setup your initial storage space using LVM. A single volume group and volume should do the job. Then when you need to example it, add a new EBS volume, attatch it to your instance, add it to the volume group, grow your file system into the space, and viola: more space with no downtime.

Later, consider creating a new device as a larger single EBS volume (again with LVM!), synchronize your data to it, and rotate your services to it. This can be done with a minimum of downtime since it can be prepared on the side and will let you snapshot your volume as one EBS device again. Otherwise the snapshot mechanism of AWS becomes kind of useless unless you freeze or unmount the file system before you snapshot.

  • might be a problem...hmm my server is running windows??? – 001 May 29 '11 at 9:20
  • You didn't mention that in your question and Linux is kind of the default option on EC2 with the possibility of even running Windows there being a later addition to the capabilities. – Caleb May 30 '11 at 11:21
  • A quick google search suggests that there is a system called LDM on windows that might be adapted to work in a similar way to the way I outlined for LVM on Linux. – Caleb May 30 '11 at 11:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.