From owner-freebsd-stable@FreeBSD.ORG Sat Jul 16 14:29:06 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5685D16A41C for ; Sat, 16 Jul 2005 14:29:06 +0000 (GMT) (envelope-from mkb@mkbuelow.net) Received: from luzifer.incubus.de (incubus.de [80.237.207.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id DCC1443D5D for ; Sat, 16 Jul 2005 14:29:05 +0000 (GMT) (envelope-from mkb@mkbuelow.net) Received: from drjekyll.mkbuelow.net (p54AA8609.dip0.t-ipconnect.de [84.170.134.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by luzifer.incubus.de (Postfix) with ESMTP id 91DE132913; Sat, 16 Jul 2005 16:31:57 +0200 (CEST) Received: from drjekyll.mkbuelow.net (mkb@localhost.mkbuelow.net [127.0.0.1]) by drjekyll.mkbuelow.net (8.13.3/8.13.3) with ESMTP id j6GETIwR001006; Sat, 16 Jul 2005 16:29:19 +0200 (CEST) (envelope-from mkb@drjekyll.mkbuelow.net) Received: (from mkb@localhost) by drjekyll.mkbuelow.net (8.13.3/8.13.3/Submit) id j6GETIoX001005; Sat, 16 Jul 2005 16:29:18 +0200 (CEST) (envelope-from mkb) Date: Sat, 16 Jul 2005 16:29:18 +0200 From: Matthias Buelow To: Bill Vermillion Message-ID: <20050716142918.GD752@drjekyll.mkbuelow.net> References: <20050715221356.5A5B916A42D@hub.freebsd.org> <20050716140835.GE6192@wjv.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050716140835.GE6192@wjv.com> User-Agent: Mutt/1.4.2.1i Cc: freebsd-stable@freebsd.org Subject: Re: dangerous situation with shutdown process X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jul 2005 14:29:06 -0000 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 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.