From owner-cvs-all Sun Mar 15 04:00:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA10873 for cvs-all-outgoing; Sun, 15 Mar 1998 04:00:15 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA10866 for ; Sun, 15 Mar 1998 04:00:11 -0800 (PST) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id WAA05923; Sun, 15 Mar 1998 22:58:30 +1100 Date: Sun, 15 Mar 1998 22:58:30 +1100 From: Bruce Evans Message-Id: <199803151158.WAA05923@godzilla.zeta.org.au> To: dima@tejblum.dnttm.rssi.ru, mike@smith.net.au Subject: Re: dumb question about fstab and 226 beta Cc: committers@FreeBSD.ORG Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk >> If anyone is seeing the "root filesystem always needs fscking" problem, >> I'd really like any input you can offer - I'm at a total loss to work >> out what's going on there. More significantly, I just can't reproduce >> it. 8( > >Let my kernel want root be on /dev/wd1s1a, and my /etc/fstab say that root >on /dev/wd1a. Then after a crash fsck will clean /dev/wd1a. But, while >wd1s1a and wd1a cover exactly same disk space, they are different >decives with different caches. So when system look into wd1s1a, it >still see old unclean state. fsck should never be used on bdevs. Devices specified in fstab are always bdevs, but fsck attempts to convert them to cdevs (see blockcheck() and rawname()). If there is no cdev, then fsck attempts to use the bdev. This normally fails for the root device, because opening of an open bdev is not permitted. This is probably not the problem here. The problem here is probably that the slice alias breaks fsck's `hotroot' calculation in blockcheck(). After fsck finishes writing to the cdev alias for a mounted bdev, the buffer cache is inconsistent. fsck fixes this by remounting with flag MNT_RELOAD, but only if `hotroot' is set correctly. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message