catastrophic recovery required

Matthias Andree matthias.andree at gmx.de
Sun Feb 20 13:35:39 CET 2005


"Pavel Kankovsky" <peak at argo.troja.mff.cuni.cz> writes:

> On Thu, 17 Feb 2005, Matthias Andree wrote:
>
>> - try to configure database page size to what the filesystem can write
>>   atomically (I posted a patch in response to Tom's post), 512 bytes is
>>   the value to use for regular hard disk drives, ATA as SCSI.
>
> This assumes the hardware guarantees atomicity of single sector write
> operations. To be honest, I would not trust the hardware (esp. current
> "modern" cheap commodity hardware) to provide such a guarantee, even with
> write cache disabled.

That's the nature of block devices, they cannot write data smaller than
block size atomically. In fact, they cannot write data smaller than
block size at all, but the cycle becomes read-modify_part-write.

Disabling the write cache guarantees that only one block can be lost in
power-off and defeats write ordering.

There IS however some hardware that claims to have disabled the write
cache when in fact it hasn't. On Linux mailing lists, there had been
some drives that had such firmware faults, losing data across shutdown
because the time between "sync" and BIOS powerdown was insufficient.

-- 
Matthias Andree



More information about the Bogofilter mailing list