fsck safe in run level 2?

Conor P. Cahill cpcahil at virtech.uucp
Mon Jul 2 22:43:10 AEST 1990


In article <970007 at teecs.UUCP> belkin at teecs.UUCP (Hershel Belkin) writes:
>I have often heard/read that fsck should not be run on a mounted
>file system, and further, should never be run while in multi-user
>mode.  While I understand the risks involved in attempting to
>use fsck to correct errors while in multi-user mode, I have a 
>problem understanding why there should be any harm in using fsck
>to simply "look" at a mounted file system even while being used!

The only rule to remember is:

	FSCK should not be run on a mounted file system.

This gives you problems when the root file system is involved (especially
when you are on a unix system that does not provide the capability to
remount root following an fsck).

Single or Multi user mode has no effect on fsck.  If a file system is 
unmounted you could fsck it until the cows come home and have no problems
with your system (the execption being, of course, disk i/o performance).

>I can imagine that the fsck results could be incorrect (ie. may
>perhaps indicate an error when in fact there is none) due to
>disc activity.  But is there any possibility that fsck could
>*cause* a problem (again, assuming "-n" responses)??

If you run fsck in a "read only" mode, it will not cause any problems.  Like
you said, it will (almost positively) report false errors on your file system.

>I'd appreciate some insights to this question.  (BTW, I have often
>run fsck's in this mode, only switching to single user mode if
>fsck shows any errors, so that I can confirm them as "real".  I have
>never experienced any problems, but I'd like to know what others
>feel about this).  Thanks!

I would recommend against running fsck on a mounted file system even if 
you are now carefull to answer n to all the update questions.  Some time
in the future you will forget the n and cause file system damage that you
will regret.  If you want to check a file system, umount the file system
and fsck it.

-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.,
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 



More information about the Comp.unix.questions mailing list