Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mounted EBS data loss after reboot

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?

like image 847
Patrick Avatar asked Feb 20 '23 11:02

Patrick


1 Answers

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.

like image 112
Eric Hammond Avatar answered Mar 11 '23 17:03

Eric Hammond