Site icon UnixArena

Sun Cluster – Configuring Resource Group in Zone Cluster

Multiple-tier consolidation - Sun cluster

Multiple-tier consolidation - Sun cluster

This article will walk you through how to configure a resource group in zone cluster. Unlike traditional cluster, resource group and cluster resources are should be created inside the non-global zone. The required physical or logical resources need to be pinned from the global zone using “clzonecluster”  or “clzc” command.  In this article, we will configure HA filesystem and IP  resource on one of the zone cluster which we have created earlier. Adding to that , you can also configure DB or Application resource for HA.

 

1.Login to one of the global cluster node.

2.Check the cluster status.

Global Cluster:

UASOL2:#clnode status
=== Cluster Nodes ===
--- Node Status ---
Node Name                                       Status
---------                                       ------
UASOL2                                          Online
UASOL1                                          Online

Zone Cluster :

Login to one of the zone and check the cluster status. (extend the command search path to “/usr/cluster/bin”)

UASOL2:#zlogin uainfrazone
[Connected to zone 'uainfrazone' pts/3]
Last login: Mon Apr 11 02:00:17 on pts/2
Oracle Corporation      SunOS 5.10      Generic Patch   January 2005
# bash
bash-3.2# export PATH=/usr/cluster/bin:$PATH
bash-3.2# clnode status
=== Cluster Nodes ===
--- Node Status ---
Node Name                                       Status
---------                                       ------
uainfrazone1                                    Online
uainfrazone2                                    Online
bash-3.2#

Make sure that both the host names are updated on each nodes “/etc/inet/hosts” file.

 

3. Login to one of the global zone (Global Cluster) and add the IP detail in zone cluster. (IP which needs to highly available)

UASOL2:#clzc configure uainfrazone
clzc:uainfrazone> add net
clzc:uainfrazone:net> set address=192.168.2.102
clzc:uainfrazone:net> info
net:
        address: 192.168.2.102
        physical: auto
        defrouter not specified
clzc:uainfrazone:net> end
clzc:uainfrazone> commit
clzc:uainfrazone> exit

 

4 . Create the ZFS pool on shared SAN LUN. So that zpool can be exported and imported other cluster nodes.

UASOL2:#zpool create oradbp1 c2t15d0
UASOL2:#zpool list oradbp1
NAME      SIZE  ALLOC   FREE  CAP  HEALTH  ALTROOT
oradbp1  2.95G  78.5K  2.95G   0%  ONLINE  -
UASOL2:#

 

Just manually export the zpool on UASOL2 & try to import it on UASOL1.

UASOL2:#zpool export oradbp1
UASOL2:#logout
Connection to UASOL2 closed.
UASOL1:#zpool import oradbp1
UASOL1:#zpool list oradbp1
NAME      SIZE  ALLOC   FREE  CAP  HEALTH  ALTROOT
oradbp1  2.95G   133K  2.95G   0%  ONLINE  -
UASOL1:#

It works. Let’s map this zpool to the zone cluster – uainfrazone.

 

5. In one of the global cluster node , invoke “clzc” to add the zpool.

UASOL1:#clzc configure uainfrazone
clzc:uainfrazone> add dataset
clzc:uainfrazone:dataset> set name=oradbp1
clzc:uainfrazone:dataset> info
dataset:
        name: oradbp1
clzc:uainfrazone:dataset> end
clzc:uainfrazone> commit
clzc:uainfrazone> exit
UASOL1:#

We have successfully added IP address and dataset on the zone cluster configuration. At this point, you are eligible to use these resource under the zone cluster to configure the cluster resources.

 

Configure Resource group and cluster Resources on Zone Cluster:

1. Add the IP in /etc/hosts  of the zone cluster nodes (uainfrazone1 & uainfrazone2). We will make this IP as highly available through cluster.

bash-3.2# grep ora /etc/hosts
192.168.2.102   oralsn-ip
bash-3.2#

 

