[DRBD-user] Help with dual primary + ocfs2 for mounting on /home

jhonyl jhonyl at netscape.net
Sun Apr 26 01:37:37 CEST 2009

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


I have so far found that setting

wfc-timeout 60;

on startup{} allow the single node that was brought up to exit the 
waiting_for_connection state, and become primary.

I am now trying to mount it on boot on /mnt/home , so I have added a 
line to my fstab

/dev/drbd1      /mnt/home       ocfs2   _netdev         0       0

But it fails - from /var/log/boot:

Starting Oracle Cluster File System (OCFS2) mount.ocfs2: Device name 
specified was not found while opening device /dev/drbd1
Failed

I think that the drbd is still in the waiting_for_connection state when 
ocfs2 is trying to mount /dev/drbd1, and so it fails.

I need to find a way that the filesystem will be automatically mounted 
once the device /dev/drbd1 is available. And what to do on a 
after-sb-2pri.

TIA


-----Original Message-----
From: jhonyl <jhonyl at netscape.net>
To: drbd-user at lists.linbit.com
Sent: Sat, 25 Apr 2009 8:00 pm
Subject: [DRBD-user] Help with dual primary + ocfs2 for mounting on 
/home

Hi,

I am trying to share the /home dir between two nodes in a dual primary
fashion, using
drbd and ocfs2.

I must always have the /home dir available, so it need to load on boot,
and if
there is a problem like split-brain, it needs to reconnect and decide
one way
or another and make the sync upon reconnection, and all automatically.

So far I have got this far (see resource drbd.conf below) and my
problem with it
is that when I power on just one node, it comes up in the
Secondary/Unknown
state and is unmountable, and so no /home.

I know ' after-sb-2pri disconnect;' is not what I want, but I didn't
understand how to
do what I want - the options according to the manual page are:

after-sb-2pri policy

              possible policies are:

              disconnect
                     No automatic resynchronization, simply disconnect.

              violently-as0p
                      Always  take the decision of the after-sb-0pri
algorithm.
                      Even if that causes an erratic change  of  the
primary's
                      view of the data.  This is only useful if you use
a 1node
                      FS (i.e.  not OCFS2 or GFS) with the
allow-two-primaries
                      flag,  _AND_ if you really know what you are
doing.  This
                      is DANGEROUS and MAY CRASH YOUR MACHINE if you
have an FS
                     mounted on the primary node.

              call-pri-lost-after-sb
                       Call the "pri-lost-after-sb" helper program on 
one
of the
                      machines. This program is expected to reboot the
machine,
                     i.e. make it secondary.

So violently-as0p is not good since OCFS2, and that leaves
call-pri-lost-after-sb as only
option, yet I didn't find the doc for  call-pri-lost-after-sb and I
don't understand what it is,
yet.

TIA

Single node power on:
------------------------------
version: 8.0.14 (api:86/proto:86)
GIT-hash: bb447522fc9a87d0069b7e14f0234911ebdab0f7 build by
phil at fat-tyre, 2008-11-12 16:40:33

 1: cs:WFConnection st:Secondary/Unknown ds:UpToDate/DUnknown C r---
    ns:0 nr:0 dw:0 dr:0 al:0 bm:6 lo:0 pe:0 ua:0 ap:0
    resync: used:0/61 hits:0 misses:0 starving:0 dirty:0 changed:0
    act_log: used:0/127 hits:0 misses:0 starving:0 dirty:0 changed:0

>From drbd.conf
----------------------
resource Serverz_Home {
  protocol      C;
  startup {
        become-primary-on both;
  }
  handlers {
        split-brain "/usr/lib/drbd/notify-split-brain.sh me at mysite.com";
  }
  net {

    allow-two-primaries;

    after-sb-0pri discard-least-changes;

    after-sb-1pri discard-secondary;

    after-sb-2pri disconnect;

  }

  on Server1 {
  device        /dev/drbd1;
  disk          /dev/erver/home_LV;
  meta-disk internal;
   address 10.0.0.131:7789;
  }
  on Server2 {
  device        /dev/drbd1;
  disk          /dev/server/home_LV;
   meta-disk internal;
   address 10.0.0.132:7789;
  }
}


_______________________________________________
drbd-user mailing list
drbd-user at lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user





More information about the drbd-user mailing list