*BSD News Article 16603


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!sdd.hp.com!col.hp.com!csn!hellgate.utah.edu!fcom.cc.utah.edu!cs.weber.edu!terry
From: terry@cs.weber.edu (A Wizard of Earth C)
Subject: Re: fsck summary info bad after every shutdown
Message-ID: <1993May28.201446.24163@fcom.cc.utah.edu>
Sender: news@fcom.cc.utah.edu
Organization: Weber State University  (Ogden, UT)
References: <davidb.738071772@otto> <1tlqt4INN7ni@fstgds01.tu-graz.ac.at> <vp.738563799@news.forth.gr>
Date: Fri, 28 May 93 20:14:46 GMT
Lines: 42

In article <vp.738563799@news.forth.gr> vp@nemesis.csi.forth.gr (Vassilis Prevelakis) writes:
>chmr@edvz.tu-graz.ac.at (Christoph Robitschko) writes:
>
>>I've modified fsck to check the clean bit, and ufs_mount and ufs_unmount
>>in the kernel to clear and set the clean bit, respectively. It works
>>fine after I manually unmount a partition, but my problem is that the
>>filesystems are not unmounted automatically on a shutdown.
>
>Why not use fasthalt(8) or fastboot(8), these create a file (/fastboot)
>so that after the machine is rebooted /etc/rc doesn't run fsck at all.

This still does not ensure superblock integrity; marking the buffers
for write versus calling bwrite on them (ala umount) are two very
different things.

Halt, by definition, should do a forcible unmount of partitions (this *is*
supported, at least in UFS).  An unmount should, among other things, write
the volume info, set the bit in the volume info for "clean", and then
rewrite the volume info.  I think the "fsck -p" warnings on a count of
reboots is unnecessary, but if you want to implement this Utrix feature
(as has been suggested), then you might as well.

SVR4 likes you to be in / when you shut down to avoid invalidating the
vnode for the current directory, and to make it easy to run uadmin (out
of sbin) to actually shut the system down.  A paramter to halt would
do the same thing for us without the "shutdown from /" bogosity.

Using fasthalt(8) or fastboot(8) avoids the fsck, but doesn't actually
make it unnecessary.  The key is telling if it necessary or not, and then
skipping it.

PS:  The forcible unmount is the reason for the "log off now or risk your
files being damaged" message, since all processes will have been killed
by that time, and well behaved processes are at no risk (they'll have cause
the SIGTERM/SIGHUP/SIGINT from init).


					Terry Lambert
					terry@icarus.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.