dangerous situation with shutdown process

Kevin Oberman oberman at es.net
Fri Jul 15 21:03:21 GMT 2005


> Date: Fri, 15 Jul 2005 22:24:07 +0200
> From: Matthias Buelow <mkb at incubus.de>
> Sender: owner-freebsd-stable at freebsd.org
> 
> Wilko Bulte wrote:
> 
> ><sigh> Not If The Bloody PeeCee Style Crap ATA Drives Keep Lying To You..
> >Followups to /dev/null
> 
> Yes, makes no sense talking to a wall.

You are right, but I don't think you get who the wall is...

When you try to get an ATA drive to flush its buffers and tell you when
they are flushed, there is a hight probability that the drive (if it
support the function at all) will tell you that it has flushed the cache
immediately. 

There is simply no way to tell if your data or metadata is actually on
the magnetic medium and no technique (journaling, barriers, soft
updates) can assure that you will not have a corrupt disk, especially if
the write cache is near full. Think about how long it takes to flush a
16 MB buffer to the hard drive and remember that the dump of the cache
to the drive is in an order over which you have no control.

The ONLY way to be really safe is to turn off the write cache and that
extracts a huge performance penalty. What you prefer is a matter of
personal choice but the file system simply can't make things
better. 

I believe that the Windows solution to this problem is to put a really,
really long delay between when the system is finished syncing and when
the power is turned off. This might be the best solution for FreeBSD, as
well, but it will irritate people.
-- 
R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman at es.net			Phone: +1 510 486-8634


More information about the freebsd-stable mailing list