pacemaker_und_corosync
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| pacemaker_und_corosync [2017-04-20 06:33:53] – [Pacemaker 1 und Corosync 2 mit Ubuntu 14.04] manfred | pacemaker_und_corosync [2017-04-20 06:39:20] (aktuell) – [Pacemaker+Corosync] manfred | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| + | ====== Pacemaker und Corosync ====== | ||
| + | |||
| + | Aus // | ||
| + | 2008 wurde das bisherige // | ||
| + | |||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | |||
| + | __Diese Anleitung zeigt nur den ersten Schritt, | ||
| + | um ein Gefühl dafür zu bekommen. | ||
| + | Weitergehende Infos findet man hier:__ [[http:// | ||
| + | |||
| + | |||
| + | ===== Host-VM-System - Multicast-Einstellung ===== | ||
| + | |||
| + | Damit Pacemaker (auf den Gast-VM-Systemen) zwischen den Clusterknoten kommunizieren kann, müssen die BRIDGE-DEVs (hier **br1**) Multicast zulassen: | ||
| + | > echo 2 > / | ||
| + | > echo 1 >/ | ||
| + | |||
| + | zum Beispiel: | ||
| + | > vi / | ||
| + | < | ||
| + | #!/bin/bash | ||
| + | |||
| + | touch /forcefsck | ||
| + | echo 2 > / | ||
| + | echo 1 >/ | ||
| + | exit 0 | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Installation von Corosync und Pacemaker ===== | ||
| + | |||
| + | # aptitude install pacemaker corosync | ||
| + | |||
| + | Nach der Installation von Pacemaker: | ||
| + | # ln -s / | ||
| + | |||
| + | # update-rc.d -f drbd remove | ||
| + | |||
| + | |||
| + | ==== Corosync ==== | ||
| + | |||
| + | Corosync Multicast: 224.0.0.80: | ||
| + | |||
| + | |||
| + | === Ubuntu 10.04 === | ||
| + | |||
| + | |||
| + | == / | ||
| + | |||
| + | Bei mehreren " | ||
| + | interface { | ||
| + | # The following values need to be set based on your environment | ||
| + | ringnumber: 0 | ||
| + | # | ||
| + | bindnetaddr: | ||
| + | mcastaddr: 226.94.1.1 | ||
| + | mcastport: 5405 | ||
| + | } | ||
| + | |||
| + | |||
| + | === Ubuntu 12.04 === | ||
| + | |||
| + | |||
| + | == / | ||
| + | |||
| + | Bei mehreren " | ||
| + | interface { | ||
| + | # The following values need to be set based on your environment | ||
| + | ringnumber: 0 | ||
| + | # | ||
| + | bindnetaddr: | ||
| + | mcastaddr: 226.94.1.1 | ||
| + | mcastport: 5405 | ||
| + | } | ||
| + | |||
| + | " | ||
| + | service { | ||
| + | # Load the Pacemaker Cluster Resource Manager | ||
| + | ver: 1 | ||
| + | name: pacemaker | ||
| + | } | ||
| + | |||
| + | # / | ||
| + | |||
| + | |||
| + | === / | ||
| + | |||
| + | # start corosync at boot [yes|no] | ||
| + | START=yes | ||
| + | |||
| + | # / | ||
| + | |||
| + | |||
| + | ==== Pacemaker ==== | ||
| + | |||
| + | [[Pacemaker]] | ||
| + | |||
| + | |||
| + | ===== Pacemaker 1 und Corosync 1 mit Ubuntu 12.04 ===== | ||
| + | |||
| + | > corosync -v | ||
| + | Corosync Cluster Engine, version ' | ||
| + | Copyright (c) 2006-2009 Red Hat, Inc. | ||
| + | |||
| + | > pacemakerd --version | ||
| + | Pacemaker 1.1.6 | ||
| + | Written by Andrew Beekhof | ||
| + | |||
| + | ==== Pacemaker+Corosync ==== | ||
| + | |||
| + | <file bash / | ||
| + | # Please read the openais.conf.5 manual page | ||
| + | |||
| + | totem { | ||
| + | version: 2 | ||
| + | |||
| + | # How long before declaring a token lost (ms) | ||
| + | token: 3000 | ||
| + | |||
| + | # How many token retransmits before forming a new configuration | ||
| + | token_retransmits_before_loss_const: | ||
| + | |||
| + | # How long to wait for join messages in the membership protocol (ms) | ||
| + | join: 60 | ||
| + | |||
| + | # How long to wait for consensus to be achieved before starting a new round of membership configuration (ms) | ||
| + | consensus: 3600 | ||
| + | |||
| + | # Turn off the virtual synchrony filter | ||
| + | vsftype: none | ||
| + | |||
| + | # Number of messages that may be sent by one processor on receipt of the token | ||
| + | max_messages: | ||
| + | |||
| + | # Limit generated nodeids to 31-bits (positive signed integers) | ||
| + | clear_node_high_bit: | ||
| + | |||
| + | # Disable encryption | ||
| + | secauth: off | ||
| + | |||
| + | # How many threads to use for encryption/ | ||
| + | threads: 0 | ||
| + | |||
| + | # Optionally assign a fixed node id (integer) | ||
| + | # nodeid: 1234 | ||
| + | |||
| + | # This specifies the mode of redundant ring, which may be none, active, or passive. | ||
| + | rrp_mode: none | ||
| + | |||
| + | interface { | ||
| + | # The following values need to be set based on your environment | ||
| + | ringnumber: 0 | ||
| + | bindnetaddr: | ||
| + | mcastaddr: 226.94.1.1 | ||
| + | mcastport: 5410 | ||
| + | } | ||
| + | } | ||
| + | |||
| + | amf { | ||
| + | mode: disabled | ||
| + | } | ||
| + | |||
| + | service { | ||
| + | # Load the Pacemaker Cluster Resource Manager | ||
| + | ver: 0 | ||
| + | name: pacemaker | ||
| + | } | ||
| + | |||
| + | aisexec { | ||
| + | user: root | ||
| + | group: | ||
| + | } | ||
| + | |||
| + | logging { | ||
| + | fileline: off | ||
| + | to_stderr: yes | ||
| + | to_logfile: no | ||
| + | to_syslog: yes | ||
| + | syslog_facility: | ||
| + | debug: off | ||
| + | timestamp: on | ||
| + | logger_subsys { | ||
| + | subsys: AMF | ||
| + | debug: off | ||
| + | tags: enter|leave|trace1|trace2|trace3|trace4|trace6 | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | wenn hier '' | ||
| + | service { | ||
| + | # Load the Pacemaker Cluster Resource Manager | ||
| + | ver: 0 | ||
| + | name: pacemaker | ||
| + | } | ||
| + | |||
| + | Das bedeutet, dass der Dienst '' | ||
| + | > service pacemaker status | ||
| + | pacemakerd is stopped | ||
| + | | ||
| + | > ps alx | fgrep pacemaker | ||
| + | 0 0 38259 4094 20 | ||
| + | |||
| + | ...trotzdem wird der CRM-Monitor funktionieren: | ||
| + | > crm_mon -fr | ||
| + | ============ | ||
| + | Last updated: Thu Apr 20 08:21:11 2017 | ||
| + | Last change: Thu Apr 20 08:09:08 2017 via crmd on ttvdbgalera001 | ||
| + | Stack: openais | ||
| + | Current DC: ttvdbgalera002 - partition with quorum | ||
| + | Version: 1.1.6-9971ebba4494012a93c03b40a2c58ec0eb60f50c | ||
| + | 3 Nodes configured, 3 expected votes | ||
| + | 1 Resources configured. | ||
| + | ============ | ||
| + | | ||
| + | Online: [ ttvdbgalera002 ttvdbgalera003 ttvdbgalera001 ] | ||
| + | | ||
| + | Full list of resources: | ||
| + | | ||
| + | res_mysqlIP | ||
| + | | ||
| + | Migration summary: | ||
| + | * Node ttvdbgalera001: | ||
| + | * Node ttvdbgalera002: | ||
| + | * Node ttvdbgalera003: | ||
| + | |||
| + | |||
| + | <file bash crm configure show> | ||
| + | node ttvdbgalera001 \ | ||
| + | attributes standby=" | ||
| + | node ttvdbgalera002 \ | ||
| + | attributes standby=" | ||
| + | node ttvdbgalera003 \ | ||
| + | attributes standby=" | ||
| + | primitive res_mysqlIP ocf: | ||
| + | params ip=" | ||
| + | op start interval=" | ||
| + | op stop interval=" | ||
| + | op monitor interval=" | ||
| + | meta is-managed=" | ||
| + | property $id=" | ||
| + | dc-version=" | ||
| + | cluster-infrastructure=" | ||
| + | expected-quorum-votes=" | ||
| + | stonith-enabled=" | ||
| + | no-quorum-policy=" | ||
| + | last-lrm-refresh=" | ||
| + | maintenance-mode=" | ||
| + | rsc_defaults $id=" | ||
| + | resource-stickiness=" | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Pacemaker 1 und Corosync 2 mit Ubuntu 14.04 ===== | ||
| + | |||
| + | * [[http:// | ||
| + | |||
| + | |||
| + | Pacemaker muss nach Corosync gestartet werden und vor Corosync beendet werden!!! | ||
| + | > update-rc.d pacemaker start 20 2 3 4 5 . stop 00 0 1 6 . | ||
| + | |||
| + | |||
| + | damit Pacemaker mit Corosync komunizieren kann: | ||
| + | <file bash / | ||
| + | ... | ||
| + | service { | ||
| + | # Load the Pacemaker Cluster Resource Manager (5) | ||
| + | ver: 1 | ||
| + | name: pacemaker | ||
| + | } | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | |||
| + | <file bash / | ||
| + | uidgid { | ||
| + | uid: hacluster | ||
| + | gid: haclient | ||
| + | } | ||
| + | </ | ||
