One, high availability principle
System availability = Average trouble-free time/(mean time to repair + average no downtime)
Improve system availability:
Reduced mean time to repair (redundancy mechanism)
Extended mean time-to-average trouble-free
Methods of improving system availability:
HA cluster:
Manually switch
Automatic switching
Cluster switching:
Failover: Failover
failback: Fix Transfer
Cluster resources:
Vip:float IP
Ipvs rules
Constraint type:
Position constraint (location)
Permutation constraints (colocation)
Sequential constraint (order)
Solution:
Vrrp+script:keepalived
Ais:
Heartbeat
Corosync
Cman (Openais)
Type of service:
No Ha-aware
Ha-aware
Framework of HA:
Ha tiering
Messaging Layer: Basic transaction tier, delivering cluster transactions and heartbeat information
Providers: Heartbeat v1, V2, v3 corosync (OpenAIS) Cman (OpenAIS)
Crm:cluster Resource Manager
Provider: Heartbeat v1: Haresources with Resource Manager (Configuration Interface: Configuration file, file name also called haresources)
Heartbeat v2: Bring your own Resource Manager CRM (each node runs the CRMD process, configures the interface: command-line client Crmsh,gui client Hb-gui)
Heartbeat v3 = heartbeat + pacemaker + Cluster-glue
Packmaker:
Cli:crm (SuSE), PCs
Gui:hawk, LCMC, PACEMAKER-MGMT
Cman + Rgmanager:
Resource group Manager:failover Domain, node priority
To configure the interface:
Clustat, Cman_tool
Conga:luci+ricci
Lrm:local Resource Manager
Provided by CRM
Ra:resource Agent
Heartbeat legacy:heartbeat and traditional types, usually scripts in the/etc/ha.d/haresources.d/directory;
LSB:/etc/init.d/*
OCF (Open Cluster Framework):
Provider
STONITH:
Quorum: Statutory number of votes (more than half of the total number of votes)
In order to determine the cluster splitting scenario, some nodes can continue to run in cluster mode;
With quorum has legal votes, cluster normal
With out quorum no legal votes, the cluster has a brain fissure
Arbitration equipment:
Ping node
Ping Node Group
Quorum Disk:qdisk
Resource Isolation Mechanisms:
Node Level: STONITH
Power switch
Service Hardware Management Module
Resource level:
Stopped
Ignore
Freeze
Suicide
Second, the working model of a high-availability cluster for CentOS or RHEL systems:
CentOS 5:
Rhcs:cman+rgmanager
Choose a third-party scenario: Corosync+pacemaker, Heartbeat (v1 or v2), keepalived
CentOS 6:
Rhcs:cman+rgmanager
Corosync + Rgmanager
Cman + Pacemaker
Heartbeat v3 + Pacemaker
Keepalived
Third, the premise of configuring a Highly available cluster: (Take the heartbeat of two nodes as an example)
1. Time must be kept in sync
Using an NTP server
2. Nodes must have names to communicate with each other
Resolving node names
Edit the hostname that is used in the/etc/hosts cluster with the hostname ' uname-n ';
3. Ping node
Only the even-numbered nodes are required;
4, SSH key authentication for communication;
Linux HA Cluster Overview