Mailing List Archive

DRBD config settings for mesh configuration errors
Hi,



I use (probably) DRBD 9.5.0, where stacked-on-top-of is deprecated, so
based on this example I applied the mesh configuration:
https://www.linbit.com/drbd-user-guide/drbd-guide-9_0-en/#s-drbdconf-conns

I created the following config:
resource boinc {
device /dev/drbd1;
disk /dev/mapper/drbd-boinc;
meta-disk internal;
on rp1 {
address ipv4 172.27.12.2:7788;
node-id 1;
}
on rp2 {
address ipv4 172.27.12.3:7788;
node-id 2;
}
on rp3 {
address ipv4 172.27.12.4:7788;
node-id 3;
}
connection-mesh {
hosts rp1 rp2 rp3;
net { protocol C; }
}
net {
allow-two-primaries no;
shared-secret "password";
verify-alg sha256;
cram-hmac-alg sha256;
after-sb-0pri discard-zero-changes;
after-sb-1pri discard-secondary;
after-sb-2pri disconnect;
rr-conflict disconnect;
}
handlers {
split-brain "/usr/lib/drbd/notify-split-brain.sh root";
out-of-sync "/usr/lib/drbd/notify-out-of-sync.sh root";
}
}


But when I run `drbdadm create-md boinc`, I get the following error:

drbd.d/boinc.res:9: Parse error: 'disk | device | address | meta-disk |
flexible-meta-disk' expected,
but got 'node-id'


The exact version I "use":
DRBDADM_BUILDTAG=GIT-hash:\ ee126652638328b55dc6bff47d07d6161ab768db\
reproducible\ build\,\ 2018-07-16\ 17:52:47
DRBDADM_API_VERSION=1
DRBD_KERNEL_VERSION_CODE=0x08040b
DRBDADM_VERSION_CODE=0x090500
DRBDADM_VERSION=9.5.0


I have been turning certain features on or off. If I remove the node-
id
lines, the error changes to:

drbd.d/boinc.res:18: Parse error: 'protocol | on | disk | net | syncer
| startup | handlers | ignore-on | stacked-on-top-of' expected,
but got 'connection-mesh' (TK 282)


It's almost as if I don't use 9.5.0, but some older version since these
newer features are not recognized. I use Raspbian 10 (Debian Buster).
According to this, the version is really 9.5.0:
https://packages.debian.org/source/stable/drbd-utils

This corresponds with `apt show drbd-utils`. I also checked in a VM
with a true Debian 10 installation (so, not Raspbian), the same package
is available there.


The strings command is also showing 9.5.0:
# strings /sbin/drbdadm | grep 9.5
Version: 9.5.0 (api:%d)
9.5.0
User-Agent: drbdadm/9.5.0 (%s; %s; %s; %s)


So I can pretty sure conclude that I really use 9.5.0, right? But these
options are not recognized. However, when I then also remove the mesh-
connection configuration line, I see the following when I try any
drbdadm command:

/etc/drbd.d/boinc.res:2: in resource boinc:
There are multiple host sections for the peer node.
Use the --peer option to select which peer section to use.
boinc: Invalid argument
Command 'drbdsetup-84 new-resource boinc' terminated with exit code 20
drbdadm: new-minor boinc: skipped due to earlier error


There we can see the command `drbdsetup-84`, this makes absolutely no
sense. I think it's a Debian thing.


However, when I check the following, I also see that I "have" 9.5.0:

# strings /lib/drbd/drbdadm-84 | grep -i version
Version: 9.5.0 (api:%d)


When I check the following I also see a warning that mixing major
versions will not work. Did Debian mess up DRBD in Buster? Or is this
normal and can I somehow use 9.5.0 features?

# /lib/drbd/drbdadm-84 --version
DRBD module version: 8.4.10
userland version: 9.5.0
mixing different major numbers will not work!
DRBDADM_BUILDTAG=GIT-hash:\ ee126652638328b55dc6bff47d07d6161ab768db\
reproducible\ build\,\ 2018-07-16\ 17:52:47
DRBDADM_API_VERSION=1
DRBD_KERNEL_VERSION_CODE=0x08040a
DRBDADM_VERSION_CODE=0x090500
DRBDADM_VERSION=9.5.0


The DRBD kernel module has version 8.4.11. I checked on my RHEL8 VM,
Debian 10 VM and Fedora workstation. There I see similar mix ups of
these versions. So I guess, it's not that strange. But then I come back
to my initial question, why doesn't my config work?
Re: DRBD config settings for mesh configuration errors [ In reply to ]
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.

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..

https://www.linbit.com/drbd-user-guide/users-guide-drbd-8-4/#s-three-nodes

The config you are using now is for DRBD9, hence it won't work in your case
(unless you install the DRBD9 kernel module).

G.



On Sat, 8 Aug 2020 at 08:07, K. de Jong <kees.dejong+lst@neobits.nl> wrote:

