Hi there, 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 ? 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 ...), and the fs is mounted as ext3. 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. One more clue: I first tried to use tune2fs -j /dev/sda5 when /home was mounted, but with "auto" in fstab, it would mount as ext2. After using the same command on the unmounted fs, it would mount as ext3 ... In the doc I read, it's written that it is not important that the fs be mounted or not. Here it seems to be somewhat different ... I hope you can help me, and thank you in advance ! Pierric Descamps.
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
Pierric Descamps
2001-Oct-13 17:45 UTC
Re: ext3 mounted fs still needs fscking after crash
Hi, Thanks, Ted, for the help. Now I am sure that my fs isn't mounted as ext3, because the has_journal feature is not present. When I use tune2fs -j /dev/sda2, the flag appears, but after reboot it's gone. The silly thing is that the output of mount is /dev/sda2 on / type ext3 (rw) Now, I didn't know that 2.4.10 was buggy, but I tried to upgrade as you said. I applied the patches for 2.4.11-dontuse (interesting name...) and then 2.4.12. But now the kernel won't compile because of -------- balloc.c: In function `ext3_free_blocks': balloc.c:432: warning: passing arg 1 of `DQUOT_FREE_BLOCK' from incompatible pointer type balloc.c:432: warning: passing arg 2 of `DQUOT_FREE_BLOCK' makes integer from pointer without a cast balloc.c:432: too many arguments to function `DQUOT_FREE_BLOCK' balloc.c: In function `ext3_new_block': balloc.c:571: warning: passing arg 1 of `DQUOT_ALLOC_BLOCK' from incompatible pointer type balloc.c:571: warning: passing arg 2 of `DQUOT_ALLOC_BLOCK' makes integer from pointer without a cast balloc.c:571: too many arguments to function `DQUOT_ALLOC_BLOCK' -------- So I don't know what to do now... What version of the kernel should I reinstall, so that I can apply a patch for ext3 and mount correctly? There's still no patch against 2.4.12, is it? Sorry if that sounds stupid, I'm quite lost in all those version numbers, I must admit. Thanks again in advance, Pierric.
Pierric Descamps
2001-Oct-14 09:14 UTC
Re: ext3 mounted fs still needs fscking after crash
Hi, Thanks, Ted, for the help. Now I am sure that my fs isn't mounted as ext3, because the has_journal feature is not present. When I use tune2fs -j /dev/sda2, the flag appears, but after reboot it's gone. The silly thing is that the output of mount is /dev/sda2 on / type ext3 (rw) Now, I didn't know that 2.4.10 was buggy, but I tried to upgrade as you said. I applied the patches for 2.4.11-dontuse (interesting name...) and then 2.4.12. But now the kernel won't compile because of -------- balloc.c: In function `ext3_free_blocks': balloc.c:432: warning: passing arg 1 of `DQUOT_FREE_BLOCK' from incompatible pointer type balloc.c:432: warning: passing arg 2 of `DQUOT_FREE_BLOCK' makes integer from pointer without a cast balloc.c:432: too many arguments to function `DQUOT_FREE_BLOCK' balloc.c: In function `ext3_new_block': balloc.c:571: warning: passing arg 1 of `DQUOT_ALLOC_BLOCK' from incompatible pointer type balloc.c:571: warning: passing arg 2 of `DQUOT_ALLOC_BLOCK' makes integer from pointer without a cast balloc.c:571: too many arguments to function `DQUOT_ALLOC_BLOCK' -------- So I don't know what to do now... What version of the kernel should I reinstall, so that I can apply a patch for ext3 and mount correctly? There's still no patch against 2.4.12, is it? Sorry if that sounds stupid, I'm quite lost in all those version numbers, I must admit. Thanks again in advance, Pierric.