#187 e2fsck cannot repair bad blocks in journal inode?

open
nobody
None
5
2015-01-06
2007-11-11
No

Hi,

It seems that ee2fsck 1.39 (29-May-2006), Using EXT2FS Library version 1.39, 29-May-2006, is unable to properly repair some bad blocks.

My hard disk developed some bad blocks. I tried to find them and mark them with e2fsck -c, but among the output I got this:

[root@mcnally root]# fsck -C - -c -y /
fsck 1.39 (29-May-2006)
e2fsck 1.39 (29-May-2006)
Checking for bad blocks (read-only test): done
Pass 1: Checking inodes, blocks, and sizes
Programming error? block #33600 claimed for no reason in process_bad_block.
Programming error? block #33617 claimed for no reason in process_bad_block.
Programming error? block #33618 claimed for no reason in process_bad_block.
Programming error? block #33619 claimed for no reason in process_bad_block.
Programming error? block #33620 claimed for no reason in process_bad_block.
Programming error? block #33621 claimed for no reason in process_bad_block.
Programming error? block #33622 claimed for no reason in process_bad_block.
Programming error? block #33623 claimed for no reason in process_bad_block.
Programming error? block #33625 claimed for no reason in process_bad_block.
Programming error? block #33626 claimed for no reason in process_bad_block.
Programming error? block #33627 claimed for no reason in process_bad_block.
Programming error? block #33628 claimed for no reason in process_bad_block.
Programming error? block #33629 claimed for no reason in process_bad_block.
Programming error? block #33630 claimed for no reason in process_bad_block.
Programming error? block #33631 claimed for no reason in process_bad_block.
Programming error? block #33632 claimed for no reason in process_bad_block.
Programming error? block #33633 claimed for no reason in process_bad_block.
Deleted inode 3417575 has zero dtime. Fix? yes

The block numbers with "programming errors" are all the blocks which the kernel reported I/O errors on. After a reboot I still had problems:

journal_bmap: journal block not found at offset 10252 on hda2
Aborting journal on device hda2.
journal commit I/O error
ext3_abort called.
EXT3-fs error (device hda2): ext3_journal_start_sb: Detected aborted journal
Remounting filesystem read-only

And running e2fsck -c again reported the same "programming errors":

[root@mcnally root]# fsck -C - -c -y /
fsck 1.39 (29-May-2006)
e2fsck 1.39 (29-May-2006)
/dev/hda2: recovering journal
Clearing orphaned inode 3417579 (uid=100, gid=101, mode=0100600, size=0)
Clearing orphaned inode 3417578 (uid=100, gid=101, mode=0100600, size=0)
Clearing orphaned inode 3417577 (uid=100, gid=101, mode=0100600, size=0)
Clearing orphaned inode 3417576 (uid=100, gid=101, mode=0100600, size=0)
Clearing orphaned inode 3417575 (uid=100, gid=101, mode=0100600, size=0)
Checking for bad blocks (read-only test): done
Pass 1: Checking inodes, blocks, and sizes
Programming error? block #33600 claimed for no reason in process_bad_block.
Programming error? block #33617 claimed for no reason in process_bad_block.
Programming error? block #33618 claimed for no reason in process_bad_block.
Programming error? block #33619 claimed for no reason in process_bad_block.
Programming error? block #33620 claimed for no reason in process_bad_block.
Programming error? block #33621 claimed for no reason in process_bad_block.
Programming error? block #33622 claimed for no reason in process_bad_block.
Programming error? block #33623 claimed for no reason in process_bad_block.
Programming error? block #33625 claimed for no reason in process_bad_block.
Programming error? block #33626 claimed for no reason in process_bad_block.
Programming error? block #33627 claimed for no reason in process_bad_block.
Programming error? block #33628 claimed for no reason in process_bad_block.
Programming error? block #33629 claimed for no reason in process_bad_block.
Programming error? block #33630 claimed for no reason in process_bad_block.
Programming error? block #33631 claimed for no reason in process_bad_block.
Programming error? block #33632 claimed for no reason in process_bad_block.
Programming error? block #33633 claimed for no reason in process_bad_block.
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/hda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/hda2: ***** REBOOT LINUX *****
/dev/hda2: 206530/4905600 files (1.4% non-contiguous), 8968454/9803666 blocks

So I decided to remove the journal with tune2fs and run another badblocks. But I still get the same errors from e2fsck:

[root@mcnally root]# tune2fs -O ^has_journal /dev/hda2
tune2fs 1.39 (29-May-2006)
[root@mcnally root]# fsck -C - -c -y /
fsck 1.39 (29-May-2006)
e2fsck 1.39 (29-May-2006)
Checking for bad blocks (read-only test): done
Pass 1: Checking inodes, blocks, and sizes
Programming error? block #33600 claimed for no reason in process_bad_block.
Programming error? block #33617 claimed for no reason in process_bad_block.
Programming error? block #33618 claimed for no reason in process_bad_block.
Programming error? block #33619 claimed for no reason in process_bad_block.
Programming error? block #33620 claimed for no reason in process_bad_block.
Programming error? block #33621 claimed for no reason in process_bad_block.
Programming error? block #33622 claimed for no reason in process_bad_block.
Programming error? block #33623 claimed for no reason in process_bad_block.
Programming error? block #33625 claimed for no reason in process_bad_block.
Programming error? block #33626 claimed for no reason in process_bad_block.
Programming error? block #33627 claimed for no reason in process_bad_block.
Programming error? block #33628 claimed for no reason in process_bad_block.
Programming error? block #33629 claimed for no reason in process_bad_block.
Programming error? block #33630 claimed for no reason in process_bad_block.
Programming error? block #33631 claimed for no reason in process_bad_block.
Programming error? block #33632 claimed for no reason in process_bad_block.
Programming error? block #33633 claimed for no reason in process_bad_block.
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/hda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/hda2: ***** REBOOT LINUX *****
/dev/hda2: 206530/4905600 files (1.4% non-contiguous), 8936676/9803666 blocks

I suspect that e2fsck is unable to repair these bad blocks. Help?

Discussion