Removing and re-enabling journal for ext3

Removing and re-enabling ext3


https://engineering.rackspace.com/dcops/operating_systems/linux/howto-s/removing-and-re-enabling-ext3?searchterm=journal+ab


https://core.rackspace.com/py/ticket/view.pt?ref_no=080709-06684


If you have to remove and then re-enable a corrupt or aborted ext3 filesystem. Try this for single user, read-only mode.


1. tune2fs -O ^has_journal /dev/***   <------ strips the journal

2. fsck the partition

3. tune2fs -j /dev/***    <----- adds back the journal


Once this is done, remount the filesystem as read-write (mount -o remount,rw /) and create a test file (touch test.txt) to see if the filesystem is indeed writeable.


If this doesn't work then a trickier option is also available to you.


1. debugfs -w -R "feature ^has_journal, ^needs_recovery" /dev/***

2. fsck the partition e2fsck -y /dev/***

3. tune2fs -j /dev/***


If that doesn't work the drive is probably hosed. 


--------


tune2fs: Attempt to read block from filesystem resulted in short read while trying to open /dev/sda5

Can't find valid filesystem superblock.


hardware error!


--------

Indications


e100: eth1: e100_watchdog: link up, 100Mbps, full-duplex

journal_bmap_R3246d747: journal block not found at offset 1036 on ide0(3,2)

Aborting journal on device ide0(3,2).

ext3_abort called.

EXT3-fs abort (device ide0(3,2)): ext3_journal_start: Detected aborted journal

Remounting filesystem read-only

Error (-5) on journal on device 03:02

journal commit I/O error

EXT3-fs error (device ide0(3,2)) in start_transaction: Journal has aborted

EXT3-fs error (device ide0(3,2)) in start_transaction: Journal has aborted

EXT3-fs error (device ide0(3,2)) in start_transaction: Journal has aborted

EXT3-fs error (device ide0(3,2)) in ext3_delete_inode: Journal has aborted

EXT3-fs error (device ide0(3,2)) in start_transaction: Journal has aborted

EXT3-fs error (device ide0(3,2)) in start_transaction: Journal has aborted

EXT3-fs error (device ide0(3,2)) in start_transaction: Journal has aborted

ip_tables: (C) 2000-2002 Netfilter core team

EXT3-fs error (device ide0(3,2)) in start_transaction: Journal has aborted 

page index