pcs cluster cib stonith.xml
#pcs -f stonith.xml property show ... no-quorum-policy: ignore stonith-enabled: true ...
pcs -f stonith.xml property set stonith-enabled=true pcs -f stonith.xml property set no-quorum-policy=ignore
pcs stonith list
, and a full list of parameters is available by pcs stonith describe )
pcs -f stonith.xml stonith create node1.stonith fence_ipmilan ipaddr="node1.ipmi" passwd="xXx" login="xXx" action="reboot" method="cycle" pcmk_host_list="node1.eth" pcmk_host_check=static-list stonith-timeout=10s op monitor interval=10s pcs -f stonith.xml stonith create node2.stonith fence_ipmilan ipaddr="node2.ipmi" passwd="xXx" login="xXx" action="reboot" method="cycle" pcmk_host_list="node2.eth" pcmk_host_check=static-list stonith-timeout=10s op monitor interval=10s
ipaddr
and pcmk_host_list
. The first one talks about the IPMI interface at what address, and the second one - which nodes can be finished off with the created resource. pcs -f stonith.xml constraint location node1.stonith avoids node1.eth=INFINITY pcs -f stonith.xml constraint location node2.stonith avoids node2.eth=INFINITY
pcs cluster push cib stonith.xml
stonith_admin -t 20 --reboot node1.eth
# pcs status Online: [ node1.eth node2.eth ] Full list of resources: FS (ocf::heartbeat:Filesystem): Started node2.eth node1.stonith (stonith:fence_ipmilan): Started node2.eth node2.stonith (stonith:fence_ipmilan): Started node1.eth # pcs constraint location Location Constraints: Resource: node1.stonith Disabled on: node1.eth Resource: node2.stonith Disabled on: node2.eth # pcs property show no-quorum-policy: ignore stonith-enabled: true
Source: https://habr.com/ru/post/200348/
All Articles