0
votes

I was running a micro instance on ec2 and running out of disk space.

Then I decide to use the current generation m3.xlarge instance. I stop the micro instance. And then change instance type to m3.xlarge and start it. I am getting the 15G memory but I don't seem to get any advertised disk space?

Here is what I have currently:

Filesystem Size Used Avail Use% Mounted on /dev/xvda1 7.9G 7.8G 0 100% / tmpfs 7.4G 0 7.4G 0% /dev/shm

And I keep getting error saying there is no disk space available when I tried to start mysql.

Anyone know how I can claim the advertised disk space in this new instance? I thought that would be automatically...

thanks!

2

2 Answers

1
votes

Amazon instances are not meant to store large amount of data so their hard drive is storage is ephemeral, not persistent across a stop or a termination or an outage of the physical host.(As mentioned by Michael) You have to use Elastic Block Storage for storing your data. You can expand the hard drive on EBS and mount it to any server. EBS is independent from the instance so in case of an instance failure your data will not be corrupted.
Word of advice: EBS fails too, so always have a backup.

0
votes

You may want to read up on EC2 instance storage here:

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html

Generally, you do not want to store any application data on the root device. You would typically store data either in the instance's ephemeral storage or in an EBS volume attached to the instance.

The ephemeral storage is typically available at /mnt on most instances and is best suited for transient data storage such as on-disk caching, non-critical logs, etc. Ephemeral storage is not a persistent storage and would be lost when stopping an instance.

For persistent, albeit slower-I/O, storage you would typically use an EBS volume (or volumes) mounted to the instance.