2. In one of the zone cluster node , Create the cluster resource group with name of “oradb-rg”.

bash-3.2# clrg create -n uainfrazone1,uainfrazone2 oradb-rg
bash-3.2# clrg status

=== Cluster Resource Groups ===
Group Name      Node Name         Suspended     Status
----------      ---------         ---------     ------
oradb-rg        uainfrazone1      No            Unmanaged
                uainfrazone2      No            Unmanaged

bash-3.2#

 

If you want to create the resource group for “uainfrazone” zone cluster from global zone , you can use the following command. (with -Z “zone-cluster” name)

UASOL2:# clrg create -Z uainfrazone -n uainfrazone1,uainfrazone2 oradb-rg
UASOL2:#clrg status -Z uainfrazone

=== Cluster Resource Groups ===

Group Name              Node Name      Suspended   Status
----------              ---------      ---------   ------
uainfrazone:oradb-rg    uainfrazone1   No          Unmanaged
                        uainfrazone2   No          Unmanaged
UASOL2:#

 

3. Create the cluster IP resource for oralsn-ip . (Refer step 1)

bash-3.2# clrslh create -g oradb-rg -h oralsn-ip oralsn-ip-rs
bash-3.2# clrs status

=== Cluster Resources ===

Resource Name      Node Name        State       Status Message
-------------      ---------        -----       --------------
oralsn-ip-rs       uainfrazone1     Offline     Offline
                   uainfrazone2     Offline     Offline

bash-3.2#

 

4. Create the ZFS resource for zpool – oradbp1 (which we have created and assigned this zone cluster in first section of the document)

You must register the ZFS resource type prior to adding the resource in cluster.

bash-3.2# clresourcetype register SUNW.HAStoragePlus
bash-3.2#  clrt list
SUNW.LogicalHostname:4
SUNW.SharedAddress:2
SUNW.HAStoragePlus:10
bash-3.2#

 

Add the dataset in zone cluster to make HA.

bash-3.2#  clrs create -g oradb-rg -t SUNW.HAStoragePlus -p zpools=oradbp1 oradbp1-rs
bash-3.2# clrs status

=== Cluster Resources ===
Resource Name      Node Name        State       Status Message
-------------      ---------        -----       --------------
oradbp1-rs         uainfrazone1     Offline     Offline
                   uainfrazone2     Offline     Offline

oralsn-ip-rs       uainfrazone1     Offline     Offline
                   uainfrazone2     Offline     Offline

bash-3.2#

 

5. Bring up the resource group online.

bash-3.2# clrg online -eM oradb-rg
bash-3.2# clrs status

=== Cluster Resources ===

Resource Name      Node Name        State       Status Message
-------------      ---------        -----       --------------
oradbp1-rs         uainfrazone1     Online      Online
                   uainfrazone2     Offline     Offline

oralsn-ip-rs       uainfrazone1     Online      Online - LogicalHostname online.
                   uainfrazone2     Offline     Offline

bash-3.2# uname -a
SunOS uainfrazone2 5.10 Generic_147148-26 i86pc i386 i86pc
bash-3.2#

 

6. Verify the resource status in uainfrazone1.

bash-3.2# clrg status
=== Cluster Resource Groups ===
Group Name      Node Name         Suspended     Status
----------      ---------         ---------     ------
oradb-rg        uainfrazone1      No            Online
                uainfrazone2      No            Offline

bash-3.2# clrs status
=== Cluster Resources ===
Resource Name      Node Name        State       Status Message
-------------      ---------        -----       --------------
oradbp1-rs         uainfrazone1     Online      Online
                   uainfrazone2     Offline     Offline

oralsn-ip-rs       uainfrazone1     Online      Online - LogicalHostname online.
                   uainfrazone2     Offline     Offline
bash-3.2#
bash-3.2# ifconfig -a
lo0:1: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        zone uainfrazone
        inet 127.0.0.1 netmask ff000000