> Hi,
>
>
>
> I use (probably) DRBD 9.5.0, where stacked-on-top-of is deprecated, so
> based on this example I applied the mesh configuration:
> https://www.linbit.com/drbd-user-guide/drbd-guide-9_0-en/#s-drbdconf-conns
>
> I created the following config:
> resource boinc {
> device /dev/drbd1;
> disk /dev/mapper/drbd-boinc;
> meta-disk internal;
> on rp1 {
> address ipv4 172.27.12.2:7788;
> node-id 1;
> }
> on rp2 {
> address ipv4 172.27.12.3:7788;
> node-id 2;
> }
> on rp3 {
> address ipv4 172.27.12.4:7788;
> node-id 3;
> }
> connection-mesh {
> hosts rp1 rp2 rp3;
> net { protocol C; }
> }
> net {
> allow-two-primaries no;
> shared-secret "password";
> verify-alg sha256;
> cram-hmac-alg sha256;
> after-sb-0pri discard-zero-changes;
> after-sb-1pri discard-secondary;
> after-sb-2pri disconnect;
> rr-conflict disconnect;
> }
> handlers {
> split-brain "/usr/lib/drbd/notify-split-brain.sh root";
> out-of-sync "/usr/lib/drbd/notify-out-of-sync.sh root";
> }
> }
>
>
> But when I run `drbdadm create-md boinc`, I get the following error:
>
> drbd.d/boinc.res:9: Parse error: 'disk | device | address | meta-disk |
> flexible-meta-disk' expected,
> but got 'node-id'
>
>
> The exact version I "use":
> DRBDADM_BUILDTAG=GIT-hash:\ ee126652638328b55dc6bff47d07d6161ab768db\
> reproducible\ build\,\ 2018-07-16\ 17:52:47
> DRBDADM_API_VERSION=1
> DRBD_KERNEL_VERSION_CODE=0x08040b
> DRBDADM_VERSION_CODE=0x090500
> DRBDADM_VERSION=9.5.0
>
>
> I have been turning certain features on or off. If I remove the node-
> id
> lines, the error changes to:
>
> drbd.d/boinc.res:18: Parse error: 'protocol | on | disk | net | syncer
> | startup | handlers | ignore-on | stacked-on-top-of' expected,
> but got 'connection-mesh' (TK 282)
>
>
> It's almost as if I don't use 9.5.0, but some older version since these
> newer features are not recognized. I use Raspbian 10 (Debian Buster).
> According to this, the version is really 9.5.0:
> https://packages.debian.org/source/stable/drbd-utils
>
> This corresponds with `apt show drbd-utils`. I also checked in a VM
> with a true Debian 10 installation (so, not Raspbian), the same package
> is available there.
>
>
> The strings command is also showing 9.5.0:
> # strings /sbin/drbdadm | grep 9.5
> Version: 9.5.0 (api:%d)
> 9.5.0
> User-Agent: drbdadm/9.5.0 (%s; %s; %s; %s)
>
>
> So I can pretty sure conclude that I really use 9.5.0, right? But these
> options are not recognized. However, when I then also remove the mesh-
> connection configuration line, I see the following when I try any
> drbdadm command:
>
> /etc/drbd.d/boinc.res:2: in resource boinc:
> There are multiple host sections for the peer node.
> Use the --peer option to select which peer section to use.
> boinc: Invalid argument
> Command 'drbdsetup-84 new-resource boinc' terminated with exit code 20
> drbdadm: new-minor boinc: skipped due to earlier error
>
>
> There we can see the command `drbdsetup-84`, this makes absolutely no
> sense. I think it's a Debian thing.
>
>
> However, when I check the following, I also see that I "have" 9.5.0:
>
> # strings /lib/drbd/drbdadm-84 | grep -i version
> Version: 9.5.0 (api:%d)
>
>
> When I check the following I also see a warning that mixing major
> versions will not work. Did Debian mess up DRBD in Buster? Or is this
> normal and can I somehow use 9.5.0 features?
>
> # /lib/drbd/drbdadm-84 --version
> DRBD module version: 8.4.10
> userland version: 9.5.0
> mixing different major numbers will not work!
> DRBDADM_BUILDTAG=GIT-hash:\ ee126652638328b55dc6bff47d07d6161ab768db\
> reproducible\ build\,\ 2018-07-16\ 17:52:47
> DRBDADM_API_VERSION=1
> DRBD_KERNEL_VERSION_CODE=0x08040a
> DRBDADM_VERSION_CODE=0x090500
> DRBDADM_VERSION=9.5.0
>
>
> The DRBD kernel module has version 8.4.11. I checked on my RHEL8 VM,
> Debian 10 VM and Fedora workstation. There I see similar mix ups of
> these versions. So I guess, it's not that strange. But then I come back
> to my initial question, why doesn't my config work?
> _______________________________________________
> Star us on GITHUB: https://github.com/LINBIT
> drbd-user mailing list
> drbd-user@lists.linbit.com
> https://lists.linbit.com/mailman/listinfo/drbd-user
>
Re: DRBD config settings for mesh configuration errors [ In reply to ]
For anyone finding this thread, here is an explanation:
https://github.com/LINBIT/drbd/issues/10