0
votes

As far as I understand for new created amazon instance ephermeral data store is used by default, unless EBS store is configured.

After stop of the instance, which uses ephermeral data store, I will loose all data. Is it correct ?

I noticed that EBS store has been created automatically for my instance. I have created few files in home directory, but this files were not deleted after reboot. So where is ephermeral data is stored ?

I want to install database to Amazon host. Should I worry about data loose with default setup and what is the common configuration, for example

  • Create instance
  • Install and configure database on ephermeral data store
  • Make AMI
  • Create EBS store and configure database to use it as storages
2

2 Answers

2
votes

After stop of the instance, which uses ephermeral data store, I will loose all data. Is it correct ?

To be specific, after you terminate or stop a node, any data on instance-specific storage will be lost. A reboot is different, and your data is intact in those cases. I am using these terms to match the terms in the AWS console.

To confuse matters slightly, some EBS-backed nodes also have some instance-specific storage. All instance-storage nodes are 100% instance-backed, though. So you really need to understand whether your data is hitting an EBS disk or instance-local storage.

I noticed that EBS store has been created automatically for my instance. I have created few files in home directory, but this files were not deleted after reboot. So where is ephermeral data is stored ?

Several points here:

  • For an EBS-backed instance, your /home partition is on the EBS root device, and hence data will persist provided the volume exists.
  • Again a reboot wouldn't delete your data even if you had an instance-storage node, but it sounds like you chose an EBS-backed node.
  • If you had instead created these files in /mnt, then stopped your instance and later started it again, you might have lost them. Again it depends exactly which ec2 node type you're running.

Regarding your last point - I would recommend that you just make sure your data is being stored on some EBS backed disk. Whether that is your root device or a separate EBS volume is up to you and depends on your specific needs.

1
votes

I want to install database to Amazon host.

You should give some thought to not installing and maintaining your own database. Doing so is complex, error prone, and can be quite time consuming. I

A better option for most folks is a turnkey database solution like RDS. This is a performant database that you don't have to really think about - it'll just work. RDS isn't for everyone, as there are some restrictive permission issues, but generally speaking it's great. I use it every day.

You can run databases on top of EBS and it'll work just fine. But you are biting off being a database admin at that point, and need to worry about all the complexity that comes with it. In my opinion, better to focus your time & energy on things like database schema, queries, and other aspects of your business.