February 14, 2011

Exploring Sun Cluster 3.2 resource group affinities

Posted in Sun Cluster at 4:43 pm by alessiodini

Today i’m studying and testing resource group affinities.

I have a two node cluster ( node1 , node2 ) and a couple of resource group ( test1-rg , test2-rg )
i love fantasy for names 🙂

In order i did and tested:

– weak positive affinity

root@nodo1 # clrg show -v test1-rg | grep aff
RG_affinities:                                             <NULL>

root@nodo1 # clrg set -p RG_affinities=+test1-rg test2-rg
root@nodo1 # clrg show -v test2-rg | grep aff
RG_affinities: +test1-rg

From last output i declared test2-rg as source and test1-rg as destination.
In this scenario test2-rg will prefer to stay where will be online test1-rg.
I can switch both rg without consequences.

– weak negative affinity
like weak positive affinity , but test2-rg will prefer to stay where will not be online test1-rg.
Even in this scenario i can switch both rg without consequences.

– strong positive affinity

root@nodo1 # clrg set -p RG_affinities=++test1-rg test2-rg

root@nodo1 # clrg show -v test2-rg | grep aff
RG_affinities: ++test1-rg

In this scenario test2-rg must be online on same node of test1-rg.
If i try to switch test2-rg on another node this operation will fail.
If test1-rg will switch due to some problem , test2-rg will switch too.

– strong negative affinity

root@nodo1 # clrg set -p RG_affinities=–test1-rg test2-rg

root@nodo1 # clrg show -v test2-rg | grep aff
RG_affinities: –test1-rg

In this scenario test2-rg will be online where test1-rg will not be active.
If i try to switch test2-rg on a node where test1-rg is active , this swill will fail.
If test2-rg needs to switch due to some problem and he doesn’t go to another node where test1-rg is not running , it will be offline !

– strong positive affinity with failover delegation

root@nodo1 # clrg set -p RG_affinities=+++test1-rg test2-rg
root@nodo1 # clrg show -v test2-rg | grep aff
RG_affinities: +++test1-rg

In this scenario if test2-rg needs to switch due to some problem , the RGM will switch test1-rg and test2-rg.

Advertisements

6 Comments »

  1. Inbound links exchange idea… Nice to be here, you may wanna swap web links with my essay writing site?. Better still, I offer a three-way link pointing from my other site. My swap inbound link request email is at my home page.

    • alessiodini said,

      hi!
      ok for me , we can try 😉

  2. Ujjal said,

    How can remove the ++ or — affinity for a RG?

    Thanks..
    Ujjal

    • alessiodini said,

      Hi,
      which version of cluster do u have?

      • janis13 said,

        Hi I have the version Cluster 3.2, how can remove de affinity? thanks

      • alessiodini said,

        Hi! 🙂
        let’s suppose we have appl-rg with affinity to test-rg as follow:

        vxlab:>clrg show -v appl-rg | grep -i aff
        RG_affinities: ++pippo-rg

        If i want to delete that affinity i can do that with:

        vxlab:>clrg set -p RG_affinities=”” appl-rg

        After i have:

        vxlab:>clrg show -v appl-rg | grep -i aff
        RG_affinities:

        Let me know if you have some problem about it !


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: