Summary: fsck checks / after std shutdown]

From: Nigel Harwood <nharwood_at_cnw06.coles.com.au>
Date: Sun, 19 Feb 1995 19:59:43 +1000 (EST)

My thanks to the following people who responded:

   "Rick Murphy" <murphy_at_burfle.dco.dec.com>
   nicolis_at_celfi.phys.univ-tours.fr
   alan_at_nabeth.cxo.dec.com (Alan Rollow)
   <johanl_at_basys.svt.se>
   "Dr. Tom Blinn, 603-881-0646" <tpb_at_zk3.dec.com>

Original message:

> Our recently installed DEC OSF/1 V2.1B (Rev. 250.113) system seems
> to have a problem with fsck and the / and /usr disks.
>
> If we reboot the system normally with 'shutdown -r now' all seems to
> be well when it shuts down but when it comes back up the fsck does
> not skip over the / and /usr disks; it actually checks them, sometimes
> finding things to fix. The other disks on the system are fine and
> are skipped over as having been unmounted cleanly.
>
> Anyone have any idea on what the problem is?

In a nutshell, "shutdown -r now" doesn't go through the shutdown scripts
and so it is possible (probable?) that there will be processes still running
in the file systems which need to be unmounted. As a result these
file systems cannot be unmounted and so are "dirty" when next you boot
meaning that fsck must check them.

The quick remedy is to drop into single user mode first, which does run
the shutdown scripts, and then shutdown (thanks Rick).

A more integrated solution was sent by DEC Sweden (thanks Johan). I
don't quite understand how the two inittab entries get kicked off as
they are 'a' and 'b', and haven't had a chance to try it yet.

A few people wondered why I was worried. I guess I'm used to other
UNIX'es such as System V or Linux where if your root file system is
being checked on re-boot then you definitely had/have a problem.

Full responses:

> From: "Rick Murphy" <murphy_at_burfle.dco.dec.com>
>
> "shutdown -r now" doesn't go thru the shutdown steps that cleanly kill off
> processes; chances are something is left running (a daemon, perhaps) that
> has your filesystems open. I've found that "init s" followed by "reboot" works
> as expected - the shutdown to single-user mode cleanly kills everything off.

> From: nicolis_at_celfi.phys.univ-tours.fr
>
> well, from what I've noticed, shutdown -r now includes a fsck -p when the
> system comes up as a matter of course. Sometimes it does ideed find
> errors that it manages to correct-but that seems standard across all
> systems I've seen--the point is that the errors DO get corrected!
> You should use the uerf command and look at the error report to pin down
> putative damages.

> From: alan_at_nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.)
>
> This may help track the problem. When the file system is
> mounted a value is set in the superblock to indicate the
> file system is dirty. When it is unmounted, the value
> is changed to indicate it is clean. Fsck can check this
> and skip the check on the assumption that normal operation
> will keep the file system consistent. For a file system
> to be unmounted, there can be no open files on it (or
> processes that have their current directory on the file
> system). A shutdown will kill on the processes and then
> unmount the file systems.
>
> What could be happening is that a processes isn't dying
> or V2.1 isn't waiting long enough. This would lead to
> the shutdown being unable to dismount /usr, and hence
> never "clean" it.
>
> You may be able to find the culprit by shutting down to
> single user and seeing what is still running. Only things
> like init, the single user shell and a couple of other
> kernel house keeping processes should be running.

> From: <johanl_at_basys.svt.se>
>
> You shouldn't use shutdown, since shutdown doesn't go through to init.d
> scripts. The following is a workaround suggested by DEC Sweden:
>
> add these entries to /etc/inittab:
>
> sa:a:wait:/sbin/rc0 reboot < /dev/console > /dev/console 2>&1
> sb:b:wait:/sbin/rc0 halt < /dev/console > /dev/console 2>&1
>
> change the end of /sbin/rc0 to:
>
> if [ "$ARGONE" = reboot ]; then
> echo "the system is rebooting."
> /sbin/reboot
> fi
>
> if [ "$ARGONE" = halt ]; then
> echo "the system is going down."
> /sbin/halt
> #else
> # echo "The system is down."
> # sync
> # /sbin/halt -q
> fi

> From: "Dr. Tom Blinn, 603-881-0646" <tpb_at_zk3.dec.com>
>
> I don't know why you think this is a problem. Your root partition is going
> to ALWAYS be dirty after a shutdown, unless you were running the standalone
> system off the CD. In normal operation, there are files open on the root
> partition that can't be closed, so it never gets unmounted cleanly. Most of
> the time the /usr partition WILL get unmounted cleanly, but sometimes it
> does not.
>
> In any case, during startup, EVERY disk that's "dirty" gets checked. There
> is no special casing of / or /usr to "skip over" them, and there should not
> be any such special case.

Regards
-- 
<<<<<<<<<<<<<<<<<<<<<<<<<<<  Nigel Harwood  >>>>>>>>>>>>>>>>>>>>>>>>>>
<<  Post: Coles Supermarkets, PO Box 480, Glen Iris 3146, Australia >>
<< Phone: +61 3 829 6090              E-mail: nharwood_at_coles.com.au >>
<<   FAX: +61 3 829 6886                                            >>
Received on Sun Feb 19 1995 - 04:32:32 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT