This article briefly describes how to configure a Fence_vmware_soap type of stonith device (test-only learning) in Rhel 7 pacemaker.
Stonith is the abbreviation for Shoot-the-other-node-in-the-head, and it protects the data from corruption due to node anomalies or simultaneous access.
A node unresponsive does not mean that it does not have access to data, and if it wants to be sure that the data is secure, it needs to use Stonith to isolate the node to ensure that the data is properly accessed by the other nodes after the current node is offline.
Stonith can also be used in situations where the Cluster service cannot be stopped. In this case, the cluster can use Stonith to force the entire node offline and allow the service to be securely enabled on the other nodes.
Here's a quick introduction to configuring a Fence_vmware_soap type of stonith device in Rhel 7 pacemaker (how to configure VMware fencing using Fence_vmware_soap In Red Hat Enterprise Linux High Availability Add on).
Since the previously built Rhel system is on VMware Server, select the Fence_vmware_soap type of fencing agent to configure the Stonith device.
1. Confirm that the current cluster status is normal:
Supcs status
2. Confirm that all nodes have Fence_vmware_soap installed:
grep Fence_vmware_soap
3. View the relevant configuration parameters for the Fence_vmware_soap:
PCs Stonith describe Fence_vmware_soap
4. Verify that the current machine can obtain a list of machines on VMware via FENCE_VMWARE_SOAP:
Fence_vmware_soap--ip <your IP Address or Host name>--ssl--ssl-insecure--action list--username="&L T Your username>" --password="<your password>"grep RedHat
Note:
IP is the IP or hostname of VMware ESXi server or vcenter server;
username is the user name that is connected to VMware server;
password is the password for connecting to VMware server;
The last RedHat is to replace your own machine entry name.
5. Copy a CIB configuration:
PCs Cluster CIB Stonith_cfg
6. Create a new Stonith resource:
Pcs-f stonith_cfg stonith Create myvmwarefence fence_vmware_soap ipaddr=<your IP Address or Host name> ipport=443Ssl_insecure=1inet4_only=1 Login="<your User name>" passwd="<your password>"Action=reboot pcmk_host_map="rhel73bob1:1; Rhel73bob2:2"Pcmk_host_check=static-list pcmk_host_list="Rhel73bob1,rhel73bob2"power_wait=3OP Monitor interval=60s
7. Enable Stonith and enable the CIB configuration to take effect:
Pcs-f Stonith_cfg Property Set stonith-enabled=truePCs cluster CIB-push stonith_cfg
8. Review the status after the change:
PCs Stonith showpcs Status
The following simple test verifies the Stonith function, the process is as follows:
The first cluster state as follows, the resources are on the RHEL73BOB2, and the Stonith equipment runs on the RHEL73BOB1;
When the RHEL73BOB2 machine abnormal offline, the status as follows, all resources are automatically transferred to RHEL73BOB1;
When the RHEL73BOB2 machine is online again, the status is as follows, guess because the stonith has not been switched to complete, the File system resources on two nodes are open state (time is very short);
Finally when the RHEL73BOB2 machine is completely online, the status is as follows, the Stonith device automatically switches to RHEL73BOB2 and returns to normal state, ensuring that the file system resources are not started on two nodes.
For more information on Stonith configuration and details, please refer to:
RHEL 7-chapter 5. Fencing:configuring STONITH;
Pacemaker Clusters from Scratch;
Fencing and Stonith;
RHEL 6-chapter 4. Fencing:configuring STONITH.
[Original articles, reproduced please indicate the source, only for study purposes, if there are errors please leave a message, if the force please recommend, thank you support]
[Original: Http://www.cnblogs.com/lavender000/p/6895488.html, from forever-smoked]
How to Configure VMware fencing using Fence_vmware_soap in Rhel high Availability Add on (RHEL pacemaker configuration Stonith)