Thursday Sep 25, 2008

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!!

This blog copyright 2009 by maddy