====== Heartbeat ====== Unter [[wpde>Heartbeat]] versteht man eine Netzwerkverbindung zwischen 2 (oder mehr) Clusternodes. Über diese Verbindung benachrichtigen sich die beiden Clusternodes gegenseitig, ob ihr jeweiliges Gegenstück noch betriebsbereit ist und seine Aufgaben noch erfüllen kann, also "am Leben" ist. Daher der Begriff "Heartbeat" (Herzschlag). Quelle: [[wpde>Heartbeat|Wikipedia]] ===== Links ===== * [[http://www.linux-ha.org/HeartbeatTutorials|Heartbeat Tutorials]] * [[http://www.linux-ha.org/Heartbeat|Heartbeat (Linux-HA (High-Availability Linux) project)]] * [[http://expertanswercenter.techtarget.com/eac/blog/0,295203,sid63_gci1194240,00.html?track=sy1&asrc=RSS_RSS-1_1|Heartbeat for failover service]] * [[http://www.linux-ha.org/_cache/HeartbeatTutorials__LinuxKongress-2006-tutorial.pdf|Linux-HA Release 2 Tutorial]] * [[http://www.doc-systems.de/downloads/kurzakten/linuxsicherheit/docs/Kurzakte%20Cluster%20mit%20Haertbeat.pdf|Heartbeat Kurzübersicht]] ===== Verwaltungstools ===== * [[http://www.linux-ha.org/GuiGuide|haclient]] - Graphical User Interface for configuring, controlling and monitoring cluster * [[http://www.linux-ha.org/v2/AdminTools|crmadmin]] - provide node related details * [[http://www.linux-ha.org/v2/AdminTools/cibadmin|cibadmin]] - allows the current configuration to be queried and modified * [[http://www.linux-ha.org/v2/AdminTools|crm_verify]] - checks a configuration is valid * [[http://www.linux-ha.org/v2/AdminTools|crm_mon]] - provides the current cluster status in text or HTML * [[http://www.linux-ha.org/v2/AdminTools/crm_resource|crm_resource]] - query and modify all things related to cluster resources/services * [[http://www.linux-ha.org/v2/AdminTools/crm_standby|crm_standby]] - control a node's standby status (ability to run resources) * [[http://www.linux-ha.org/cl_status|cl_status]] - provides low-level node-centric connectivity information. ===== Installation ===== aptitude install heartbeat-2 ===== Konfiguration ===== Für eine minimale Konfiguration brauchen wir im Ordner /etc/heartbeat bzw. in /etc/da.d - **ha.cf** * ha.cf aus der Datei /usr/share/doc/heartbeat-2/ha.cf.gz entpacken und anpassen * minimale Konfiguration:logfacility local0 node node1 node2 bcat eth0 falls ein cluster ressource manager((z. B. [[http://clusterlabs.org/|pacemaker]])) benutzt wird muss noch ''crm on'' angefügt werden. - **authkeys** * Inhalt: auth 1 1 sha1 geheimes_passwort * Rechte setzen: chmod 600 authkeys - **haresources** (:!: nicht nötig falls ''crm on'') aus der Datei /usr/share/doc/heartbeat-2/haresources.gz entpacken und anpassen. - die logfacility local0 sollte in eine Datei gehen! * Beispiel für syslog-ng: destination df_local0 { file("/var/log/local0.log"); }; filter f_local0 { facility(local0); }; log { source(s_all); filter(f_local0); destination(df_local0); }; * log-Datei rotieren lassen (logrotate): im Ordner ''/etc/logrotate.d/'' /var/log/ha.log { rotate 7 daily compress postrotate /etc/init.d/syslog-ng reload >/dev/null endscript }Der Eintrag kann auch schon automatisch vorgenommen worden sein. ===== Verwaltung ===== Mit dem grafischen Tool aus heartbeat-2-gui kann man sich mit Anruf von ''hb_gui'' zum Cluster verbinden. Vorher aber dem Benutzer hacluster ein Passwort setzen: passwd hacluster ===== crm_mon ===== Mit crm_mon kann man den aktuellen Status und die Verbindungsversuche zu des einzelnen nodes überwachen. Refresh in 11s... ============ Last updated: Mon Oct 13 18:09:57 2008 Current DC: xeon (d14e7b0d-33f1-4122-8ae7-2dfb66e48a76) 2 Nodes configured. 0 Resources configured. ============ Node: debfail (3e2ab484-b3a1-48e8-aeb5-d1bd66be8230): OFFLINE Node: xeon (d14e7b0d-33f1-4122-8ae7-2dfb66e48a76): online