Unsolved
This post is more than 5 years old
3 Posts
0
923
January 11th, 2010 03:00
Mirrorview /A and scripting LUN promotes etc.
Hi all,
First thread, so please do be gentle.
We currently run 2 x CX3-20s with mirrorview A between the 2 array members for certain critical LUNs.
I've been given the task of scripting mirrorview member promotion as part of streamlining our DR processes. I have the Mirrorview CLI reference and things are fairly clear.
However, does anyone else here have any experience in scripting with navicli (for any tasks) or better still for performing these sorts of tasks. Would any of you be willing to share your code to help an updstart like myself?
Failing that, any tips on possible gotchas etc. would be extremely useful.
Thanks in advance.
No Events found!


hersh1
197 Posts
0
January 11th, 2010 04:00
Lennie2
23 Posts
1
January 11th, 2010 09:00
hope this helps in some ways: http://communities.vmware.com/docs/DOC-7238
muterobert
3 Posts
0
January 11th, 2010 09:00
Well, it could be either Linux or Windows - but if you assume Windows, your VBscript would suit well.
Anything you can would be of great help.
hersh1
197 Posts
0
January 28th, 2010 10:00
Sorry it has taken me so long to get back to you. Here is how I build out the commands using
Set objShell = wscript.createObject("wscript.shell")
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
The last part, objshell.Run is what issues the command. It opens another command prompt and will continue on with the remaining code when that window closes. The window closes when the command completes which works nicely.
You can pass arguements to your vbscirpt as well. So you can do something like lun_promote.vbs TARGET_ARRAY MIRRORSESSION . Then within the script you can grab those variables and use them to build out a command like I did above:
Set args = WScript.Arguments
Dim remote_ip
Dim mirror_sess
If WScript.Arguments.Count < 2 then
Wscript.Quit
Else
remote_ip = args.Item(0)
mirror_sess = args.Item(1)
End if
kelleg
6 Operator
•
4.5K Posts
0
January 28th, 2010 11:00
remember to use the naviSECcli commands only - navicli will be going away in the future. Also, you will need to setup a security file to hold your username/password stuff to automate the commands.
glen
hersh1
197 Posts
0
January 28th, 2010 12:00
Glen I've noticed that only my user account can authenticate against the array. Is there a way to have the system account for a server to use that security file as well.
As of now I'm forced to hard code the username and password into the script.
kelleg
6 Operator
•
4.5K Posts
0
January 28th, 2010 13:00
Do you have a copy of the Navisphere CLI document? There is a very good explanation of the security setting for naviseccli.
glen
hersh1
197 Posts
0
January 29th, 2010 11:00