I'm trying to backup and restore an EBS volume on EC2. So this is what I'm doing:

ec2-create-snapshot <ebs volume> -d <snapshot name>
ec2-create-volume --snapshot <snapshot code> -z us-east-1a
ec2-run-instances ami-82fa58eb -n 1 -g default -k <keypair> -t m1.large -z us-east-1a
(That is an instance of ubuntu 12.04)
ec2-attach-volume <restored volume code> -i <instance code> -d /dev/sdf
sudo mkdir /mongo
(the directory that the volume was mounted on the original instance)
sudo mount /dev/xvdf /mongo -t ext4 -o defaults,auto,noatime,noexec

I get the following error:

mount: wrong fs type, bad option, bad superblock on /dev/xvdf,
       missing codepage or helper program, or other error

dmesg | tail return the following:

[2530743.900350] EXT4-fs (xvdf): mounted filesystem with ordered data mode. Opts: (null)
[2531604.280710] blkfront device/vbd/2128 num-ring-pages 1 nr_ents 32.
[2531604.862635] blkfront: xvdf: barrier or flush: disabled
[2531604.883965]  xvdf: unknown partition table
[2531656.336763] EXT4-fs (xvdf): VFS: Can't find ext4 filesystem

When I detach the restored EBS and attach the original EBS to the new instance, it works.

What am I missing? Or what do I do wrong?


I'm not sure that was the problem but I umount the EBS before creating the snapshot and rerun the whole procedure once again and it worked.

| improve this answer | |
  • I had the same problem (due to a disk failure). I followed your advice and i managed to get my data back. Thank you very much. – Davide Vernizzi Nov 19 '14 at 22:54

I faced the same problem. I had created an entry for the ssd that i had attached in /etc/fstab. I had added an entry for the UUID of the previos ssd. I just deleted it and rebooted my machine and it worked for me.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.