Stress testing the UFS2 filesystem

Kris Kennaway kris at obsecurity.org
Wed May 3 20:15:49 UTC 2006


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.
> +> 
> +> 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.
> +> 
> +> 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.
> +> 
> +> 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).
> 
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20060503/fa06a716/attachment.pgp


More information about the freebsd-fs mailing list