Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 May 2004 11:59:03 -0400
From:      Mikhail Teterin <mi+mx@aldan.algebra.com>
To:        Steve Byan <smb@egenera.com>
Cc:        current@freebsd.org
Subject:   Re: QMail and SoftUpdates
Message-ID:  <200405211159.03075@misha-mx.virtual-estates.net>
In-Reply-To: <7CE7075D-AB35-11D8-B0BF-000A957CD5B0@egenera.com>
References:  <20040517174836.GA983@frontfree.net> <200405201615.51539@misha-mx.virtual-estates.net> <7CE7075D-AB35-11D8-B0BF-000A957CD5B0@egenera.com>

next in thread | previous in thread | raw e-mail | index | archive | help
=On May 20, 2004, at 4:15 PM, Mikhail Teterin wrote:

=> =No. Unlike SCSI disks, ATA disks will toss their write-cache on a
=> =reset. When the system crashes and the BIOS starts rebooting, guess
=> =what it issues to the ATA disks? Yep, a reset.
=
=I checked with my BIOS source, and I got this wrong. After a crash, the
=BIOS is usually entered as a result of the crash-code (panic(), in the
=case of *BSD) invoking a hard reset by writing to the reset bit of I/O
=port 92. This causes a reset of the hardware, which includes the PCI
=bus and the ATA disks as well as the CPU.

So, you are saying, disks are reset _before_ rebooting? I thought, you
meant _during_ boot...

=> So with ATA write-cache =enabled, your filesystem is likely to be
=> toast after a crash, as well =as after a power failure.
=>
=> Is not this only of concern if the power is restored and the BIOS
=> resets the disks _before_ they flush their write caches? I'd expect
=> them to do that (the flushing) within seconds anyway, no?

=I'm confused by your reference to the restoration of power in your
=question. If you lose power to the whole system, then it's game over.
=Are you suggesting that the disks might be powered separately from the
=CPU and motherboard, and that the CPU might lose power and then regain
=it while the disks are still powered? I don't know of any systems that
=are designed that way.

Here are some examples of SATA-based external arrays:

http://store.sun.com/CMTemplate/CEServlet?process=SunStore&cmdViewProduct_CP&catid=114140

I'm sure, there are more.

=Yes, if the disks manage to win the race by flushing their write cache
=before the hard reset is issued by the crash code, then everything is
=fine. [...] I think the panic code quite soon after getting control,
=and the disks flush their write cache rather lazily, rather than
=eagerly.

Does not panic() wait 15 seconds after flushing buffers before
automaticly rebooting? Or may that not be enough either?

	-mi



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