Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Dec 2002 11:28:52 -0800 (PST)
From:      Archie Cobbs <archie@dellroad.org>
To:        Dan Nelson <dnelson@allantgroup.com>
Cc:        mckusick@beastie.mckusick.com, freebsd-current@FreeBSD.ORG
Subject:   Re: backgroud fsck is still locking up system (fwd)
Message-ID:  <200212061928.gB6JSqn0065389@arch20m.dellroad.org>
In-Reply-To: <20021206191024.GA1646@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Dan Nelson wrote:
> > Why does softupdates not get enabled on / , by default on the
> > install?
> 
> Softupdates updates on-disk structures in the background, and
> background fsck cannot relink unreferenced files into lost+found, so
> you run the risk of losing both the original and backup copies of
> important files in case of a sudden reboot.  Imagine you edited
> /etc/rc.conf, saved it, and 5 seconds later the system panic'ed.
> Because the default metadata flush time is 28 seconds, there's a pretty
> good chance that neither the new file or the original is in /etc after
> a reboot.  I got bit by this three times before I learned my lesson.  I

I don't understand this.. presumably vi updates the file contents by
opening and writing into the file; why would this cause the file's
directory entry to disappear?

On the other hand, if you do "mv rc.conf.new rc.conf" then you are
supposedly guaranteed that the file exists in some form; see rename(2).

In any case, you seem to be implying that with respect to modifying
files just before a system crash:

    (a) Softupdates is more 'dangerous' than non-softupdates
    (b) Background fsck is more 'dangerous' than normal fsck

Is this really true? I thought if anything the reverse of (a) would be true.

-Archie

__________________________________________________________________________
Archie Cobbs     *     Packet Design     *     http://www.packetdesign.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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