Skip Navigation Links | |
Exit Print View | |
Oracle Solaris Cluster Data Service for SAP NetWeaver Guide Oracle Solaris Cluster 4.1 |
This example shows how to install a dual stack with enqueue replication on a two-node cluster consisting of the nodes pbono1 and pbono2. The chosen enqueue replication model requires different instance numbers between central services and the replicated enqueue server.
In this example, the primary application instance is installed in a failover resource group. Two additional dialog instances are deployed on the physical hosts, pbono1 and pbono2, in a multiple-master resource group.
Pick a database that can be made highly available. Depending on your choice, you might need a different resource group layout for the database.
The logical host are as follows:
bono1 — Central services
bono2 — Database
bono3 — Replicated enqueue server
bono4 — Primary application instance
The following instance numbers will be installed.
00 — Central services for ABAP
01 — Central services for Java
10 — Replicated enqueue server ABAP
11 — Replicated enqueue server Java
02 — Primary application instance
03 — Additional dialogue instance on pbono1
04 — Additional dialogue instance on pbono2
You need the following resource groups:
Database — db-rg (failover)
Central services — scs-rg (failover/positive affinity for rep-rg)
Replicated enqueue services — rep-rg (failover)
Primary application instance — pas-rg (failover)
Additional application instance — dia-rg (multiple masters)
How to Prepare the Hosts
On all Oracle Solaris 11 hosts, add the following packages to install SAP:
# pkg set-publisher -O your repository solaris # pkg install solaris-large-server # pkg install solaris-desktop # pkg install motif # pkg install unrar # pkg install xclock # pkg install expect # pkg install library/medialib # pkg install pkg:/developer/library/lint # svcadm enable svc:/application/graphical-login/gdm:default # pkg install pkg:/compatibility/ucb # svcadm enable svc:/network/login:rlogin # svcadm enable telnet For additional locales, do the following: # pkg change-facet facet.locale.*=True # pkg install system/input-method/iiim # pkg install pkg:/system/locale/extra # pkg install pkg:/library/motif/libdpstkxm
On all hosts, add modifications for SAP to the /etc/system directory and reboot.
# set rlim_fd_cur=8192
For 7.3, add 40 GBytes swap space per node.
Add a fully qualified domain name to all hostnames and logical hosts in the /etc/hosts directory.
Add the following groups.
# groupadd -g 700 sapinst # groupadd -g 701 sapsys # groupadd -g 702 sdba
Add the users as follows:
# useradd -o -u 0 -g 1 -d / -c "validation" -s /bin/tcsh emroot On Oracle Solaris 11: # useradd -o -u 699 -g 1 -d / -c "validation" -s /bin/tcsh emroot # useradd -u 700 -g 701 -m -d /export/qe3adm \ -c "SAP system administrator" -s /bin/tcsh qe3adm # useradd -u 701 -g 702 -m -d /export/sdb \ -c "SAPDB software owner" -s /bin/tcsh sdb # useradd -u 702 -g 701 -m -d /export/sqdqe3 \ -c "Owner of the database instance QE3" -s /bin/tcsh sqdqe3 # useradd -u 703 -g 701 -m -d /export/sapadm \ -c "SAP system administrator" -s /bin/tcsh sapadm # useradd -u 704 -g 701 -m -d /export/daaadm \ -c "owner of the instance DAA" -s /bin/tcsh daaadm
Depending on the database of your choice, you might need different users other than sdb and sqdqe1.
Place all the users except sdb and emroot in the sapinst group.
You must place sqdqe3 in the sdba group. Whether you need the sdb user or others will depend on the database that you choose.
Give daaadm a password that is the same as the master password you will choose later on.
Note - On all nodes, QE3 is the SAP system name in this example.
Do not give a password to the sdb user.
Add the users, qe3adm and sapadm, to the sapinst group in the /etc/group directory.
Add the user, sqdqe3, to the sdba group in the /etc/group directory.
Define the project for QE3 on all the nodes.
QE3:223:SAP System QE3:daaadm,emroot,qe3adm,sapadm,\ sdb,sqdqe3::process.max-file-descriptor=(basic,65536,deny) \ ;process.max-sem-nsems=(priv,2048,deny) \ ;project.max-sem-ids=(priv,9216,deny) \ ;project.max-shm-ids=(priv,256,deny) \ ;project.max-shm-memory=(priv,18446744073709551615,deny)
Define the project in the /etc/user_attr directory on all the nodes.
qe3adm::::project=QE3 sqdqe3::::project=QE3 sdb::::project=QE3 emroot::::project=QE3 sapadm::::project=QE3
Give the sidadm user cluster administration rights on all the nodes.
# usermod -A solaris.cluster.admin qe3adm # for 7.30 (kernel 7.20_EXT)
Note - If you want to do the installation as root, root must have project limits of QE3. On Oracle Solaris 11 systems, the alternative to the root user is sudo su as UID 0 will not work for emroot. The alternate user requires a modification in the /etc/sudoers directory.
The following links are assumed on the global mount at /sapstore.
# mkdir /sapstore/sap # mkdir /sapstore/sapmnt # mkdir /sapstore/sapdb # ln -s /sapstore/sapdb /sapdb # ln -s /sapstore/sap /usr/sap # ln -s /sapstore/sapmnt /sapmnt
This example is based on a lab storage layout. On production systems, the process will be different. In this example, you need only one HAStoragePlus resource. On production systems, you will need a different layout.
How to Create Resource Groups
Create a resource group scs-rg containing the HAStoragePlus resource, and a logical host to contain the central services like the message server, the enqueue server, and a logical host.
Ensure that the resource group containing the HAStoragePlus resource is online on the node where you want to install SAP.
Set the AffinityOn property to TRUE, if it is not done already.
# clrt register HAStoragePlus # clrg create scs-rg # clrslh create -g scs-rg bono-1 Note: Create the HAStoragePlus resource here, if appropriate. # clrg online -eM +
Create a resource group with a logical host db-rg, to contain the database.
# clrg create db-rg # clrslh create -g db-rg bono-2 Note: Create the HAStoragePlus resource here, if appropriate. # clrg online -eM db-rg
Create a resource group with a logical host rep-rg, to contain the replicated enqueue server.
# clrg create rep-rg # clrslh create -g rep-rg bono-3 Note: Create the HAStoragePlus resource here, if appropriate. # clrg online -eM rep-rg
Set the affinity from scs-rg to rep-rg.
# clrg set -p rg_affinities=+rep-rg scs-rg
Create a resource group with a logical host pas-rg, to contain the primary application instance DVBEMGS02.
# clrg create pas-rg # clrslh create -g pas-rg bono-4 Note: Create the HAStoragePlus resource here, if appropriate. # clrg online -eM pas-rg
Create a multiple-master resource group dia-rg, for the additional application instances.
# clrg create -p maximum_primaries=2 -p desired_primaries=2 dia-rg
Ensure that no logical host is deprecated.
For all deprecated interfaces of the logical hosts, do the following:
ifconfig if -deprecated up
Notes about SAP installation
Install SAP in the layout of your choice.
Install everything on one node of the cluster and redistribute it when you create the resources. If you run the installation in a VNC session, log in as emroot to get the right project
Configure all logical hosts as not deprecated.
All DVDs must be on a local drive. Before you install additional dialog instances, bring the previous instances and the database under cluster control. However, do not test the failover.
After the installation, copy the /etc/services directory on all nodes.
Copy all the user home directories to all the nodes, including daadm.
Set the interfaces of the logical host to deprecated. For example:
ifconfig nge0:1 deprecated up
Configure SAP for the Java stack
As long as the JAVA stack does not detect that the database is online on a remote node, unset the database start from the application instance's start profile.
# Start_Program_00 = immediate $(_DB)
Configure SAP for the enqueue server
To recover the enqueue replication after network outages, add the following to the instance profile of the enqueue replication server.
# enque/enrep/keepalive_count = 1
Register the resource types
# clrt register sapstartsrv # clrt register sapcentr # clrt register saprepenq # clrt register sapdia # clrt register saprepenq_preempt
Make the database highly available
Follow the instructions in the appropriate Oracle Solaris Cluster documentation. Name the database as db-rs.
Register the SAP resources with the appropriate commands
Follow the instructions in the appropriate Oracle Solaris Cluster documentation. Name the database as db-rs.
Create the sapstartsrv resource for the ABAP central services resource
As qe3adm:
call stopsap r3 ASCS00 bono-1
kill the sapstartsrv process for the instance ASCS00
# clrs create -d -g scs-rg -t sapstartsrv \ -p sid=QE3 \ -p sap_user=qe3adm \ -p instance_number=00 \ -p instance_name=ASCS00 \ -p HOST=bono-1 \ -p timeout_return=20 \ -p debug_level=0 \ -p resource_dependencies_offline_restart=hsp-rs \ abapscs-strt-rs
Create the ABAP central services resource
# clrs create -d -g scs-rg -t sapcentr \ -p sid=QE3 \ -p sap_user=qe3adm \ -p instance_number=00 \ -p instance_name=ASCS00 \ -p HOST=bono-1 \ -p yellow=20 \ -p debug_level=0 \ -p resource_dependencies_offline_restart=hsp-rs \ -p resource_dependencies=db-rs,abapscs-strt-rs \ abapscs-rs # clrg online -eM +
Create the sapstartsrv resource for the JAVA Central Services Resource
As qe3adm:
call stopsap r3 SCS00 bono-1
kill the sapstartsrv process for the instance SCS01
# clrs create -d -g scs-rg -t sapstartsrv \ -p sid=QE3 \ -p sap_user=qe3adm \ -p instance_number=01 \ -p instance_name=SCS01 \ -p HOST=bono-1 \ -p timeout_return=20 \ -p debug_level=0 \ -p resource_dependencies_offline_restart=hsp-rs \ javascs-strt-rs
Create the JAVA central services resource
# clrs create -d -g scs-rg -t sapcentr \ -p sid=QE3 \ -p sap_user=qe3adm \ -p instance_number=01 \ -p instance_name=SCS01 \ -p HOST=bono-1 \ -p yellow=20 \ -p debug_level=0 \ -p resource_dependencies_offline_restart=hsp-rs \ -p resource_dependencies=db-rs,javascs-strt-rs \ javascs-rs # clrg online -eM +
Create the sapstartsrv resource for the ABAP replicated enqueue service
As qe3adm:
call stopsap r3 ERS10 bono-3
kill the sapstartsrv process for the instance ERS10
# clrs create -d -g rep-rg -t sapstartsrv \ -p sid=QE3 \ -p sap_user=qe3adm \ -p instance_number=10 \ -p instance_name=ERS10 \ -p HOST=bono-3 \ -p timeout_return=20 \ -p debug_level=0 \ -p resource_dependencies_offline_restart=hsp-rs \ abaprep-strt-rs
Create the ABAP replicated enqueue service resource
# /usr/cluster/bin/clrs create -d -g rep-rg -t saprepenq \ -p sid=QE3 \ -p sap_user=qe3adm \ -p instance_number=10 \ -p instance_name=ERS10 \ -p HOST=bono-3 \ -p debug_level=0 \ -p resource_dependencies_offline_restart=hsp-rs \ -p resource_dependencies=abapscs-rs,abaprep-strt-rs \ abaprep-rs # clrg online -eM +
Create the sapstartsrv resource for the JAVA replicated enqueue service
As qe3adm:
call stopsap r3 ERS11 bono-3
kill the sapstartsrv process for the instance ERS11
# clrs create -d -g rep-rg -t sapstartsrv \ -p sid=QE3 \ -p sap_user=qe3adm \ -p instance_number=11 \ -p instance_name=ERS11 \ -p HOST=bono-3 \ -p timeout_return=20 \ -p debug_level=0 \ -p resource_dependencies_offline_restart=hsp-rs \ javarep-strt-rs
Create the JAVA replicated enqueue resource
# /usr/cluster/bin/clrs create -d -g rep-rg -t saprepenq \ -p sid=QE3 \ -p sap_user=qe3adm \ -p instance_number=11 \ -p instance_name=ERS11 \ -p HOST=bono-3 \ -p debug_level=0 \ -p resource_dependencies_offline_restart=hsp-rs \ -p resource_dependencies=javascs-rs,javarep-strt-rs \ javarep-rs # clrg online -eM +
Create the replicated pre-empter
# /usr/cluster/bin/clrs create -d -g scs-rg -t saprepenq_preempt \ -p sid=QE3 \ -p sap_user=qe3adm \ -p repenqres=abaprep-rs \ -p enq_instnr=00,01 \ -p debug_level=0 \ -p resource_dependencies_offline_restart=hsp-rs,abapscs-rs,javascs-rs \ -p resource_dependencies=db-rs \ preempt-rs
Create the sapstartsrv resource for the primary application server resource
As qe3adm:
call stopsap r3 DVEBMGS02 bono-4
kill the sapstartsrv process for the instance DVEBMGS02
# /usr/cluster/bin/clrs create -d -g pas-rg -t sapstartsrv \ -p sid=QE3 \ -p sap_user=qe3adm \ -p instance_number=02 \ -p instance_name=DVEBMGS02 \ -p HOST=bono-4 \ -p timeout_return=20 \ -p debug_level=0 \ -p resource_dependencies_offline_restart=hsp-rs \ pas-strt-rs
Create the primary application server resource
# /usr/cluster/bin/clrs create -d -g pas-rg -t sapdia \ -p sid=QE3 \ -p sap_user=qe3adm \ -p instance_number=02 \ -p instance_name=DVEBMGS02 \ -p HOST=bono-4 \ -p debug_level=0 \ -p resource_dependencies_offline_restart=hsp-rs \ -p resource_dependencies=db-rs,abapscs-rs,javascs-rs,pas-strt-rs \ pas-rs # clrg online -eM +
Create the sapstartsrv resource for the additional application server
On the first node, as qe3adm:
call stopsap r3 D03
kill the sapstartsrv process for the instance D03
On the second node, as qe3adm:
call stopsap r3 D04
kill the sapstartsrv process for the instance D04
# /usr/cluster/bin/clrs create -d -g dia-rg -t sapstartsrv \ -p sid=QE3 \ -p sap_user=qe3adm \ -p instance_number{pbono1}=03 \ -p instance_number{pbono2}=04 \ -p instance_name{pbono1}=D03 \ -p instance_name{pbono2}=D04 \ -p timeout_return=20 \ -p debug_level=0 \ -p resource_dependencies_offline_restart=hsp-rs \ dia-strt-rs
Create the additional application server resource
# /usr/cluster/bin/clrs create -d -g dia-rg -t sapdia \ -p sid=QE3 \ -p sap_user=qe3adm \ -p instance_number{pbono1}=03 \ -p instance_number{pbono2}=04 \ -p instance_name{pbono1}=D03 \ -p instance_name{pbono2}=D04 \ -p HOST{pbono1}=pbono1 \ -p HOST{pbono2}=pbono2 \ -p debug_level=0 \ -p resource_dependencies_offline_restart=hsp-rs \ -p resource_dependencies=db-rs,abapscs-rs,javascs-rs,dia-strt-rs \ dia-rs # clrg online -eM +
How to Integrate Oracle Solaris Cluster Management and SAP Instance Management
Download and install the latest hostagent.
Configure every instance profile with the following lines, assuming that saphascriptco.co is in the /usr/sap/hostctrl/exe/saphascriptco directory.
# # SAP HA Script Connector # service/halib = /usr/sap/hostctrl/exe/saphascriptco.so service/halib_cluster_connector = / /opt/ORCLscsapnetw/saphacmd/bin/sap_orcl_cluster_connector service/halib_debug_level = 1
Create the /usr/local/bin directory on every node.
Create the following symbolic links under the /usr/local/bin directory on every node.
# ls -la /usr/local/bin total 8 drwxr-xr-x 2 root root 4 May 29 02:22 . drwxr-xr-x 3 root root 3 May 29 02:13 .. lrwxrwxrwx 1 root root 48 May 29 02:22 / functions_sap_ha -> /opt/ORCLscsapnetw/saphacmd/bin/functions_sap_ha lrwxrwxrwx 1 root root 58 May 29 02:14 / sap_cluster_connector -> /opt/ORCLscsapnetw/saphacmd/bin/sap_orcl_cluster_connector # cd /usr/local/bin # ln -s /opt/ORCLscsapnetw/saphacmd/bin/functions_sap_ha / ./functions_sap_ha # ln -s /opt/ORCLscsapnetw/saphacmd/bin/sap_orcl_cluster_connector / sap_orcl_cluster_connector
Restart the instances and the corresponding sapstartsrv process.
Generic test case
For all sapstartsrv resources, kill the sapstartsrv process. The underlying instance will be restarted as well.
For all instance resources, kill the instance processes. The underlying instance will be restarted or failed over in case of a central service.