From owner-freebsd-fs@FreeBSD.ORG Fri Mar 16 01:48:59 2007 Return-Path: X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6A66016A406 for ; Fri, 16 Mar 2007 01:48:59 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id 0616813C44C for ; Fri, 16 Mar 2007 01:48:58 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 4156C4569A; Fri, 16 Mar 2007 02:48:57 +0100 (CET) Received: from localhost (154.81.datacomsa.pl [195.34.81.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id EB49345684; Fri, 16 Mar 2007 02:48:51 +0100 (CET) Date: Fri, 16 Mar 2007 02:48:46 +0100 From: Pawel Jakub Dawidek To: David Cecil Message-ID: <20070316014846.GA3229@garage.freebsd.pl> References: <45F776AE.8090702@nokia.com> <20070314161041.GI7847@garage.freebsd.pl> <45F8EE27.6070208@nokia.com> <20070315090031.GB80993@deviant.kiev.zoral.com.ua> <20070315092659.GA14080@garage.freebsd.pl> <45F9C9B4.4030508@nokia.com> <20070315223641.GA89923@xor.obsecurity.org> <45F9CBCC.7050006@nokia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9amGYk9869ThD9tj" Content-Disposition: inline In-Reply-To: <45F9CBCC.7050006@nokia.com> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-fs@FreeBSD.org, ext Kris Kennaway Subject: Re: FFS writes to read-only mount X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2007 01:48:59 -0000 --9amGYk9869ThD9tj Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 16, 2007 at 08:42:20AM +1000, David Cecil wrote: >=20 > >>It may be that snapshots are used, but not explicitly. The startup scr= ipts attempt to run fsck in the background, which would normally require a = snapshot, but shouldn't=20 > >>for a read-only mount, right? > >> =20 > > > >What happens if the filesystem is marked dirty, background fsck is > >enabled, but the filesystem is mounted read-only? > > =20 >=20 > Yeah, I was wondering the same thing Kris. In fact, that was one of my f= irst suspects when I started looking at this problem. >=20 > I had eliminated it because fstat (and ps in ddb) doesn't show fsck runni= ng, or the raw device open for writing. Maybe fsck had already closed the = descriptor and exited=20 > but the write to disk (GEOM mirror) is still outstanding in the buffer ca= che? Is the offset always the same for this error you're seeing? Maybe some dirty buffer isn't flushed on disk properly and syncer retries syncing it every now and then. This would explain why you see it not only early after system was booted. Could you try disabling bgfsck, by setting background_fsck=3D"NO" to your /etc/rc.conf? I know that there is a hack for handling fsck of the root file system. Bascially once system is mounted read-only (the partition it resides on is opened read-only), it (the partition) can't be opened for write by anything else (because of how GEOM works). But there is an exception for the root partition, which is opened without exclusive bit at first time, which allows, eg. to boot system into single-user mode and run fsck - without this hack it won't be possible. So I'm wondering if this can be problematic if one use bgfsck for the root file system... --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --9amGYk9869ThD9tj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFF+fd+ForvXbEpPzQRAn/BAKCGo1RPKaZJtzkHKNfjk95TdN9H1gCglEWc j0ZlOhZp5EMC/AtubbQI7qA= =8rzM -----END PGP SIGNATURE----- --9amGYk9869ThD9tj--