[ClusterLabs] 2node cluster question

Andrei Borzenkov arvidjaar at gmail.com
Wed Aug 15 07:20:21 EDT 2018


On Wed, Aug 15, 2018 at 11:58 AM Stefan K <Shadow_7 at gmx.net> wrote:
>
> Hello,
>
> what is the 'best' 2-node cluster config?

There is no such thing :) Besides, your example does not include any
resource which means it does nothing useful.

> What I want, if it run on nodeA and nodeA goes in standby or shut down, everything must start at nodeB,

This requires working fencing (STONITH) to avoid split brain. Your
configuration requires STONITH but does not define any STONITH
resource so fail-over won't work.

> if nodeA comes back, everything must still run on nodeB.
>

This is controlled by resource configuration, usually stickiness attribute.

> pacemaker looks like:
>         have-watchdog=false \
>         dc-version=1.1.16-94ff4df \
>         cluster-infrastructure=corosync \
>         cluster-name=zfs-vmstorage \
>         no-quorum-policy=stop \
>         stonith-enabled=true \
>         last-lrm-refresh=1528814481
> rsc_defaults rsc_defaults-options: \
>         resource-stickiness=100
>
> and the corosync.config:
> totem {
>     version: 2
>     secauth: off
>     cluster_name: zfs-vmstorage
>     transport: udpu
>     rrp_mode: passive
> }
>
> nodelist {
>     node {
>         ring0_addr: zfs-serv3
>         ring1_addr: 192.168.251.1
>         nodeid: 1
>     }
>
>     node {
>         ring0_addr: zfs-serv4
>         ring1_addr: 192.168.251.2
>         nodeid: 2
>     }
> }
>
> quorum {
>     provider: corosync_votequorum
>     two_node: 1

This fakes quorum, meaning no-quorum-policy setting is not really
relevant - cluster will always have quorum, even if one node fails.

> }
>
> logging {
>     to_logfile: yes
>     logfile: /var/log/corosync/corosync.log
>     to_syslog: yes
> }
>
> thanks in advance
> and best regards
> Stefan
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> https://lists.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