Thursday Sep 25, 2008

The fencing mechanism of SCX has been enhanced to make it optional.  Though it is recommended to use strong fencing mechanisms, some user environments require flexibility and in such cases, fencing can be turned off. 

Basics

* The fencing can be set a) globally or b) Individual disks. 

* Fencing type cannot be changed for disks configured as Quorum devices.

* Fencing type set at individual disk level will take precedence over global settings.

By default, the cluster will use Device ID (DID) pathcount  to determine the type of reservation protocol to be used.  For devices connected to 2 nodes, it will be PGR emulation and for 3 or greater connections, SCSI will be used.

How to determine what is the fencing type globally?

bash-3.00# scdidadm -G

The cluster is currently configured to use DID path count algorithm to determine fencing protocol for shared devices.

Now let us change the fencing type globally to nofencing:

bash-3.00# scdidadm -G nofencing
Warning: Device instance d1 is a quorum device - fencing protocol remains PATHCOUNT for the device.

Now to change the fencing algorithm to prefer scsi,

bash-3.00# scdidadm -G prefer3

** If scsi cannot be used for a subset of disks, the warning message will be displayed.

To return fencing to default settings,

bash-3.00# scdidadm -G pathcount

To change fencing at per disk level, use scdidadm with -F option:

To change the fencing type to noscrub,

bash-3.00# scdidadm -F nofencing-noscrub d2

** noscrub  switches fencing off without scrubbing the scsi keys. Keys are scrubbed only for scsi and not for PGRe.

For using global fencing settings,

bash-3.00# scdidadm -F useglobal d2

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

Tuesday Aug 26, 2008

The latest Open HA Cluster Core, Agents and Geographic Edition source is now available.

Note that due to a bug in Solaris:
http://bugs.opensolaris.org/view_bug.do?bug_id=6734100

this code is buildable, but will not run on Solaris Express Community Edition (builds 95 and 96). The fix for 6734100 will be in SXCE build 97 when it's published.


Download it all from:
http://opensolaris.org/os/community/ha-clusters/ohac/downloads/

Browse the source at:
http://src.opensolaris.org/source/xref/ohac/

Find the list of bugs fixed since the last source code drop at:
http://dlc.sun.com/osol/ohac/downloads/current/ohac-changelog-20080820.sparse.txt
http://opensolaris.org/os/community/ha-clusters/ohac/Documentation/Agents/ohacds_changelog/
http://dlc.sun.com/osol/ohac/downloads/current/ohacgeo-changelog-20080820.sparse.txt

This blog copyright 2009 by maddy