4
votes

I've mounted an additional EBS volume on an instance. I stopped the instance and tried to reboot one day later, and all the data in the mounted volume is gone. Anyone has any idea why this could be happening?

1
Are you sure you're remounting the correct EBS volume? I made very heavy use of EBS volumes (creating servers with 8 EBS volume stripes in software RAID configurations) and never encountered this type of issue.Eric J.
Also... is the volume completely empty after you remounted it, or were just certain files missing?Eric J.
Yes, the volume is attached to the instance, so it couldn't be wrong. Is it because I stopped the server for too long (>12 hours)? Volume completely empty.Patrick

1 Answers

8
votes

This used to be a common question right after EBS volumes were introduced and the answer is generally one of:

(1) You didn't mount the volume after reboot (being attached is not sufficient).

(2) The volume wasn't mounted when you put the data in the directory and now you have mounted an empty volume over the data, hiding it.

With the latter you're in trouble if the data was put on an ephemeral volume (e.g., under /mnt) as that is cleared on stop.

Otherwise, the good news is that EBS volumes don't just lose files, so they should be somewhere.

Oh. One other common cause of this problem:

(3) You copied and pasted the commands to attach and mount a new EBS volume and didn't notice the mkfs command the list.