[comp.unix.questions] Regular FSCK Required ?

nigel@cnw01.storesys.coles.oz.au (Nigel Harwood) (03/01/91)

We run a large number of sites who are staffed with non-computer
people.

Every few weeks we get some file system weirdness such as data destined
for one file ending up in another.  There is no way that this can be
a bug in application software.

I am beginning to suspect that it is the file system which is getting
out of wack.

Because of the low computer skill level at these sites it is a
real battle to get any normal SA things done, like for example a
regular FSCK of the file systems (i.e. once a week).

Is a regular FSCK required ?  Could it solve some of our problems ?

Perhaps then I can convince them to invest the time.

Regards
-- 
<<<<<<<<<<<<<<<<<<<<<<<<<  Nigel Harwood  >>>>>>>>>>>>>>>>>>>>>>>>>>>
<< Post:  Coles Myer Ltd, PO Box 2000 Tooronga 3146, Australia     >>
<< Phone: +61 3 829 6090  E-mail: nigel@cnw01.storesys.coles.oz.au >>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

torek@elf.ee.lbl.gov (Chris Torek) (03/04/91)

In article <1235@cnw01.storesys.coles.oz.au> nigel@cnw01.storesys.coles.oz.au
(Nigel Harwood) writes:
>Is a regular FSCK required ?

No---unless something is broken, fsck should be necessary *only* after
a power-failure crash or hardware error.  (If something *is* broken,
fix it.  If you do not have source, switch to BSD Unix.)

>Because of the low computer skill level at these sites it is a
>real battle to get any normal SA things done, like for example a
>regular FSCK of the file systems (i.e. once a week).

Do not allow fsck to change a file system that is mounted.
-- 
In-Real-Life: Chris Torek, Lawrence Berkeley Lab EE div (+1 415 486 5427)
Berkeley, CA		Domain:	torek@ee.lbl.gov

andrew@tvcent.uucp (Andrew Cowie) (03/08/91)

In article <1235@cnw01.storesys.coles.oz.au> nigel@cnw01.storesys.coles.oz.au (Nigel Harwood) writes:
>Is a regular FSCK required ?  Could it solve some of our problems ?
>Perhaps then I can convince them to invest the time.

I believe that regular fsck's couldn't hurt in any case. What you might 
try, postulating computer illiterate users, is putting a call to it in
cron and having it run at, say, 4:00am Sundays.

The only catch is that some versions of fsck absolutely refuse to contine
unless someone answers the questions, for example:

INODE=1234 BAD
CLEAR?

If your flavour of UNIX supports completely automatic fscks, then I don't
see why this won't work.

Hey, you could even solve this problem (maybe) by having cron kill off the
fscks an hour later if they still exist. (Emphasis on the maybe; you won't
find me trying that on MY system :-))

Regards,

--
Andrew F. Cowie at TVC Enterprises, Toronto, Canada.
neat.ai.toronto.edu!tvcent!andrew -or- andrew@tvcent.uucp

dougg@vme.heurikon.com (Doug Gillett) (03/09/91)

In article <1991Mar8.040254.16272@tvcent.uucp> andrew@tvcent.uucp (Andrew Cowie) writes:
>
>Hey, you could even solve this problem (maybe) by having cron kill off the
>fscks an hour later if they still exist. (Emphasis on the maybe; you won't
>find me trying that on MY system :-))

Another possibility is to use "fsck -n", if available on your system, and
redirect the output to a file, usually /usr/adm/messages.  The -n option
answers "no" to any questions fsck might ask.

Doug

mouse@thunder.mcrcim.mcgill.edu (der Mouse) (03/15/91)

In article <166@heurikon.heurikon.com>, dougg@vme.heurikon.com (Doug Gillett) writes:
> In article <1991Mar8.040254.16272@tvcent.uucp> andrew@tvcent.uucp (Andrew Cowie) writes:
>> Hey, you could even solve this problem (maybe) by having cron kill
>> off the fscks an hour later if they still exist.  (Emphasis on the
>> maybe; you won't find me trying that on MY system :-))

I have a program called timeout that runs something else, and if it
still hasn't died after some time later (the time being specified in
seconds on timeout's command line), it kills it off.  (Details
available by mail.)

> Another possibility is to use "fsck -n", if available on your system,
> and redirect the output to a file, usually /usr/adm/messages.  The -n
> option answers "no" to any questions fsck might ask.

Unfortunately this is not always what you want.  I would *really* like
an option to fsck that automatically answers "yes" to "CONTINUE?"
messages and "no" to all others.  I suppose I could hack something
together with expect, but it seems to me it belongs in fsck.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu

torek@elf.ee.lbl.gov (Chris Torek) (03/16/91)

In article <1991Mar15.095247.13441@thunder.mcrcim.mcgill.edu>
mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
>Unfortunately this is not always what you want.  I would *really* like
>an option to fsck that automatically answers "yes" to "CONTINUE?"
>messages and "no" to all others.

``When this baby hits 88 miles an hour ...''  vroooOOOM <crackle> <fssss>

D 5.9   87/03/11 20:06:28       karels  16      15      00018/00010/00428
use physical sector size for partial buffer reads;
-n implies "yes" answer for "CONTINUE?"
-- 
In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427)
Berkeley, CA		Domain:	torek@ee.lbl.gov

rbj@uunet.UU.NET (Root Boy Jim) (03/28/91)

In article <11004@dog.ee.lbl.gov> torek@elf.ee.lbl.gov (Chris Torek) writes:
?In article <1991Mar15.095247.13441@thunder.mcrcim.mcgill.edu>
?mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
?>Unfortunately this is not always what you want.  I would *really* like
?>an option to fsck that automatically answers "yes" to "CONTINUE?"
?>messages and "no" to all others.
?
?``When this baby hits 88 miles an hour ...''  vroooOOOM <crackle> <fssss>
?
?D 5.9   87/03/11 20:06:28       karels  16      15      00018/00010/00428
?use physical sector size for partial buffer reads;
?-n implies "yes" answer for "CONTINUE?"

Cannot read superblock: CONTINUE?

?-- 
?In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427)
?Berkeley, CA		Domain:	torek@ee.lbl.gov
-- 
		[rbj@uunet 1] stty sane
		unknown mode: sane

libes@cme.nist.gov (Don Libes) (03/28/91)

In article <126605@uunet.UU.NET> rbj@uunet.UU.NET (Root Boy Jim) writes:
>In article <11004@dog.ee.lbl.gov> torek@elf.ee.lbl.gov (Chris Torek) writes:
>?In article <1991Mar15.095247.13441@thunder.mcrcim.mcgill.edu>
>?mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
>?>Unfortunately this is not always what you want.  I would *really* like
>?>an option to fsck that automatically answers "yes" to "CONTINUE?"
>?>messages and "no" to all others.

For sites that don't have Karel's fix, here's an expect script to do it.

	spawn fsck
	for {} 1 {} {
		expect	"*CONTINUE?*"	{send "y\r"} \
			"*?*"		{send "n\r"} \
			eof		{exit}
	}


>Cannot read superblock: CONTINUE?

I would've liked it better if the message read:

Cannot continue: CONTINUE?

Don Libes          libes@cme.nist.gov      ...!uunet!cme-durer!libes