Reputation: 109
I have seen a few questions on SO that relate to an EC2 instance losing data after a reboot, however it them becomes apparent that the user was doing a stop/start without an EBS backup. In my scenario, I've lost nearly all data on the server after a reboot. Some of the directories in 'home' persisted but everything else we had outside of a basic EC2 instance creation is gone. To be clear I didn't stop, start, rather I rebooted the instance explicitly.
Is it possible that it takes a considerable about of time for the data to return? It's a large instance (that lists EBS storage backup in the console). If this is EBS backed-up, how do I go about restoring from this state? I have seen some comments mentioning that the user would just need to remount the volume after backup, but I'm unclear how to proceed with this. I've also seen that rebooting with unmount a disk, and then require remounting. Is this the case?
Is it possible that I have to mount one of the disks somehow? I'm noticing that the root directory is 66% full but with everything else seemingly gone, I'm confused.
Is there some type of protocol I'm missing to restore this data after a simple reboot? If it's gone I could be in some trouble here....
I will also post this here. It looks like the 1.3T disk is not mounted, is my understanding correct and is this the issue?
I've tried rebooting the instance a second time after roughly an hour and hadn't noticed any changes in behavior or disk size on the EC2 instance. I was expecting that a simple reboot shouldn't harm the data (even on in instance backed server)
Upvotes: 0
Views: 1984
Reputation: 983
As you've noticed, the EBS volume not being mounted is likely the problem. A volume does not get automatically mounted after a reboot. You either have to mount it manually using sudo mount
command, or add it to /etc/fstab
file so that it gets mounted on reboot.
Refer to the documentation here - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html#ebs-mount-after-reboot
Upvotes: 2