HeartBeat manages and configures resources based on CRM

Source: Internet
Author: User

CRM: Cluster Resources Manager
Provides a basic platform for calling non-ha-ware applications
Generally, a high-availability service includes multiple resources. Multiple resources belonging to the same service must run on one node, by default, it is flat (after completing this experiment, I believe you will have some knowledge about the mechanism of Cluster Resource Nodes)

Configuration process: (here I will continue to use the environment in the previous section)
# Ssh node2 'service heartbeat stop'
# Service heartbeat stop
# Vim ha. cf
Mcast eth0 225.0.100.1 694 1 0
Crm respawn
# CRM and Resources are not compatible. If CRM is defined in ha. cf, the HA service will not read the/etc/ha. d/haresources configuration file. If you insist on using this configuration, it is fine. Let's take a look at its configuration method:
# Cd/usr/lib/heartbeat
#./Haresources2cib. py/etc/ha. d/haresources
Of course, here we will mainly introduce the crm configuration method.
#/Usr/lib/heartbeat/ha_propagate // copy the ha. cf & authkeys file of the current node to another node

View logs:
# Tail-f/var/log/messages
Info: update_dc: Set DC to node2.neo.com (2.0)
# Netstat-tnlp
Tcp 0 0 0.0.0.0: 5560 0.0.0.0: * LISTEN 4877/mgmtd
Now we can use various crm/cib command line tools
Below we configure the cluster service through heartbeat-gui
Because the heartbeat package's built-in account hacluster is required for GUI configuration, you need to set a password for it.
# Passwd hacluster
# Hb_gui

Note: In the configuration process, we first create a group and then create resources in sequence. We need to connect to the DC node for configuration. To see which node is DC, we can use crm_mon to check which node is DC.
Then test whether the browser can access node2, and then manually test to set node2 as standby to see if it can transfer the service to node1.

Add NFS shared storage to this resource

Note: Resource Nodes need to be created in order. If you cannot adjust the upper and lower order on the GUI, You need to delete the original resources and create a new one (because httpd and nfs are not on the same host, we must first start the file service and then start the httpd service), and remember to clear cache data when deleting resources. Otherwise, it may affect subsequent startup.

The above is created by group.

Recommended reading:

Heartbeat for Linux high availability (HA) Cluster Based on crm

Heartbeat + httpd + NFS for highly available Web Servers

Heartbeat for Linux high availability (HA) CLUSTERS

Heartbeat CRM configuration for Linux high availability solution

High-availability cluster Heartbeat v1 instance

LVS + heartbeat + ldirectord high-availability server Load balancer cluster Solution

  • 1
  • 2
  • Next Page

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.