Cannot mount volumes made from snapshots, get "Bad message", invalid superblock

0

My old EC2 server, that was launched in 2011, has finally died. It is unreachable and cannot be rebooted. It was running an Amazon AMI. I created a new VPC server with a new Amazon Linux2. My plan was to copy my website files from an old snapshot to the new drive on the new server.

I created a volume from an old snapshot taken a few days before the server died. I can see the volume has a filesystem.

$ sudo file -s /dev/xvdf
/dev/xvdf: SGI XFS filesystem data (blksz 4096, inosz 256, v2 dirs)

But it fails when I try to mount it.

$ sudo mkdir /olddata
$ sudo mount /dev/xvdf /olddata
  mount: /old_data: mount(2) system call failed: Bad message.

$ sudo e2fsck -p /dev/xvdf
  e2fsck: Bad magic number in super-block while trying to open /dev/xvdf

I tried the same things for older snapshots a month before the server died and got the same result. I know the website was running. So the old filesystem must have been somewhat OK.

I tried:

$ sudo e2fsck -b 8193 /dev/xvdf

No luck. I also tried "Fast snapshot restore" so that I knew I was working with a fully restored snapshot. But it made no difference.

Any suggestions for how to recover the files from the old snapshot? Or how to get the old server to launch so I can FTP the files?

asked 2 years ago427 views
1 Answer
0

I was able to get a restored volume to mount on a VPC t2.small. But I was able to launch a new m1.small instance using a saved AMI backup. I had tried to do this earlier but could not get past a broken UI asking for a VPC security zone. The instructions were nonsensical. So I reverted to the older UI and was then able to successfully launch the new instance.

Now I will use scp to copy the old data from the restored AMI to my new VPC.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions