Sunday 29 December 2013

Solaris cluster 4.x V/S Veritas Cluser 6.x

1)To Add Resource/Service Group:-
SUN cluster:-
#clrg create  <resource Group Name> 

VCS:-
Failover Service Group:-
=======================
# hagrp -add testsg
VCS NOTICE V-16-1-10136 Group added; populating SystemList and setting the Parallel attribute recommended before adding resources                            
# hagrp -modify testsg SystemList Z10DB 0 Z10CI 1
# hagrp -modify testsg AutoStartList Z10DB Z10CI
# hagrp -modify testsg Parallel 0
Parallel service Group:-
=========================
# hagrp -add testsg
VCS NOTICE V-16-1-10136 Group added; populating SystemList and setting the Parallel attribute recommended before adding resources                            
# hagrp -modify testsg SystemList Z10DB 0 Z10CI 1
# hagrp -modify testsg AutoStartList Z10DB Z10CI
# hagrp -modify testsg Parallel 1

2)To Register Resource Types:-
SUN Cluster:-
#clrt register  <TYPE>
1.F/s or Pools---> HAStoragePlus
2. for NFS ---->SUNW.nfs
3.for Oracle --->SUNW.oracle_server
4.for Listener --->SUNW.oracle_listener
5.for SAP ASCS --->ORCL.sapstartsrv & ORCL.sapcenter
6.for SAP ERS ----->ORCL.sapstartsrv & ORCL.saprepenq
VCS:-
No need to register by default all bundel agents are available
1)Bundeled agents(NFS,Disk,DiskGroup,Volume,MountPoint,IP,NIC,Share,CVMVolDg,CFSMount,……..
2)enter prise agents (SAP agenet (SAPNW04)/oracle (Netlsnr/Oracle)
3)Custom agents

3)To create veritas Disk group Resource:-
Solaris Cluster:-
1)not possible
VCS:-
# hares -add dgres DiskGroup testsg
VCS NOTICE V-16-1-10242 Resource added. Enabled attribute must be set before agent monitors
# hares -modify dgres Critical 1
# hares -modify dgres Enabled 1
# hares -modify dgres DiskGroup testdg
4)To create veritas volume resource:-
SCS:-
NoT supported
VCS:-
# hares -add volres Volume testsg
VCS NOTICE V-16-1-10242 Resource added. Enabled attribute must be set before agent monitors
# hares -modify volres Critical 1
# hares -modify volres Enabled 1
# hares -modify volres DiskGroup testdg
# hares -modify volres Volume convol
5)to create mountresource:-
SCS:-
SVM file system 3 mount points
these mountpoint information we need to place in #cat /etc/vfstab
# clrs "create" -g "Z10ASCS_RG" -t "SUNW.HAStoragePlus" -p "filesystemmountpoints=/usr/sap/trans,/usr/sap/Z10/ASCS00,/sapmnt/Z10" ascsdatares
VCS:-
# hares -add mountres Mount testsg
VCS NOTICE V-16-1-10242 Resource added. Enabled attribute must be set before agent monitors
# hares -modify mountres Critical 1
# hares -modify mountres MountPoint /test
# hares -modify mountres BlockDevice /dev/vx/dsk/testdg/convol
# hares -modify mountres FsckOpt %-y
# hares -modify mountres FSType vxfs
6)To create IPresource
SCS:-
#clrs create –g <rgname> –h <virhostname> ersipres
NOTE:- first we make an entry in /etc/hosts <ip> <hostname>
VCS:-
add nic resource
# hares -add nicres NIC testsg
VCS NOTICE V-16-1-10242 Resource added. Enabled attribute must be set before agent monitors
# hares -modify nicres Critical 1
# hares -modify nicres Enabled 1
add IP resource
# hares -add ipres IP testsg
VCS NOTICE V-16-1-10242 Resource added. Enabled attribute must be set before agent monitors
# hares -modify ipres Critical 1
# hares -modify ipres Enabled 1
# hares -modify ipres Address "10.66.10.111"
# hares -modify ipres Device net0
# hares -modify ipres NetMask 255.255.255.0

