<div dir="ltr">Looks like you are confusing the DRBD userland utilities with the kernel module version. Those two are using different version schemes, so 'drbdadm --version' should show you exactly which is the version of each component. The config must adapt on the kernel module version and _not_ on drbd-utils version.<div><br></div><div>Since you are using DRBD8 (kernel module) then you should have a look at the following section of its documentation for creating a 3 node setup..</div><div><br></div><div><a href="https://www.linbit.com/drbd-user-guide/users-guide-drbd-8-4/#s-three-nodes">https://www.linbit.com/drbd-user-guide/users-guide-drbd-8-4/#s-three-nodes</a></div><div><br></div><div>The config you are using now is for DRBD9, hence it won't work in your case (unless you install the DRBD9 kernel module).</div><div><br></div><div>G.<br><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 8 Aug 2020 at 08:07, K. de Jong <<a href="mailto:kees.dejong%2Blst@neobits.nl">kees.dejong+lst@neobits.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
<br>
<br>
I use (probably) DRBD 9.5.0, where stacked-on-top-of is deprecated, so<br>
based on this example I applied the mesh configuration: <br>
<a href="https://www.linbit.com/drbd-user-guide/drbd-guide-9_0-en/#s-drbdconf-conns" rel="noreferrer" target="_blank">https://www.linbit.com/drbd-user-guide/drbd-guide-9_0-en/#s-drbdconf-conns</a><br>
<br>
I created the following config:<br>
resource boinc {<br>
device /dev/drbd1;<br>
disk /dev/mapper/drbd-boinc;<br>
meta-disk internal;<br>
on rp1 {<br>
address ipv4 <a href="http://172.27.12.2:7788" rel="noreferrer" target="_blank">172.27.12.2:7788</a>;<br>
node-id 1;<br>
}<br>
on rp2 {<br>
address ipv4 <a href="http://172.27.12.3:7788" rel="noreferrer" target="_blank">172.27.12.3:7788</a>;<br>
node-id 2;<br>
}<br>
on rp3 {<br>
address ipv4 <a href="http://172.27.12.4:7788" rel="noreferrer" target="_blank">172.27.12.4:7788</a>;<br>
node-id 3;<br>
}<br>
connection-mesh {<br>
hosts rp1 rp2 rp3;<br>
net { protocol C; }<br>
}<br>
net {<br>
allow-two-primaries no;<br>
shared-secret "password";<br>
verify-alg sha256;<br>
cram-hmac-alg sha256;<br>
after-sb-0pri discard-zero-changes;<br>
after-sb-1pri discard-secondary;<br>
after-sb-2pri disconnect;<br>
rr-conflict disconnect;<br>
}<br>
handlers {<br>
split-brain "/usr/lib/drbd/notify-split-brain.sh root";<br>
out-of-sync "/usr/lib/drbd/notify-out-of-sync.sh root";<br>
}<br>
}<br>
<br>
<br>
But when I run `drbdadm create-md boinc`, I get the following error:<br>
<br>
drbd.d/boinc.res:9: Parse error: 'disk | device | address | meta-disk |<br>
flexible-meta-disk' expected,<br>
but got 'node-id'<br>
<br>
<br>
The exact version I "use":<br>
DRBDADM_BUILDTAG=GIT-hash:\ ee126652638328b55dc6bff47d07d6161ab768db\<br>
reproducible\ build\,\ 2018-07-16\ 17:52:47<br>
DRBDADM_API_VERSION=1<br>
DRBD_KERNEL_VERSION_CODE=0x08040b<br>
DRBDADM_VERSION_CODE=0x090500<br>
DRBDADM_VERSION=9.5.0<br>
<br>
<br>
I have been turning certain features on or off. If I remove the node-<br>
id <br>
lines, the error changes to:<br>
<br>
drbd.d/boinc.res:18: Parse error: 'protocol | on | disk | net | syncer<br>
| startup | handlers | ignore-on | stacked-on-top-of' expected,<br>
but got 'connection-mesh' (TK 282)<br>
<br>
<br>
It's almost as if I don't use 9.5.0, but some older version since these<br>
newer features are not recognized. I use Raspbian 10 (Debian Buster).<br>
According to this, the version is really 9.5.0: <br>
<a href="https://packages.debian.org/source/stable/drbd-utils" rel="noreferrer" target="_blank">https://packages.debian.org/source/stable/drbd-utils</a><br>
<br>
This corresponds with `apt show drbd-utils`. I also checked in a VM<br>
with a true Debian 10 installation (so, not Raspbian), the same package<br>
is available there.<br>
<br>
<br>
The strings command is also showing 9.5.0:<br>
# strings /sbin/drbdadm | grep 9.5<br>
Version: 9.5.0 (api:%d)<br>
9.5.0<br>
User-Agent: drbdadm/9.5.0 (%s; %s; %s; %s)<br>
<br>
<br>
So I can pretty sure conclude that I really use 9.5.0, right? But these<br>
options are not recognized. However, when I then also remove the mesh-<br>
connection configuration line, I see the following when I try any<br>
drbdadm command:<br>
<br>
/etc/drbd.d/boinc.res:2: in resource boinc:<br>
There are multiple host sections for the peer node.<br>
Use the --peer option to select which peer section to use.<br>
boinc: Invalid argument<br>
Command 'drbdsetup-84 new-resource boinc' terminated with exit code 20<br>
drbdadm: new-minor boinc: skipped due to earlier error<br>
<br>
<br>
There we can see the command `drbdsetup-84`, this makes absolutely no<br>
sense. I think it's a Debian thing.<br>
<br>
<br>
However, when I check the following, I also see that I "have" 9.5.0:<br>
<br>
# strings /lib/drbd/drbdadm-84 | grep -i version<br>
Version: 9.5.0 (api:%d)<br>
<br>
<br>
When I check the following I also see a warning that mixing major<br>
versions will not work. Did Debian mess up DRBD in Buster? Or is this<br>
normal and can I somehow use 9.5.0 features?<br>
<br>
# /lib/drbd/drbdadm-84 --version<br>
DRBD module version: 8.4.10<br>
userland version: 9.5.0<br>
mixing different major numbers will not work!<br>
DRBDADM_BUILDTAG=GIT-hash:\ ee126652638328b55dc6bff47d07d6161ab768db\<br>
reproducible\ build\,\ 2018-07-16\ 17:52:47<br>
DRBDADM_API_VERSION=1<br>
DRBD_KERNEL_VERSION_CODE=0x08040a<br>
DRBDADM_VERSION_CODE=0x090500<br>
DRBDADM_VERSION=9.5.0<br>
<br>
<br>
The DRBD kernel module has version 8.4.11. I checked on my RHEL8 VM,<br>
Debian 10 VM and Fedora workstation. There I see similar mix ups of<br>
these versions. So I guess, it's not that strange. But then I come back<br>
to my initial question, why doesn't my config work?<br>
_______________________________________________<br>
Star us on GITHUB: <a href="https://github.com/LINBIT" rel="noreferrer" target="_blank">https://github.com/LINBIT</a><br>
drbd-user mailing list<br>
<a href="mailto:drbd-user@lists.linbit.com" target="_blank">drbd-user@lists.linbit.com</a><br>
<a href="https://lists.linbit.com/mailman/listinfo/drbd-user" rel="noreferrer" target="_blank">https://lists.linbit.com/mailman/listinfo/drbd-user</a><br>
</blockquote></div>