This site best when viewed with a modern standards-compliant browser. We recommend Firefox Get Firefox!.

Linux-HA project logo
Providing Open Source High-Availability Software for Linux and other OSes since 1999.

USA Flag UK Flag

Japanese Flag

Homepage

About Us

Contact Us

Legal Info

How To Contribute

Security Issues

This web page is no longer maintained. Information presented here exists only to avoid breaking historical links.
The Project stays maintained, and lives on: see the Linux-HA Reference Documentation.
To get rid of this notice, you may want to browse the old wiki instead.

1 February 2010 Hearbeat 3.0.2 released see the Release Notes

18 January 2009 Pacemaker 1.0.7 released see the Release Notes

16 November 2009 LINBIT new Heartbeat Steward see the Announcement

Last site update:
2017-11-24 22:16:42

hb_standby

This is a simple shell script that issues a failover from the node where it is running to the other node, if available. It is useful to interface with an external resource monitor, such as mon or Nagios, or any home-made-monitor-script.

hb_standby is a script that allows manual control of which node is controlling what resources at a given time. When the "standby" option is provided to the Heartbeat init script, it calls hb_standby with the "all" option.

    usage: hb_standby [all|foreign|local|failback]

The full path is usually /usr/lib/heartbeat/hb_standby. To get a list of the options to hb_standby issue the command, "/usr/lib/heartbeat/hb_standby --help". NOTE: For historical reasons, unlike most scripts where failure to specify an option gives you the list of possible options, failure to provide an option to hb_standby is equivalent to "hb_standby all".

The meaning of the options is relative. For this sample haresources file (IMPORTANT: all resources for one node on one line):

nodea drbddisk::r0 Filesystem::/dev/drbd0::/local/groups::ext3 10.0.0.1 smb
nodeb drbddisk::r1 Filesystem::/dev/drbd1::/local/ldap::ext3 10.0.0.2 ldap

hb_standby local

When run on nodea, means migrate any resources that nodea is the preferred node for. In this case Samba would be shutdown, the IP address 10.0.0.1 would be released, /local/groups would be unmounted, /dev/drbd0 would be placed into secondary and nodeb would take all these services over.

When run on nodeb, OpenLDAP would shutdown, 10.0.0.2 would be released, /local/ldap would be unmounted, /dev/drbd1 would be placed into Secondary mode and nodea would take over all these services.

hb_standby foreign

When run on nodea, means migrate any resources that nodea is NOT the preferred node for. In this case OpenLDAP would shutdown, 10.0.0.2 would be released, /local/ldap would be unmounted, /dev/drbd1 would be placed into Secondary mode and nodeb would take over all these services.

When run on nodeb, Samba would be shutdown, the IP address 10.0.0.1 would be released, /local/groups would be unmounted, /dev/drbd0 would be placed into secondary and nodea would take all these services over.

hb_standby all

Regardless of which node it's run on means to release all resources so the other node takes over all resources.

hb_standby

Without an argument is the same as "hb_standby all"

hb_standby failback

Same as "hb_standby foreign"

See Also

haresources, hb_takeover, cl_status, mon, failback