Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Jul 2005 16:29:18 +0200
From:      Matthias Buelow <mkb@incubus.de>
To:        Bill Vermillion <bv@wjv.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: dangerous situation with shutdown process
Message-ID:  <20050716142918.GD752@drjekyll.mkbuelow.net>
In-Reply-To: <20050716140835.GE6192@wjv.com>
References:  <20050715221356.5A5B916A42D@hub.freebsd.org> <20050716140835.GE6192@wjv.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Bill Vermillion wrote:

>You can fsck a mounted file system and fsck will run in read-only
>mode.  That way you can check for problems, and if there is
>something wrong you can shutdown and restart.  FreeBSD will NOT
>run fsck in anything other than READ ONLY when the file system is
>mounted

I thought fsck on a live (read-write) filesystem almost always
brings up errors (although only of a certain kind, like dangling
inodes) unless the fs has been completely quiescent for a while.

A quick check seems to confirm this:

** /dev/ad4s3a (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
UNREF FILE I=94257  OWNER=mkb MODE=100600
SIZE=2397 MTIME=Jul 16 16:25 2005 
CLEAR? no

>And in the old days when drives were smaller and slower and
>perfomance needed to be maximized, from about Verision III through
>System V you could run   fsck -S <device> from cron!!
>
>The -S flag was interesting in that it would actually re-write
>the freelist IF AND ONLY IF there was no corruption on the drive.

I'm amazed that this worked.. considering that the fsck would have
to be atomic then (i.e., basically halt all filesystem i/o while
it's running).

mkb.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050716142918.GD752>