[DRBD-user] Resync

Florian Haas florian.haas at linbit.com
Mon Apr 28 08:25:35 CEST 2008

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On Friday 25 April 2008 13:45:30 Guy wrote:
> Hi,
>
> I wanted to check exactly what drbd does when doing a resync. I'm
> using heartbeat with drbd8 and under certain conditions I think I'd
> lose data.
>
> I've got two drbd partitions with one being primary on each server and
> shared over NFS. If I lose the connection (crossover between the
> nodes) that drbd uses the nodes just keep running as they are.
> If node 1 loses connectivity to the LAN as well, it makes the primary
> partition secondary and node 2 takes over as primary for both
> partitions. But node 1 has changes that never reached node 2 before it
> starts being changed. Once the drbd connection is restored, will the
> changes on both nodes be synced or is the secondary overwritten by the
> new primary?

That would be an example of split brain, and by default DRBD would simply 
disconnect and wait for you to manually rectify the problem. Which is the 
recommended approach. The "automatic overwrite" scenario you describe would 
only occur if you had an automatic split brain recovery policy in place. See 
http://www.drbd.org/users-guide/s-auto-split-brain-recovery.html for details. 
Repeat, manual split brain recovery is the recommended approach.

> Since there's the --overwrite-peer-data option I'm wondering whether a
> normal sync goes both ways?

No, it doesn't.

> If it doesn't go both ways then I need to get heartbeat to do
> outdating and suchlike which it doesn't currently do. Unless drbd can
> do it itself, but I'm not sure it caters to doing so under the
> conditions I've got.

You can never expect DRBD as a block device to be able to do a merge 
on the file system level. DRBD does not know about the semantics of a file 
system (any file system), so any higher-layer merging is something that's 
completely outside DRBD's realm.

Cheers,
Florian

-- 
: Florian G. Haas
: LINBIT Information Technologies GmbH
: Vivenotgasse 48, A-1120 Vienna, Austria

When replying, there is no need to CC my personal address.
I monitor the list on a daily basis. Thank you.



More information about the drbd-user mailing list