Subject: Re: back to a few basics
To: Mark R. Nathan <mark@nathan.net>
From: Frederick Bruckman <fb@enteract.com>
List: netbsd-help
Date: 02/13/2001 15:47:17
On Tue, 13 Feb 2001, Mark R. Nathan wrote:

> /dev/rsd1g: UNEXPECTED INCONSISTENCY; RUNfsck_ffs MANUALLY.
> THE FOLLOWING FILE SYSTEM HAD AN UNEXPECTED INCONSISTENCY:
>              ffs: /dev/rsd1g (/usr2)
> automatic file system check failed; help!

First, try to do what it says. "Run fsck manually" means:

    fsck /dev/rsd1g

or

    fsck /usr2

or "fsck" with no arguments.

"fsck" will give you obtuse messages, and ask you cryptic questions.
The default answer, "yes", is usually safe, unless there are DUPS due
to bogus directory entries, in which case you'll probably have to
reinstall or restore from back-up, anyway. If there are DUPS, and you
want to try to save the file system, say "no" when it asks to delete a
good file, and "yes" when it asks to delete the garbage file, which
you can usually tell by the name.

Repeat "fsck -f" until there are no more errors. If it's asking way
too many questions, that's a sign that you're really hosed. If you
know you're really hosed, and you've pretty much resigned yourself to
rebuilding and restoring the file systems anyway, you can get to
oblivion a little faster with "fsck -fy" (answer "yes" to everything).

> Something obviously happened in the 2 house move.. and not sure where
> to begin to correct this.
>
> in single user I tried to edit some local files and was getting the same error:
>
> ex/vi: Error: Unable to create temporray file: Read-only file system

The file systems aren't mounted read/write until they pass the file
system checks. If, by chance, you can get them all to fsck, you can
mount everything with "mount -a; swapctl -A" in order to assess the
collateral damage while you're still in single-user mode.


Frederick