Implementation of corosync + drbd + pacemaker in the HA cluster of mysql Server

Source: Internet
Author: User
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. 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 for case application:

I. preparations:

Ii. install and configure DRBD

Iii. mysql installation and configuration

Iv. installation and configuration of corosync + pacemaker

V. Cluster Management

Detailed steps:

I. preparations:

1.1 modify the node1.magedu.com host name, IP address, and system time.



1.2 modify the host name, IP address, and system time of node2.magedu.com.



1.3 configure the hosts file and ssh key information on node1 and node2
This helps you directly operate on another node in the future.
1.3.1 modify the/etc/hosts file on node1


  • 1.3.1 modify the/etc/hosts file on node1


  • 1.3.3 configure ssh key information on node1

  • [Root @ node1 ~] # Ssh-keygen-t rsa # always enter Spaces
  • [Root @ node1 ~] # Root@node2.magedu.com for ssh-copy-id-I. ssh/id_rsa.pub

  • 1.3.4 configure ssh key information on node2

    1.4 download related software packages: (here I put the downloaded software package under/root/ha/. There are 18 website spaces)


    1.5 configure the local yum Database


    1.6 Add a disk on node1

    1.7 Add a disk on node2

    Ii. install and configure DRBD

    Perform the following operations on node1 and node2:

    The software package I downloaded is: (I put it under/root/ha)

    Drbd83-8.3.8-1.el5.centos.i386.rpm

    Kmod-drbd83-8.3.8-1.el5.centos.i686.rpm

    2.1 install the DRBD suite


    2.2 load the DRBD Module


    2.3 modify the configuration file

    When the drbd. conf configuration file is running, it reads a configuration file/etc/DRBD. conf. This file describes the ing between the drbd device and the hard disk partition.
    2.3.1 configure the following on node1.

    2.3.2 copy the configuration to node2:


    2.4 check the configuration file and create nfs resources.

    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.