Linux-HA Logo

Contents

  1. Introduction
  2. Example
  3. Location Constraints for Resource Groups
  4. Ordering Constraints and Resource Groups
  5. Co-locational Constraints and Resource Groups

Introduction

Resource groups[1] are essentially a shortcut for creating a set of resources that need to:

They effectively correspond to one line from a version 1 haresources[2] file.

Example

In the example below we have defined an IP address, a database and an Apache instance. All three resources will be placed on the same machine, and will be started in the order listed, ie.

  1. WebServerIP

  2. WebServerDatabase

  3. WebServerApache

and stopped in the reverse order.

The group will implicitly define rules equivalent to:

Location Constraints for Resource Groups

Using constraints for the resource group as a whole is no different to a native resource... you just use the id of the group.

Easy! :)

Ordering Constraints and Resource Groups

If we defined two more resources and had one start before MyCorpWWW and one after, the results are pretty much what you would expect.

Since the ordering constraints are symmetrical by default, this is the equivalent of

If nothing was yet started, the order would be like this:

  1. Start Named

  2. Start WebServerIP

  3. Start WebServerDatabase

  4. Start WebServerApache

  5. Start WwwStats

and likewise, the shutdown order would be:

  1. Stop WwwStats

  2. Stop WebServerApache

  3. Stop WebServerDatabase

  4. Stop WebServerIP

  5. Stop Named

Co-locational Constraints and Resource Groups

Ensuring that the WwwStats resource runs on the same machine as Apache is no different than before... we just use the id of the group.


References

[1]http://www.linux-ha.org/ResourceGroup
[2]http://www.linux-ha.org/haresources


This information provided courtesy of the Linux-HA project at http://linux-ha.org/