From owner-freebsd-questions@FreeBSD.ORG Sat Aug 18 19:32:39 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67D1916A417 for ; Sat, 18 Aug 2007 19:32:39 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213]) by mx1.freebsd.org (Postfix) with ESMTP id E9A7413C465 for ; Sat, 18 Aug 2007 19:32:38 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-253-10-135.bredband.comhem.se ([83.253.10.135]:59557 helo=falcon.midgard.homeip.net) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.66) (envelope-from ) id 1IMU2D-0000zN-9A for freebsd-questions@freebsd.org; Sat, 18 Aug 2007 21:32:38 +0200 Received: (qmail 1718 invoked from network); 18 Aug 2007 21:32:28 +0200 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 18 Aug 2007 21:32:28 +0200 Received: (qmail 53656 invoked by uid 1001); 18 Aug 2007 21:32:28 +0200 Date: Sat, 18 Aug 2007 21:32:28 +0200 From: Erik Trulsson To: Christopher Key Message-ID: <20070818193228.GA53607@owl.midgard.homeip.net> Mail-Followup-To: Christopher Key , freebsd-questions@freebsd.org References: <46C746C6.5080202@cam.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46C746C6.5080202@cam.ac.uk> User-Agent: Mutt/1.5.16 (2007-06-09) X-Originating-IP: 83.253.10.135 X-Scan-Result: No virus found in message 1IMU2D-0000zN-9A. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1IMU2D-0000zN-9A 4c12f2b43e74b63f8ae21f5aa40b576e Cc: freebsd-questions@freebsd.org Subject: Re: fsck strangeness X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Aug 2007 19:32:39 -0000 On Sat, Aug 18, 2007 at 08:21:42PM +0100, Christopher Key wrote: > Hello, > > I'm having some rather strange behaviour with fsck. > > When I boot the system, it asserts that all the file systems are clean, but > subsequently running an fsck on /dev/ad8s1e (mounted as /var) detects > errors. Even if this first check is run whilst the file system is mounted, > and is hence run in NO WRITE mode, a second check doesn't find block > errors. If I then unmount the file system and check the disk, it's fine, > as indeed it is if I unmount, remount, then check. However, if I then > reboot, the process repeats, and an fsck immediately after reboot will find > errors again. If I bring the system up in single user mode, and run fsck > either before or after mounting /var, it finds no errors. > > I'm running 6.2_RELEASE with a custom kernel based upon generic-smp, but > with a lot of unecessary bits removed, and geom_mirror compiled in. I > don't think it's the drive that's at fault, all the other partitions in the > slice are fine, it's a fairly new drive, and it passes a self test quite > happily. Included below is a transcript that attempt to show what's going > on in detail, is there anything else relevant? > > Can anyone suggest what might be going on and how to fix it, or suggest > some slightly better diagnostics? Apologies if this is an RTFM issue, I > have had a good dig through the handbook, but can't seem to find anything > that helps. > Running fsck on a file system that has been mounted read/write will almost always report spurious errors and can really screw up the disk if it tries to 'correct' those errors. You should normally not run fsck on a mounted filesystem and you should *NEVER* run fsck on a filesystem that has been mounted read/write. -- Erik Trulsson ertr1013@student.uu.se