Recovering corrupted ext4 journal

You try to mount an external USB disk drive /dev/sdf1 with ext4 file system.  It fails with the message:

mount: wrong fs type, bad option, bad superblock on /dev/sdf1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog – try
       dmesg | tail  or so

You run “dmesg | tail” and it gives you:

[ 5565.594647] end_request: critical target error, dev sdf, sector 0
[ 5565.594676] JBD2: recovery failed
[ 5565.594693] EXT4-fs (sdf1): error loading journal

From here you have two routes.

A) One is to attempt to fix the journal:

You run e2fsck on the partition and it fixes the problem:

  • e2fsck /dev/sdf1 -v

Proceed with the mount as usual.

But then, upon the next mount you have the same problem again. You try to mount the disk in another version of Linux and it mounts just fine. So you see that the problem is actually a bug in your OS, and not the disk.

If so, you can try to mount the disk in read-only mode with extra options,

B) Mount the disk read only:

  • mount -t ext4 -o ro,noexec,noload /dev/sdf1 /media/mount
Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s