Ubuntu – Can’t mount after EBS snapshot and restore on Ubuntu 12.04

amazon ec2amazon-ebsbackupmountUbuntu

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?

Best Answer

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.