7)to create SHARE resource:-
SCS:-
#clrt register SUNW.nfs
# cd /global/
#mkdir  testrg
#cd testrg
#cat > SUNW.nfs
share -F nfs -o anon=0,rw /test
#clrg set –p PathPrefix=/global/testrg
#clrs create  –g  Z10ASCS_RG  –t  SUNW.nfs  –p  resource_dependences= mountpointres,ipres  nfsres
VCS:-
create NFS service Resource
# hares -add nfsres NFS testsg
VCS NOTICE V-16-1-10242 Resource added. Enabled attribute must be set before agent monitors
# hares -modify nfsres Critical 1
# hares -modify nfsres Enabled 1
# hares -modify nfsres UseSMF 1
add Share resource
# hares -add shareres Share testsg
VCS NOTICE V-16-1-10242 Resource added. Enabled attribute must be set before agent monitors
# hares -modify shareres Enabled 1
# hares -modify shareres Critical 1
# hares -modify shareres PathName /test

8)To make Resource Dependencies
SCS:-
while creation of resource it self dependencies are defined
VCS:-
# hares -link shareres ipres
# hares -link shareres mountres
# hares -link shareres nfsres
# hares -link mountes volres
# hares -link mountres volres
# hares -link volres dgres

9)To make SG/RG online
SCS:-
to make RG online
#clrg online  –n node1   testrg
VCS:-
to make SG online
# hagrp -online testsg -sys <hostname>
10)To make RG/SG offline
SCS:-
#clrg offline   –n node1 testrg
VCS:-
#hagrp -offline testsg -sys <hostname>
11)to switch  RG/SG
SCS:-
#clrg switch -n node2 testrg
VCS:-
# hagrp -switch testsg -to <failover node>
12)To create Oracle Resource
SCS:-
% sqlplus "/as sysdba"
SQL> grant connect, resource to mary identified by mary;
 Grant succeeded.
 SQL> alter user mary default tablespace system quota 1m on system;
 User altered.
SQL> grant select on v_$sysstat to mary;
Grant succeeded.
SQL> grant create table to mary;
 Grant succeeded.
 SQL> grant create session to mary;
Grant succeeded.
SQL> exit
#clrt register SUNW.oracle_server   
#clrs create -g Z10DB_RG -t SUNW.oracle_server   
-p ORACLE_HOME=/oracle/Z10/112_64
-p ORACLE_SID=Z10
-p ALERT_LOG_FILE=/oracle/Z10/saptrace/diag/rdbms/z10/Z10/trace/alert_Z10.log
-p connect_string=mary/mary
-p Resource_Dependencies_offline_restart=dbdatares,dblogres,dbarchres -d Z10dbres
#clrs set -p Resource_project_name=Z10 Z10dbres
#clrs enable Z10dbres
VCS:-
#hares -add oracleres Oracle <Service Group Name>
#hares -modify oracleres Critical 1
#hares -modify oracleres Enabled  1
#hares -modify oracleres Home /oracle/EP2/112_64
#hares -modify oracleres Sid EP2
#hares -modify oracleres Owner oraep2
#hares -modify oracleres Pfile /oracle/EP2/112_64/dbs/initEP2.ora
#hares -modify oracleres ShutDownOpt IMMEDIATE
#hares -modify oracleres StartUpOpt STARTUP_FORCE


13)To create Oracle listener resource
SCS:-
Z10CI% pwd
/oracle/Z10/112_64/network/admin
Z10CI% cat tnsnames.ora
################
# Filename......: tnsnames.ora
# Created.......: created by SAP AG, R/3 Rel. >= 6.10
# Name..........:
# Date..........:
# @(#) $Id: //bas/720_REL/src/krn/tpls/ora/TNSNAMES.ORA#2 $
################
Z10.WORLD=
  (DESCRIPTION =
    (ADDRESS_LIST =
        (ADDRESS =
          (COMMUNITY = SAP.WORLD)
          (PROTOCOL = TCP)
          (HOST = Z10DB-VIP)
          (PORT = 1527)
        )
    )
    (CONNECT_DATA =
       (SID = Z10)
       (GLOBAL_NAME = Z10.WORLD)
    )
  )
LISTENER_Z10.WORLD=
(ADDRESS = (PROTOCOL = TCP)(HOST = Z10DB-VIP)(PORT = 1527))
$ sqlplus "/as sysdba”
SQL*Plus: Release 11.2.0.3.0 Production on Thu May 31 11:22:25 2012 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g
Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show parameter listener
NAME TYPE VALUE ------------------------------------ ----------- ------------------------------
 listener_networks string
local_listener string
remote_listener string
SQL> alter system set local_listener='LISTENER_Z10' scope=both;
System altered.

