Operating System - HP-UX
1833873 Members
3197 Online
110063 Solutions
New Discussion

Script for automation in 3 node cluster

 
shyam sunder_2
Advisor

Script for automation in 3 node cluster

Hi,
I have 3 node cluster and all 3 nodes are running with one package each.

Node A - Package X
Node B - Package Y
Node C - Package Z

The configuration is done like that if node A fails then Package X can failover to node B OR node C. The same config has been done for package Y & Z. Means any package can failover to any available node.

Now I want to do the automation in case of change in cluster, like if any new LV (File system) is added to a package the same changes has to replicate to other 2 nodes also.

Does anyone has this kind of script? If anyone has, please share.

Thanks in advance.
10 REPLIES 10
Asif Sharif
Honored Contributor

Re: Script for automation in 3 node cluster

Hi sunder,

I don't have script for it, but its very simple to add new FS and rcp to other adaptive nodes.

Regards,
Asif Sharif
Regards,
Asif Sharif
shyam sunder_2
Advisor

Re: Script for automation in 3 node cluster

Hi Asif,
Thanks for reply. I know the steps to replicate the changes to other node like rcp the cntl files between the nodes, but i need the script for the automation.

Shyam
Calandrello
Trusted Contributor

Re: Script for automation in 3 node cluster

I understand that you have 3 nodes correct?
you created a new LV in a vg that is within a cluster package right?
usually this lvol and mounted by cliuster script that is in / etc / cmcluster / PKG_NAME
you should add the new lvol it in, and replicate this script that you changed to
the other nodes in the same path / etc / cmcluster / PKG_NAME
after that you must re-import the vg that you created a new lvol following steps
the node that you created the new lv run the command
vgexport-s-m-p /dev/vgname /tmp/vgname_map
Copy the file /tmp/vgname_map for the other 2 servers
import the vg on the other nodes with the commands
vgimport /dev/vgname /tmp/vgname_map
after that when the cluster to fail over the package it will enable and recognize the new lvol
otherwise it will not happen.
any doubt and so write here again
shyam sunder_2
Advisor

Re: Script for automation in 3 node cluster

Hi calendrello,

Yes, you understand right nad thanks for sharing the steps and I also do the same, but I need some readymade script, so whenever there is any change in cluster then this script should automatically replicate the same changes to other 2 nodes.

If you have this kind of script, then please share.

Thanks
Shyam
Calandrello
Trusted Contributor

Re: Script for automation in 3 node cluster

Dear
then this script is in the path /etc/cmcluster each specific package has a script that runs the package, it is created when the package and created.
inside it has the settings of the vg start and Mountaga FS
if you want to list what is inside the path /etc/cmcluster it'll help.
shyam sunder_2
Advisor

Re: Script for automation in 3 node cluster

I know that in /etc/cmcluster/PKG_NAME directory there is PKG_NAME.conf and PKG_NAME.cntl files exists which is used to run the cluster, but my requirement is not starting and halting package by script.

My requirement is a kind of script which can do modification in PKG_NAME.cntl file, rcp of PKG_NAME.cntl file to other nodes, creation of map file using vgexport, rcp of map file to other nodes, then importing of vg on other node.
The script should do all these steps, whenever there is a change in the package.

Hope you understand the requirement.

Thanks
Shyam
Calandrello
Trusted Contributor

Re: Script for automation in 3 node cluster

Dear
understand
you would like it to own the knife guard all mcservice replication work right?
then I have bad news, he does not.
unfortunately you will have to do the whole process manually.
shyam sunder_2
Advisor

Re: Script for automation in 3 node cluster

Ok, Thanks Calandrello,

anybody else who can help me out to make & provide me this kind of script.

Regards,
Shyam
Calandrello
Trusted Contributor

Re: Script for automation in 3 node cluster

my friend
I serves honest with you, until I started developing a script that does it automatically, so that started to become very large and the script has a lot of work, I decided to do it manually, and faster.
Stephen Doud
Honored Contributor

Re: Script for automation in 3 node cluster

Consider using System Management Homepage GUI with Serviceguard Manager plug-in. That will make some of your life easier, but it will not deal with sub-systems such as LVM PV/VG/lvol modifications.

To see if SMH-SGMgr is running on your Serviceguard server, use a URL of this syntax:

http://:2301/