Corosync and pacemaker implementation of the high availability of the difficulties in the CRM command, subcommand, more parameters, and so on, the following some common examples.One, CRM has two kinds of working methods
1, batch mode, which is to enter commands directly on the shell command line2, interactive mode (CRM (live) #) enters into Crmsh for interactive execution
Second, the order detailed
1, First ORDER subcommand
The code is
One: Experimental environment
Node
OS
Ip
Drbd_ip
DRBD with HDD
Vip
Web1
centos5.10
192.168.10.11
172.16.1.1
/dev/sdb
192.168.10.100
Web2
centos5.10
192.168.10.12
172.16.1.2
/dev/sdb
1. Where the two-node IP address is set as above:
2. Two nodes have been configured with mutual SSH trust and have done time synchronization
Two: Install related software (both nodes 1 and 2 are installed)
1. Insta
Tags: corosync pacemakerFirst, the environment introduction:Three are dual network cards:Openstack-control.example.com Openstack-controleth0:172.16.171.100eth1:10.1.1.100Openstack-nova.example.com Openstack-novaeth0:172.16.171.110eth1:10.1.1.110Openstack-neutron.example.com Openstack-neutroneth0:172.16.171.120eth1:10.1.1.120Second, Corosync and pacemaker configuration steps are as follows:1. Configure time zones and sync times2. Configure the cluster
one of the platforms:1. Set into primary:DRBDADM----Overwrite-data-of-peer primary drbdweb2. Format and MountMkfs.ext4/dev/drbd0Mkdir/drbdMount/dev/drbd0/drbd3. Create a file, uninstall it, and set it to secondaryTouch/drbd/somethingUmount/drbdDrbdadm Secondary DrbdwebUpgrade to primary on another platform to mount and see if there are any files that you just created:DRBDADM Primary DrbdwebDrbd-overviewMkdir/drbdMount/dev/drbd0/drbdLs/drbdAt this point, the DRBD experiment has been completed.He
1, two cenots7.0 server, I was built with a KVM virtual machine.2, parse the hosts file with each other3, turn off iptables and selinux,ssh open4, configure Yum source, install PACEMAKER,COROSYNC,DRBD5, configure DRBD, select Procoto C, copy mode, verify results6, configuration Corosync, CRM-based management VIP,FSSYSTEM,DRBD block device7, verify the result, can fail automatic switch.1,drbdaa eth0 9.111.222.59 eth1 192.168.100.59DRBDBB eth0 9.111.222
First, the preparatory workTo undertake the above: Corosync+pacemaker using CRMSH to build a highly available clusterII. MariaDB Server Configuration (NFS-based)NFS Server Preparation1. Prepare the LVM storage space in Nfsserver [[emailprotected]~]#fdisk/dev/sdbdevicecontains Neitheravaliddospartitiontable,norsun,sgiorosf disklabelBuildinganewDOSdisklabelwithdiskidentifier 0x61284c6a. changeswillremaininmemoryonly,untilyoudecideto Writethem. Afterthat
Tags: host server IP addressLab Environment:Two MARIADB servers 172.16.10.20 172.16.10.21fip:172.16.10.28MARIADB file storage share: 172.16.10.22Experiment Preparation:1, two node host name and corresponding IP address resolution service can work, and the host name of each node needs to be consistent with the results of the "uname-n" commandVim/etc/hosts
172.16.10.20 21.xuphoto.com 20xu
172.16.10.21 22.xuphoto.com 21xu
Node1:
# sed-i ' [email protected]\ (hostname=\). *@\[email protected] '
# HO
One: Experimental environment
node
os
ip
san_ip
VIP
node1
rhel 6.5
192.168.10.11
172.16.1.1
192.168.10.100
node2
Rhel 6.5
192.168.10.12
172.16.1.2
san
rhel 6.5
172.16.1.3
/table>
Note:The concept of 1.corosync and pacemaker is not said here, there is a lot of information on the In
High Availability of servers through HA, that is, high availability cluster of mysql servers through corosync + drbd + pacemaker. Main steps to implement the case application: 1. Preparations: 2. install and configure DRBD. 3. mysq
High Availability of servers through HA, that is, high availability cluster of mysql servers through corosync + drbd + pacemaker. Main steps to implement the case application: 1.
Ansible + Corosync + Pacemaker + NFS for http High Availability
Directory:
(1) experiment environment(2) Preparations(3) Configure basic configurations for node1 and node2(4) deploying nfs using ansible(5) deploying corosync and pacemaker using ansible(6) Use ansible to install the crmsh Tool(7) Use crmsh to configure http High Availability(8) Verification(9) Notes
(1) experiment environment1.1 environment
The search algorithm for the Niang, as well as the bidding rankings, I just want to say that I bought a watch last year.
One, MySQL replication master configuration
Please refer to: MySQL replication master (master-slave) Sync http://www.111cn.net/database/mysql/83904.htm
Second, Corosync pacemaker installation configuration
Please refer to: Corosync pacemaker Nginx High-availability installation configurat
After MySQL migrated to Azure, due to the nature of the cloud, the method of ha in the self-built data center of MySQL could not be deployed much on the cloud.This is mainly because the public cloud currently does not support: 1. shared storage; 2. Multicast;3. Vip.
Shared storage, the Azure file service can partially resolve this issue, but given the performance issues, this scenario does not use File service;
The main reason for multicast is that the cluster software needs multica
First, install the heartbeat.Ha premise: 1, time synchronization; 2, SSH dual-machine mutual trust; 3, host name to be consistent with uname-n, and through/etc/hosts resolution; rpm-ivhepel-release-6-8.noarch.rpm #配置epel的源: yum-yinstallheartbeatcp/usr/share/doc/heartbeat-3.0.4/{ Authkeys,ha.cf,haresources}/etc/ha.d/Three configuration files: 1, key file, 600,/etc/ha.d/authkeys2, heartbeat configuration configuration of the service/etc/ HA.D/HA.CF3, resource management configuration file/etc/ha.
node2
192.168.3.20.node2Modify/etc/ha. d/ha. cf to add the node to the file, and modify the specific configuration node as needed:Keepalive 2Deadtime 20Inittime 120Udpport 694Bcast eth0 (your broadcast Nic, usually eth0)Auto_failback onNode node1Node node2Modify/etc/ha. d/authkeys to modify the encryption mode:Auth 11 crcModify the/etc/ha. d/authkeys attribute to 600.Modify/etc/ha. d/haresources to add an ip address for automatic drift processing:
Node1 Ipaddr: 192.168.3.169/24/eth0 mysql httpd
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
1. Preparation before installation High-availability clusters generally need to configure time synchronization, based on host name Mutual communication, SSH mutual trust communication, Corosync Pacemaker only need to configure time synchronization, based on host name to communicate with each other: yuminstallchrony #安装chronyvim /etc/chrony.confserver172.16.0.1iburst #设置为可用的ntp服务器systemctl restartchronyd #启动服务vim /etc/ hosts #将hosts文件分发给每个节点 172.16
managing master-slave DRBD hosts. The main use of drbdadm, because it more in line with the user's habits. Drbdsetup and Drbdmeta are less used as they are closer to the underlying device.DRBD's working features: real-time, transparent, set data synchronization typeThere are three types of data synchronization:A: Asynchronous, good performance, poor reliabilityB: Semi-synchronous performance reliability TradeoffC: Good synchronization reliability, poor performanceResource type for DRBD:Resource
Lab Environment:Virtual Machine 2 installs Corosync+pacemaker, the operating system used is CentOS6.5.Virtual Machine ip:172.16.103.2, 172.16.103.3Experimental steps:Prerequisite Preparation: Two virtual machine time synchronization, can use/etc/hosts file based on host name to communicate.First, install Corosync + pacemaker:# yum Install corosync# yum install pacemakerSecond, install the DRBD package:The D
DBRD can achieve data synchronization, DRBD is generally a master from, all read and write operations, Mount can only be performed on the master node. DRBD Master node can be swapped.The Corosync+pacemaker implementation of the DRBD master-slave point can be automatically switched to the slave node, and the failover continues to provide service.MySQL data can therefore be placed on a DRBD block.DRBD:DRBD: (Distributed replication block device) is a di
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.