[DRBD-user] Pacemaker resource start failure in combination of drbd-utils-8.9.3 and drbd-8.4.6

Lars Ellenberg lars.ellenberg at linbit.com
Tue Jun 30 14:08:43 CEST 2015

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


On Tue, Jun 30, 2015 at 11:14:01AM +0200, Lars Ellenberg wrote:
> On Tue, Jun 30, 2015 at 05:57:17PM +0900, Hiroshi Fujishima wrote:
> > >>>>> In <20150630082043.GH7381 at soda.linbit> 
> > >>>>>	Lars Ellenberg <lars.ellenberg at linbit.com> wrote:
> > > On Tue, Jun 30, 2015 at 10:16:42AM +0200, Lars Ellenberg wrote:
> > > > On Tue, Jun 30, 2015 at 09:46:49AM +0900, Hiroshi Fujishima wrote:
> > > > > Hello
> > > > > 
> > > > > In combination of drbd-utils-8.9.3 and drbd-8.4.6, the following
> > > > > command failed to start drbd resource.
> > > > > 
> > > > > # systemctl stop pacemaker
> > > > > # rmmod drbd
> > > > > # systemctl start pacemaker
> > > > > 
> > > > > # crm_mon
> > > > > Failed actions:
> > > > >     res_drbd_r0_start_0 on sac-tkh-sv002 'unknown error' (1): call=7, status=complete, last-rc-change='Tue Jun 30 09:33:29 2015', queued=0ms, exec=67ms
> > > > > 
> > > > > Jun 30 09:33:29 sac-tkh-sv002 drbd(res_drbd_r0)[26761]: ERROR: r0: Called drbdadm -c /etc/drbd.conf syncer r0

Try this:

>From 07289b456d662379d36d964742ea71331933d1cb Mon Sep 17 00:00:00 2001
From: Lars Ellenberg <lars.ellenberg at linbit.com>
Date: Tue, 30 Jun 2015 11:51:41 +0200
Subject: [PATCH] drbd.ocf: fix drbd module version detection of unloaded
 module

---
 scripts/drbd.ocf | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/scripts/drbd.ocf b/scripts/drbd.ocf
index 0733a8d..e339841 100644
--- a/scripts/drbd.ocf
+++ b/scripts/drbd.ocf
@@ -926,6 +926,18 @@ drbd_validate_all () {
 	if VERSION="$($DRBDADM --version 2>/dev/null)"; then
 		eval $VERSION
 	fi
+	if (( $DRBD_KERNEL_VERSION_CODE == 0x0 )) ; then
+		# Maybe the DRBD module was not loaded (yet).
+		# I don't want to load the module here,
+		# maybe this is just a probe or stop.
+		# It will be loaded on "start", though.
+		# Instead, look at modinfo output.
+		# Newer drbdadm does this implicitly, but may reexec older
+		# drbdadm versions for compatibility reasons.
+		DRBD_KERNEL_VERSION_CODE=$(printf "0x%02x%02x%02x" $(
+			modinfo -F version drbd |
+			sed -ne 's/^\([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\).*$/\1 \2 \3/p'))
+	fi
 	if (( $DRBD_KERNEL_VERSION_CODE >= 0x080400 )); then
 		DRBD_HAS_MULTI_VOLUME=true
 	fi
-- 
1.9.1




More information about the drbd-user mailing list