Create Cluster Packages on Linux within HP Serviceguard


Create Cluster Packages on Linux within HP Serviceguard

This post will guide you with How to create cluster packages on Linux within HP Serviceguard Cluster.

If you are interested in learning, Request you to go through the below recommended tutorial.

Already we have seen the cluster installation and cluster creation in the previous article. Checkout the link

Our Cluster Example Setup:

Primary Node Server :

Hostname : node1.learnitguide.net
OS : RHEL 5.4
Node 1 Lan Port 1 : 10.10.10.10 (Connected to swtich for administrator use to manage the server)
Node 1 Lan Port 2 : 172.19.1.10 (Connected directly to Node 2 Lan Port 2 to have a heartbeat link)
MC Service GUARD : Evaluation version 11.19

Secondary Node Server :

Hostname : node2.learnitguide.net
OS : RHEL 5.4
Node 2 Lan Port 1 : 10.10.10.11 (Connected to swtich for administrator use to manage the server)
Node 2 Lan Port 2 : 172.19.1.11 (Connected directly to Node 1 Lan Port 2 to have a heartbeat link)
MC Service GUARD : Evaluation version 11.19

Create Cluster Packages on Linux within HP Serviceguard


1. Create a dedicated folder for each packages under the default serviceguard installed directory (usr/local/cmcluster)
[root@node1 ~] cd usr/local/cmcluster/
[root@node1 cmcluster] mkdir mypkg1
[root@node1 cmcluster] chmod 700 mypkg1

2. Create package configuration and script templates.
[root@node1 cmcluster] cmmakepkg -p mypkg1/pkg1.conf
[root@node1 cmcluster] cmmakepkg -s mypkg1/pkg1.sh

3. Edit the package configuration mypkg1/pkg1.conf.
Make the required changes as per our requirement as below like package name, type, node names, run and halt script, policy, service name, timeout.
PACKAGE_NAME mypkg1
PACKAGE_TYPE FAILOVER
NODE_NAME node1
NODE_NAME node2
AUTO_RUN YES
NODE_FAIL_FAST_ENABLED NO
RUN_SCRIPT /usr/local/cmcluster/mypkg1/pkg1.sh
HALT_SCRIPT /usr/local/cmcluster/mypkg1/pkg1.sh
RUN_SCRIPT_TIMEOUT 800
HALT_SCRIPT_TIMEOUT 800
SUCCESSOR_HALT_TIMEOUT 800
FAILOVER_POLICY CONFIGURED_NODE
FAILBACK_POLICY MANUAL
PRIORITY NO_PRIORITY
SERVICE_NAME myservice1
SERVICE_FAIL_FAST_ENABLED no
SERVICE_HALT_TIMEOUT 300

4. Edit the package script mypkg1/pkg1.sh.
Here in this file, we include our Package IP address, service names, commands as below.
# IP ADDRESSES
IP[0]="10.10.10.20"
SUBNET[0]="10.10.10.0"
# SERVICE NAMES AND COMMANDS.
SERVICE_NAME[0]="myservice1"
SERVICE_CMD[0]="/usr/bin/xload -display 10.10.10.50 -label `uname -n`:myservice"
SERVICE_RESTART[0]="-R"

where 10.10.10.50 is our X server for testing purpose, hence we are not using any shared disk lun. If you planned for oracle cluster package, include your shared lun disk to be available in all nodes, oracle package scripts. We will discuss the oracle package creation and configuration in the upcoming topics. Same way we can use the HP Serviceguard high-availability cluster software for nfs, samba and many other services.

5. Copy the necessary files to the other nodes.
[root@node1 cmcluster] scp -r /usr/local/cmcluster/mypkg1 node2:/usr/local/cmcluster/

6. Verify the cluster package configuration for errors.
[root@node1 cmcluster] cmcheckconf -P mypkg1/pkg1.conf

If you get any errors, please fix the errors.
If you dont see any errors, please go for applying the package cluster configuration.

7. Apply the Cluster Package configuration.
[root@node1 cmcluster] cmapplyconf -v -P mypkg1/pkg1.conf

8. Enable the autostart to the package.
[root@node1 cmcluster] cmmodpkg -e mypkg1

8. Check the Cluster Package status from both nodes.
[root@node1 cmcluster] cmviewcl -v -P mypkg1

We are done the cluster package creation. we can create 'N' number of packages in a single cluster.

You may come in a situtation to modify the running cluster packages, we will discuss in the upcoming article.

Keep practicing and have fun. Leave your comments if any.

Support Us: Share with your friends and groups.

Stay connected with us on social networking sites, Thank you.

Post a Comment

0 Comments