[Pacemaker] configuration of stonith

Digimer lists at alteeve.ca
Fri Dec 6 11:19:44 EST 2013

On 06/12/13 10:57, Michael Schwartzkopff wrote:
> Am Freitag, 6. Dezember 2013, 16:49:32 schrieb Dvorak Andreas:
>> Dear all
>> I would like to configure stonith and found example like this: 
>> pcs cluster cib stonith_cfg pcs -f stonith_cfg stonith pcs -f
>> stonith_cfg stonith create impi-fencing fence_ipmilan 
>> pcmk_host_list="sv2836 sv2837" ipaddr= login=testuser
>> passwd=acd123 op monitor interval=60s pcs -f stonith_cfg property
>> set stonith-enabled=true pcs -f stonith_cfg property pcs cluster
>> push cib stonith_cfg
>> But I have two different ip addresses, one for each server, so I
>> do not know how to configure that. Can you please help me?
> Make two fencing resources and two location constraints the prevent
> the resources on the node that they can fence. Something like:
> primitive resourceFenceNode1 ... primitive resourceFenceNode2 ...
> location placeFenceNode1 -inf: node1 location placeFenceNode2 -inf:
> node2
> Mit freundlichen Grüßen,
> Michael Schwartzkopff

If you're using 1.1.10+,

pcs stonith create fence_pcmk1_ipmi fence_ipmilan \
    pcmk_host_list="pcmk-1" ipaddr="pcmk-1.ipmi" \
    action="reboot" login="admin" passwd="secret" delay=15 \
    op monitor interval=60s

pcs stonith create fence_pcmk2_ipmi fence_ipmilan \
    pcmk_host_list="pcmk-2" ipaddr="pcmk-2.ipmi" \
    action="reboot" login="admin" passwd="secret" delay=15 \
    op monitor interval=60s

is sufficient.

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