Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 05-09-2011, 07:05 PM   #1
LQ Newbie
Registered: May 2011
Posts: 6

Rep: Reputation: 0
Problem fixing ext3 root file system using fsck on CentOS 5

When I run a read-only fsck on the mounted root partition of a CentOS 5 server, it finds a number of errors. However, running a forced check upon next boot does not find any!

Here are the results of the mounted read-only check:

# fsck -nCf /
fsck 1.39 (29-May-2006)
e2fsck 1.39 (29-May-2006)
Warning!  /dev/sda3 is mounted.
Warning: skipping journal recovery because doing a read-only filesystem check.
Pass 1: Checking inodes, blocks, and sizes
Deleted inode 232259589 has zero dtime.  Fix? no

Inodes that were part of a corrupted orphan linked list found.  Fix? no

Inode 232259593 was part of the orphaned inode list.  IGNORED.
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences:  -32194676 -(32235995--32235998) -(32236209--32236210) -(32238978--32238981) -(32239590--32239593) -(32239924--32239926) -(32241448--32241457) -(32245306--32245313) -32867401 -(36754088--36754097) +(143647672--143648620) -(143653816--143654764)
Fix? no

Free blocks count wrong for group #982 (1277, counted=1276).
Fix? no

Free blocks count wrong for group #983 (810, counted=777).
Fix? no

Free blocks count wrong for group #984 (19647, counted=19637).
Fix? no

Free blocks count wrong for group #1003 (28042, counted=28041).
Fix? no

Free blocks count wrong for group #1121 (11611, counted=11598).
Fix? no

Free blocks count wrong (227428348, counted=227427933).
Fix? no

Inode bitmap differences:  -232259589 -232259593
Fix? no

Free inodes count wrong (243391778, counted=243391739).
Fix? no

/: ********** WARNING: Filesystem still has errors **********

/: 205534/243597312 files (3.7% non-contiguous), 16161230/243589578 blocks
The way I run a forced check is by:

touch /forcefsck
echo -n "-y" > /fsckoptions
This does force fsck to run upon next boot and the "-y" option should autofix all errors, but the check doesn't find any during bootup. However, once the file system is mounted and I run the read-only check again, it finds all the same errors.

Thanks for your time,

Old 05-09-2011, 07:07 PM   #2
LQ Newbie
Registered: May 2011
Posts: 23

Rep: Reputation: 2
I never use fsck on a live system. Boot knoppix and use fsck from there, that should do it.
Old 05-17-2011, 06:24 PM   #3
LQ Newbie
Registered: May 2011
Posts: 6

Original Poster
Rep: Reputation: 0
Good call, vkvs. Apparently, here's why that's a good idea:

"However, even if it is safe to do so, the results printed by e2fsck are not valid if the filesystem is mounted." -E2FSCK(8)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
fsck and root file system xj25vm Slackware 4 10-20-2011 02:11 PM
fsck not checking non-root file system at boot time... robertjinx Slackware 2 04-21-2011 04:28 PM
how to dynamically grow the ext3 file system in centOs hemanthv414 Linux - Server 6 11-04-2010 03:03 PM
I cannot do fsck. Why is that? Repairing Linux ext2 or ext3 file system LinuxCrazy Linux - General 5 06-18-2007 05:01 PM
Running fsck (or e2fsck) on root file system... xbill311x Linux - Newbie 2 01-02-2006 11:54 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:00 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration