Você está na página 1de 7

How to Create Zone Cluster in Sun Cluster 3.

2u2

Zone Cluster is a whole new way of dealing with zones in Sun Cluster.

Before we get into it, understand that all the previous ways of dealing with zones in the
cluster still exist, completely unchanged. If you knew nothing about the new zone
cluster feature, you could administer and use Sun Cluster 3.2 U2 exactly as you always
have regarding zones.

In summary, there are now three completely different ways of dealing with zones in
Sun Cluster (and they can be mixed and matched with different zones in the same
cluster!)

1. HA-containers feature, from SC 3.1, where a zone itself is treated like a resource. The

zone path is stored in shared storage and the zone is the application that fails over.

2. Sun Cluster 3.2 original zones feature:

a. Zone (booting, storage) is not under Sun cluster control

b. RGM running in the global zone can launch Resource Group in zones — a zone looks
like a virtual node on which to launch RG

3. Zone Cluster, a brand new thing

One more note, before we start: a zone cluster is intended as a general structure for
supporting clustered applications in zones, but today the only supported application
using a zone cluster is Oracle RAC.

So what is a Zone Cluster already?

A zone cluster is a cluster of zones. It might be easiest to start with the picture and then
look at the rules:
zonecluster

Here are the rules:

 You must have a regular old cluster on nodes before any zones on those nodes
can be
 involved in a zone cluster. The regular old cluster is given a new terminology,
the global cluster.
 Once you have the regular old cluster (global cluster), you can have as many
zone clusters as you like.
 A zone can only be in one zone cluster
 Each zone cluster is composed of zones on different nodes (no such thing as a
single zone cluster with multiple zones on the same node).

So what is the “look and feel” of a zone cluster?

Zone cluster acts like its own independent cluster, as far as nodes, resources, resource
groups, and resource types are concerned.

When you are logged into a zone that is part of a zone cluster, you manage the
resources and resource groups and resource types of that zone cluster independently of
those in the global cluster or in any other zone cluster. One easy set of rules is:

 Each zone cluster has its own RGM and CCR


 Inside a zone of a zone cluster, you can only manage and see RG’s, resources,
and resource types for that zone cluster
 From the regular old cluster (global cluster), you can see and manage RG’s,
resources, and resource types for the global cluster and for all zone clusters.
Zones in a zone cluster have their own virtual private network (really a sub-space on
the clprivnet network), but it is used for application traffic only (like Oracle RAC).

Currently zone clusters do not have:

 Their own quorum device or quorum configuration


 Their own private net heartbeat. The private net in a zone cluster is for
application traffic only.

The structure of the zone cluster feature is flexible (each zone cluster has its own CCR),
so it is easy to see that in the future more pieces of the cluster could easily live in a zone
cluster, if need be).

How is zone cluster built?

There is a new command clzonecluster (clzc) that can build the entire zone cluster from
a single node. Underneath, the command communicates across the network with all the
nodes and uses standard zonecfg and zoneadm commands to configure, install, and
boot

the zones of a zone cluster. You perform these functions as separate steps (clzc configure,
clzc install, and so on), but all from a single node.

The zones of a zone cluster are installed with standard Solaris 10 software, including
the cluster components (they can be sparse root or whole root zones).

They are automatically given a special zone brand (the cluster brand) to mark them as
zones in a zone cluster.

Now we have two new concepts:

 Global Cluster: The cluster installed in the global zone.


 Zone Cluster: The cluster installed in the non-global zone.

The cluster software has all the tools needed to define the cluster zones.

These are the prerequisites:

 The unique name for the Zone Cluster.


 The zonepath for the nodes that are going to be part of the zone cluster.
 The name of each node taking part of the zone cluster.
 The public hostname of the zone cluster.
 The public IP of the zone cluster.
 The physical interfaces used for the zone cluster.

We will use this steps to create the zone cluster:

1. From the global zone of one node as the root user.

2. All nodes taking part of the zone cluster must be in clustered mode.
root@node11:$ clnode status

=== Cluster Nodes ===

— Node Status —

Node Name Status


——— ——
node12 Online
node11 Online

3. Create the zone cluster. The zones are sparse zones by default. If we want a whole
root zone we need to specify the create -b parameter. The command used to manage a
zone cluster is clzc or clzonecluster.

In both nodes:

root@node11:$ mkdir /zonascluster

Now execute this from only one node:

root@node11:$ # cluster set-netprops -p num_zoneclusters=1


