From: Ron Mayer <rm_pg@cheapcomplexdevices.com>
To: Scott Lamb <slamb@slamb.org>
To: Joshua D. Drake <jd@commandprompt.com>
To: rm_pg@cheapcomplexdevices.com
Subject: Re: [PERFORM] Arguments Pro/Contra Software Raid
Date: Thu, 11 May 2006 13:04:16 -0700
Message-ID: <446398C0.4020104@cheapcomplexdevices.com> (raw)
In-Reply-To: <7779142C-B027-4C17-A67C-A7C220AADF80@slamb.org>
References: <e3pmkc$12mk$1@news.hub.org>
<473FC220-A52C-4954-81E9-A14ED33164C2@blighty.com>
<4460BA8B.7010600@commandprompt.com>
<4F853BBA-175C-4B3E-BAF4-AA34B80DF6EF@blighty.com>
<4460DED4.2090103@commandprompt.com>
<7779142C-B027-4C17-A67C-A7C220AADF80@slamb.org>
On May 9, 2006, at 11:26 AM, Joshua D. Drake wrote:
> Of course not, but which drives lie about sync that are SATA? Or more
> specifically SATA-II?
With older Linux drivers (before spring 2005, I think) - all of
them - since it seems the linux kernel didn't support the
write barriers needed to force the sync. It's not clear to
me how much of the SATA data loss is due to this driver issue
and how much is due to buggy drives themselves.
According to Jeff Garzik (the guy who wrote the SATA drivers
for Linux) [1]
"You need a vaguely recent 2.6.x kernel to support fsync(2)
and fdatasync(2) flushing your disk's write cache.
Previous 2.4.x and 2.6.x kernels would only flush the write
cache upon reboot, or if you used a custom app to issue
the 'flush cache' command directly to your disk.
Very recent 2.6.x kernels include write barrier support, which
flushes the write cache when the ext3 journal gets flushed to disk.
If your kernel doesn't flush the write cache, then obviously there
is a window where you can lose data. Welcome to the world of
write-back caching, circa 1990.
If you are stuck without a kernel that issues the FLUSH CACHE (IDE)
or SYNCHRONIZE CACHE (SCSI) command, it is trivial to write
a userspace utility that issues the command.
Jeff, the Linux SATA driver guy
"
I've wondered for a while if this driver issue is actually the
source of most of the fear around SATA drives. Note it appears
that with those old kernels you aren't that safe with SCSI either.
[1] in may 2005, http://hardware.slashdot.org/comments.pl?sid=149349&cid=12519114
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: rm_pg@cheapcomplexdevices.com, slamb@slamb.org, jd@commandprompt.com
Subject: Re: [PERFORM] Arguments Pro/Contra Software Raid
In-Reply-To: <446398C0.4020104@cheapcomplexdevices.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox