From owner-freebsd-questions@FreeBSD.ORG Sat Aug 18 20:04:06 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 324F716A417 for ; Sat, 18 Aug 2007 20:04:06 +0000 (UTC) (envelope-from cjk32@cam.ac.uk) Received: from ppsw-2.csi.cam.ac.uk (ppsw-2.csi.cam.ac.uk [131.111.8.132]) by mx1.freebsd.org (Postfix) with ESMTP id EEAC413C458 for ; Sat, 18 Aug 2007 20:04:05 +0000 (UTC) (envelope-from cjk32@cam.ac.uk) X-Cam-SpamDetails: Not scanned X-Cam-AntiVirus: No virus found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from gw.cjkey.org.uk ([88.97.163.222]:2138 helo=[192.168.2.186]) by ppsw-2.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.152]:465) with esmtpsa (PLAIN:cjk32) (TLSv1:DHE-RSA-AES256-SHA:256) id 1IMUWd-0000ll-7j (Exim 4.63) for freebsd-questions@freebsd.org (return-path ); Sat, 18 Aug 2007 21:03:59 +0100 Message-ID: <46C750AF.6050903@cam.ac.uk> Date: Sat, 18 Aug 2007 21:03:59 +0100 From: Christopher Key User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 CC: freebsd-questions@freebsd.org References: <46C746C6.5080202@cam.ac.uk> <20070818153503.d47b40ae.wmoran@potentialtech.com> In-Reply-To: <20070818153503.d47b40ae.wmoran@potentialtech.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 20:04:06 -0000 Bill Moran wrote: > 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. >> > > Don't run fsck on mounted filesystems unless they're mounted read-only. > > Although, it's possible I misunderstood your description of the problem. > > Thanks Eric, Bill, I must have misunderstood, I was under the impression that running fsck on a device with a mounted file system would scan, but not actaully write anything, hence its reporting 'NO WRITE'. I'll reread the fsck manpage. Is running fsck -B /dev/ad8s1e safe, as I understand it, this creates a snapshot of the filesystem and scans that. Regards, Chris