<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<refentry id="re-hbstandby">
  <refentryinfo>
    <date>November 26, 2009</date>
    <productname>Heartbeat</productname>
    <productnumber>@VERSION@</productnumber>
    <authorgroup>
      <author>
	<firstname>Alan</firstname>
	<surname>Robertson</surname>
	<contrib>hb_standby</contrib>
	<email>alanr@unix.sh</email>
      </author>
      <author>
	<surname>Shi</surname>
	<firstname>Guochun</firstname>
	<contrib>man page</contrib>
	<email>gshi@ncsa.uiuc.edu</email>
      </author>
      <author>
	<firstname>Florian</firstname>
	<surname>Haas</surname>
	<contrib>man page</contrib>
	<email>florian.haas@linbit.com</email>
      </author>
    </authorgroup>
  </refentryinfo>
  <refmeta>
    <refentrytitle>hb_standby</refentrytitle>
    <manvolnum>1</manvolnum>
    <refmiscinfo class="manual">General commands</refmiscinfo>
  </refmeta>
  <refnamediv>
    <refname>hb_standby</refname>
    <refpurpose>issues a failover request to the cluster manager</refpurpose>
  </refnamediv>
  <refsynopsisdiv>
    <para><command>hb_standby</command> [<token>all</token>|<token>foreign</token>|<token>local</token>|<token>failback</token>]</para>
  </refsynopsisdiv>
  <refsection id="rs-hbstandby-description">
    <title>Description</title>
    <warning>
      <para>This command is deprecated. It is only suitable for legacy
      Heartbeat clusters without Pacemaker enabled. In
      Pacemaker-enabled clusters, the
      <citerefentry><refentrytitle>crm</refentrytitle><manvolnum>8</manvolnum></citerefentry>
      shell supports switching individual nodes into standby mode, and
      replaces <command>hb_standby</command>.</para>
    </warning>
    <para><command>@HA_NOARCHDATAHBDIR@/hb_standby</command> issues a
    request to the cluster to move resources from the node where it is
    invoked, to the other node (if it is currently available). The
    meaning of the options is relative. This manual assumes the
    following configuration to be present in
    <filename>@HA_HBCONF_DIR@/haresources</filename>:</para>
    <programlisting>alice drbddisk::r0 Filesystem::/dev/drbd0::/local/groups::ext3 10.0.0.1 smb
bob drbddisk::r1 Filesystem::/dev/drbd1::/local/ldap::ext3 10.0.0.2 ldap</programlisting>
  </refsection>
  <refsection id="rs-hbstandby-options">
    <title>Options</title>
    <para>The following options are supported:</para>
    <variablelist>
      <varlistentry>
	<term>
	  <token>local</token>
	</term>
	<listitem>
	  <para>Migrates any resources that the local node
	  <emphasis>is</emphasis> the preferred node for.</para>
	  <para>When invoked on <code>alice</code>, Samba would be
	  shut down, the IP address 10.0.0.1 would be released,
	  <filename>/local/groups</filename> would be unmounted,
	  <filename>/dev/drbd0</filename> would be placed into the
	  secondary role and <code>bob</code> would take all these
	  services over.</para>
	  <para>When run on <code>bob</code>, OpenLDAP would shut
	  down, 10.0.0.2 would be released,
	  <filename>/local/ldap</filename> would be unmounted,
	  <filename>/dev/drbd1</filename> would be placed into the
	  Secondary role and <code>alice</code> would take over all
	  these services.</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term>
	  <token>foreign</token>|<token>failback</token>
	</term>
	<listitem>
	  <para>Migrates any resources that the local node
	  <emphasis>is not</emphasis> the preferred node for.</para>
	  <para>When run on <code>alice</code>, OpenLDAP would shut
	  down, 10.0.0.2 would be released,
	  <filename>/local/ldap</filename> would be unmounted,
	  <filename>/dev/drbd1</filename> would be placed into the
	  Secondary role and <code>bob</code> would take over all
	  these services.</para>
	  <para>When invoked on <code>bob</code>, Samba would be
	  shut down, the IP address 10.0.0.1 would be released,
	  <filename>/local/groups</filename> would be unmounted,
	  <filename>/dev/drbd0</filename> would be placed into the
	  secondary role and <code>alice</code> would take all these
	  services over.</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term>
	  <token>all</token>
	</term>
	<listitem>
	  <para>Migrates all resources to the other node.</para>
	</listitem>
      </varlistentry>
    </variablelist>
    <para>Invoking <command>hb_standby</command> without any options
    is identical to
    <command>hb_standby</command>&nbsp;<token>all</token>.</para>
  </refsection>
  <refsection id="rs-hbstandby-caveats">
    <title>Caveats</title>
    <para><command>hb_standby</command> is only usable in R1-style
    configurations (i.e., those configured using the
    <filename>haresources</filename> file).</para>
  </refsection>
  <refsection id="rs-hbstandby-seealso">
    <title>See also</title>
    <para>
      <citerefentry><refentrytitle>hb_takeover</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
      <citerefentry><refentrytitle>heartbeat</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
      <citerefentry><refentrytitle>cl_status</refentrytitle><manvolnum>1</manvolnum></citerefentry>
    </para>
  </refsection>
</refentry>
