[DRBD-user] I need a little help with drbd and pacemaker - node never promoted

Graham Smith gps1539 at gmail.com
Mon Apr 15 18:13:56 CEST 2019


Thanks for the reply
I'm just doing some basic testing and not using stonith, but I
understand why this is important. 
I rebuilt my setup from scratch and it worked the 2nd time. Not sure
what I got wrong, but I now have the basics working.

-----Original Message-----From: digimer <lists at alteeve.ca>To: Graham
Smith <gps1539 at gmail.com>, drbd-user at lists.linbit.comSubject: Re:
[DRBD-user] I need a little help with drbd and pacemaker - node never
promotedDate: Mon, 15 Apr 2019 11:24:36 -0400

  
    
  
  
    For one; Enable and test stonith in Pacemaker. When a node can be
      failed and fenced, then configure drbd to use fencing:
      resource-and-stonith; and set the {un,}fence-handler to
      crm-{un,}fence-peer.sh.
    digimer

    
    On 2019-04-12 11:51 p.m., Graham Smith
      wrote:

    
    
>       
>       Hi
>       
> 
>       
>       1st time user, trying to set up drbd with pacemaker for a
>         potental NFS server project. I've tried following 3 guides
> and I
>         can not get drbd and pacemaker to work together. And guidance
> is
>         gratefully received.
>       
> 
>       
>       Centos 7.5 on 2 nodes
>       uname -a
>       Linux node-1 3.10.0-957.10.1.el7.x86_64 #1 SMP Mon Mar 18
>         15:06:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
>       
> 
>       
>       I have drbd installed and initially it is syncing a disk
>         between 2 nodes (prior to pcs cluster)
>       drbdadm --version
>       DRBDADM_BUILDTAG=GIT-hash:\
>         d458166f5f4740625e5ff215f62366aca60ca37b\ build\ by\
>         mockbuild@\,\ 2018-11-03\ 14:14:44
>       DRBDADM_API_VERSION=2
>       DRBD_KERNEL_VERSION_CODE=0x090010
>       DRBD_KERNEL_VERSION=9.0.16
>       DRBDADM_VERSION_CODE=0x090600
>       DRBDADM_VERSION=9.6.0
>       
> 
>       
>       drbdadm status
>       drbd0 role:Primary
>         disk:UpToDate
>         node-2 role:Secondary
>           peer-disk:UpToDate
>       
> 
>       
>       So far so good
>       
> 
>       
>       cat /proc/drbd 
>       version: 9.0.16-1 (api:2/proto:86-114)
>       GIT-hash: ab9777dfeaf9d619acc9a5201bfcae8103e9529c build by
>         mockbuild@, 2018-11-03 13:54:24
>       Transports (api:16): tcp (9.0.16-1)
>       
> 
>       
>       # the output is different than I see in online guides (maybe
>         different in v9?). 
> https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html/Clusters_from_Scratch/_initialize_drbd.html
>       ---------
>       
>         [root at pcmk-1 ~]# cat /proc/drbdversion: 8.4.11-1
> (api:1/proto:86-101)GIT-hash:
> 66145a308421e9c124ec391a7848ac20203bb03c build by mockbuild@, 2018-
> 04-26 12:10:42
>  1: cs:WFConnection ro:Secondary/Unknown ds:Inconsistent/DUnknown C
> r----s    ns:0 nr:0 dw:0 dr:0 al:8 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f
> oos:524236
>         --------
>       
>       
> 
>       
>       When I create a PCS cluster and add drbd as a resource, I do
>         not get a node to become a master
>       
> 
>       
>       pcs -f drbd_cfg resource create NFSData ocf:linbit:drbd
>         drbd_resource=drbd0 op monitor interval=60
>       pcs -f drbd_cfg resource master NFSDataClone NFSData
>         master-max=1 master-node-max=1 clone-max=2 clone-node-max=1
>         notify=true
>       
> 
>       
>       pcs status
>       Cluster name: mycluster
>       Stack: corosync
>       Current DC: node-1 (version 1.1.19-8.el7_6.4-c3c624ea3d) -
>         partition with quorum
>       Last updated: Fri Apr 12 23:43:36 2019
>       Last change: Fri Apr 12 23:43:32 2019 by root via cibadmin on
>         node-1
>       
> 
>       
>       2 nodes configured
>       2 resources configured
>       
> 
>       
>       Online: [ node-1 node-2 ]
>       
> 
>       
>       Full list of resources:
>       
> 
>       
>        Master/Slave Set: NFSDataClone [NFSData]
>            Slaves: [ node-1 node-2 ]
>       
> 
>       
>       Daemon Status:
>         corosync: active/disabled
>         pacemaker: active/disabled
>         pcsd: active/enabled
>       
> 
>       
>       Here is the output of pcs config
>       
> 
>       
>       pcs config
>       Cluster Name: mycluster
>       Corosync Nodes:
>        node-1 node-2
>       Pacemaker Nodes:
>        node-1 node-2
>       
> 
>       
>       Resources:
>        Master: NFSDataClone
>         Meta Attrs: master-node-max=1 clone-max=2 notify=true
>         master-max=1 clone-node-max=1 
>         Resource: NFSData (class=ocf provider=linbit type=drbd)
>          Attributes: drbd_resource=drbd0
>          Operations: demote interval=0s timeout=90
>         (NFSData-demote-interval-0s)
>                      monitor interval=60s
>         (NFSData-monitor-interval-60s)
>                      notify interval=0s timeout=90
>         (NFSData-notify-interval-0s)
>                      promote interval=0s timeout=90
>         (NFSData-promote-interval-0s)
>                      reload interval=0s timeout=30
>         (NFSData-reload-interval-0s)
>                      start interval=0s timeout=240
>         (NFSData-start-interval-0s)
>                      stop interval=0s timeout=100
>         (NFSData-stop-interval-0s)
>       
> 
>       
>       Stonith Devices:
>       Fencing Levels:
>       
> 
>       
>       Location Constraints:
>       Ordering Constraints:
>       Colocation Constraints:
>       Ticket Constraints:
>       
> 
>       
>       Alerts:
>        No alerts defined
>       
> 
>       
>       Resources Defaults:
>        resource-stickiness: 100
>       Operations Defaults:
>        No defaults set
>       
> 
>       
>       Cluster Properties:
>        cluster-infrastructure: corosync
>        cluster-name: mycluster
>        dc-version: 1.1.19-8.el7_6.4-c3c624ea3d
>        default-resource-stickiness: INFINITY
>        have-watchdog: false
>        no-quorum-policy: ignore
>        stonith-enabled: false
>       
> 
>       
>       Quorum:
>         Options:
>       
> 
>       
>       ------
>       After creating the PCS cluster drbd now has no primary
>       drbdadm status
>       drbd0 role:Secondary
>         disk:UpToDate
>         node-2 role:Secondary
>           peer-disk:UpToDate
>       
> 
>       
>       --------
>       
> 
>       
>       I'm stumped on how to get this to work, are there better
>         guides, is this a know bug. Thanks in advance for any
> guidance.
>       
> 
>       
>       
> 
>       
>       
>           -- 
>           
> 
>           
>           best regards
>           
> 
>           
>           Graham
>         
>       
> 
>       
>       _______________________________________________drbd-user
> mailing listdrbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user
> 
>     

  


-- 
best regards


Graham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20190415/1bafeeaf/attachment-0001.htm>


More information about the drbd-user mailing list