Product SiteDocumentation Site

D.2. Activarea Pacemaker

D.2.1. Pentru Corosync

The Corosync configuration is normally located in /etc/corosync/corosync.conf and an example for a machine with an address of 1.2.3.4 in a cluster communicating on port 1234 (without peer authentication and message encryption) is shown below.
Un exemplu de fişier de configurare al Corosync
  totem {
      version: 2
      secauth: off
      threads: 0
      interface {
          ringnumber: 0
          bindnetaddr: 1.2.3.4
          mcastaddr: 239.255.1.1
          mcastport: 1234
      }
  }
  logging {
      fileline: off
      to_syslog: yes
      syslog_facility: daemon
  }
  amf {
      mode: disabled
  }
Partea de loguri ar trebui să fie evidentă în cea mai mare parte şi secţiunea amf se referă la Availability Management Framework şi nu este acoperit în acest document.
The interesting part of the configuration is the totem section. This is where we define how the node can communicate with the rest of the cluster and what protocol version and options (including encryption [21] ) it should use. Beginners are encouraged to use the values shown and modify the interface section based on their network.
Este totodată posibilă configurarea Corosync pentru un mediu bazat pe IPV6. Pur şi simplu configuraţi bindnetaddr şi mcastaddr cu echivalentele IPV6 ale acestora. ex.
Exemple de opţiuni pentru un mediu IPV6
  bindnetaddr: fec0::1:a800:4ff:fe00:20
  mcastaddr: ff05::1
Pentru a îi spune Corosync-ului să folosească Pacemaker ca şi manager al clusterului, adăugaţi următorul fragment la o configuraţie funcţională de Corosync şi reporniţi clusterul.
Fragment de configurare pentru a activa Pacemaker sub Corosync
aisexec {
    user:  root
    group: root
}
service {
    name: pacemaker
    ver: 0
}
The cluster needs to be run as root so that its child processes (the lrmd in particular) have sufficient privileges to perform the actions requested of it. After all, a cluster manager that can’t add an IP address or start apache is of little use.
A doua directivă este cea care instruieşte de fapt clusterul să ruleze Pacemaker.


[21] Please consult the Corosync website (http://www.corosync.org/) and documentation for details on enabling encryption and peer authentication for the cluster.