Running an RA script manually from the prompt

Is it possible to to run an RA script manually. Specifically the SAPHana script. I have executed it with start command as an option but SAP settings were not picked up.

You need to :

  1. Stop the resource
  2. Get the configuration of the resource
  3. export the configuration as environment variables. For example, if your resource has the following options:
option1=AAA opton2=BBB option3=CCC

Then you need to export first the OCF_ROOT:

export OCF_ROOT=/usr/lib/ocf

And then the options themselves:

export OCF_RESKEY_option1=AAA
export OCF_RESKEY_option2=BBB
export OCF_RESKEY_option3=CCC

And then run the script with start/stop/status (the path is based on memories, so use find in /usr/lib/ocf or locate):

bash -x /usr/lib/ocf/resources.d/<PROVIDER>/resource <start/stop/status>

Source: https://wiki.clusterlabs.org/wiki/Debugging_Resource_Failures