cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger script question

mokkan
Level 6
Certified

Hello,

I would like to setup a script to tirgger before the service group is online.

In the startup I need to feed 2 arguments.  How can I set it up? Sorry this is the first time I am trying to setup.

preonline_script.pl  systemname  servicegroupname

4 REPLIES 4

mikebounds
Level 6
Partner Accredited

systemname and servicegroupname are passed to preonline when it is called by VCS before a group onlines (and in UNIX, VCS also passes, systemLastOnline and WhyOnlining so these are probably also passed in Windows)

To setup a preonline you can copy sample from VRTSvcs/bin/sample_triggers to VRTSvcs/bin/triggers and you also need to set PreOnline attribute to 1 for the service group.
 

If you want to test manually, then you run PreOnline trigger manually pass arguments of systemname  and servicegroupname

 

Mike

Marianne
Level 6
Partner    VIP    Accredited Certified

Everything in Mike's post is covered in VCS Admin Guide......

Have you tried to download these manuals as suggested previously?

Or tried to attend a 5-day VCS classroom training course?

 

mokkan
Level 6
Certified

I totally understand,  but I like to here from someone who has done it before and when they give the detail, its more clear.

 

Wally_Heim
Level 6
Employee

Hi Mokkan,

VCS works exactly the same regardless of platform with very few exceptions.

Mike and Marianne are very experienced with VCS and are spot on on their suggestions/recommendations. They do answer a lot of forum posts and they are "Awsome" with how quickly they respond and are very indepth knowledge with the storage foundation products.

As they mentioned that arguments that you are needing passed are passed automatically to the preonline trigger and is documented in the guides on page 452-453.  Here is a link to the VCS Admin Guide for 6.0.1

http://sort-cdn.symantec.com/public/documents/sfha/6.0.1/windows/productguides/pdf/VCS_Admin_6.0.1.pdf

The thing to remember is that the preonline trigger is not executed by default.  You will need to enable the attribute on the service group to execute the preonline trigger.

Also, the preonline trigger need to fire an hagrp online command with the -nopre option as the last line to online the group and not recursively call the preonline trigger.

Another thing that you could do is use the same process agent that I provided you to call the script that you need at the bottom most resource in the service group.  This is a little different than the preonline trigger but it might also do what you need.

Let us know if you have more problems.

Thank you,

Wally Heim