cancel
Showing results for 
Search instead for 
Did you mean: 

triggers.

589902266
Not applicable
All,

I am not very good at scripting.We are using cluster server 1.3 which is not supported by veritas any more.

Any help from this group in getting the following issue resolved would be of great help..

All I need to do is..TO BLINDLY RUN A SCRIPT AFTER A FILE SYSTEM IS MOUNTED (which is a resource , type mount in my configuration)"

I know triggers are available in 1.3 but not sure how to use them for above case.I used application agent but I got stuck as I am not supposed to monitor the agent.

Again your help is highly appreciated...
2 REPLIES 2

system_storage
Level 3
As an alternate solution, you can develop your own agent, for example, postmountagent and put the script that you want to run after mount in the online script of the agent, then add a resource of postmount type in your main.cf.

Ralph_G_stenm1
Level 2
Hi,
Triggers are used in two cases:
- for groups (after online, after offline, after faulted)
- for resources (after status change)

All Triggers located in /opt/VRTSvcs/bin/triggers and named by the reason of calling, e.g. postonline, postoffline, resstatechange.

So, to use a trigger when the status of a resource changes:
- configure the service group to use the resstatechange trigger
hagrp -modify TriggerResStateChange 1

- create a script in /opt/VRTSvcs/bin/triggers called resstatechange. This will be called on all systems, when the status of the resource is change (called with parameters

If you want to perform an action on the system where the resource becomes online, you have to do somethine like

THISHOST=`hostname`
STATE=`hares -state $2 -sys $THISHOST`
if
then
.. .. perform action
fi


Hope that helps
Ralph