1

I have a question / curiosity about split-brain on a Drbd Primary/Primary configuration. Supposing two nodes (hosts), host1 and host2 configured with Drbd Primary/Primary and two different shares (NFS, CIFS o iSCSI) of a replicated area (saying /drbd)

/drbd/file1.data
/drbd/file2.data

If a pool of client would access only by host1 share reading and wrinting only file1.data and another pool only by host2 share to file2.data, this scenario should avoid split brain situation in case of one node failure or it's just a conjecture?

The final purpose is load balance between the two nodes in normal condition and collapsing to one node only in case of failure.

Thank you!
Eddie

2 Answers 2

1

As long as you have one DRBD ressource in prim/prim mode and write to it from different nodes, you will have a split brain in case of a network failure.

Also, if /drbd is a normal (non-cluster) filesystem with just two subdirectories which are then shared on the two hosts, data corruption is guaranteed even in normal operation, as the local file systems are unaware that other machines are writing on their block device.

Creating a reliable HA/Load balancing installation is an advanced topic and highly dependent on what you want to achieve, but it will include some form of cluster management software, possibly a clustered file system and many other components.

2
  • Thank you SvenW, if I understood this is because there is no way to separate and predict which block will be written by a node even if belonging to two different files, is it right? Do you think could be any scenario/solution to obtain a load balancing in order to not have a secondary node doing nothing all the time (except syncing from the primary node, of course)?
    – Eddie C.
    Sep 10, 2012 at 16:12
  • Basically, yes, but there are more important problems in form of the file system metadata, which will be overwritten by the other machine if it has to change something in it's view of this metadata.
    – Sven
    Sep 10, 2012 at 16:16
1

I would say - it depends on the filesystem used.

With NFS you can not guarantee that writes go to different drbd-blocks (so "discard-zero-changes" will not help to recover from a split-brain).

But if you use a cluster-aware-filesystem (e.g. ocfs) on top, chances are higher that your data will not be corrupt afterwards - especially if you use different directory branches.

But in your scenario - I would use two separated devices in primary/secondary mode, using an ordinary ext3 file-system.

2
  • Thank you Nils, so for what is my understanding even if ocfs it would not be sure, just a chance. Yes I'm going now with Primary/Secondary + ext3 but I just have fault tollerancy and not load balancing. Thank you
    – Eddie C.
    Sep 17, 2012 at 16:23
  • @EddieC. from what I darkly remember from reading the ocfs-documentation it separates meta-data for directories. So in theory this could be "safe" in your setup - but I would not do it.
    – Nils
    Sep 19, 2012 at 13:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .