lars.ellenberg at linbit
Apr 20, 2012, 5:06 AM
Post #2 of 2
On Fri, Apr 20, 2012 at 01:38:25PM +0200, Lukas Gradl wrote:
Re: disk-barriers - technical Background?
[In reply to]
> Could someone explain what disk-barriers are and how they work? Or
> is there any document on that topic that I did'nt find so far?
> I could find something about turning them on and off and played
> around with them - but nothing on what they really are...
If you don't have volatile write caches in your IO stack ("safe"),
all write caches are either non-existant, disabled,
or battery backed or equivalent,
then barriers may potentially cause performance degradation
(due to unnecessarily triggering cache flushes),
but most of the time not even that.
In any case, on such "safe" setups, barriers can safely be disabled.
If you DO have volatile write caches in your IO stack ("unsafe"),
like RAID controller cache and no batteries,
or the on-disk write caches are enabled,
barriers are essential to be able to do crash recovery
of file system or database journals, or other data
that needs to be stored in a crash safe way.
Barriers (or, FLUSH/FUA requests) are supposed to ensure
that the actual data is written to *stable* storage
before the corresponding commit block is written,
enforcing write-ordering where it matters.
If barriers are disabled on an "unsafe" setup,
hard crashes during IO load will cause data corruption.
DRBD internally uses barriers to ensure
its meta data transactions are on stable storage.
> software security networks
> Lukas Gradl <proxmox#ssn.at>
> Eduard-Bodem-Gasse 6
> A - 6020 Innsbruck
> Tel: +43-512-214040-0
> Fax: +43-512-214040-21
> drbd-user mailing list
> drbd-user [at] lists
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com
DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
please don't Cc me, but send to list -- I'm subscribed
drbd-user mailing list
drbd-user [at] lists