1、使用sbd命令创建sbd盘创建sbd文件3.配置HA资源执行crm_gui创建克隆资源组,SBD与PING。具体配置如下图:双击配置之前创建好的sbd盘指向网关创建资源组saprg并按顺序配置各种SAP资源各资源的详细属性如下:需要提前在两个节点创建/etc/nfsexport目录nfs_ip指向虚拟主机名SAP脚本是lsb类型,脚本需要提前放在/etc/init.d下,名字就叫sapecp.脚本详细内容为:sapprdap1: # cat /etc/init.d/sapecp #!/bin/sh# BEGIN INIT INFO# Provides: sapbip.sh# Required-
2、Start: $local_fs $network# Required-Stop: $local_fs# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Short-Description:# Description: sapbip.sh pop & imap daemon# END INIT INFO# Run-level Startup script for the SAP instance# chkconfig: 345 91 19# description: Startup/Shutdown SAP instanceSAP_OWNR=ecpad
3、mHOST_NAME=hostnameHOST1=sapprdap1HOST2=sapprdap2# depending on parameter - startup, shutdown, restart# of the instance and listener or usage displaycase $1 in start) # SAP instance startup echo mount nfss filesystem num=df -h |grep sapmnt|wc -l if $num = 1 then mount sapprdap:/export/sapmnt/ECP /sa
4、pmnt/ECP/export/usr/sap/trans /usr/sap/trans fi echo -n Starting SAP instance su - $SAP_OWNR -c startsap R3 ASCS01 sapecpapStart SAP ASCS01 ok. su - ecpadm -c startsap R3start remote SAP Instance num2=ssh $HOST1 df -h |grep sapmnt|wc -l if $num2 != 2 then ssh $HOST1 sapprdap: ssh $HOST2 su - $SAP_OW
5、NR -c startsap R3 D00Start D00 instance in sapprdap2 ok. ; stop) # SAP instance shutdownShutdown SAP instancestopsap R3stopsap R3 ASCS01 sapprdapsaposcol -kcleanipc 00 removecleanipc 01 removecleanipc 10 removesapcontrol -nr 00 -function StopService sapcontrol -nr 01 -function StopServicesapcontrol
6、-nr 10 -function StopService kill -9 ps -ef|grep $SAP_OWNR|grep -v grep|awk print $2Stop SAP instance ok. # umount -l /sapmnt/ECP restart) $0 stop $0 start reload)reload command not supported. status) num=ps aux -cols=1024|grep ms.sapECP_ASCS01|grep -v grep|wc -lrunning process ms.sapECP_ASCS01 $num
7、 # $num -gt 0 | exit 1 # num=ps aux -cols=1024|grep en.sapECP_ASCS01|grep -v grep|wc -l # echo running process en.sapECP_ASCS01 $num exit 0 *)Usage: $0 start|stop|restart|reload|status exit 1esacexit 0 #配置SAP启停超时为10分钟HA配置完成。4.SUSE HA常用命令1.启停rcopenais startrcopenais stop2.配置crm_gui3.切换或者直接重启主机4.监控crm_mon
copyright@ 2008-2023 冰点文库 网站版权所有
经营许可证编号:鄂ICP备19020893号-2