Subject: Re: tough filesystem stains
To: Todd Whitesel <toddpw@best.com>
From: Brian Stark <bstark@siemens-psc.com>
List: netbsd-help
Date: 08/07/1998 09:52:49
> So I tried fsck'ing it while it was not yet mounted, and that fixed it.
> 
> Does this call for a PR against fsck? During these experiments, I ran only
> four commands: mount /z, ls /z, fsck /z, umount /z. I don't understand why
> fsck would not either Just Work or warn me that it might not Just Work.
> 

Todd,

You should use fsck to fix a file system when it is not mounted.
Attempting to repair a file system when it is mounted can be dangerous
because other processes may be writing/reading data from the file system.

I don't have access to my NetBSD system right now, so I am unable to
check the man page for NetBSD fsck. However, for the fsck man page for AIX
4.2 I see the following comment:

  Notes:

  1. The fsck command does not make corrections to a mounted file
     system.

  2. The fsck command can be run on a mounted file system for reasons
     other than repairs. However, inaccurate error messages may be
     returned when the file system is mounted.


I suspect NetBSD fsck works in a similar fashion. Hope this helps...


Brian

-------------------------------------------------------------------------
| Brian Stark                       | Internet : bstark@siemens-psc.com |
| Siemens Power Systems Control     |                                   |
| 7225 Northland Drive              | Voice    : +1 612 536-4697        |
| Brooklyn Park, MN 55428   USA     | Fax      : +1 612 536-4919        |
-------------------------------------------------------------------------