Page 1 of 1

read only file system; fsck exit status 3

Posted: Thu May 10, 2012 1:22 pm
by adasilva
Hello everyone,

I am using LMDE with gnome 3.2.1. My file systems are ext2. I have had the following problem 2-3 times since installing LMDE several months ago:

At some point during my workday my system becomes read only. I haven't been able to figure out what's common between these times... it might be when I access a particular folder on my hard drive (but not every time I access it; I haven't found a way to reproduce the problem).

The relevant output of dmesg is:

Code: Select all

EXT2-fs (sda6): error: ext2_lookup: deleted inode referenced: 4136976
EXT2-fs (sda6): error: ext2_lookup: deleted inode referenced:  4136977
(and shows that the system is being mounted read-only)

I can fix the problem by forcing fsck and rebooting:
$ sudo touch /forcefsck
then reboot. At the reboot I see the following: (see attached picture)

Code: Select all

Checking root file system...fsck from util-linux 2.20.1
/dev/sda5: ***** REBOOT LINUX *****
/dev/sda5: 353022/1921360 files (1.6% non-contiguous), 3035002/7680000 blocks
fsck died with exit status 3
failed (code 3).
The file system check corrected errors on the root partition but requested that the system be rebooted
The system will be restarted in 5 seconds. ... (warning).
*** EDIT ***
I realized that the fsck was only happening on the root partition. I edited /etc/fstab so that /home is marked "2" for "pass",

Code: Select all

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc    /proc   proc    defaults        0       0
UUID=sda5_location     /       ext2    rw,errors=remount-ro    0    1
UUID=sda6_location       /home   ext2    rw,errors=remount-ro    0    2
This found additional errors, and hopefully fixed the problem (so far so good).
*** END EDIT ****

So my questions are:
1. Is the error occurring because I am trying to access a previously deleted inode? Was the inode incorrectly deleted somehow?
2. Does anyone know how I can prevent this from happening in the future?

Additional info that might help:
I went into to what I think might be the affected folder and I do in fact find a problem with the files there:

Code: Select all

$ ls -il
ls: cannot access 20000-22.mp3: Input/output error
ls: cannot access 20000-24.mp3: Input/output error
ls: cannot access 20000-31.mp3: Input/output error
ls: cannot access 20000-44.mp3: Input/output error
total 262224
4136975 -rw-r--r-- 1 ashley ashley 18944206 Jan  3 21:53 20000-01.mp3
4136967 -rw-r--r-- 1 ashley ashley 16304879 Jan  3 21:52 20000-04.mp3
4136973 -rw-r--r-- 1 ashley ashley 15077750 Jan  3 21:52 20000-05.mp3
4136963 -rw-r--r-- 1 ashley ashley 15325518 Jan  3 21:51 20000-12.mp3
4136968 -rw-r--r-- 1 ashley ashley 17482062 Jan  3 21:52 20000-17.mp3
4136970 -rw-r--r-- 1 ashley ashley 22018254 Jan  3 21:52 20000-20.mp3
4136964 -rw-r--r-- 1 ashley ashley 25260238 Jan  3 21:51 20000-21.mp3
      ? -????????? ? ?      ?             ?            ? 20000-22.mp3
      ? -????????? ? ?      ?             ?            ? 20000-24.mp3
4136962 -rw-r--r-- 1 ashley ashley 23263566 Jan  3 21:51 20000-25.mp3
4136974 -rw-r--r-- 1 ashley ashley 21108910 Jan  3 21:53 20000-30.mp3
      ? -????????? ? ?      ?             ?            ? 20000-31.mp3
4136971 -rw-r--r-- 1 ashley ashley 23292110 Jan  3 21:52 20000-32.mp3
4136969 -rw-r--r-- 1 ashley ashley 24072526 Jan  3 21:52 20000-36.mp3
4136966 -rw-r--r-- 1 ashley ashley 24357198 Jan  3 21:52 20000-41.mp3
      ? -????????? ? ?      ?             ?            ? 20000-44.mp3
4136965 -rw-r--r-- 1 ashley ashley 17455278 Jan  3 21:51 20000-46.mp3
4136972 -rw-r--r-- 1 ashley ashley  4175439 Jan  3 21:52 20000-47.mp3
But when I encounter the problem, I am NOT accessing any of these particular files; I am just working within the same folder.

Re: read only file system; fsck exit status 3

Posted: Thu May 10, 2012 1:59 pm
by xenopeek
[Topic moved to LMDE section]

Re: read only file system; fsck exit status 3

Posted: Sat May 19, 2012 7:12 pm
by äxl
adasilva wrote:My file systems are ext2.
First of all: Why do you use ext2? Is this an old home partition? How old is the hard drive?

Code: Select all

fsck died with exit status 3
I know this is old but since I don't even know what an inode is: http://www.linuxquestions.org/questions ... or-630878/
Also the ro shouldn't happen in a running system. Just saying that this could be a hardware problem. Though I don't know which Linux process would recognize this ...

Re: read only file system; fsck exit status 3

Posted: Sun May 27, 2012 5:52 pm
by Zweitaktmotor
Similar problem here.

It happens on USB devices (sticks, cards) with FAT FS, but not on all of them, just some.

Re: read only file system; fsck exit status 3

Posted: Mon May 28, 2012 10:50 pm
by adasilva
First of all: Why do you use ext2? Is this an old home partition? How old is the hard drive?
I am not sure why I chose to use ext2. It was probably because when I formatted the drive I used what my old computer was using without giving much thought... The hard drive is only a few months old.

Thanks for the link, it looks useful! But so far the problem hasn't reoccurred... :?

Re: read only file system; fsck exit status 3

Posted: Wed May 30, 2012 9:47 pm
by adasilva
Well, my problem has returned... with a vengeance :(

First of all, I'm seeing this during the boot:

Code: Select all

mount: according to mtab, tmpfs is already mounted on /run/lock
mount: according to mtab, tmpfs is already mounted on /run/shm
Then the problems begin:

Code: Select all

Checking file systems...fsck from util-linux 2.20.1
/dev/sda6 contains a file system with errors, check forced.
Inode 3391292, i_blocks is 24, should be 0. FIXED.
Duplicate or bad block in use!
/dev/sda6: Multiply-claimed block(s) in inode 3473456: xxxxxxxx xxxxxxxx etc.
There are several of these last ones. The x's stand for digits, and there are mutliple sets of numbers after each inode number. Presumably these refer to sections of the inode.

After that I get:

Code: Select all

/dev/sda6: (There are 4 inodes containing multiply-claimed blocks.)

/dev/sda6: File /ashley/.moxilla/firefox/mwad0hks.default/urlclassifier.pset (inode #3473456, mod time Wed May 30 14:46:20 2012) has 10 multiply-claimed block(s), shared with 1 file(s):
/dev/sda6:    ... (inode $3473462, mod time Wed May 30 19:59:17 2012)
/dev/sda6:

/dev/sda6: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
     (i.e. without -a or -p options)
fsck died with exit status 4
failed (code 4).
File system check failed. A log is being saved in /var/log/fsck/checkfs if that location is writable. Please repair the file system manually. ... failed!
A maintenance shell will now be started. CONTROL-D will terminate this shell and resume system boot ... (warning).
After running fsck in the maintenance shell, selecting "yes" to all the recommended fixes, I still get the above message. Any advice? Is it a bad hard drive? I've got all my data backed up, so I can always reformat... :?