From owner-freebsd-fs@FreeBSD.ORG Wed May 3 20:15:47 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A012F16A43C; Wed, 3 May 2006 20:15:47 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 19F0543D70; Wed, 3 May 2006 20:15:47 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id F14FB1A3C28; Wed, 3 May 2006 13:15:46 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 0449451F27; Wed, 3 May 2006 16:15:46 -0400 (EDT) Date: Wed, 3 May 2006 16:15:45 -0400 From: Kris Kennaway To: Pawel Jakub Dawidek Message-ID: <20060503201545.GA33457@xor.obsecurity.org> References: <20060502193900.GA94069@peter.osted.lan> <1541458526.20060503003229@merdin.com> <20060502221306.GD95348@xor.obsecurity.org> <44584421.3000807@cs.tu-berlin.de> <20060503072013.GA2926@xor.obsecurity.org> <18034.193.3.141.124.1146642890.squirrel@webmail7.pair.com> <20060503184408.GA31172@xor.obsecurity.org> <20060503200406.GF3335@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="a8Wt8u1KmwUX3Y2C" Content-Disposition: inline In-Reply-To: <20060503200406.GF3335@garage.freebsd.pl> User-Agent: Mutt/1.4.2.1i Cc: freebsd-fs@freebsd.org, Kris Kennaway Subject: Re: Stress testing the UFS2 filesystem 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: Wed, 03 May 2006 20:15:49 -0000 --a8Wt8u1KmwUX3Y2C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 03, 2006 at 10:04:06PM +0200, Pawel Jakub Dawidek wrote: > On Wed, May 03, 2006 at 02:44:08PM -0400, Kris Kennaway wrote: > +> Modulo modern disk hardware violating these assumptions anyway, bg > +> fsck more or less works as long as you only have "power failure" > +> shutdowns. > +>=20 > +> When your kernel panics instead (especially if it's a > +> filesystem-related panic), all bets are off. With its dying breath, > +> your kernel may decide to scribble all over your filesystem, causing > +> arbitrary damage to it. Many of these types of damage are not > +> "survivable", as you have demonstrated -- in fact the very existence > +> of fsck is proof that the kernel is not designed to handle arbitrary > +> damage at runtime. > +>=20 > +> So the moral is that if your kernel is panicking a lot, turn off bg > +> fsck or you'll probably hit other filesystem panics at runtime. > +>=20 > +> I don't think you can completely prevent this problem, but one thing > +> that may help would be for the kernel to attempt to write a marker to > +> the dump device when it panics, and if this marker is present at boot > +> time a fg fsck is forced. Of course the kernel will not always be > +> able to do this, but it should work most of the time (since crashdumps > +> usually work for most panics). >=20 > Actually my feelings are exactly opposite. When you have a panic (ok, > maybe not file system related), your system just stops, but disks write > cache is flushed (at least from what I tested). Per Peter's webpage (also my own experiences and those of others), further filesystem panics are very common after your system previously panics and you are running bg fsck. The panics stop after you force a fg fsck. Personally I usually disable bg fsck on all my machines because this problem hits me too often :-) Kris --a8Wt8u1KmwUX3Y2C Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEWQ9xWry0BWjoQKURAt5UAKDLAwfrclXacYQwvH/Lj/Vlf1aPbQCgwJx/ dIeAt6DrGe+dBN15bH+Z6vE= =1zvp -----END PGP SIGNATURE----- --a8Wt8u1KmwUX3Y2C--