file system damage

jffrs asked:

I try recover the backup superblock on /dev/sda2 that contain ubuntu 12.04 LTS and partition ext4 with livecd ubuntu 10.04. the message is below

root@ubuntu:/home/ubuntu# fsck.ext4 -b 163840 -B 4096 /dev/sda2
e2fsck 1.41.11 (14-Mar-2010)
/dev/sda2 was not cleanly unmounted, check forced.
Resize inode not valid.  Recreate<y>? yes

Pass 1: Checking inodes, blocks, and sizes
Programming error?  block #7963637 claimed for no reason in process_bad_block.
Programming error?  block #11240437 claimed for no reason in process_bad_block.
Root inode is not a directory.  Clear<y>? yes

Inode 712 is in extent format, but superblock is missing EXTENTS feature
Fix<y>? yes

Inode 98519 has compression flag set on filesystem without compression support.  Clear<y>? yes

Inode 98519 has INDEX_FL flag set but is not a directory.
Clear HTree index<y>?

what’s the correct procedure?

I answered:

As a general rule, you want to answer Yes to just about anything that fsck comes up with.

However, your particular case has some oddities that make me believe that much of your data is probably permanently lost. You may be better off to replace the drive (this also makes me suspect the drive may be failing; confirm it with smartctl) and restore from backup.

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.