Remaking ext3 journals

Sometimes, ext3 journals go bad. Typically this will be evident in journal or dma errors in dmesg (I'll provide some examples next time I come across one of these). In order to resolve it, perform the following:
* Take the server down and boot it into the rescue environment (this means KVM time for support)... do NOT mount any of the partitions.
* fsck the affected partition.
* Remove the journal from the affected partition
* re-fsck the affected partition
* Readd the journal to the affected partition

fsck -yf /dev/hda3
tune2fs -O ^has_journal /dev/hda3
fsck -yf /dev/hda3
tune2fs -j /dev/hda3

At this point you are safe to mount the partitions, make sure everything looks ok, and if so then the server is ready to go!

Submitted by jkelly on Fri, 2006-08-11 10:37. categories [ | ] login or register to post comments