[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: ext3 mounted fs still needs fscking after crash



On Fri, Oct 12, 2001 at 09:07:18PM +0200, Pierric Descamps wrote:
> 
> I'm new to ext3, so I hope you won't find my question to be stupid. I also
> hope this isn't the 1,000,000th time someone posts it.
> My problem is the following: I converted my ext2 systems to ext3 using
> tune2fs -j /dev/sda2 (or 5 for my /home, 2 is my root)
> Then I modified fstab and put ext3 for each. After a reboot, the mount
> command says they are mounted as ext3.
> But when I simulate a crash by resetting the machine manually, they don't
> behave the same. The /home (sda5) gets fixed instantly by EXT3-FS, and
> needs no fsck. But for the root fs it says "/dev/sda2 was not unmounted
> correctly, fsck forced", or something like that, you all know this message
> by heart, don't you ? 

Are you *sure* the root filesystem was mounted ext3?  There are a
number of reasons why that might not be the case.  Are you compiling
ext3 as a kernel module?  If so, you need to modify your initrd file
so that the ext3 filesystem is loaded first.  If you ran tune2fs -j
/dev/sda2 command while you running 2.4.10, that would have caused the
problem.  

So the first thing to check is whether or not your root filesystem
actually was an ext3 journal created on it.  The way to do that is to
use "dumpe2fs -h /dev/sda2".  Check to see if the filesystem feature
flag HAS_JOURNAL is present.  If not, that's your problem.  Upgrade to
a non-buggy kernel revision (if you were using 2.4.10), and re-run
tune2fs -j /dev/sda2.  If you get the error message "File exists" or
"Permission denied", then look for the file "/.journal", and run the
commands "chattr -i /.journal; rm /.journal", and re-run the command
"tune2fs -j /dev/sda2".

> Then the fsck is done (though since my upgrade of
> the e2tools without progress bar, do you know how to get it back, by the
> way? I hope I won't need it anymore, but ...)

The progress bar will appear if the -C option is passed to the fsck
program in your /etc/rc scripts.  Upgrading e2fsprogs wouldn't have
affectecd your rc.scripts, so I'm not sure what happened here.
Anyway, look for the fsck invocation in your /etc/rc scripts, and make
sure -C is being passed to it.

> At least, it says so, cause in my dmesg output, I just see on time the
> messages
> EXT3 FS 2.4-0.9.10, 23 Sep 2001 on sd(8,5), internal journal
> EXT3-fs: recovery complete.
> EXT3-fs: mounted filesystem with ordered data mode.
> for my scsi partitions... So I guess it is not *really* mounted as ext3.

sd(8,5) is your /dev/sda5 partition.  Was there a similar kernel
message for sd(8,2)?  If noto, then your root filesystem isn't getting
mounted as ext3.

						- Ted





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]