SQL> alter system register;
System altered.
SQL> exit
To create listener resource
#clrt register SUNW.oracle_listener
#clrs create -g Z10DB_RG -t SUNW.oracle_listener
-p ORACLE_HOME=/oracle/Z10/112_64
-p listener_name=LISTENER
-p Resource_Dependencies_offline_restart=dbdatares,dblogres,dbarchres -d Z10lisres
#clrs set -p Resource_project_name=Z10 Z10lisres
#clrs enable Z10lisres

VCS:-
#hares -add lisres Netlsnr <Service Group Name>
#hares -modify lisres Critical 1
#hares -modify lisres Enabled  1
#hares -modify lisres Home /oracle/EP2/112_64
#hares -modify oracleres Owner oraep2

14)create ASCS resource
SCS:-
#clrt register ORCL.sapstartsrv
create ASCS start service
#clrs create -d -g Z10ASCS_RG -t ORCL.sapstartsrv -p sid=Z10
-p sap_user=z10adm
-p instance_number=00
-p instance_name=ASCS00
-p host=Z10ASCS-VIP
-p timeout_return=20
-p debug_level=0
-p resource_dependencies_offline_restart=ascsdatares ascssapstartres

To create Central SAP Resource
#clrt register ORCL.sapcentr
#clrs create -d -g Z10ASCS_RG  -t ORCL.sapcentr -p sid=Z10
-p sap_user=z10adm
-p instance_number=00
-p instance_name=ASCS00
-p host=Z10ASCS-VIP
-p yellow=20
-p debug_level=0
-p resource_dependencies_offline_restart=ascsdatares 
-p resource_dependencies=Z10dbres,ascssapstartres ascscsrs
Trouble shoot notes:-
on Z10DB it is not started  we see logs and check and copy following system
root@Z10CI:/usr/sap# scp -rp sapservices Z10DB:/usr/sap
then it start working
Observations :-
No need to create sap start service directly u crate sap resource
& ASCS,ERS are running indipendent to Oracle DB so no need to mention resource dependencies

#clrs create -d -g Z10ASCS_RG  -t ORCL.sapcentr
-p sid=Z10
-p sap_user=z10adm
-p instance_number=00
-p instance_name=SCS00
-p host=Z10ASCS-VIP 
-p resource_dependencies=ascsdatares ascscsrs
#clrs  "set" -p "resource_dependencies=ers_Z10_startsrv" "ERS-Z10-rs"
#clrs "set" -p "resource_dependencies=ascssapstartres" "ascscsrs"

VCS:-
hares -add ascsres ASCS <SGNAME>
hares -modify ascsres Critical 1
hares -modify ascsres Enabled  1
hares -modify ascsres InstName SCS00
hares -modify ascsres InstType ENQUEUE
hares -modify ascsres ProcMon  "ms en"
hares -modify ascsres SAPAdmin  ep2adm
hares -modify ascsres SAPSID    EP2
hares -modify ascsres EnvFile "/home/ep2adm/.cshrc"
hares -modify ascsres EnqSrvResName  "en.sapEP2_SCS00"

15)To create Enque replication service resource
SCS:-
create ERS start service
#clrs create -d -g Z10ERS_RG -t sapstartsrv  -p sid=Z10 
-p sap_user=z10adm 
-p instance_number=10 
-p instance_name=ERS10 
-p host=Z10ERS-VIP
-p timeout_return=20 
-p debug_level=0 
-p resource_dependencies_offline_restart=ersdatares ers_Z10_startsrv
create ERS resource

#clrt register ORCL. saprepenq
#clrs create -d -g Z10ERS_RG -t saprepenq  -p sid=Z10 
-p sap_user=z10adm 
-p instance_number=10 
-p instance_name=ERS10 
-p host=Z10ERS-VIP 
-p debug_level=0 
-p resource_dependencies_offline_restart=ersdatares 
-p resource_dependencies=ascscsrs,ers_Z10_startsrv, Z10dbres  ERS-Z10-rs
VCS:-
hares -add ersres  SAPNW04 <sgname>
hares -modify ersres  Critical 1
hares -modify ersres  Enabled 1
hares -modify ersres InstName ERS21
hares -modify ersres InstaType ENQREP
hares -modify ersres ProcMon   er
hares -modify ersres SAPAdmin  ep2adm
hares -modify ersres SAPSID    EP2
hares -modify ersres StartProfile "/usr/sap/EP2/ERS21/profile/EP2_ERS21_EPEP2ERS"
hares -modify ersres EnvFile   "/home/ep2adm/.cshrc"

No comments:

Post a Comment