19 Sep RAC : How to create a user application resource in CRS
When you manage a RAC database, there is a tool called crsctl , this tool is an interface to manage all the resources belonging to the clusterware. At the same time this tool can help you to manage and have available your user applications when the cluster is running and viceversa.
This not only helps us to have available our user applications , but also to have up and running monitoring tools when the cluster us running, in this case we will setup OSWbb (OS Watcher Black Box 461053.1) as resource, and even though there is a document to start OSWbb as an OS service, Document ID 580513.1, we will set it up with crsctl.
As always , first try this with a testing environment, before moving it to a production environment, and also verify the scripts mentioned below.
The first thing that you have to do is download OSWbb and install it in the same location across all nodes in your RAC farm, in my case I set it up in the following location:
Now you have to create a script that calls all four necessary commands (START,STOP,CHECK and CLEAN) that work and are called by crsctl , this script has to be visible in all nodes in the same location as well, in this case I’m going to use a script called rac_verificar_oswbb.sh, and you can find it clicking the name of it.
One thing that you will have to do is change the variable OSWPATH and point it to where you installed OSWbb, and also because this script is from my blog in spanish, you will have to change the messages as they are in spanish. In my case I changed it to the value below:
Make sure that you the user with which you create the resource, either root or grid , has read write permissions over rac_verificar_oswbb.sh and OSWPATH.
What you have to do now us run the script rac_verificar_oswbb.sh from the command line and verify that all four commands run cleanly before setting up the CRS resource, if one of the four commands (START,STOP,CHECK and CLEAN) doesn’t work or run with an error, this setup won’t work.
Once you have verified/corrected that you have no errors running the script, you can go ahead and setup the resource, the only thing that you have to verify is the resource doesn’t have the prefix .ora, as this type of prefix are used and managed by Oracle, in my case I used a prefix .usr to be able to distinguish it.
root $ crsctl add resource usr.oswbb -type ora.local_resource.type -attr "AUTO_START=always,RESTART_ATTEMPTS=2, START_TIMEOUT=100,STOP_TIMEOUT=100,CHECK_INTERVAL=60,ACTION_SCRIPT=/mount/dba01/oracle/admin/rac_verificar_oswbb.sh"
Now that you have create the resource , you have to initiate it and verify that it’s running
root $ crsctl start resource usr.oswbb
CRS-2672: Attempting to start 'usr.oswbb' on 'servidor1'
CRS-2672: Attempting to start 'usr.oswbb' on 'servidor2'
CRS-2676: Start of 'usr.oswbb' on 'servidor1' succeeded
CRS-2676: Start of 'usr.oswbb' on 'servidor2' succeeded
root $ crsctl status resource usr.oswbb
TARGET=ONLINE , ONLINE
STATE=ONLINE on servidor1, ONLINE on servidor2
This method not only works for OSWbb, but for any user application that you need it to be tied to your cluster.
Sorry, the comment form is closed at this time.