Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
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;
}
}