Pacmaker can’t start the DRBD Error “not configured”

centos8drbdpacemaker

I´m setting up a 3 node DRBD Cluster with Pacemaker and corosync on CentOS 8.

I set up 3 IP resources, 1 apache webserver resource and now I want to set up my drbd resource.

The Drbd is working if it is started alone with systemctl and is working.

But if I create the resource with following command:

pcs resource create DRBD-1 ocf:linbit:drbd drbd_resource=drbd1 op monitor interval=1m role=Master op monitor interval=59s role=Slave

it will never start and stays stopped.

The log from pacemaker sais: Could not onnect to 'drbd' generic netlink family and <1> error creating netling socket

/var/log/messages sais:

 ERROR: drbd2: Called drbdadm -c /etc/drbd.conf down drbd2
 ERROR: drbd2: Exit code 20
 ERROR: drbd2: Command output:
 ERROR: drbd2: Called /usr/sbin/crm_master -l reboot -D
 ERROR: drbd2: Exit code 102
 ERROR: drbd2: Command output:
 notice: DRBD-2_stop_0:7360:stderr [ <1>error creating netlink socket ]
 Error connecting to the CIB manager: Transport endpoint is not connected

And I´m unsure about this line in /var/log/messages

 notice: DRBD-2_stop_0:7360:stderr [ /usr/lib/ocf/lib/heartbeat/ocf-shellfuncs: line 235: /var/log/pacemaker/pacemaker.log: Permission denied ]

Edit 1
If I´m creating the Master Slave Resource for the DRBD i will get following message from pacemaker:

    Starting resources on a cluster is (almost) always done by pacemaker and
    not directly from pcs.  If your resource isn't starting, it's usually
    due to either a misconfiguration of the resource (which you debug in
    the system log), or constraints preventing the resource from starting or
    the resource being disabled.  You can use 'pcs resource debug-start' to
    test resource configuration, but it should *not* normally be used to start 
resources in a cluster.

Best Answer

DRBD must be configured as a multi-state clone in Pacemaker, since it can be started in multiple states (Primary or Secondary).

In addition to the primitive you've defined, you will need to define the multi-state clone as follows:

pcs resource create DRBD-1 ocf:linbit:drbd drbd_resource=drbd1 op monitor interval=1m role=Master op monitor interval=59s role=Slave
pcs resource master ms-DRBD-1 DRBD-1 master-max=1 master-node-max=1 clone-max=3 clone-node-max=1 notify=true

The next bit, regarding Permission Denied, sounds like it might be SELinux related. Please check that you don't have DENIED entries in your /var/log/audit/audit.log, and if you do, try setting SELinux to permissive and see if that allows Pacemaker to manage DRBD:

setenforce 0
Related Topic