Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
possible duplicate of EC2 drive not EBS volume size –  Michael Hampton Sep 2 '12 at 8: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 2 '12 at 9:17

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
    
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 2 '12 at 9:12
    
@CodeShining Have a look at this jonlloyd.co.uk/resize-ebs-volume-ec2 –  John Wheal Sep 2 '12 at 13:43

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

share|improve this answer
    
Posting identical answers to multiple questions gets you noticed by the system really quickly as that's typical spambot activity. –  Iain Sep 2 '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 2 '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. –  Iain Sep 2 '12 at 10:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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