0

I am facing a strange error. I had my mongo instance up and running yesterday. The data was in /mnt/mongo/db and I am launching it through AWS.

The only activity I did is I stopped the machine for creating an AMI copy, and then restarted. Would this cause /mnt/mongo/db to vanish? Have any of you had such an experience? As the entire data has vanished, this is causing concern about going productive with this setup. Any help appreciated.

Additional details: According to a documentation I read, "Any contents on the instance’s former ephemeral storage were wiped and you are given fresh ephemeral storage (often mounted as /mnt)" But when I look up the instance, the root device is listed as "ebs" and should be backing up from the ephemeral storage.

Any thoughts on what might be going wrong with my setup?

df shows:

/dev/xvda1             8256952   5154808   2682716  66% /
udev                    840532         4    840528   1% /dev
tmpfs                   339352       192    339160   1% /run
none                      5120         0      5120   0% /run/lock
none                    848376        16    848360   1% /run/shm
/dev/xvdb            153899044    406996 145674424   1% /mnt

However, this is confusing, as the ones that show up on AWS console are xvda1 and xvdf. I am not sure where is /dev/xvdb coming from. I will change to /dev/xvdf and see if the data is persisted.

Neo_32
  • 225
  • 4
  • 13

1 Answers1

1

If the data is gone, and it was stored in /mnt, its very likely you were using instance storage. Even though the root device may have been EBS, you can enable instance store volumes. Use the command 'df' to see the volume layout.

When you stop an instance, it will get a new host once restarted. Instance storage is tied to a host.

You should never instance storage for any database, unless you are confident that you have it replicated in such a way where you can handle data loss.

datasage
  • 19,153
  • 2
  • 48
  • 54
  • Thanks, I added df info. Also, as I understand now, the practice that has gained traction is to have an EBS for the root also, and a separate EBS volume for data. – Neo_32 Sep 29 '13 at 22:00
  • /dev/xvd[b-e] are often used as mount points for ephemeral storage. – datasage Sep 29 '13 at 22:06
  • @datasage. I keep seeing you beat me to the punch on EBS questions! If you get a chance, send me an email or a linked-in request (see my profile). We should have a chat.. :-) – Chris M. Sep 30 '13 at 20:12