e1000g0: flags=9000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,NOFAILOVER> mtu 1500 index 2
        inet 192.168.2.90 netmask ffffff00 broadcast 192.168.2.255
        groupname sc_ipmp0
e1000g0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        zone uainfrazone
        inet 192.168.2.101 netmask ffffff00 broadcast 192.168.2.255
e1000g0:2: flags=1001040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,FIXEDMTU> mtu 1500 index 2
        zone uainfrazone
        inet 192.168.2.102 netmask ffffff00 broadcast 192.168.2.255
clprivnet0: flags=1008843<UP,BROADCAST,RUNNING,MULTICAST,PRIVATE,IPv4> mtu 1500 index 5
        inet 172.16.2.2 netmask ffffff00 broadcast 172.16.2.255
clprivnet0:3: flags=1008843<UP,BROADCAST,RUNNING,MULTICAST,PRIVATE,IPv4> mtu 1500 index 5
        zone uainfrazone
        inet 172.16.3.66 netmask ffffffc0 broadcast 172.16.3.127
bash-3.2# zfs list
NAME      USED  AVAIL  REFER  MOUNTPOINT
oradbp1  86.5K  2.91G    31K  /oradbp1
bash-3.2#

You can see that ZFS dataset “oradbp1” and IP “192.168.2.102” is up on uainfrazone1.

 

7. Switch the resource group to uainfrazone2 and check the resource status.

bash-3.2# clrg switch -n uainfrazone2 oradb-rg
bash-3.2# clrg status
=== Cluster Resource Groups ===
Group Name      Node Name         Suspended     Status
----------      ---------         ---------     ------
oradb-rg        uainfrazone1      No            Offline
                uainfrazone2      No            Online

bash-3.2# clrs status
=== Cluster Resources ===
Resource Name      Node Name        State       Status Message
-------------      ---------        -----       --------------
oradbp1-rs         uainfrazone1     Offline     Offline
                   uainfrazone2     Online      Online

oralsn-ip-rs       uainfrazone1     Offline     Offline - LogicalHostname offline.
                   uainfrazone2     Online      Online - LogicalHostname online.

bash-3.2#
bash-3.2#

 

Verify the result from OS level. Login to uainfrazone2 and check the following to confirm the switch over.

bash-3.2# ifconfig -a
lo0:1: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        zone uainfrazone
        inet 127.0.0.1 netmask ff000000
e1000g0: flags=9000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,NOFAILOVER> mtu 1500 index 2
        inet 192.168.2.91 netmask ffffff00 broadcast 192.168.2.255
        groupname sc_ipmp0
e1000g0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        zone uainfrazone
        inet 192.168.2.103 netmask ffffff00 broadcast 192.168.2.255
e1000g0:2: flags=1001040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,FIXEDMTU> mtu 1500 index 2
        zone uainfrazone
        inet 192.168.2.102 netmask ffffff00 broadcast 192.168.2.255
clprivnet0: flags=1008843<UP,BROADCAST,RUNNING,MULTICAST,PRIVATE,IPv4> mtu 1500 index 5
        inet 172.16.2.1 netmask ffffff00 broadcast 172.16.2.255
clprivnet0:3: flags=1008843<UP,BROADCAST,RUNNING,MULTICAST,PRIVATE,IPv4> mtu 1500 index 5
        zone uainfrazone
        inet 172.16.3.65 netmask ffffffc0 broadcast 172.16.3.127
bash-3.2# df -h /oradbp1/
Filesystem             size   used  avail capacity  Mounted on
oradbp1                2.9G    31K   2.9G     1%    /oradbp1
bash-3.2# zfs list
NAME      USED  AVAIL  REFER  MOUNTPOINT
oradbp1  86.5K  2.91G    31K  /oradbp1
bash-3.2#

 

We have successfully configure the Resource group and made ZFS and IP as highly available (HA) on Oracle Solaris zones via zone cluster concept.  Hope this article is informative to you.  In the next article, we will see that how to add/remove/delete nodes from the zones cluster.

Exit mobile version