Hi there, I'm running software raid 1 across two 60GB IDE drives and booting off the raid device. The raid device holds an ext3 filesystem. Each drive is configured as a master on its own bus. The system is redhat 7.2, stock kernel 2.4.9-31smp. The hardware platform is a Dell precision dual 2Ghz P4 system with 1G of memory. I have two of these systems, both configured identitically. I've had filesystem corruption problems on both machines. In the process of trying to troubleshoot the problem, I've used tune2fs to force fscks on every 1 mount, but these never happen on reboot. If I do tune2fs -l /dev/md0 I can clearly see that the system is past its maximal mount count, and that it has a "needs check" flag, but it does not fsck on boot or even ask to be optionally fsck'd on boot like it does when the filesystem is marked dirty. Each time I reboot the system the raid device + ext3 filesystem loads fine and shows no errors. Is this the desired behavior? I suspect that there may be errors on the root partition but I can't fsck it while the system is up. I built a CD rescue disk from some random freshmeat project, and it does appear to find errors on the md partition, but I am not sure that I trust it. It's running an older kernel. Does anyone know how to force ext3 fscks on reboot, or have any ideas what kinds of things could cause filesystem corruption in my setup? Thanks in advance, -Darrell
On Mon, Apr 01, 2002 at 08:50:31PM -0500, Darrell Michaud wrote:> > I'm running software raid 1 across two 60GB IDE drives and booting off > the raid device. The raid device holds an ext3 filesystem. > > Each drive is configured as a master on its own bus. > > The system is redhat 7.2, stock kernel 2.4.9-31smp. The hardware > platform is a Dell precision dual 2Ghz P4 system with 1G of memory. > > I have two of these systems, both configured identitically. I've had > filesystem corruption problems on both machines. > > In the process of trying to troubleshoot the problem, I've used tune2fs > to force fscks on every 1 mount, but these never happen on reboot. If I > do tune2fs -l /dev/md0 I can clearly see that the system is past its > maximal mount count, and that it has a "needs check" flag, but it does > not fsck on boot or even ask to be optionally fsck'd on boot like it > does when the filesystem is marked dirty. Each time I reboot the system > the raid device + ext3 filesystem loads fine and shows no errors.Did you do "tune2fs -l /dev/md0" check right after the system boots, and before you attempt to modify the superblock using tune2fs? There's a possbility that the problem is caused by the changes to the superblock not "taking" due to the filesystem activity around the time of the tune2fs. That's not likely, but it is something to check just to make sure. The next question is are you sure that fsck is actually being run? I don't use Red Hat and so I'm not familiar with its initrd scripts, but that's the next obvious thing to check. Adding a "set -vx" to the beginning of the initrd's rc script will allow us to see exactly how fsck is being called, if it is being called at all. - Ted
On Apr 01, 2002 20:50 -0500, Darrell Michaud wrote:> Does anyone know how to force ext3 fscks on reboot, or have any ideas > what kinds of things could cause filesystem corruption in my setup?You need to have a non-zero value for the last number in /etc/fstab, like: /dev/md0 /home ext3 defaults 1 2 If the second number is zero, fsck will not check your filesystem. Cheers, Andreas -- Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto, \ would they cancel out, leaving him still hungry?" http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert