Scott Marlowe wrote:
> On Mon, Mar 16, 2009 at 2:03 PM, Stefan Kaltenbrunner
> <stefan@kaltenbrunner.cc> wrote:
>> So in my understanding LVM is safe on disks that have write cache disabled
>> or "behave" as one (like a controller with a battery backed cache).
>> For storage with write caches it seems to be unsafe, even if the filesystem
>> supports barriers and it has them enabled (which I don't think all have)
>> which is basically what all of linux was not too long ago.
>
> I definitely didn't have this problem with SCSI drives directly
> attached to a machine under pgsql on ext2 back in the day (way back,
> like 5 to 10 years ago). IDE / PATA drives, on the other hand,
> definitely suffered with having write caches enabled.
I guess thats likely because most SCSI drives (at least back in the
days) had write caches turned off by default (whereas IDE drives had
them turned on).
The Linux kernel docs actually have some stuff on the barrier
implementation (
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=Documentation/block/barrier.txt;hb=HEAD)
which seems to explain some of the issues related to that.
Stefan