Heartbeat
(New page: Heartbeat is a daemon that handles all the failover in the cluster. For starters, see http://linux-ha.org/ . We are running Heartbeat V2. ==crm_resource== crm_resource is a command that...) |
|||
| Line 1: | Line 1: | ||
Heartbeat is a daemon that handles all the failover in the cluster. For starters, see http://linux-ha.org/ . We are running Heartbeat V2. | Heartbeat is a daemon that handles all the failover in the cluster. For starters, see http://linux-ha.org/ . We are running Heartbeat V2. | ||
| + | |||
| + | ==Basics== | ||
| + | Heartbeat works by managing resources on nodes. A node is a computer that runs stuff. A resource is any type of service that gets moved around. Examples of services include failover IP's, drbd disks (who is primary/secondary), filesystems (you use these to mount drbd stuff), and services. Resources are usually put into "Resource Groups". All the services in a resource group will be run on the same host, and they will be started/stopped sequentially. | ||
| + | |||
| + | There are also rules that help specify where services can be run. The most common is a "location" rule. | ||
==crm_resource== | ==crm_resource== | ||
| Line 19: | Line 24: | ||
* When configuring drbd stuff, use "drbddisk" instead of "drbd". The "drbd" resource is a V2 one that uses some complex master-slave stuff. Supposedly it can do cool stuff if it's set up correctly, but otherwise it's just confusing. "drbddisk" is much simpler and Just Works. | * When configuring drbd stuff, use "drbddisk" instead of "drbd". The "drbd" resource is a V2 one that uses some complex master-slave stuff. Supposedly it can do cool stuff if it's set up correctly, but otherwise it's just confusing. "drbddisk" is much simpler and Just Works. | ||
| − | [[Category: | + | [[Category:Sysadmin_Documentation]] |
Revision as of 00:14, 8 June 2008
Heartbeat is a daemon that handles all the failover in the cluster. For starters, see http://linux-ha.org/ . We are running Heartbeat V2.
Contents |
Basics
Heartbeat works by managing resources on nodes. A node is a computer that runs stuff. A resource is any type of service that gets moved around. Examples of services include failover IP's, drbd disks (who is primary/secondary), filesystems (you use these to mount drbd stuff), and services. Resources are usually put into "Resource Groups". All the services in a resource group will be run on the same host, and they will be started/stopped sequentially.
There are also rules that help specify where services can be run. The most common is a "location" rule.
crm_resource
crm_resource is a command that lets you manage resources in the cluster.
crm_resource -W -r <resource>
Tells you where the specified resource is running
crm_resource -M -r <resource> [-h host]
Migrates the specified resource off of its current host. If -h is specified, it moves it to that host. This adds a location constraint with a score of -INFINITY for the resource and its current host (translation: the resource will never be run on its current host again), so you probably want to run
crm_resource -U -r <resource>
to remove this rule.
hb_gui
hb_gui is a graphical interface to the heartbeat cluster. It's quite nice, and is also very useful for configuring services.
Notes
- The raw configuration file is in /var/lib/heartbeat/crm/cib.xml . Never edit this file by hand- use cibadmin to add stuff to it. Better yet, use the gui.
- When configuring drbd stuff, use "drbddisk" instead of "drbd". The "drbd" resource is a V2 one that uses some complex master-slave stuff. Supposedly it can do cool stuff if it's set up correctly, but otherwise it's just confusing. "drbddisk" is much simpler and Just Works.