read only file system; fsck exit status 3

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help

read only file system; fsck exit status 3

Postby adasilva on Thu May 10, 2012 1:22 pm

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.
Attachments
Photo0088.jpg
Photo0088.jpg (451.03 KiB) Viewed 3401 times
Last edited by adasilva on Thu May 17, 2012 10:02 am, edited 1 time in total.
adasilva
Level 1
Level 1
 
Posts: 6
Joined: Thu Jan 05, 2012 10:36 am

Linux Mint is funded by ads and donations.
 

Re: read only file system; fsck exit status 3

Postby xenopeek on Thu May 10, 2012 1:59 pm

[Topic moved to LMDE section]
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15280
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: read only file system; fsck exit status 3

Postby äxl on Sat May 19, 2012 7:12 pm

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 ...
My Linux history: Ubuntu 10.04 - 10.10 - LMDE 201109 - UP4 My sources.list/preferences

Computers is not science. And it's not magic - it's something in between.
User avatar
äxl
Level 5
Level 5
 
Posts: 524
Joined: Fri Apr 06, 2012 6:14 am
Location: Germany

Re: read only file system; fsck exit status 3

Postby Zweitaktmotor on Sun May 27, 2012 5:52 pm

Similar problem here.

It happens on USB devices (sticks, cards) with FAT FS, but not on all of them, just some.
Zweitaktmotor
Level 2
Level 2
 
Posts: 53
Joined: Mon Feb 08, 2010 12:12 pm

Re: read only file system; fsck exit status 3

Postby adasilva on Mon May 28, 2012 10:50 pm

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... :?
adasilva
Level 1
Level 1
 
Posts: 6
Joined: Thu Jan 05, 2012 10:36 am

Re: read only file system; fsck exit status 3

Postby adasilva on Wed May 30, 2012 9:47 pm

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... :?
adasilva
Level 1
Level 1
 
Posts: 6
Joined: Thu Jan 05, 2012 10:36 am


Return to Newbie Questions

Who is online

Users browsing this forum: No registered users and 5 guests