Search website

Svenska (Sverige)English (United Kingdom)
Rebuild the journal in a ext3 journaled filesystem PDF Print E-mail
Written by Stefan Helander   
Thursday, 03 September 2009 13:07

The symtom of a broken ext3 journal is that the system will boot normaly but after a while the filesystem will be remounted read only and according to the log there are problems reading a block in the journal.

Boot on a rescue cd or boot but make sure the filesystem is in read only mode.

In this example i use /dev/md0 (the software raid device), becuase when I had this problem it was an ext3 journaled filesystem residing on a software raid that was causing trouble.

Issue the following commands

# fsck /dev/md0
# tune2fs -O ^have_journaled /dev/md0
# mount -n -o remount,rw /dev/md0
# tune2fs -j /dev/md0
# mount -n -o remount,ro /dev/md0
# fsck /dev/md0
# reboot

The first tune2fs removes the current journal on the filesystem (-O ^have_journaled). The second tune2fs (-j) recreates it. In between the filesystem must be mounted read only in order for the new journal to be written.

 

 

Ads

Registrera gratis konto för nyhetsbrev redan nu

Cookies

This website use cookies for session tracking and statistical purposes. By continuing to visit the site you agree on the use of cookies on this website. If you do not whish to agree to this, you should leave the website.