You are not logged in.

#1 2010-09-27 12:43:27

Krzesimir
Member
From: Wrocław
Registered: 2010-08-16
Posts: 7

ext4 errors

Hello.

I think I'm having serious problem here. Suddenly I couldn't read or write anything from partition so I checked dmesg and this so I saw:

EXT4-fs error (device sda4): __ext4_get_inode_loc: inode #3414109: (comm zsh) unable to read inode block 13631909
sd 0:0:0:0: [sda] Unhandled error code
sd 0:0:0:0: [sda] Result: hostbyte=0x04 driverbyte=0x00
sd 0:0:0:0: [sda] CDB: cdb[0]=0x28: 28 00 09 98 b8 40 00 00 20 00
end_request: I/O error, dev sda, sector 161003584
sd 0:0:0:0: [sda] Unhandled error code
sd 0:0:0:0: [sda] Result: hostbyte=0x04 driverbyte=0x00
sd 0:0:0:0: [sda] CDB: cdb[0]=0x28: 28 00 09 98 b8 40 00 00 08 00
end_request: I/O error, dev sda, sector 161003584

What is happening?

Offline

#2 2010-09-27 16:46:05

xvello
Member
Registered: 2010-05-15
Posts: 81
Website

Re: ext4 errors

Hello

Before trying to repair your filesystem, you should make sure it isn't a disk error. If it is, any atempt to repair the fs will make things worse.

You should try running `badblocks` from a livecd/liveusb (I recommend you the sysresccd, I always keep one at hand). By default, it runs a read-only test. If it finds errors and you have enough space on a usb drive or a networked computer, you should backup immediately your hard drive with ddrescue (included in the sysresccd iirc).

If badblocks doesn't complain (or if it does and your have backuped), please tell us.


Cheers

Offline

#3 2010-09-27 18:08:23

kfgz
Member
From: Supraśl, Poland
Registered: 2009-03-02
Posts: 114

Re: ext4 errors

Another very good program for checking disk surface is MHDD (it's included in SystemRescueCD and Parted Magic).

Offline

#4 2010-09-27 22:03:55

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: ext4 errors

I suggest you do as xvello says, do a full backup as soon as possible.

Then before trying badblocks try using 'smartctl -A /dev/sda'. It will give you a listing of the smart attributes and you can check if any critical ones have failed. If it reports that any attribute of type "Pre-fail" is failing or failed in the past I would say not to bother to try using badblocks.

If the output of smartctl seem ok then go ahead with badblocks, it will probably help the problem automagically solve itself.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2010-09-28 09:33:56

Krzesimir
Member
From: Wrocław
Registered: 2010-08-16
Posts: 7

Re: ext4 errors

OK.
I made as you suggested. 'smartctl' didn't report any fails, so I ran 'badblocks' and it found bad blocks...
I ran it twice, first time showed 52 bad blocks and second time "only" 20. How do I fix them?

Thanks for your help, guys.

Offline

#6 2010-09-28 09:54:13

kfgz
Member
From: Supraśl, Poland
Registered: 2009-03-02
Posts: 114

Re: ext4 errors

Krzesimir wrote:

I ran it twice, first time showed 52 bad blocks and second time "only" 20. How do I fix them?

You can remap them using MHDD but you have to backup your data. In MHDD choose disk and run ERASE command. Then press F4 and set ON (Remap). To see if remap was sucessful press 2xF4 (scan). I see that you are from Poland so you can use this instruction - http://nirvanowiec.republika.pl/MHDD.html Read very carefully point 3 of instruction.

Last edited by kfgz (2010-09-28 09:54:39)

Offline

#7 2010-09-28 12:53:02

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: ext4 errors

I would try to write over those blocks a few times (a few more write+read badblocks passes), maybe some will go away or be automatically remapped by the drive (you should check if the smart reallocated sector count parameter increases).

If there are still bad blocks you may want to pass some extra options to mkfs.ext4 while recreating the filesystem, the extra is -cc, it should do a write+read pass with badblocks and automatically avoid the bad blocks.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB