Start a Conversation

Unsolved

This post is more than 5 years old

4231

March 9th, 2010 06:00

Using navicli for scripts to sync consistency groups, clones, and fracture clones

I would like assistance in creating actual usable CLI code to be able to:

  1. synchronize a consistency group and to then know when the process is 100% complete

  2. synchronize a set clones and to then know when the process is 100% complete

  3. administratively fracture that set of clones after the entire set becomes 100% synchronized.

The first step will be to identify the specific CLI commands needed and then where to get the values needed for them.

After I get one working I can do the same for all the others I also need to do. Others in this community may also benefit from a full working example.

What is the best way to get the values for names and IDs needed in the CLI?  Can these values be querried somehow? IIs there a better method than just typing what I see using Navisphere.  Is there and way to copy and paste these values from Navishere?

447 Posts

March 17th, 2010 12:00

As Gina suggested, we've moved this into our CLARiiON Support Forum.

546 Posts

March 17th, 2010 12:00

Hi Hessler,

I think your question may have been buried in that long post. I'm going to get it moved over the support forums, hopefully you'll get some quick answers! -Gina

2.2K Posts

March 17th, 2010 13:00

Hessler,

The script below is what I use to do some of what you are looking for. The command 'clone -listclone' will give you the status of the operation. If you are automating the process you can query the output and use those results to perform a successive action.

It is a pretty basic script but works for me for the particular environment I use it in, this is just a template script as the actual script has a lot more clone groups for the source. I run it interactively (hence the menu option) but you can just stip that of course if you are looking to automate it. I also have other scripts where I use variables for the clone group name and LUNs, so you can add in all those variables and just edit the begining of the script with your variables.

--------------------------------------

@ECHO OFF
CLS

REM Clone Synch for SQL.

set SPA=10.x.y.z
set SPB=10.x.y.z

:MENU
ECHO.
ECHO    ** Clone Creation and Access Script for SQL **
ECHO ................................................................
ECHO Press 1 to Create the Clone Groups of SQL Replicas
ECHO Press 2 to Add and Sychronize Clones
ECHO Press 3 to Fracture the Clones
ECHO Press 4 to Remove the Clones from the Clone Group
ECHO Press 5 to destory the Clone Groups
ECHO Press 6 to Check Clone Synch Status
ECHO Press 7 to exit the script
ECHO .................................................................
ECHO.
SET /P M=Type number from list above then press ENTER:
IF %M%==1 GOTO CREATE_CLONEGROUP
IF %M%==2 GOTO ADD_CLONES
IF %M%==3 GOTO FRACTURE_CLONES
IF %M%==4 GOTO REMOVE_CLONES
IF %M%==5 GOTO DESTROY_CLONE_GROUP
IF %M%==6 GOTO CLONE_SYNCH_STATUS
IF %M%==7 GOTO EOF

REM Step 1 - Create Clone Groups
:CREATE_CLONEGROUP
@ECHO ON
naviseccli -h %SPA% snapview -createclonegroup -name sql_k -luns 1011 -o
naviseccli -h %SPA% snapview -createclonegroup -name sql_i -luns 1012 -o
naviseccli -h %SPA% snapview -createclonegroup -name sql_j -luns 1013 -o
@ECHO OFF
GOTO MENU


REM Step 2 - Add Target Clones for SQL
:ADD_CLONES
@ECHO ON
naviseccli -h %SPB% clone -addclone -name sql_k -luns 501 -issyncrequired 1 -syncrate high
naviseccli -h %SPA% clone -addclone -name sql_i -luns 512 -issyncrequired 1 -syncrate high
naviseccli -h %SPB% clone -addclone -name sql_j -luns 503 -issyncrequired 1 -syncrate high
@ECHO OFF
GOTO MENU


REM Step 3 - Fracture Clones
:FRACTURE_CLONES
@ECHO ON
naviseccli -h %SPB% clone -fractureclone -name sql_k -cloneid 0100000000000000 -o
naviseccli -h %SPA% clone -fractureclone -name sql_i -cloneid 0100000000000000 -o
naviseccli -h %SPB% clone -fractureclone -name sql_j -cloneid 0100000000000000 -o
@ECHO OFF
GOTO MENU


REM Step 4 - Remove Clones from Clone Group
:REMOVE_CLONES
@ECHO ON
naviseccli -h %SPB% clone -removeclone -name sql_k -cloneid 0100000000000000 -o
naviseccli -h %SPA% clone -removeclone -name sql_i -cloneid 0100000000000000 -o
naviseccli -h %SPB% clone -removeclone -name sql_j -cloneid 0100000000000000 -o
@ECHO OFF
GOTO MENU


REM Step 5 - Destory Clone Groups
:DESTROY_CLONE_GROUP
@ECHO ON
naviseccli -h %SPB% clone -destroyclonegroup -name sql_k -o
naviseccli -h %SPA% clone -destroyclonegroup -name sql_i -o
naviseccli -h %SPB% clone -destroyclonegroup -name sql_j -o
@ECHO OFF
GOTO MENU


REM Step 6 - Check Clone Synch Status
:CLONE_SYNCH_STATUS
@ECHO ON
naviseccli -h %SPA% clone -listclone -name sql_k
naviseccli -h %SPA% clone -listclone -name sql_i
naviseccli -h %SPA% clone -listclone -name sql_j
@ECHO OFF
GOTO MENU


EXIT

-------------------------------------------------

No Events found!

Top