How to Configure VMware fencing using fence

Source: Internet
Author: User
Tags vmware server

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 (see here for information on how to install the "class" SQL Server cluster feature on RHEL):
sudo supcs status

2. Confirm that all nodes have Fence_vmware_soap installed:
PCs Stonith List | 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= "<Your UserNa Me> "--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=443 s sl_insecure=1 inet4_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=3 op 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.