[Pacemaker] stonith q
Digimer
lists at alteeve.ca
Sat Nov 1 23:49:16 CET 2014
On 01/11/14 06:27 PM, Alex Samad - Yieldbroker wrote:
> Hi
>
> 2 node cluster, running under vmware
>
> Centos 6.5
>
> pacemaker-libs-1.1.10-14.el6_5.3.x86_64
> pacemaker-cluster-libs-1.1.10-14.el6_5.3.x86_64
> pacemaker-cli-1.1.10-14.el6_5.3.x86_64
> pacemaker-1.1.10-14.el6_5.3.x86_64
>
>
> this is what I have in /etc/cluster/cluster.conf
>
> <fencedevices>
> <fencedevice agent="fence_pcmk" name="pcmk"/>
> </fencedevices>
>
>
> And pcs config
> stonith-enabled: false
>
> How do I configure stonith to do a os reboot if I want to use that.
>
> I found some suse documentation to a suicide drive
> http://doc.opensuse.org/products/draft/SLE-HA/SLE-ha-guide_sd_draft/cha.ha.fencing.html
>
> but I am guess that is something deprecated or suse specific
>
> Alex
In cman's cluster.conf, you configure the fence device 'fence_pcmk', as
you have. That is a dummy/hook fence agent that simply passes fence
requests up to pacemaker to actually perform. Pacemaker will then tell
cman whether the fence succeeded or failed.
To make sure you have cluster.conf configured properly, it should look
something like this;
====
ccs -f /etc/cluster/cluster.conf --createcluster an-anvil-04
ccs -f /etc/cluster/cluster.conf --setcman two_node="1" expected_votes="1"
ccs -f /etc/cluster/cluster.conf --addnode an-a04n01.alteeve.ca
ccs -f /etc/cluster/cluster.conf --addnode an-a04n02.alteeve.ca
ccs -f /etc/cluster/cluster.conf --addfencedev pcmk agent=fence_pcmk
ccs -f /etc/cluster/cluster.conf --addmethod pcmk-redirect
an-a04n01.alteeve.ca
ccs -f /etc/cluster/cluster.conf --addmethod pcmk-redirect
an-a04n02.alteeve.ca
ccs -f /etc/cluster/cluster.conf --addfenceinst pcmk
an-a04n01.alteeve.ca pcmk-redirect port=an-a04n01.alteeve.ca
ccs -f /etc/cluster/cluster.conf --addfenceinst pcmk
an-a04n02.alteeve.ca pcmk-redirect port=an-a04n02.alteeve.ca
ccs -f /etc/cluster/cluster.conf --setfencedaemon post_join_delay="30"
cat /etc/cluster/cluster.conf
====
<cluster config_version="10" name="an-anvil-04">
<fence_daemon post_join_delay="30"/>
<clusternodes>
<clusternode name="an-a04n01.alteeve.ca" nodeid="1">
<fence>
<method name="pcmk-redirect">
<device name="pcmk" port="an-a04n01.alteeve.ca"/>
</method>
</fence>
</clusternode>
<clusternode name="an-a04n02.alteeve.ca" nodeid="2">
<fence>
<method name="pcmk-redirect">
<device name="pcmk" port="an-a04n02.alteeve.ca"/>
</method>
</fence>
</clusternode>
</clusternodes>
<cman expected_votes="1" two_node="1"/>
<fencedevices>
<fencedevice agent="fence_pcmk" name="pcmk"/>
</fencedevices>
<rm>
<failoverdomains/>
<resources/>
</rm>
</cluster>
====
Then you move over to pacemaker and configure stonith there. How you do
this will vary a bit for your fence agent. I use IPMI fencing, which
looks like this:
====
pcs cluster cib stonith_cfg
pcs -f stonith_cfg stonith create fence_n01_ipmi fence_ipmilan
pcmk_host_list="an-a04n01.alteeve.ca" ipaddr="an-a04n01.ipmi"
action="reboot" login="admin" passwd="Initial1" delay=15 op monitor
interval=10s
pcs -f stonith_cfg stonith create fence_n02_ipmi fence_ipmilan
pcmk_host_list="an-a04n02.alteeve.ca" ipaddr="an-a04n02.ipmi"
action="reboot" login="admin" passwd="Initial1" op monitor interval=10s
pcs cluster cib-push stonith_cfg
pcs property set stonith-enabled=true
====
Hope this helps.
--
Digimer
Papers and Projects: https://alteeve.ca/w/
What if the cure for cancer is trapped in the mind of a person without
access to education?
More information about the Pacemaker
mailing list