Long-Term Supported Versions

    Innovation Versions

      Installing and Deploying HA

      This chapter describes how to install and deploy an HA cluster.

      Installation and Deployment

      • Prepare the environment: At least two physical machines or VMs with openEuler 20.03 LTS SP3 installed are required. (This section uses two physical machines or VMs as an example.) For details about how to install openEuler 20.03 LTS SP3, see the openEuler 20.03 LTS SP3 Installation Guide.

      Modifying the Host Name and the /etc/hosts File

      • Note: You need to perform the following operations on both hosts. The following takes one host as an example.

      Before using the HA software, ensure that all host names have been changed and written into the /etc/hosts file.

      • Change the host name:
      hostnamectl set-hostname ha1
      • Edit the /etc/hosts file and write the following fields: ha1 ha2

      Configuring the Yum Repository

      After the system is successfully installed, the Yum source is configured by default. The file location is stored in the /etc/yum.repos.d/openEuler.repo file. The HA software package uses the following sources:


      Installing the HA Software Package Components

      yum install -y corosync pacemaker pcs fence-agents fence-virt corosync-qdevice sbd drbd drbd-utils

      Setting the hacluster User Password

      passwd hacluster

      Modifying the /etc/corosync/corosync.conf File

      totem {
              version: 2
              cluster_name: hacluster
               crypto_cipher: none
              crypto_hash: none
      logging {         
              fileline: off
              to_stderr: yes
              to_logfile: yes
              logfile: /var/log/cluster/corosync.log
              to_syslog: yes
              debug: on
             logger_subsys {
                     subsys: QUORUM
                     debug: on
      quorum {
                 provider: corosync_votequorum
                 expected_votes: 2
                 two_node: 1
      nodelist {
             node {
                     name: ha1
                     nodeid: 1
              node {
                     name: ha2
                     nodeid: 2

      Managing the Services

      Disabling the firewall

      systemctl stop firewalld

      Change the status of SELINUX in the /etc/selinux/config file to disabled.

      # SELINUX=disabled

      Restart the system to ensure that the SELINUX settings take effect.


      Managing the pcs service

      • Start the pcs service:
      systemctl start pcsd
      • Enable the pcs service to start upon system startup:
      systemctl enable pcsd
      • Query the pcs service status:
      systemctl status pcsd

      The service is started successfully if the following information is displayed:

      Managing the Pacemaker service

      • Start the Pacemaker service:
      systemctl start pacemaker
      • Query the Pacemaker service status:
      systemctl status pacemaker

      The service is started successfully if the following information is displayed:

      Managing the Corosync service

      • Start the Corosync service:
      systemctl start corosync
      • Query the Corosync service status:
      systemctl status corosync

      The service is started successfully if the following information is displayed:

      Performing Node Authentication

      • Note: Run this command on only one node. Authorize the user name and password oof each node using pcs.
      $ pcs host auth ha1 ha2
      Username: hacluster
      ha1: Authorized
      ha2: Authorized

      Accessing the Front-End Management Platform

      After the preceding services are started, open the browser (Chrome or Firefox is recommended) and enter https://localhost:2224 in the navigation bar.

      • This page is the native management platform.

      For details about how to install the management platform newly developed by the community, see https://gitee.com/openeuler/ha-api/blob/master/docs/build.md.

      • The following is the management platform newly developed by the community.

      • The next chapter describes how to quickly use an HA cluster and add an instance. For details, see the HA Usage Example.

      Bug Catching

      Buggy Content

      Bug Description

      Submit As Issue

      It's a little complicated....

      I'd like to ask someone.


      Just a small problem.

      I can fix it online!

      Bug Type
      Specifications and Common Mistakes

      ● Misspellings or punctuation mistakes;

      ● Incorrect links, empty cells, or wrong formats;

      ● Chinese characters in English context;

      ● Minor inconsistencies between the UI and descriptions;

      ● Low writing fluency that does not affect understanding;

      ● Incorrect version numbers, including software package names and version numbers on the UI.


      ● Incorrect or missing key steps;

      ● Missing prerequisites or precautions;

      ● Ambiguous figures, tables, or texts;

      ● Unclear logic, such as missing classifications, items, and steps.


      ● Technical principles, function descriptions, or specifications inconsistent with those of the software;

      ● Incorrect schematic or architecture diagrams;

      ● Incorrect commands or command parameters;

      ● Incorrect code;

      ● Commands inconsistent with the functions;

      ● Wrong screenshots.

      Risk Warnings

      ● Lack of risk warnings for operations that may damage the system or important data.

      Content Compliance

      ● Contents that may violate applicable laws and regulations or geo-cultural context-sensitive words and expressions;

      ● Copyright infringement.

      How satisfied are you with this document

      Not satisfied at all
      Very satisfied
      Click to create an issue. An issue template will be automatically generated based on your feedback.
      Bug Catching
      编组 3备份