How to create a zone cluster?
The introduction of the new zone cluster functionality in the SCX 9/08 release opens the door to very creative use of available system resources. To get started with it, I have created a simple cheat sheet.
Basics:
1. Zone cluster uses a new zone of brand "cluster".
2. For the cluster to work properly, you need to edit the /usr/lib/brand/cluster/config.xml file and add the following line:
<privilege set="default" name="contract_identity" />
before the </brand>. Make sure that you backup the file before editing it.
3. The clzonecluster (1CL) command creates the zone and configures it.
4. You need to have the encrypted password of the root user copied from the /etc/shadow file before starting the configuration along with the nameservice configuration.
5. Exclusive IP zones are not possible.
Steps:
*We'll use NIS for the deployment example.
bash-3.2# clzc configure zone-cluster
zone-cluster: No such zone cluster configured
Use 'create' to begin configuring a new zone cluster.
clzc:zone-cluster> create
clzc:zone-cluster> add capped-memory
clzc:zone-cluster:capped-memory> set physical=512M
clzc:zone-cluster:capped-memory> set swap=4g
clzc:zone-cluster:capped-memory> end
clzc:zone-cluster> set autoboot=true
clzc:zone-cluster> add sysid
clzc:zone-cluster:sysid> set root_password=***********
clzc:zone-cluster:sysid> set name_service="NIS{domain_name=sun.com name_server=nis(1.1.1.1)}"
clzc:zone-cluster:sysid> end
clzc:zone-cluster> add node
clzc:zone-cluster:node> set physical-host=<physical hostname of node you want to add>
clzc:zone-cluster:node> set hostname=<intended hostname of the zone on that node>
clzc:zone-cluster:node> add net
clzc:zone-cluster:node:net> set physical=bge0
clzc:zone-cluster:node:net> set address=<hostname/address of the zone>
clzc:zone-cluster:node:net> end
clzc:zone-cluster:node> end
clzc:zone-cluster> add node
clzc:zone-cluster:node> set physical-host=<hostname of the physical node>
clzc:zone-cluster:node> set hostname=<hostname for zone>
clzc:zone-cluster:node> add net
clzc:zone-cluster:node:net> set physical=bge0
clzc:zone-cluster:node:net> set address=<hostname/address of zone>
clzc:zone-cluster:node:net> end
clzc:zone-cluster:node> end
clzc:zone-cluster> set zonepath=/export/zonecluster
clzc:zone-cluster> verify
clzc:zone-cluster> exit
To verify, you can execute :
clzc verify <zone-cluster name>
To save the configuration for future use,
clzc export -f <file-name> <zone-cluster name>
To install the zone cluster,
clzc install <zone-cluster name>
To boot the zone cluster,
clzc boot <zone-cluster name>
To check the status of the zone cluster,
clzc status <name>
eg)
bash-3.00# clzc status
=== Zone Clusters ===
--- Zone Cluster Status ---
Name Node Name Zone HostName Status Zone Status
---- --------- ------------- ------ -----------
virt-ker ker2 vker2 Online Running
ker1 vker1 Online Running
ker3 vker3 Online Running
ker4 vker4 Online Running
**After the zone cluster boots for the first time, the clzc status command will take some time for it to show status as online since the configuration has to be done on the zone similar to a native zone.
To halt the zone cluster,
clzc halt <zone-cluster>
Ain't it cool? Hats off to our engineers for designing such a cool feature!
Happy virtual clustering!!

Will Oracle RAC in Zones/Containers be rolled into Solaris 10 / Solaris Cluster at any time ?
Posted by Joe on October 19, 2008 at 12:31 AM IST #
Joe,
It will be available in the up coming Solaris Cluster release. If you are interested in the release dates, please contact the Sales team.
Posted by Madhan Kumar on October 20, 2008 at 07:44 AM IST #
Can it possible to install cluster on two different zone ?
Posted by Mohammed Tanvir Alam on November 24, 2008 at 06:14 AM IST #
Mohammed,
Yes. You can use 2 or more zones. The zone installation is done by the clzc utility itself. The name of the zone on the cluster nodes will be identical.
Posted by Madhan Kumar on November 24, 2008 at 12:14 PM IST #
If you are deploying, let's say Apache, sun cluster and you will have data services in the zones, which do you register with Sun Cluster? the zones or the application which is running in the zones, since the zone does not need to failoiver in the event the Apache data service fails?
Posted by Ryan DeWaele on January 29, 2009 at 07:54 PM IST #
Ryan,
Solaris Cluster is having a few "hooks" in the kernel and hence a configured zone will automatically be detected by SC software. There is no need to register it. Apache, like all other applications, have to configured and registered using special code to make them HA called an "agent" or Resource Type (RT).
You can configure Apache in either Failover or Scalable mode. In scalable mode, there is no need for failover as apache will be online on all then nodes at the same time. With Failover mode, apache alone will failover to thew other potential master.
Posted by Madhan Kumar on January 30, 2009 at 09:46 PM IST #
Is there way to cluster two zones in one physical box using clzc command?
Posted by Jang Woo Heo on March 05, 2009 at 11:37 PM IST #
Hi Jang,
That is not possible. If you want to use 2 zones in the same node, then you should use the zones in the same RG.
Posted by Madhan Kumar on March 06, 2009 at 09:04 AM IST #
Do you have a document like "how-to" to configure Logical Hostname resource and Oracle Database resource inside Zone Cluster?
Posted by Fabio Morais on March 27, 2009 at 12:00 AM IST #
Fabio,
Do you want to configure HA Oracle (single instance) or RAC?
Posted by Madhan Kumar on March 27, 2009 at 09:03 AM IST #
I'm a little confused here. If we have a 2 node cluster, and want 1 zone, to run under the cluster, are we installing 2 ng zones (1 on each node) and they each have their own IP address. And then we have another IP address for the clustered zone?
Can't I have a shared filesystem with 1 zone on it, and the cluster brings up and down that zone on which ever node?
Posted by Paul Root on March 27, 2009 at 09:00 PM IST #
Paul,
That is possible with failover zones. That is the beauty of solaris zones - the possibilities are endless! :)
Posted by Madhan Kumar on March 27, 2009 at 09:22 PM IST #
My idea is to configure a Zone Cluster with Oracle Database Failover (HA), using DID's from Global Zone (add device; set match=/dev/did/rdsk/dXX) and Oracle ASM to manage these DID's.
Posted by Fabio Morais on March 28, 2009 at 02:39 AM IST #
Fabio,
Technically it definintely is possible. However at this point in time support is there only for RAC. Moire quals are in the pipeline. Please watch http://blogs.sun.com/sc for further updates.
Posted by Madhan Kumar on March 29, 2009 at 10:04 PM IST #
For configuring failover services, one could follow:
http://wikis.sun.com/display/BluePrints/High+Availability+MySQL+Database+Replication+with+Solaris+Zone+Cluster
Posted by Madhan Kumar on March 31, 2009 at 09:33 AM IST #
Again, that's not what I want.
I want 1 zone, 1 ip address. And that zone will run on 1 machine in the cluster at a time.
Posted by Paul Root on April 04, 2009 at 12:42 AM IST #
Paul,
That is possible! can you send a mail to ha-clusters-discuss@opensolaris.org so that you get better explanation of how to implement it? :)
Posted by Madhan Kumar on April 06, 2009 at 10:44 AM IST #
I have installed solaris non-globald whole zone test-zone
Because I have already install applcation on it, So can I reuse this test-zone as cluster zone with reinstall this zone after news sun cluster installation.
Posted by jiagang sun on June 23, 2009 at 10:52 AM IST #