# clzonecluster configure zonecluster1
zonecluster1: No such zone cluster configured
Use ‘create’ to begin configuring a new zone cluster.
clzc:zonecluster1> create
clzc:zonecluster1> set zonepath=/zonascluster/zonecluster1
clzc:zonecluster1> add node
clzc:zonecluster1:node> set physical-host=node11
clzc:zonecluster1:node> set hostname=node11zona1
clzc:zonecluster1:node> add net
clzc:zonecluster1:node:net> set address=10.164.17.178
clzc:zonecluster1:node:net> set physical=bge0
clzc:zonecluster1:node:net> end
clzc:zonecluster1:node> end
clzc:zonecluster1> add sysid
clzc:zonecluster1:sysid> set root_password=zoKzAMAH9JFeM
clzc:zonecluster1:sysid> end
clzc:zonecluster1> commit
Jun 11 18:32:53 node11 Cluster.RGM.rgmdstarter: did_update called
Jun 11 18:32:53 node11 Cluster.RGM.rgmdstarter: new cluster zonecluster1 added
clzc:zonecluster1> exit

4. Add one or more nodes to the zone cluster:

root@node11:$ clzonecluster configure zonecluster1


clzc:zonecluster1> add node
clzc:zonecluster1:node> set physical-host=node12
clzc:zonecluster1:node> set hostname=node12zona1
clzc:zonecluster1:node> add net
clzc:zonecluster1:node:net> set address=10.164.17.188
clzc:zonecluster1:node:net> set physical=bge0
clzc:zonecluster1:node:net> end
clzc:zonecluster1:node> end
clzc:zonecluster1> commit
clzc:zonecluster1> exit

5. Verify the new configuration of the zone cluster.

root@node11:$ clzonecluster verify zonecluster1


Waiting for zone verify commands to complete on all the nodes of the zone cluster
“zonecluster1″…
clzonecluster status zonecluster1

=== Zone Clusters ===

— Zone Cluster Status —

Name Node Name Zone HostName Status Zone Status


—- ——— ————- —— ———–
zonecluster1 node11 node11zona1 Offline Configured
node12 node12zona1 Offline Configured

6. Install and boot the zone:


root@node11:$ clzonecluster install zonecluster1
Waiting for zone install commands to complete on all the nodes of the zone cluster
“zonecluster1″…
Preparing to install zone .
Creating list of files to copy from the global zone.
Copying <11521> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <1264> packages on the zone.
Initialized <1264> packages on zone.
Zone is initialized.
The file contains a log of the zone installation.

clzonecluster boot zonecluster1


Waiting for zone boot commands to complete on all the nodes of the zone cluster “zonecluster1″

clzonecluster status zonecluster1

=== Zone Clusters ===

— Zone Cluster Status —

Name Node Name Zone HostName Status Zone Status


—- ——— ————- —— ———–
zonecluster1 node11 node11zona1 Offline Running
node12 node12zona1 Offline Running

zoneadm list -iv


ID NAME STATUS PATH BRAND IP
0 global running / native shared
1 hazone running /zonas/hazone-s10u7be-zfsBE native shared
3 zonecluster1 running /zonascluster/zonecluster1 cluster shared

After this, we can login to the new zone as an standard non-global zone:

root@node11:$ zlogin zonecluster1


[Connected to zone 'zonecluster1' pts/1]
Last login: Thu Jun 11 18:52:42 on console
Sun Microsystems Inc. SunOS 5.10 Generic January 2005

ifconfig -a
lo0:1: flags=2001000849 mtu 8232 index 1
zone zonecluster1
inet 127.0.0.1 netmask ff000000
bge0: flags=9000843 mtu 1500 index 2
inet 10.164.17.170 netmask ffffff00 broadcast 10.164.17.255
groupname sc_ipmp0
ether 0:14:4f:22:75:ce
bge0:1: flags=1000843 mtu 1500 index 2
zone zonecluster1
inet 10.164.17.178 netmask ffffff00 broadcast 10.164.17.255
clprivnet0: flags=1009843 mtu 1500 index 5
inet 172.16.4.2 netmask fffffe00 broadcast 172.16.5.255
ether 0:0:0:0:0:2
clprivnet0:3: flags=1009843 mtu 1500 index 5
zone zonecluster1
inet 172.16.6.130 netmask ffffff80 broadcast 172.16.6.255

/usr/cluster/bin/cluster status

=== Cluster Nodes ===

— Node Status —

Node Name Status


——— ——
node11zona1 Online
node12zona1 Online

=== Cluster Resource Groups ===

Group Name Node Name Suspended State


———- ——— ——— —–

=== Cluster Resources ===

Resource Name Node Name State Status Message


————- ——— —– ————–

Now we have a full featured zone cluster with two Virtual Nodes.

Você também pode gostar