1

I'm trying to understand why when launching a new instance Amazon defaults to EBS (8gb root) instead of instance storage. Why do they sell instance storage then if it's not used also to boot the base system?

Is it safe to uncheck delete on termination, make it bigger (~50GiB) and keep all files on that EBS instead of creating a new one to make sure data will persist and it will also be usable by another instance?

CodeShining
  • 225
  • 2
  • 8
  • possible duplicate of [EC2 drive not EBS volume size](http://serverfault.com/questions/414983/ec2-drive-not-ebs-volume-size) – Michael Hampton Sep 02 '12 at 08:58
  • @MichaelHampton sorry but I don't see them to be the same question. I'm asking if it's a valid option to keep data under a bigger root EBS partition, instead of creating/attaching/mounting a second EBS for this data. – CodeShining Sep 02 '12 at 09:17

2 Answers2

2

EBS storage is persistent, the data will be kept even if you shutdown/terminate the instance. The local storage is not and the data is only kept whilst the instance is alive.

If you want to keep the data stored on EBS after the instance is terminated you should uncheck Delete on termination.

It is safe to change the size of an EBS, I believe it must be shutdown to make the change.

You can attach and detach an EBS drive from instances, so yes, you can move it between instances but it can only be attached to 1 instance at a time.

John Wheal
  • 456
  • 5
  • 17
  • Thanks, so instead of creating a second EBS needing to mount it and move webserver/db files over the mounted partition, can I simply increase the root size and install it like I do on my phisical server without worrying about losing the data? Is it safe to do this or is it better to just keep webserver and db data on another EBS partition? – CodeShining Sep 02 '12 at 09:12
  • @CodeShining Have a look at this http://www.jonlloyd.co.uk/resize-ebs-volume-ec2/ – John Wheal Sep 02 '12 at 13:43
0

I think the main question is that you have too few space on your EBS drive available. There are two ways to resolve this:

You can change the size of your root disk (provided it is an EBS backed instance) as described here: http://alestic.com/2010/02/ec2-resize-running-ebs-root I would suggest to test this on a throw-away instance first however...

The best (and easier) option is to give the desired space on instance launch - see the --block-device parameter on the launch call: http://docs.amazonwebservices.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-RunInstances.html

j0nes
  • 945
  • 10
  • 25
  • Posting identical answers to multiple questions gets you noticed by the system really quickly as that's typical spambot activity. – user9517 Sep 02 '12 at 10:19
  • Thanks Iain - what is the preferred way to deal with these cases? Linking to the other posting or commenting with "possible duplicate" (although the question is different, but same answer applies here)? – j0nes Sep 02 '12 at 10:20
  • 1
    If it's an identical question then use a comment to link and flag/vote as identical. If it's a different question then just tweak the answer text a bit and it shouldn't get picked up automagically. – user9517 Sep 02 '12 at 10:24