Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why am I not seeing new content in an Amazon EBS volume created from an existing snapshot?

I created an EBS volume, attached and mounted it on an EC2 instance. Created few sample text files in the mounted directory and took a snapshot from the AWS console.

Problem is, when I create a new EBS volume using this snapshot and mount this new volume, I am not seeing the stored content (in snapshot).

What can be the issue? Is my data not going into the snapshot? Or is the newly created volume having any issue?

Thanks in advance.

like image 261
Sunil Avatar asked May 12 '10 08:05

Sunil


People also ask

How do you add existing EBS volume to EC2 instance?

To attach an EBS volume to an instance using the consoleOpen the Amazon EC2 console at https://console.aws.amazon.com/ec2/ . In the navigation pane, choose Volumes. Select the volume to attach and choose Actions, Attach volume. You can attach only volumes that are in the Available state.

How long does EBS snapshot take?

I have a need to keep EBS snapshots for 7 years for regulatory purposes. AWS documentation says: You can retain snapshots based on either the total count of snapshots or the age of each snapshot. However, it does not give a maximum of age.


1 Answers

Found the issue. Not a system admin, else I should have know this thing. Following command is flushing the data from the EBS volume.

yes | mkfs -t ext3 /dev/sdf

On an EBS volume, started using snapshot, don't run above command. Hope it this thread will help someone in future.

like image 180
Sunil Avatar answered Sep 17 '22 13:09

Sunil