0

Something happened when I was copying files to a ext3 drive (via network, mounted by samba) and I lost ability to write anything to this HDD. After I used dmesg command it is explained:

db: Current: sense key=0x3
ASC=0x0 ASCQ=0x0
Info fld=0xa2fce10
end_request: I/O error, dev sdb, sector 170905104
EXT3-fs error (device sdb2): read_block_bitmap: Cannot read block bitmap - block_group = 644, block_bitmap = 21102592
Aborting journal on device sdb2.
ext3_abort called.
EXT3-fs error (device sdb2): ext3_journal_start_sb: Detected aborted journal
Remounting filesystem read-only
EXT3-fs error (device sdb2) in ext3_prepare_write: IO failure
__journal_remove_journal_head: freeing b_committed_data
__journal_remove_journal_head: freeing b_committed_data
__journal_remove_journal_head: freeing b_committed_data
__journal_remove_journal_head: freeing b_committed_data
__journal_remove_journal_head: freeing b_committed_data
__journal_remove_journal_head: freeing b_committed_data

I investigated problem further and found out tha the journal is probably corrupted. It was suggested that I should: unmount drive, remove journal from filesystem using tune2sf, use e2fsck to scan drive and lastly recreate journal using tune2fs. That's the tricky part becouse the drive is flagged as needs_revocery and the journal could'nt be deleted (even when I force delete in e2fck it won't allow it). I try to change flag using debugfs but the program fails every time:

Can't read an block bitmap while reading block bitmap

I'm 99% sure that data on drive are not corrupted, and when I use e2fsck before I delete the journal it will definitley corrupt some data.

Any ideas how to remove needs_recovery flag from that drive so I will be able to delete journal?

2

The problem is not the journal itself. You have an unreadable block (ie: The disk is failing) that corrupted the journal or another metadata, so simply get rid of the journal is not the right solution.

I strongly suggest you to backup all you can and to replace the failing disk.

| improve this answer | |
0

As @shodanshok already said the journal might not be possible to delete anyway since that particular sector is failing. There is a simple rescue: mount the partition as ext2, not ext3, so that journal block is not read at all. Then backup all data as quickly as possible. I had the same problem a few days ago.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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