Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Mar 1998 22:58:30 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        dima@tejblum.dnttm.rssi.ru, mike@smith.net.au
Cc:        committers@FreeBSD.ORG
Subject:   Re: dumb question about fstab and 226 beta
Message-ID:  <199803151158.WAA05923@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199803151158.WAA05923>