Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Mar 2007 02:48:46 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        David Cecil <david.cecil@nokia.com>
Cc:        freebsd-fs@FreeBSD.org, ext Kris Kennaway <kris@obsecurity.org>
Subject:   Re: FFS writes to read-only mount
Message-ID:  <20070316014846.GA3229@garage.freebsd.pl>
In-Reply-To: <45F9CBCC.7050006@nokia.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



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