Subject: Re: Phantom "fsck" complaints from /etc/daily run?
To: - Greg Earle <earle@isolar.Tujunga.CA.US>
From: Arne Steinkamm <arne@oldman.eikon.e-technik.tu-muenchen.de>
List: port-sparc
Date: 08/13/1994 11:46:25
> Have any of you had the "daily output" tell you that an fsck on the root showed
> up an unreferenced file, but if you manually run "fsck" yourself, it shows
> nothing wrong? I get this in the "daily output" mail, *every* night:
>
> Message 6:
> >From daemon Fri Aug 12 02:08:41 1994
> Date: Fri, 12 Aug 1994 02:08:40 -0700
> From: Charlie Root <root>
> To: root
> Subject: daily output
>
> Subject: netbsd4me daily run output
>
> ...
>
> Checking filesystems:
> ** /dev/rsd0a (NO WRITE)
> ** Last Mounted on /
> ** Root file system
> UNREF FILE I=730 OWNER=root MODE=100644
> SIZE=0 MTIME=Aug 12 02:00 1994
> CLEAR? no
>
> Yet if I randomly do a manual "fsck", it yields nothing wrong:
>
> netbsd4me# fsck /dev/rsd0a
> ** /dev/rsd0a (NO WRITE)
> ** Last Mounted on /
> ** Root file system
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> ** Phase 5 - Check Cyl groups
> 335 files, 9917 used, 1450 free (34 frags, 177 blocks, 0.3% fragmentation)
>
> Anyone else get these "phantom" fsck complaints?
>
> This looks like the case where a running process creates some temporary file at
> 2:00 AM and unlink()'s it, and that process doesn't go away until after the
> /etc/daily run has finished, so the fsck trips over the unlinked-but-still-
> there file. I'd be willing to wager that this is what is happening, but I
> don't know what created & unlinked the file. Since /etc/daily is started at
> 2:00, it would figure that the culprit was something in there; but it looks to
> me like all the processes run to completion before the "fsck" is done.
>
> Maybe I should run /etc/daily at an hour when I'm still at work :-)
Never run fsck while the system is multiuser. At 02:00 am the system make a
fsck -n. Look at the (NO WRITE) in the output.
Running fsck without -n is dangerous. Running it with -n is senseless.
Now you ask: Why ?
The answer is easy:
As Mike Karels wrote in <9307102059.AA08572@redrock.BSDI.COM> at
Sat, 10 Jul 1993 22:59:38 +0200 in bsdi-users:
I think I originally put the fsck in /etc/daily at Berkeley because
we had systems with a lot of disks, and some were not heavily used.
If they started to get flakey or die, the fsck was likely to give me
a warning.
And now, it is there :-)
Greetings
.//. Arne
--
Arne Steinkamm | Smart: arne@oldman.eikon.e-technik.tu-muenchen.de
Tel.: +49.89.299.756 | IRC: Arne
Robert-Koch-Str. 4 |\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
D-80538 Muenchen |///////////////////////////////////////////////////
------------------------------------------------------------------------------