The haresources file is one of the most important files to configure when using Heartbeat.
The general form of a line in the haresources file is simple:
preferred-node resourcename ...
Heartbeat resources are acquired in a left-to-right order, and released in a right-to-left order.
Note that it is absolutely mandatory for the haresources files to be identical on both machines.
This preferred-node is the nominal owner of the resources. That is, this is the machine who will own them if both machines are available and you have selected autofailback on. A fairly common error is to think that you have to tell each machine to own the same set of resources on both machines. By doing this, you have directed Heartbeat to make each machine owner of the same set of resources, and you wind up with both machines trying to run the same resources at the same time. If you do this, BadThingsWillHappen.
Note: Make sure that the first resource in each resource group is unique because the first resource will be used as resource group name.