Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|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 at 22:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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