[ClusterLabs] DRBD on asymmetric-cluster

Ken Gaillot kgaillot at redhat.com
Mon Apr 4 10:26:13 EDT 2016


On 04/02/2016 01:16 AM, Jason Voorhees wrote:
> Hello guys:
> 
> I've been recently reading "Pacemaker - Clusters from scratch" and
> working on a CentOS 7 system with pacemaker 1.1.13, corosync-2.3.4 and
> drbd84-utils-8.9.5.
> 
> The PDF instructs how to create a DRBD resource that seems to be
> automatically started due to a symmetric-cluster setup.
> 
> However I want to setup an asymmetric-cluster/opt-in
> (symmetric-cluster=false) but I don't know how to configure a
> constraint to prefer node1 over node2 to start my DRBD resource as
> Master (Primary).

I thought location constraints supported role, but that isn't
documented, so I'm not sure. But it is documented with regard to rules,
which using pcs might look like:

pcs location clusterdataClone rule \
  role=master \
  score=50 \
  '#uname' eq nodo1

For a lower-level explanation of rules, see
http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#idm140617356537136

> So far this are my resources and constraints:
> 
> [root at nodo1 ~]# pcs resource
>  IPService      (ocf::heartbeat:IPaddr2):       Started nodo1
>  Web    (systemd:httpd):        Started nodo1
>  Master/Slave Set: clusterdataClone [clusterdata]
>      Stopped: [ nodo1 nodo2 ]
> 
> [root at nodo1 ~]# pcs constraint
> Location Constraints:
>   Resource: IPService
>     Enabled on: nodo2 (score:50)
>     Enabled on: nodo1 (score:100)
>   Resource: Web
>     Enabled on: nodo2 (score:50)
>     Enabled on: nodo1 (score:100)
> Ordering Constraints:
>   start IPService then start Web (kind:Mandatory)
> Colocation Constraints:
>   Web with IPService (score:INFINITY)
> 
> My current DRBD status:
> 
> [root at nodo1 ~]# drbdadm role clusterdb
> 0: Failure: (127) Device minor not allocated
> additional info from kernel:
> unknown minor
> Command 'drbdsetup-84 role 0' terminated with exit code 10
> 
> 
> [root at nodo2 ~]# drbdadm role clusterdb
> 0: Failure: (127) Device minor not allocated
> additional info from kernel:
> unknown minor
> Command 'drbdsetup-84 role 0' terminated with exit code 10
> 
> 
> I know that it's possible to configure my cluster as asymmetric and
> use constraints to avoid a resource running (or becoming master) on
> certain nodes, but this time I would like to learn how to do it with
> an opt-in scenario.
> 
> Thanks in advance for your help.
> 
> P.D. nodo1 & nodo2 are spanish names for node1 and node2
> 
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://clusterlabs.org/mailman/listinfo/users
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
> 





More information about the Users mailing list