Page
Page
Contents
3 Using the Sybase ASE Toolkit in a Serviceguard Cluster on HP-UX
Page
1 Introduction
Table 1 Toolkit Name/Application Extension and Application Name
http://software.hp.com
HP-UX
11i software
High availability
2 Using the Oracle Toolkit in an HP Serviceguard Cluster
“Configuring and packaging Oracle
single-instance
database to
co-exist
with SGeRAC packages” (page 52)
•Configuring shared file system using CFS
The shared file system can be a CFS mounted file system
The control files, table spaces, and
/home/Oracle/dbs
•Multiple Instance Configuration
◦For LVM
◦For VxVM
◦For CFS
Page
Toolkit Overview
Table 2 Legacy Package Scripts (continued)
Table 3 Variable or Parameter Name in haoracle.conf file
Table 3 Variable or Parameter Name in haoracle.conf file (continued)
Page
Support for multiple listeners
Support for database hang detection
Package Setup and Configuration
If you are using LVM or VxVM
If you are using CFS
Assuming Oracle is installed in
Bring the database down
If you are using LVM - unmount and deactivate the volume group
If you are using VxVM - unmount and deport the disk group
•Create the Serviceguard package using legacy method
If you are using LVM
VOLUME GROUPS
Define the file systems which are used by the Oracle instance
LV[0]=/dev/vg00_${SID_NAME}/lvol1
FS[0]=/${SID_NAME}
LV[0]=/dev/vg00_ORACLE_TEST0/lvol1
FS[0]=/ORACLE_TEST0
If you are using VxVM
cmmodpkg
To reset the restart counter execute the following command:
cmmodpkg [-v] [-nnode_name] -R -sservice_name package_name
/etc/cmcluster/pkg/ORACLE_TEST0/ toolkit.sh
function customer_defined_run_cmds
SERVICE_NAME
If the listener should also be monitored, another service must be added
NOTE: If listener monitoring is not intended, do not create a new service
•The Oracle toolkit user configuration file
ASM_DISKGROUP, ASM_VOLUME_GROUP, ASM_HOME, ASM_USER, ASM_SID
KILL_ASM_FOREGROUNDS
Table 5 Files in ORACLE_TEST0
Another example to create the Serviceguard package using modular method:
# cmmakepkg -mecmt/Oracle/Oracle pkg.conf
where
'ecmt/Oracle/Oracle' is the ECMT Oracle toolkit module name
HP Enterprise Cluster Master Toolkit
a.Edit the package configuration file and populate the new values
b.Halt the package
c.Apply the package configuration file
d.Start the package
Following are the supported versions of HP Serviceguard:
•A.11.19
•A.11.20
High Availability Support for Oracle ASM with Serviceguard
www.hp.com/go/hpux-serviceguard-docs
Figure 1 Oracle database storage hierarchy without and with ASM
Why ASM over LVM
ASM-over-LVM
ASM-over-LVM
The disadvantages of the ASM-over-LVMconfiguration are as follows:
Sample Command Sequence for Configuring LVM Volume Groups
2.For each of the two PVs, create a corresponding LV
• Create an LV of zero length
• Mark the LV as contiguous
Serviceguard support for ASM on HP-UX11i v3 onwards
http:
2 logical volumes are also supported as members of the ASM disk groups
Framework for ASM support with Serviceguard
•Many database instances can share one ASM instance per node
How Toolkit Starts, Stops and Monitors the Database instance
Serviceguard Toolkit Internal File Structure
Figure 5 Internal file structure for legacy packages
Figure 6 Internal file structure for modular packages
ASM File Descriptor Release
•Halt the ASM and database instances
Configuring ASM in a Serviceguard environment and creating the ASM instance
Creating an Oracle database on an ASM disk group in a Serviceguard environment
3.Configure a listener (if required)
Table 6 Variables or Parameters in haoracle.conf file
Table 6 Variables or Parameters in haoracle.conf file (continued)
Page
Oracle Legacy Package Configuration Example
1.ASM Multi-NodePackage Setup and Configuration
Log in as root:
#mkdir /etc/cmcluster/asm_package_mnp
#cd /etc/cmcluster/asm_package_mnp
In the package configuration file asmpkg.conf, edit the following parameters:
In the package control script asmpkg.cntl, edit the following parameters:
Configure the package service:
Add in the customer_defined_run_cmds function:
Add in the customer_defined_halt_cmds function:
#cmmakepkg -pdb1pkg.conf
#cmmakepkg -sdb1pkg.cntl
Edit the package configuration file db1pkg.conf as shown below:
PACKAGE_NAME - Set to any name desired
PACKAGE_TYPE - Set to FAILOVER
Configure the service parameters:
SERVICE_NAME ORACLE_DB1_SRV
SERVICE_NAME ORACLE_LSNR_SRV
Edit the package control script db1pkg.cntl as shown below:
SERVICE_NAME[0]="ORACLE_DB1_SRV
asmpkg.conf
/etc/cmcluster/asm_package_mnp
# cmmakepkg -mecmt/Oracle/Oracle asmpkg.conf
Configure the Serviceguard parameters as mentioned below:
package_name - Set to any name desired
Edit the dependency parameters as shown:
dependency_name asm_dependency
dependency_condition <ASM MNP package_name>=up dependency_location same_node
Configure the ip_subnet and ip_address parameters
“Support For Oracle Database without ASM” (page 9)
For Oracle 10g:
#$ORACLE_HOME/bin/srvctl modify database -d<dbname> -ymanual For Oracle 11g:
#$ORACLE_HOME/bin/srvctl modify database -d<dbname> -yMANUAL
b.Log in as root and create the database package directory:
#mkdir /etc/cmcluster/db1_package
1)Set attribute ASM to yes. ASM = yes
ASM_HOME=/ASM_TEST0
ASM_USER=Oracle
ASM_SID=+ASM
7)Apply the package configuration
ORACLE_ADMIN, SID_NAME, LISTENER, LISTENER_NAME
Start the database package. There is no need to
2.Migration to a legacy database package using ASM:
•Configure an ASM MNP as mentioned in this document
•Apply the ASM MNP configuration
•Apply the new modular package configuration using cmapplyconf
•Start the database package
4.Migration to a modular database package using ASM:
•Configure a modular ASM MNP as mentioned in this document
Refer to the Whitepaper
$ cmmodpkg -e -n<node1> -n<node2> ORACLE_TEST0 $ cmmodpkg -eORACLE_TEST0
Managing ServiceGuard
http://www.hp.com
Serviceguard
For Example:
Listener:
PASSWORDS_<listener_name
LISTENER_PASS
Disable the failover of the package through
•Pause the monitor script
•If required, stop the Oracle database instance as shown below:
Re-start
Allow monitoring scripts to continue normally as shown below: $ rm
•Enable the package failover
$ cmmodpkg -eORACLE_TEST0
Serviceguard Extension for RAC/opt/cmcluster/SGeRAC/toolkit/README file
The ASM
The ASM Disk Groups and underlying LVM volume groups used by the
Attributes newly added to ECMT Oracle toolkit
Figure 7 Packages in a coexistence environment
Page
ASM_DISKGROUP[1] asm_dg2
ASM_VOLUME_GROUP[0] vgora_asm1 ASM_VOLUME_GROUP[1] vgora_asm2
R2 this is same as CRS Home: ASM_HOME /ASM_TEST0
ASM_USER oracle
ASM_SID +ASM
Page
Configure the Package IP and the SUBNET
6.Run the database package:
ECMT Oracle Toolkit Maintenance Mode
If the
–servername
RapidInstall
NOTE: Refer to the latest Oracle document available in Oracle support website
3 Using the Sybase ASE Toolkit in a Serviceguard Cluster on HP-UX
Shared Configuration
master.dat
sysprocs.dat
sybsysdb.dat
<ASE_SERVER.cfg
/etc/passwd file:
file:
Assuming that the name of the ASE instance is 'SYBASE0', create the following:
Building an HA Cluster
Set up additional database logical volumes
File system for Sybase ASE data files:
/SYBASE0 - mount point for /dev/vg03_SYBASE0/lvol1
•Sybase ASE system data tables
•Sybase ASE indexes
•Sybase ASE stored procedures
Table 7 Sybase ASE attributes (continued)
•Module Script (tkit_module.sh)
On package
2.On package halt, it stops the Sybase ASE instance and monitor process
•Package Setup and Configuration
Building an HA Cluster Configuration
hpux-serviceguard-docs
The following is an example of specifying Sybase ASE specific variables:
“Configuring Access Roles” (page 67)
ecmt/sybase/sybase/MONITOR_INTERVAL
ecmt/sybase/sybase/TIME_OUT
ecmt/sybase/sybase/RECOVERY_TIMEOUT
To reset the restart counter execute the following command cmmodpkg [-v] [-n
node_name] -R -sservice_name package_name
Follow the steps below to create Serviceguard package using Modular method:
1.Create a directory for the package
#mkdir /etc/cmcluster/pkg/sybase_pkg
cmapplyconf -PSYBASE0
cmmodpkg -e -n<node1> -n<node2> SYBASE0 cmmodpkg -eSYBASE0
cmviewcl
•USER_NAME
•USER_HOST
Page
•Sybase ASE interfaces file
This needs to be edited to have the re-locatable IP-address,as follows:
Use the
- /etc/hosts
/etc/hosts
following procedure should be used:
/opt/cmcluster/pkg/SYBASE0
command:
Create an empty file
<TKIT_DIR>/sybase.debug
4 Using the DB2 database Toolkit in a Serviceguard Cluster in HP-UX
the Serviceguard user manual available at
http://www-306.ibm.com/software/data/db2/9/sysreqs.html
Use the DB2 Setup Wizard or
db2install
IBM provides a utility called
To enable the communication between the partitions, edit the
/etc/services, /etc/ hosts
.rhosts
Edit the ~/.rhosts file for the instance owner:
As root, edit the
As an instance owner execute the following:
[payroll_inst@node1/]> db2set DB2COMM=tcpip
[payroll_inst@node1/]> db2stop
[payroll_inst@node1/]> db2start
NOTE: For multi-partitioneddatabase using DB2 V9.7, a parameter called
https:// publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp
https:// publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp
Multiple Instance Configurations
/dev/vg_employee
/mnt/employee
/etc/ cmcluster/modules/ecmt/db2
(hadb2.conf)
(toolkit.sh)
hadb2.sh
hadb2.mon
Table 10 Variables in hadb2.conf File (continued)
Table 11 Modular Package Scripts
Assuming DB2 is already installed
To create a logical volume infrastructure on a shared disk, see
Page
Creating Serviceguard package using Modular method
•Create the Serviceguard package using Modular method
Follow these steps to create Serviceguard package using Modular method:
1.Create a directory for the package:
2.Copy the toolkit template and script files from db2 directory:
3.Create a configuration file (pkg.conf) as follows:
Page
Creating Serviceguard package using legacy method
Follow these steps to create Serviceguard package using legacy method
The Serviceguard package control script (pkg.cntl)
◦VOLUME GROUPS
Define the file systems which are used by the DB2 instance
customer_defined_run_cmds
The Serviceguard package configuration file (pkg.conf)
hadb2.conf
/etc/cmcluster/pkg/db2_pkg
Page
Enable monitoring scripts to continue monitoring by removing
db2.debug
•Enable the package failover:
5 Using MySQL Toolkit in a HP Serviceguard Cluster
/etc/cmcluster/modules/ecmt/ mysql
Table 14 ADF File in Modular Package in MySQL
/etc/cmcluster/scripts/ecmt/mysql
Table 15 Script Files
The database server can be configured in two different ways:
To run MySQL in a HP Serviceguard environment:
•Primary Node
2.The relocatable IP address is removed from this node
•Standby Node
1.Volume groups are activated and file systems are mounted
chapter of
manual available at
3.Copy the configuration file /etc/my.cnf to /MySQL_1/my.cnf
Copy the configuration file
Modify
MySQL Configuration File (my.cnf)
/etc/my.cnf
/MySQL_1/my.conf
Table 18 Parameters in MySQL Configuration File (my.cnf)
mysqld_safe
Page
Table 20 Package Configuration File Parameters (continued)
Table 21 Package Control Script Parameters
SERVICE_NAME="mysql1_monitor
SERVICE_CMD="/etc/cmcluster/pkg/MYSQL1/toolkit.sh monitor
SERVICE_RESTART="-r0
2.Copy the toolkit template and script files from mysql directory
ecmt/mysql/mysql
TKIT_DIR /etc/cmcluster/pkg/pkg01
Create a directory in the cmcluster directory for each package (for example
/etc/ cmcluster/pkg/MySQL1
cmmakepkg -sMySQL1.cntl (control template)
“Package Configuration File and Control Script” (page 92)
chown mysql:mysql /etc/cmcluster/pkg/MySQL1
8.Distribute the package directory to all nodes in the cluster
Apply the Serviceguard package configuration using the command
Do's
Don'ts
6 Using an Apache Toolkit in a HP Serviceguard Cluster
Table 23 Files in Apache Toolkit (continued)
Table 24 (page 98)
Table 24 Files in Modular Method Packaging
hahttp.conf
/opt/hpws22/apache
httpd.conf
•Each node must have the same version of the HP-UXbased Apache Web Server
Apache Web Server can be configured in two different ways:
(local config) by putting the configuration and other
/opt/hpws22/apache/conf/httpd.conf
/shared/apache_1
1.Create a Volume Group "vg01" for a shared storage
2.Create a Logical Volume "lvol1" on the volume group "vg01
3.Construct a new file system on the Logical Volume "lvol1
Create a directory named
Active - Passive
Method #1
2.Copy all files from /opt/hpws22/apache to /mnt/apache on any one node
Remove or rename
Method #2
Page
/etc/cmcluster/pkg/http_pkg1/ toolkit.sh start
/etc/cmcluster/pkg/http_pkg1/toolkit.sh stop
/etc/cmcluster/pkg/http_pkg1/toolkit.sh start
Configure the Apache user configuration file
4.Copy this package configuration directory to all other package nodes
/opt/ cmcluster/toolkit/apache
/etc/cmcluster/scripts/ ecmt/apache
Toolkit User Configuration
Table 26 (page 106)
Table 26 Configuration Variables
ALERT_MAIL_ID
ALERT_MAIL ID
/etc/ cmcluster/pkg/http_pkg1
1.Edit the Apache Toolkit user configuration file
2.Copy the toolkit template and script files from apache directory
ecmt/apache/apache
Page
Start the apache instance again if stopped
cd /etc/cmcluster/pkg/http_pkg1/ $PWD/toolkit.sh start
◦Enable the package failover cmmodpkg -ehttp_pkg1
7 Using Tomcat Toolkit in a HP Serviceguard Cluster
Table 28 ADF File for Modular Method of Packaging
/etc/cmcluster/scripts/ecmt/tomcat
Table 29 Files For Modular Method of Packaging
hatomcat.conf
•conf - Server configuration files (including server.xml)
/opt/ hpws22/tomcat
conf
/opt/hpws/tomcat
CATALINA_BASE
hatomcat.conf
/opt/hpws22/tomcat/conf/ server.xml
1.Using LVM
a.Create a Volume Group "vg01" for a shared storage
b.Create a Logical Volume "lvol1" on the volume group "vg01
c.Construct a new file system on the Logical Volume "lvol1
e.Mount device "/dev/vg01/lvol1" to the "/shared/tomcat_1
f.Copy all files from "/opt/hpws22/tomcat/conf" to "/shared/tomcat_1/conf
a.Method
2)Copy all files from /opt/hpws22/tomcat to /mnt/tomcat on any one node
b.Method
$ /opt/hpws22/util/ altroot.sh
--tomcat /mnt/tomcat
cluster_config_file
/etc/cmcluster/ pkg/tomcat_pkg1
tomcat_pkg.conf
tomcat_pkg.cntl
$mkdir /etc/cmcluster/pkg/tomcat_pkg1
Example 1 For example:
Configure the Tomcat user configuration file
Page
Table 30 Legal Package Scripts
Table 31 (page 119)
Table 31 User Configuration Variables
Table 31 User Configuration Variables (continued)
1.Edit the Tomcat Toolkit user configuration file
CATALINA_HOME="/opt/hpws22/tomcat" CATALINA_BASE="/shared/tomcat_1
Page
Start the tomcat instance again if it is stopped using cd
/etc/cmcluster/pkg/ tomcat_pkg1/ $PWD/toolkit.sh start
6.Allow monitoring scripts to continue normally as shown below:
rm -f /etc/cmcluster/pkg/tomcat_pkg1/tomcat.debug
/etc/cmcluster/pkg/tomcat_pkg1
http_pkg1.monitor
Example 2 For example:
VG[0]="vg01
LV[0]="/dev/vg01/lvol1
FS[0]="/share/pkg_1
Page
8 Using SAMBA Toolkit in a Serviceguard Cluster
/etc/cmcluster/modules/ecmt/samba
Table 33 Attribute Definition File (ADF)
/etc/cmcluster/scripts/ecmt/samba
Table 34 Scripts name
Configuration rules include the following:
Multiple HP CIFS Server Instances Configuration
/opt/samba/bin/stopsmb
Ensure the RUN_SAMBA parameter in the
/etc/rc.config.d/samba
Here is a simple example of a multiple-instanceconfiguration
Copy the workgroup line from the /etc/opt/samba/smb.conf file
Add in the rest of desired configuration items
smbpasswd <username
To use a shared file system, the file system must reside on shared storage
/shared/smb1
3.Using CFS
HP Serviceguard
/shared/smb1
MAX_CONFIGURED_PACKAGES
/etc/cmcluster/ smb1
To create both the package configuration (smb_pkg.conf) and package control
(smb_pkg.cntl)
/etc/cmcluster/smb1
Create a package configuration file with the command
Create a package control file with command
/etc/cmcluster/smb1/toolkit.sh start
/etc/cmcluster/smb1/ toolkit.sh stop
#Stop the HP CIFS Server
/etc/cmcluster/smb1/toolkit.sh stop
Configure the user configuration file
Table 35 Legacy Package Scripts (continued)
Creating Serviceguard package using Modular method
#mkdir /etc/cmcluster/pkg/samba_pkg
2.Copy the toolkit template and script files from samba directory
#cd /etc/cmcluster/pkg/samba_pkg/ #cp /opt/cmcluster/toolkit/samba
Page
Table 36 User Configuration Variables (continued)
/etc/ cmcluster/smb1
1.Edit the SAMBA Toolkit user configuration file
NETBIOS_NAME=smb1
CONF_FILE=/etc/opt/samba/smb.conf.${NETBIOS_NAME}
Apply the package configuration using the command
smb_pkg.conf
/etc/ cmcluster/pkg/SMB_1
as shown below: $ touch
•If required stop the CIFS Server instance and as shown below:
•Client Applications
•File Locks
•Print Jobs
•Symbolic Links
•Security Files and Encrypted Passwords
•Username Mapping File
•HP CIFS Server as a WINS Server
/var/opt/samba/locks/browse.tdb
browse.tdb
•HP CIFS Server as a Master Browser
9 Support and other resources
For the name of the nearest HP authorized reseller, see the following sources:
In the United States, see the HP U.S. service locator web site:
http://www.hp.com/service_locator
docsfeedback@hp.com
•HP ProLiant servers: