**Myself
OpenAIS Cluster Environment
Cluster information
- hostname=host01
- ip= 172.10.10.10
- virtual IP=172.10.10.11
- heartbeat ip=No
- eth0=172.10.10.10 (data no heartbeat)
- eth1=Not use ,
- vgshare=qasdatavg
lv=lvol1,lvol2
- Oracle sid = QAS [Mcod csd,csq,bcd,bcq,j2d,j2q,ecd,ecq]
- SAP sid = j2d,j2q,trex_90,trex_92
- disk on qasdatavg= md0/md1/md2/md3/md4
Create OpenAIS cluster
- Create a shared volume group.
- Create a OpenAIS Cluster.
- Create an application package.
- Dependency or Constraints of Resource cluster startup.
- Maintain cluster.
1. Create a shared volume group
2. Create a OpenAIS Cluster
3. Create an application package.
1. Add primitive oracle listener ora_list_vhost1
| Resources-> ora_list_vhost1 ->Edit-> primitive->add
ID: listener_crmqasdb Class: ocf
Provider:heartbeat
Type: oralsnr
SID=QAS
Add
Name=listener
Value=LISTENER
Name=home
Value=/oracle/QAS/112_64
OK
#Start listener resource
host01:~ # crm resource start ora_list_crmqasdb
|
2. Create New Group Oracle Instant [QAS]
| Resources-> Add->group->
ora_inst_QAS_crmqasdb
primitive
ora_QAS_crmqasdb
ADD
Sid:QAS
Home:/oracle/QAS/112_64
User:oraqas
Shutdown_method:immediate
OK->Apply
Cancel->apply
#Start oracle instant resource
host01:~ # crm resource start ora_inst_QAS_crmqasdb
|
3. [Option] Create New Group SAP CI/ACS [J2D and TREX] Instant
| Note 995116 - Backward porting of sapstartsrv for earlier releases
Manual postprocessing in Release 6.40 for non-Windows platforms
1. Set the "SAPSYSTEM" profile parameter in the start profile in accordance with the value in the relevant instance profile for each instance.
2. The Unicode version of sapstartsrv requires the shared library librfcum. In Release 6.40, this was originally not included in all replication lists (for example, scs.lst and scsclient.lst). After you import Support Package 20, these lists are updated and exist in librfcum. If you want to activate sapstartsrv only by applying the relevant kernel patch or importing sapexe.sar, you can manually copy librfcum until you import Support Package 20.
3. Set up the autostart of sapstartsrv in accordance with Note 823941. You can do this by once installing sapinit on each application server (the required scripts are available in the attachment to this note) and enter the start of sapstartsrv in /usr/sap/sapservices for each instance. During the following OS boot, the start services are started. You can also start the services by executing /usr/sap/sapservices. All entered sapstartsrv are executed as root and started for all systems and instances. The start services are executed as <sid>adm and started for the relevant system. You can also use "sapcontrol -nr <instance no.> -function StartService <SID>" to manually start individual services. For Release 6.40, we currently do not intend to provide an autostart of sapstartsrv using startsap (as in Release 700).
Summary
Symptom
After an SAP upgrade, the SAP Start Service (sapstartsrv) on UNIX platforms is not automatically started when the operating system is started.
Other terms
sapstartsrv, sapinit, installsapinit.sh, configure sapstartsrv as a boot service, sapstartsrv as an SYSV service.
Solution
In order to configure the SAP Start Service (sapstartsrv) as boot service, you must make some manual changes after the upgrade.
Log on to the operating system as user 'root'.
Execute the following command in the 'DIR_PUT/bin' directory (or /usr/sap/jupgrade/exe in the case of a Java upgrade):
./installsapinit.sh
The 'sapinit' script was now copied to the correct location and the runlevel directories updated accordingly, so that sapinit is called automatically when the operating system is restarted and starts sapstartsrv.
If sapinit/installsapinit.sh does not exist, download the
attached sapinit.tgz (or sapinit.sar). The archive
contains both scripts. Extract the archive to a temporary
directory and proceed as described above.
Since 'sapservices' is read by 'sapinit', the file permissions should be set to 0755 (rwxr-xr-x).
For IBM i, you must set the owner to QSECOFR and the file permissions to 0644 (-rw-r--r--).
#!/bin/sh
LD_LIBRARY_PATH=<DIR_EXECUTABLE>:$LD_LIBRARY_PATH;export LD_LIBRARY_PATH;<DIR_EXECUTABLE>/sapstartsrv pf=<DIR_PROFILE>/<INSTANCE_START_profile> -D -u <sid>adm
# if exists:
LD_LIBRARY_PATH=<DIR_EXECUTABLE>/:$LD_LIBRARY_PATH;export LD_LIBRARY_PATH;<DIR_EXECUTABLE>/sapstartsrv pf=<DIR_PROFILE>/<ASCS_START_profile> -D -u <sid>adm
#!/bin/sh
LD_LIBRARY_PATH=<DIR_EXECUTABLE>:$LD_LIBRARY_PATH;export LD_LIBRARY_PATH;<DIR_EXECUTABLE>/sapstartsrv pf=<DIR_PROFILE>/<INSTANCE_START_PROFILE> -D -u <sid>adm
LD_LIBRARY_PATH=<DIR_EXECUTABLE>:$LD_LIBRARY_PATH;export LD_LIBRARY_PATH;<DIR_EXECUTABLE>/sapstartsrv pf=<DIR_PROFILE>/<SCS_START_profile> -D -u <sid>adm
Replace <DIR_EXECUTABLE> and <DIR_PROFILE> with the value of SAP profile parameters DIR_EXECUTABLE or DIR_PROFILE, and replace the profile files with the relevant file names.
This syntax is applicable to Linux and Solaris/SunOS operating systems. On AIX, replace 'LD_LIBRARY_PATH' with 'LIBPATH', for HP-UX replace 'LD_LIBRARY_PATH' with 'SHLIB_PATH'.
For IBM i, the following settings are sufficient:
< DIR_EXECUTABLE>/sapstartsrv pf=<DIR_PROFILE>/<INSTANCE_START_profile> -D -u <sid>adm
If available:
< DIR_EXECUTABLE>/sapstartsrv pf=<DIR_PROFILE>/<ASCS_START_profile> -D -u <sid>adm
< DIR_EXECUTABLE>/sapstartsrv pf=<DIR_PROFILE>/<INSTANCE_START_PROFILE> -D -u <sid>adm
< DIR_EXECUTABLE>/sapstartsrv pf=<DIR_PROFILE>/<SCS_START_profile> -D -u <sid>adm
< DIR_EXECUTABLE> and <DIR_PROFILE> must be replaced accordingly.
After that, sapstartsrv is fully functional as start service.
The entry for starting an SAP start service in /usr/sap/sapservices must be made in a single text line without other line breaks.
Instead of making the entry yourself manually in /usr/sap/sapservices, you can also use the sapstartsrv as of Kernel Release 7.01 by executing "sapstartsrv pf=<INSTANCE_START_PROFILE> -reg".
As of Release 7.10, start profiles are no longer used in general. The start entries are in the instance profile instead. In this case, you must specify the relevant instance profile instead of the start profile. However, the start profiles may still be active depending on the upgrade history and upgrade options that were used. Proceed as follows to determine which profile is to be specified. If there are entries in the instance profile "Start_Program" or "Restart_Program", specify the instance profile. Otherwise, specify the start profile.Example for /usr/sap/sapservices:
#!/bin/sh
LD_LIBRARY_PATH=/usr/sap/LNX/DVEBMGS00/exe:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH;/usr/sap/LNX/DVEBMGS00/exe/sapstartsrv pf=/usr/sap/LNX/SYS/profile/START_DVEBMGS00_lnxhost -D -u lnxadm
#!/bin/sh
LD_LIBRARY_PATH=/usr/sap/LNX/JC00/exe:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; /usr/sap/LNX/JC00/exe/sapstartsrv pf=/usr/sap/LNX/SYS/profile/START_JC00_lnxhost -D -u lnxadm
LD_LIBRARY_PATH=/usr/sap/LNX/SCS01/exe:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH;/usr/sap/LNX/SCS01/exe/sapstartsrv pf=/usr/sap/LNX/SYS/profile/START_SCS01_lnxhost -D -u lnxadm
Examples for /usr/sap/sapservices for IBM i:
/usr/sap/DB4/DVEBMGS00/exe/sapstartsrv pf=/usr/sap/DB4/SYS/profile/START_DVEBMGS00_db4host -D -u db4adm
/usr/sap/DB4/JC00/exe/sapstartsrv pf=/usr/sap/DB4/SYS/profile/START_JC00_db4host -D -u db4adm
/usr/sap/DB4/SCS01/exe/sapstartsrv pf=/usr/sap/DB4/SYS/profile/START_SCS01_db4host -D -u db4adm
#Need to download sapstartsrv/ sapcontrol
#Need download sapinit and installsapinit.sh to /tmp
#From Root user
1) chmod 777 installsapinit.sh
2) ./installsapinit.sh
#create file sapservices in the '/usr/sap/'
3)
#!/bin/sh
#!/bin/sh
LD_LIBRARY_PATH=/usr/sap/J2D/SYS/exe/run; export LD_LIBRARY_PATH; /usr/sap/J2D/SYS/exe/run/sapstartsrv pf=/usr/sap/J2D/SYS/profile/S
TART_SCS71_vhost1 -D -u j2dadm
LD_LIBRARY_PATH=/usr/sap/J2D/SYS/exe/run; export LD_LIBRARY_PATH; /usr/sap/J2D/SYS/exe/run/sapstartsrv pf=/usr/sap/J2D/SYS/profile/S
TART_JC80_vhost1 -D -u j2dadm
4) chmod 755 sapservices
#Extract from download or copy from CSD sapstartsrv/sapcontrol /librfccm.so
5) cp /sapmnt/CSD/exe/sapstartsrv /sapmnt/CSD/exe/sapcontrol /sapmnt/CSD/exe/librfcum.so /sapmnt/J2D/exe
6) chown j2dadm:sapsys /sapmnt/CSD/exe/sapstartsrv /sapmnt/CSD/exe/sapcontrol /sapmnt/CSD/exe/librfcum.so
Resources-> Add->group->
sap_inst_CI_QAS_crmqasdb
primitive
### ADD SCS of J2D
sap_inst_SCS_J2D
InstanceName J2D_SCS71_vhost1
START_PROFILE /sapmnt/J2D/profile/START_SCS71_vhost1
### ADD J2D and TREX
For CI of J2D and script start TREX
sap_inst_CI_J2D_TREX
ADD
InstanceName J2D_JC80_vhost1
PRE_START_USEREXIT /clusterconf/QAS/script/startTREX90J2D.sh
START_PROFILE /sapmnt/J2D/profile/START_JC80_vhost1
PRE_STOP_USEREXIT /clusterconf/QAS/script/stopTREX90J2D.sh
AUTOMATIC_RECOVER true
Remove monitoring resource
Set start and stop timeout=480
OK->Apply
Cancel->apply
#Start SAP J2D instant resource
crm resource start sap_inst_CI_QAS_crmqasdb
!!Disable sap_inst_J2D_TREX_crmqasdb resource group
|
4. Dependency or Constraints of Resource cluster startup.
!!Disable Resource SAP Instant and start manual
Order Constraints
5. Maintain cluster.
Normal Status : crm_mon
Maintain
Detail
| Command
|
Start cluster
| rcopenais start
|
Start SAP after cluster all resource on
| su - j2dadm
startsap r3 vhost1
exit
su – trexadm
TREX start
exit
|
Stop cluster
| rcopenais stop
|
Stop SAP
| su - j2dadm
stopsap r3 vhost1
exit
su – trexadm
TREX stop
exit
|
Start resource [qas]
|
# DM [Disk raid]
crm resource start ora_data_qasdb
# FS/LV/VG
crm resource start qas_qasdatavg
# Oracle instant [QAS]
crm resource start ora_inst_QAS_crmqasdb
# Virtual IP and Oracle listener [Disk raid]
crm resource start ora_list_crmqasdb
# resource disable SAP [J2D,TREX90]
crm resource start sap_inst_J2D_TREX_crmqasdb
|
Stop resource [qas]
|
# resource disable SAP [J2D,TREX90]
crm resource stop sap_inst_J2D_TREX_crmqasdb
# Virtual IP and Oracle listener [Disk raid]
crm resource stop ora_list_crmqasdb
# Oracle instant [QAS]
crm resource stop ora_inst_QAS_crmqasdb
# FS/LV/VG
crm resource stop qas_qasdatavg
# DM [Disk raid]
crm resource stop ora_data_qasdb
|
Cleanup resource [qas]
# Case change status not save/un commit/abnormal
|
# FS/LV/VG
crm resource cleanup qas_qasdatavg
# DM [Disk raid]
crm resource cleanup ora_data_qasdb
# Virtual IP and Oracle listener [Disk raid]
crm resource cleanup ora_list_crmqasdb
# Oracle instant [QAS]
crm resource cleanup ora_inst_QAS_crmqasdb
# resource disable SAP [J2D,TREX90]
crm resource cleanup sap_inst_J2D_TREX_crmqasdb
|
Useful crm commands :
- cibadmin -Q : List the xml configuration of the cluster
- cibadmin -Q > cib-backup.xml : Save the configuration of the cluster in the given file
- cibadmin -E –force : Delete the complete cluster information (immediately)
If you want to reset the whole configuration you should also delete /var/lib/heartbeat/crm/* on all nodes
- crm_mon : Displays the cluster state of hosts and resources
- crm_verifiy -LV : Check the xml for errors or orphaned resources
- crm_resource -M -r resource_virtual_ip -H hacluster1 : Migrate the resource resource_irtual_ip to hacluster1
/usr/lib/ocf/resource.d/heartbeat/
2 comments:
very informative blog. Can you please let me know where can i find the standard documentation for this configuration? Thank you very much.
See stanadard doc from suse,novell below
https://www.suse.com/documentation/sle_ha/pdfdoc/book_sleha/book_sleha.pdf
http://www.novell.com/docrep/2011/04/sap_solutions_high_available_on_suse_linux_enterprise_server_for_sap_applications.pdf
http://www.novell.com/docrep/2012/07/sap_solutions_high_availability_on_SLES_for_sap_apps.pdf
Post a Comment