Unsolved
This post is more than 5 years old
13 Posts
0
732
MirrorView /A - Sheduling a Sync job
Is it possible to script a remote mirror to run at a set time for a set of particular LUNs?
In Navisphere, the only options I see are for timing syncs for either start of last or end of last update.
I would be greatful for any tips and a note of any additional software I need to have to implement this.
I have got a few issues with performance so I really want to run the less critical LUNs after hours if I can.
Thanks.
joej1_3ddf8c
34 Posts
0
December 15th, 2009 12:00
hersh1
197 Posts
0
December 18th, 2009 08:00
I created a simple vbscrict that I used to do just that last week. Basically just needed to create the remote mirror manually and then scheduled my script to add the secondary image to that mirror session. Here is the command: naviseccli -h SOURCE_IP mirror -async -addimage -name REMOTE_MIRROR -arrayhost REMOTE_IP -lun SECONDARY_ALU.
You can add recovery policy options following that. If you want I can post my script (assuming we are allowed to do that).
muterobert
3 Posts
0
January 11th, 2010 03:00
Hersh,
Glad to see you have this up and running. Although I'm not directly interestd in this specific command, I'd love to see your script and how you handle responses from naviscli etc.
Many thanks.
hersh1
197 Posts
0
January 11th, 2010 05:00
No problem. There isn't much of any error detection yet in my scripts, expecting everything to be double checked prior to scheduling. One thought I had was to simply email any error message that is generated. That could give insight on what might have happened.
As of now the syntax to run the script would be SCRIPT.VBS MIRROR_SESSION_NAME SOURCE_ARRAY_IP DEST_ARRAY_IP DEST_ALU_#
Extremely plain and straightfoward but it should allow someone to add the image after hours if that is a requirement. Also the reason I had to type the username and password in this one was because I was having issue with the system user using the stored credentials. Need to look into that so I don't have an admin account in clear text.
Set objShell = wscript.createObject("wscript.shell")
Set args = WScript.Arguments
Dim mirror_name
Dim source_ip
Dim remote_ip
Dim remote_alu
If WScript.Arguments.Count < 4 then
Wscript.Quit
Else
mirror_name = args.Item(0)
source_ip = args.Item(1)
remote_ip = args.Item(2)
remote_alu = args.Item(3)
End if
dim naviseccli, navi_temp
navi_temp = "C:\PROGRA~1\EMC\NAVISP~2\naviseccli.exe"
naviseccli = path_with_quotes(navi_temp)
naviseccli = naviseccli & " -user USERNAME -password PASSWORD -scope 0"
command = naviseccli & " -h "
command = command & source_ip
command = command & " mirror -async -addimage -name "
command = command & mirror_name
command = command & " -arrayhost "
command = command & remote_ip
command = command & " -lun "
command = command & remote_alu
command = command & " -recoverypolicy auto -syncrate medium -enddelay 15"
objshell.Run "%comspec% /c " & command,,True
'Wscript.echo command
'**************************************************************************
'
'Function: path_with_quotes(path)
'
'Purpose: Adds quotes to path.
'
'**************************************************************************
Function path_with_quotes(path)
new_path = chr(34) & path
new_path = new_path & chr(34)
path_with_quotes = new_path
End Function