cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any way to make hares -action use non-buffered I/O?

S_Herdejurgen
Level 4
Accredited Certified

I have an action that takes many seconds to execute and would like to make it use non-buffered I/O verus the buffered I/O it uses now.  Is there any way to do this?

-Seann

4 REPLIES 4

mikebounds
Level 6
Partner Accredited

Can you elaborate on what you mean and what you are trying to do as I don't understand what hares -action has to do with I/O.  hares -action just kicks off a script that you place in /opt/VRTSvcs/bin/Agent_name/actions and the script can do what ever you want it to do.

Mike

S_Herdejurgen
Level 4
Accredited Certified

What I really would like is unbuffered output.  (since action scripts don't take input)  The action I am running performs a 'vxdg -Cs import $dg; vxvol -g $dg startall; fsck -F vxfs -y /dev/vx/rdsk/$dg/$vol'  This takes upwards of 60 seconds and it would be nice to see the output in near real time instead of waiting almost a minute to see the output.

mikebounds
Level 6
Partner Accredited

You are right the output is not shown until the action script completes and I don't think there is any way round this. 

Action script can take input - you can add arguments in GUI (click on + if I remember) or from command line, run:

hares -action res action_token [-actionargs arg1 arg2 ...] -sys system 

But why are you using action scripts to import disk group - diskgroup resoucre will do this, and Mount resource will fsck if it needs to.

Could you elaborate on what you are trying to do.

Mike

S_Herdejurgen
Level 4
Accredited Certified

In a DR scenario, we need to suspend hardware replication, import shared disk groups on a CFS cluster, start the volume, run fsck on them (log replay) and then mount the shared file systems on multiple cluster nodes.

In a CFS cluster, we do not use the DiskGroup or Mount agents.  We use CVMVolDg and CFSMount agents, but CVMVolDg does not perform a 'vxdg -Cs import $dg' on a shared disk group when you online it.

When I say that action scripts don't take input, I am referring to their inability to process standard in. (i.e. echo y | hares -action ...)