Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

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.

share|improve this answer
    
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 '12 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. –  SvW Sep 10 '12 at 16:16
add comment

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.

share|improve this answer
    
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 '12 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 '12 at 13:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.