fence_virsh --how does it work?
Posted: 2015/02/02 19:24:04
Sorry if I'm being dim but I cannot figure out how this works. I have two clustered CentOS 7 VMs on the same KVM host and I need to configure STONITH for both VMs to complete the cluster. fence_virsh looks like the proper device to use, and it would seem that I need to create a single fence device (representing the KVM host) and add both VMs to it, so they can both kill the other if needs be, but the command to create the fence forces a 'port' setting, which means only a single VM can be added to the device.
This is what I end up with, which only includes one of the VMs in the stonith section. If I use the other VM, lb-1, in the port= setting, then only that one shows up. What am I missing here?
Thanks in advance
Code: Select all
pcs stonith create fence fence_virsh ipaddr=192.168.99.200 action=stop port=lb-2 login=root identity_file=/root/.ssh/id_rsa
Code: Select all
[root@lb-2 ~]# pcs status
Cluster name: lbs
Last updated: Mon Feb 2 19:09:28 2015
Last change: Mon Feb 2 19:09:22 2015 via cibadmin on lb-2
Stack: corosync
Current DC: lb-1 (1) - partition with quorum
Version: 1.1.10-32.el7_0.1-368c726
2 Nodes configured
2 Resources configured
Online: [ lb-1 lb-2 ]
Full list of resources:
fip1 (ocf::heartbeat:IPaddr2): Started lb-1
fence (stonith:fence_virsh): Started lb-2
PCSD Status:
lb-1: Online
lb-2: Online
Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled