[Linux-HA] Active Ressources should be always on the same node

Harakiri harakiri_23 at yahoo.com
Wed Dec 3 03:33:42 MST 2008


--- On Wed, 12/3/08, Dominik Klein <dk at in-telegence.net> wrote:

> From: Dominik Klein <dk at in-telegence.net>

> As suggested in another reply, look into colocation
> constraints. If you only use primitive resources (no clones
> or master/slave resources), you could also use a group
> instead of single resources. In fact, groups are just a
> syntax shortcut for colocation constraints between all
> resources within that group, but that happens in the
> background.

I only use primitive - the following two actually:

type IPaddr2 for virtual ip and a script, both should only run on one server in the cluster, the others are "dumb".

I looked into one example from the current documentation:

<group id=”grp_webserver”>
<primitive type=”datadisk” class=”heartbeat”>
...
</primitive>
<primitive type=”Filesystem” class=”ocf”>
...
</primitive>
<primitive type=”IPaddr2” class=”ocf”>
...
</primitive>
<primitive type=”apache” class=”ocf”>
...
</primitive>
</group>

i currently have

<resources>
      <primitive id="ip_resource_1" class="ocf" type="IPaddr" provider="heartbeat">
        <instance_attributes id="inst_attr">
          <attributes>
            <nvpair name="ip" value="@VIRTUAL_IP@"  id="vip1"/>          
          </attributes>
        </instance_attributes>
      </primitive>
      <primitive id="myscript" class="heartbeat" type="myscript-haswitch" provider="heartbeat"/>
    </resources>

so when i just put <group id=”some_id”> around these primitives, it should work out of the box? Both ressources will only always run on the same node, if that node goes offline another node will manage both ressources again?


Thanks

> 
> Regards
> Dominik
> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems


      


More information about the Linux-HA mailing list