abclinuxu.cz AbcLinuxu.cz itbiz.cz ITBiz.cz HDmag.cz HDmag.cz abcprace.cz AbcPráce.cz
AbcLinuxu hledá autory!
Inzerujte na AbcPráce.cz od 950 Kč
Rozšířené hledání
×
    včera 22:33 | Nová verze

    Byla vydána beta verze openSUSE Leap 16. Ve výchozím nastavení s novým instalátorem Agama.

    Ladislav Hagara | Komentářů: 0
    včera 17:44 | Zajímavý článek

    Devadesátková hra Brány Skeldalu prošla portací a je dostupná na platformě Steam. Vyšel i parádní blog autora o portaci na moderní systémy a platformy včetně Linuxu.

    karkar | Komentářů: 0
    včera 12:11 | Humor

    Lidi dělají divné věci. Například spouští Linux v Excelu. Využít je emulátor RISC-V mini-rv32ima sestavený jako knihovna DLL, která je volaná z makra VBA (Visual Basic for Applications).

    Ladislav Hagara | Komentářů: 2
    včera 10:44 | IT novinky

    Revolut nabídne neomezený mobilní tarif za 12,50 eur (312 Kč). Aktuálně startuje ve Velké Británii a Německu.

    Ladislav Hagara | Komentářů: 22
    včera 09:55 | IT novinky

    Společnost Amazon miliardáře Jeffa Bezose vypustila na oběžnou dráhu první várku družic svého projektu Kuiper, který má z vesmíru poskytovat vysokorychlostní internetové připojení po celém světě a snažit se konkurovat nyní dominantnímu Starlinku nejbohatšího muže planety Elona Muska.

    Ladislav Hagara | Komentářů: 2
    včera 09:33 | IT novinky

    Poslední aktualizací začal model GPT-4o uživatelům příliš podlézat. OpenAI jej tak vrátila k předchozí verzi.

    Ladislav Hagara | Komentářů: 0
    včera 08:11 | Nová verze

    Google Chrome 136 byl prohlášen za stabilní. Nejnovější stabilní verze 136.0.7103.59 přináší řadu novinek z hlediska uživatelů i vývojářů. Podrobný přehled v poznámkách k vydání. Opraveno bylo 8 bezpečnostních chyb. Vylepšeny byly také nástroje pro vývojáře.

    Ladislav Hagara | Komentářů: 0
    29.4. 20:55 | Nová verze

    Homebrew (Wikipedie), správce balíčků pro macOS a od verze 2.0.0 také pro Linux, byl vydán ve verzi 4.5.0. Na stránce Homebrew Formulae lze procházet seznamem balíčků. K dispozici jsou také různé statistiky.

    Ladislav Hagara | Komentářů: 0
    29.4. 16:22 | Nová verze

    Byl vydán Mozilla Firefox 138.0. Přehled novinek v poznámkách k vydání a poznámkách k vydání pro vývojáře. Řešeny jsou rovněž bezpečnostní chyby. Nový Firefox 138 je již k dispozici také na Flathubu a Snapcraftu.

    Ladislav Hagara | Komentářů: 0
    29.4. 15:55 | Pozvánky

    Šestnáctý ročník ne-konference jOpenSpace se koná 3. – 5. října 2025 v Hotelu Antoň v Telči. Pro účast je potřeba vyplnit registrační formulář. Ne-konference neznamená, že se organizátorům nechce připravovat program, ale naopak dává prostor všem pozvaným, aby si program sami složili z toho nejzajímavějšího, čím se v poslední době zabývají nebo co je oslovilo. Obsah, který vytvářejí všichni účastníci, se skládá z desetiminutových

    … více »
    Zdenek H. | Komentářů: 2
    Jaký filesystém primárně používáte?
     (58%)
     (1%)
     (9%)
     (22%)
     (4%)
     (1%)
     (2%)
     (0%)
     (1%)
     (3%)
    Celkem 493 hlasů
     Komentářů: 19, poslední včera 11:32
    Rozcestník

    ATOL: Heartbeat

    29.6.2009 11:38 | Přečteno: 1307× | Linux

    Author: Pavel Piskač

    Heartbeat is part of the Linux-HA project, where HA means High Availability. Heartbeat is a daemon that provides cluster infrastructure (communication and membership) services to its clients. This allows clients to know about the presence (or disappearance!) of peer processes on other machines and to easily exchange messages with them.

    In order to be useful to users, the Heartbeat daemon needs to be combined with a cluster resource manager (CRM) which has the task of starting and stopping the services (IP addresses, web servers, etc) that cluster will make highly available.

    Heartbeat comes with a primitive resource manager, however it is only capable of managing 2 nodes and does not detect resource-level failures.

    A new resource manager which addressed these limitations and more was written for Heartbeat 2.0.0. However in 2007 the new resource manager was spun-off to become the Pacemaker project in order to better support additional cluster stacks (such as OpenAIS) and is no longer associated with the Linux-HA project.

    The current stable series of Heartbeat is 2.99.x and can be obtained for many platforms. Because of high portability, users can use this service on GNU/Linux, Solaris, OpenBSD, even on MacOS/X from time to time.

    What Heartbeat provides

    To be able to use Heartbeat on very wide systems, there is no fixed maximum number of nodes. Very small a simple clusters can be of course build using Heartbeat too. Each cluster has to have some resource monitoring which can automatically restart move resources to another node on failure.

    Another cluster automatic healing function is fencing mechanism. Fencing is the component of cluster project that cuts off access to a resource (hard disk, etc.) from a node in your cluster if it loses contact with the rest of the nodes in the cluster.

    The most effective way to do this is commonly known as STONITH, which is an acronym that stands for "Shoot The Other Node In The Head." In other words, it forces the system to power off or reboot. That might seem harsh to the uninitiated, but really it's a good thing. If a node that is not cooperating with the rest of the cluster can seriously damage the data unless it's forced off. So by fencing an errant node, we're actually protecting the data.

    Fencing is often accomplished with a network power switch, which is a power switch that can be controlled through the network. This is known as power fencing.

    Fencing can also be accomplished by cutting off access to the resource, such as using SCSI reservations. This is known as fabric fencing.

    For resource managing, there is sophisticated policy-based resource management, resource inter-dependencies and constraints. If your cluster has regular power peaks, you should use time-based rules allow for different policies depending on time, which add extra nodes in case of they are needed or it is able to decrease number of nodes in case the cluster does not need them.

    Each cluster can provide some special service or set of services. Developers prepared several resource scripts (for Apache, DB2, Oracle, PostgreSQL etc.) to make using these services easier.

    Some users prefer graphical user interface instead of editing text files. These user will welcome GUI for configuring, controlling and monitoring resources and nodes.

    How to configure your cluster

    First of all, you have to install Heartbeat. If you don't have some rare distribution, your repository should contain Heartbeat package. In other case, compiling source codes takes place. Examples how to install Heartbeat on Debian and CentOS.

    aptitude install heartbeat-2

    yum install heartbeat

    Compiling source codes can be said as rare and it is described in official documentation. There are created some directories during installation. The most important of them are

    /etc/ha.d
    and
    /usr/share/doc/heartbeat-???version???
    . In the first of them you will find almost nothing but configuration files should be there. Examples of these files are places in the second directory.

    Following configuration files are needed to make the cluster to work. We will start with the most important of them,

    ha.cf
    , this is the main configuration file where are set services and cluster behavior. Second configuration file is
    haresources
    , where are saved nodes with their resources. These resources move from machine to machine as nodes go down and come up in the cluster. The last of them is
    authkeys
    where is saved authentication information. For those who don't read manuals. There is a password which must be the same on all nodes in the cluster. Each file contains rich guide with examples with some regular configuration.

    The will not be mentioned any set of practical examples because they can be found in each configuration file. Moreover, there are lots of cluster types with many services and to be able to mention at least small part of them, it would be little book.

    Pacemaker

    Pacemaker makes use of your cluster infrastructure (either OpenAIS or Heartbeat) to stop, start and monitor the health of the services (aka. resources) you want the cluster to provide.

    It can do this for clusters of practically any size and comes with a powerful dependency model that allows the administrator to accurately express the relationships (both ordering and location) between the cluster resources.

    Its is also worth reiterating that Pacemaker is NOT a Fork of Heartbeat, as it seems to be a common misconception.

    Pacemaker uses configuration file which is saved in

    /var/lib/heartbeat/crm/cib.xml
    . This file can be created using following command

    /usr/lib/heartbeat/haresources2cib.py /etc/ha.d/haresources

    You should never edit this file by hand! This file is changed according to actual cluster state and you should only create it from

    haresources
    using
    haresources2cib.py
    . That's all you have to do with this file.

    Conclusion

    There are some advantages and disadvantages, I will try to describe the most important of them.

    To able to ensure, that the cluster is working properly, you can use init script to start, stop or restart the service. It will help you with finding out, how is the behavior of the whole cluster and its services if some of the nodes die.

    Human readable configuration files are very important for many administrators. There are many examples and documentation. But there is bad news for those who don't like xml configuration files, developers are planning to use them in the next version of Heartbeat.

    Heartbeat is wide-spread cluster application and there are many guides, user's experience and documentation on the Internet. Both newbie and expert will find solution of his problem.

    If you will use some wide-spread application (Apache, DB2, Oracle, PostgreSQL etc.), you can use prepared scripts for their management in cluster. If there is no official script, community certainly created something, what you can use.

    Not to be so optimistic, there are also some disadvantages. Heartbeat is not suitable for people who don't read manuals. There are many options whose function is not clear and the cluster will not work properly without knowledge of the right configuration. Because of some functions which were mentioned above, the first configuration can be a little bit difficult for newbie.

    The biggest disadvantage for me is changing configuration files from classic text files to xml. In my opinion it is not good choice but developers have another reason and they hopefully know what they do.

    Links

    http://linux-ha.org/

    http://clusterlabs.org/wiki/Main_Page

    http://en.wikipedia.org/wiki/Heartbeat_(program)

    http://sources.redhat.com/cluster/wiki/FAQ/Fencing

           

    Hodnocení: 60 %

            špatnédobré        

    Anketa

    How do you rate this article?
     (0 %)
     (79 %)
     (21 %)
    Celkem 19 hlasů

    Tiskni Sdílej: Linkuj Jaggni to Vybrali.sme.sk Google Del.icio.us Facebook

    Komentáře

    Vložit další komentář

    Michal Fecko avatar 29.6.2009 11:46 Michal Fecko | skóre: 31 | blog: Poznámkový blog
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat
    你為什麼把它寫在英語?
    AsciiWolf avatar 29.6.2009 11:58 AsciiWolf | skóre: 41 | blog: Blog
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat

    To musíš pod každým jeho článkem takhle trollovat?

    Proč by to nemělo být v angličtině? Jsme na technickém portálu a proto předpokládám (a nejen já), že většina lidí zde bude schopna přelouskat pár jednoduchých anglických vět.

    Možná autor tohoto blogpostu nepíše naprosto správně/spisovně anglicky, nicméně jeho blogposty jsou kvalitně a jednoduše napsány, takže to imho nemá problém přečíst i člověk se základy (technické) angličtiny.

    Pokud ti to opravdu dělá problém, tak se k tomu nevyjadřuj... ;-)

    29.6.2009 12:03 ATOL @ FI | skóre: 7 | blog: atol
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat

    Je to blog predmetu, takže od jedného autora je obvykle len jeden článok :)

    xxxs avatar 29.6.2009 20:06 xxxs | skóre: 25 | blog: vetvicky
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat

    mozno by si mal pred kazdym zapiskom nahodit male vysvetlenie v slovencine.

    30.6.2009 00:59 Marek 'marx' Grác | skóre: 21 | blog: Paralelný blog | Brno / Bratislava
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat

    To by asi dávalo zmysel a súčasne by bolo jasnejšie z akého predmetu to je.

    xxxs avatar 30.6.2009 22:17 xxxs | skóre: 25 | blog: vetvicky
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat

    ozaj, aka bola kofola?

    pools avatar 29.6.2009 18:32 pools | skóre: 19 | blog: Svědek Damdogův | Opava/Praha
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat

    中国是一个很好的语言

    Vivre libre ou mourir!
    AsciiWolf avatar 29.6.2009 12:00 AsciiWolf | skóre: 41 | blog: Blog
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat

    A navíc. Proč to píše anglicky, napsal Zde (do svého prvního blogpostu).

    29.6.2009 12:04 mimozemšťan
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat

    Já příští blog napíšu mimozemsky.

    =^..^= AmigaPower® avatar 29.6.2009 12:59 =^..^= AmigaPower® | skóre: 30 | blog: BLB | Praha
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat
    ...a já nizozemsky.
    Michal Fecko avatar 29.6.2009 13:11 Michal Fecko | skóre: 31 | blog: Poznámkový blog
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat
    A ja v činsštine :-)
    =^..^= AmigaPower® avatar 29.6.2009 13:12 =^..^= AmigaPower® | skóre: 30 | blog: BLB | Praha
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat
    ...a v jakém dialektu? ;-)
    29.6.2009 13:33 . | skóre: 8 | blog: ,
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat

    您好,我很高興,您知道如何中國 :-)

    30.6.2009 08:48 m-a
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat

    Aspon po slovensky keby to bolo spravne.

    29.6.2009 19:01 xindl | skóre: 2 | blog: SALAM_OLEJKUM
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat
    a já pičo v příšerné češtině ať se všichni poserete! :-)
    29.6.2009 13:32 . | skóre: 8 | blog: ,
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat
    =^..^= AmigaPower® avatar 29.6.2009 13:46 =^..^= AmigaPower® | skóre: 30 | blog: BLB | Praha
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat
    Já obrovský pinďour mít v ruka ráno dnes svůj! :-D
    stativ avatar 29.6.2009 19:48 stativ | skóre: 54 | blog: SlaNé roury
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat
    Mr Happy, I have a huge tangan di pagi hari ini! :-D
    Ať sežeru elfa i s chlupama!!! ljirkovsky.wordpress.com stativ.tk
    29.6.2009 21:11 . | skóre: 8 | blog: ,
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat

    ty máš kocourův pinďour?


    =^..^= AmigaPower® avatar 29.6.2009 21:31 =^..^= AmigaPower® | skóre: 30 | blog: BLB | Praha
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat
    Ty ne?! ;-)
    Michal Fecko avatar 29.6.2009 13:59 Michal Fecko | skóre: 31 | blog: Poznámkový blog
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat
    However in 2007 the new resource manager was spun-off to become the Pacemaker project in order to better support additional cluster stacks (such as OpenAIS) and is no longer associated with the Linux-HA project.
    preklad a la Google :-D
    Nicméně v roce 2007 nový zdroj manažera byl opředený-off, kterým se stal kardiostimulátorů projekt s cílem lépe podporovat další cluster komíny (např. OpenAIS) a již není spojena s Linux-HA projektu.
    Nikola Ciprich avatar 29.6.2009 13:36 Nikola Ciprich | skóre: 23 | blog: NiX_blog | Palkovice
    Rozbalit Rozbalit vše heartbeat vs openais/corosync
    If I can recommend, rather look at openais/corosync, as this is the stack of choice for future pacemaker development, not the heartbeat.
    Did you ever touch the starlight ? Dream for a thousand years? Have you ever seen the beauty Of a newborn century?
    hikikomori82 avatar 29.6.2009 14:37 hikikomori82 | skóre: 18 | blog: foobar | Košice
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat
    V ankete mi chyba moznost: I don't give a shit
    29.6.2009 16:27 Adam Rohac, Roznava
    Rozbalit Rozbalit vše Re: ATOL: Heartbeat

    English sucks! :-D

    Založit nové vláknoNahoru

    ISSN 1214-1267   www.czech-server.cz
    © 1999-2015 Nitemedia s. r. o. Všechna práva vyhrazena.