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

18 August 2008 Heartbeat release 2.1.4 is now out Download it and install it!

11 October 2007 NEW educational HA/DR Blog hosted by Alan Robertson

9 April 2007 Check out the Cool Heartbeat Screencasts: Installation, Intro to the GUI Part of the Heartbeat Education project

Last site update:
2008-08-20 19:18:27

It is very common to want to have a certain resource run only on a node which is master for a given resource.

You can either make sure the resource is run on the master, which is the propably more common approach:

<rsc_order id="ms-drbd0_before_fs0" from="fs0" action="start" to="ms-drbd0" to_action="promote"/>
<rsc_colocation id="fs0_on_ms-drbd0" to="ms-drbd0" to_role="master" from="fs0" score="infinity"/>

Translation:

  • Start fs0 after ms-drbd0 has been promoted
  • Only start fs0 when ms-drbd0 is running as master

Or you can make sure the resource is not run on the slave:

<rsc_order id="ms-drbd0_before_fs0" from="fs0" action="start" to="ms-drbd0" to_action="promote"/>
<rsc_colocation id="fs0_not_on_stopped_ms-drbd0" to="ms-drbd0" to_role="stopped" from="fs0" score="-infinity"/>
<rsc_colocation id="fs0_not_on_slave_ms-drbd0" to="ms-drbd0" to_role="slave" from="fs0" score="-infinity"/>

Translation:

  • Never run fs0 on a node where ms-drbd0 is stopped.

  • Never run fs0 on a node where ms-drbd0 is running as slave.

  • Only start fs0 after promoting ms-drbd0 to master.

Since the the total set of states for a master/slave resource is {stopped, slave, master}, this only allows it to run on a node which is running as master.