[DRBD-user] database on drbd

Lars Ellenberg Lars.Ellenberg at linbit.com
Fri Mar 5 21:49:18 CET 2004


/ 2004-03-05 13:59:53 -0600
\ Curtis Tiffany:
> >> Can i club any database with drbd? , can i use "rawdevices" in
> >>drbd to avoid any database inconsistency.
> >
> >
> >What do you mean with "inconsistency" here?
> >
> >Yes, you can.
> >With drbd 0.6.X with the restriction that it should not change the
> >logical block size too often (best: not at all).
> >The drbd is basically just an other block device.
> 
> I'm not sure if this is what he means, but I've assumed that you can not 
> prevent data inconsistencies in databases mirrored by drbd.
> 
> For instance,
> You have an atomic transaction that completes on the primary node that 
> writes to multiple blocks
> While replicating the changes on the secondary, the primary fails
> 
> The database on the secondary, which may become the primary, will have 
> inconsistent data, right?

As long as you use protocol "C", this is NOT true.

If some user (file system, database, any program) wants to
complete a "transaction", it should make sure that whatever was
modified is on stable storage.
To do so typically (f)sync is used.
With protocol "C" in connected mode, this completes only
*after* sync completed on *both*, active AND passive node.

So no, any application that is able to cope with a power outage on
a standalone box is able to cope with failure of the active node.

Only the "reboot" is faster ...

	Lars Ellenberg



More information about the drbd-user mailing list