Operating System - HP-UX
1835205 Members
2890 Online
110077 Solutions
New Discussion

Failover database application

 
SOLVED
Go to solution
Gary Hines
Advisor

Failover database application

Hi All,
Situation:
1) 2-node cluster, hp1 and hp2 with VA7100 array
2) Failover VG is vg01 which contains the data volumes and the volume with the database application (UniVerse)
3) The database volume (/dev/vg00/lvuv) is mounted under /uv on hp1, and fails over to same on hp2
4) hp2 has a VG, vg01bcv, which is used to snapshot vg01 every night using Business Copy
5) hp2 runs backup after copy, but is otherwise idle.

I've installed a copy of UniVerse to /dev/vg00/lvuv to use for testing and large reports on hp2. Now I'm trying to figure out the best way to mount it in regards to failovers. If I mount it under /uv, which is where /dev/vg01/lvuv would go on failover, what would happen? Would I still be able to shut down the testing version, and start the failed over copy of the DB. Almost forgot, there's 3 small files in the / directory, that point to the locations of the database, so if I put it somewhere else, I'll have to swap files or something before starting the failed over copy...

Anybody else tried anything like this? Thanks for any pointers.

Gary
7 REPLIES 7
Michael Steele_2
Honored Contributor

Re: Failover database application

You're going to have to make a new package and enable it. No biggie.

cmmakepkg -p test_package.conf

vi test...
fill in the template
I'd leave AUTO_RUN / PKG_SWITCHING_ENABLED off.

cmmakepkg -s test_package.conf

vi test...
fill in file systems, vgs, etc.

I'd use the same network but remember, with the extra traffic you're production heartbeat latency will increase.

Select all the defaults if in doubt or compare to the other package values.

cmcheckconf -P test_package.conf

cmapplyconf -P test_package.conf

vgchange -c y vg##
vgchange -a n vg##

cmmodpkg -e test package

Failover testing with cmmodpkg disable node1. Don't cmhaltnode or anything else with the cluster.
Support Fatherhood - Stop Family Law
Gary Hines
Advisor

Re: Failover database application

I'm not quite sure what you're getting at here. From what I can tell, you're saying that I need to setup a separate package for the test package, which I can handle. But when failover occurs from hp1 to hp2, would the test package know that it needs to shutdown before /dev/vg00/lvuv attempts to mount under /uv on the backup system? Thanks again for any help.
Michael Steele_2
Honored Contributor
Solution

Re: Failover database application

Regarding....

"...But when failover occurs from hp1 to hp2, would the test package know that it needs to shutdown before /dev/vg00/lvuv attempts to mount under /uv on the backup system? Thanks again for any help. ..."

Of course. ????

Refer to your current package.cntl file. Aren't logical volumes and file systems indicated here?

SG binaries handle everything. SG binaries bypass the normal config files of HP-UX. You don't use /etc/fstab because the SG binaries don't refer to /etc/fstab they mount via the package.cntl file entries.

This is MC/ServiceGuard right? You've tested cluster and LAN failovers right?

Attach your cluster.ascii file also run and attach the cmscancl and cmviewcl -v reports.
Support Fatherhood - Stop Family Law
Sridhar Bhaskarla
Honored Contributor

Re: Failover database application

Hi Gary,

Frederick has a point.

However, you cannot use /dev/vg00/lvuv and you must define another disk in a seperate vg that is shared across both the systems. Though you wouldn't use it on the primary ever, since this is a two node cluster, you don't have much choice.

Then you will have to write quite some scripting to achieve it
.
Your test package should constantly be monitoring the original package. If it finds either the node or the package down|halting status, it should go down itself. It is achieved by defining the monitoring script as a service. Put a loop in there that checks for the primary node and package continuously and exits if it doesn't find. Once ServiceGuard finds the script (service) not running anymore, it will bring down the package and hence the logical volume.

Do not keep any code in the startup and shutdown procedures. This will ensure speedy shutdown of the package.

Also define only one node which is the failover node in the package configuration file.

Do thorough testing before implementing it into production.

-Sri



You may be disappointed if you fail, but you are doomed if you don't try
Michael Steele_2
Honored Contributor

Re: Failover database application

Sridhar's absolutely right. You can mount anything from vg00.
Support Fatherhood - Stop Family Law
Michael Steele_2
Honored Contributor

Re: Failover database application

Sridhar's absolutely right. You can't mount anything from vg00.
Support Fatherhood - Stop Family Law
Gary Hines
Advisor

Re: Failover database application

Thanks to both of you. I now understand what I'll need to do, and unfortunately, it's not going to be easy enough to fit it into my schedule anytime soon. Thanks again for all the help!

Gary