Comment 9 for bug 293465

Revision history for this message
Theodore Ts'o (tytso) wrote : Re: [Bug 293465] Re: make ext4 as the primary filesystem for GNU/Linux

On Sat, Dec 20, 2008 at 06:00:49PM -0000, Matteo Croce wrote:
> I don't want to scare people but i've lost my ext4 partition:
>
> root@ubuntu:~# mount -t ext4dev /dev/sda1 /mnt
> mount: wrong fs type, bad option, bad superblock on /dev/sda1,
> missing codepage or helper program, or other error
> In some cases useful info is found in syslog - try
> dmesg | tail or so
>
> root@ubuntu:~# dmesg | tail -1
> [ 4874.514703] VFS: Can't find ext4 filesystem on dev sda1.
> root@ubuntu:~# e2fsck /dev/sda1
> e2fsck 1.41.3 (12-Oct-2008)
> e2fsck: Superblock invalid, trying backup blocks...

That's not good.... What version of the kernel were you using, and
did you have any patches applied? Do you know what the system was
doing when the corruption happened?

> /dev/sda1 was not cleanly unmounted, check forced.
> Pass 1: Checking inodes, blocks, and sizes
> Error1: Corrupt extent header on inode 107192
> Aborted (core dumped)

OK, that's an embarassing hole that I had left for later to fill in,
and forgot to complete in e2fsck. It's caused by a corrupted extent
index node in the file. The easiest way to recover from the problem
is to simply wipe out the inode, since it's likely most of the data in
that inode has already been lost:

debugfs -s 32768 -b 4096 -w /dev/sda1
debugfs: clri <107192>
debugfs: quit

I'll get a better fix into e2fsprogs; thanks for pointing this out.

                                 - Ted