I am trying to find out if I can use Navi CLI to script out the creation of snaps. I want to create the snaps, add them to a storage group, create the snap session and activate the snaps. Once I am done I would want to do the reverse to remove them. I have no clue where to start so I thought I would try here. Thanks for any advice!
Have a look on Powerlink at Home > Support > Technical Documentation and Advisories > Software ~ S ~ Documentation > SnapView > Maintenance/Administration
Admsnap has everything you need for start and stop and mount and un mount a snap , the only thing you can't do is create and define a new snap .
This mean all the snap you will start need to be configure on the clariion .
A normal procedure for starting and corretly mount a snap with admsnap will be something like this :
1) On production host issue the admsnap start command 2) On backup host issue admsnap activate (this will mount the snap and assign a drive letter if you are in windows) 3) On backup host issue admsnap deactivate ( the mounted snap will disappear ) 4) On production host issue the admsnap stop
I opted to use the admsnap utility instead of naviseccli. for SNAPS the utility only allows 4 functions: start, activate, deactivate, and stop. Does everything I need.
One thing I forgot to add. You will need to manually create the snapshots before hand. But the snapshot itself is static and only needs to be created once, it will not need to be destroyed and recreated. Only the session is destroyed and recreated to refresh the timestamp of the snapshot data.
Yes you can and it is pretty simple. It can be mostly automated with the exception of the mountpoints in Windows.
Ideally I woldlike to use mountvol in the scripts to mount the snapshot to the drive letter of my choice. All you have to do is manually create and mount the snapshot initially and then run mountvol on the mounthost to get the GUID of the snapshot in Windows. Then in your script you use that GUID and the mountvol commands to automatically mount the snapshot. I have had problems getting admsnap to not mount the snapshot to a drive letter, so I have a pause in the script to go to another command prompt to remove the mount points that admsnap assigns so I can use the pre-determined mount points for any backup / development scripts.
The entire process is run from the mount host. This does not require any part of the process to be run on the production host.
Below is an example of the script I use. It is two separate scripts, one to create the create the session and mount the snapshots, and one to stop the session and remove the snapshots. Using the variables you can customize this script to create many snapshots at once.
---- SNAPSHOT CREATION AND MOUNT ----- @echo off
REM Configure the variables for the script REM One Session variable per storage processor REM Create variable for each snapshot and drive letter for snapshot REM Snapshot variables are SP specific
set SPA=10.1.1.1 set SPB=10.1.1.2
set Session_SPA=SNAPTest_SPA
Set StorageGroup=SG1
set Snapshot_A1=LUN120_SNAP02 set Snapshot_A2=LUN121_SNAP02
set Drive_LUN_A1=P: set Drive_LUN_A2=Q:
cd C:\Scripts @echo on
REM Process to start new snapshot session and activate snapshot
REM Configure the variables for the script REM One Session variable per storage processor REM Create variable for each snapshot and drive letter for snapshot REM Snapshot variables are SP specific
set SPA=10.1.1.1 set SPB=10.1.1.2
set Session_SPA=SNAPTest_SPA
Set StorageGroup=SG1
set Snapshot_A1=LUN120_SNAP02 set Snapshot_A2=LUN121_SNAP02
set Drive_LUN_A1=P: set Drive_LUN_A2=Q:
cd C:\Scripts @echo on
REM Process to deactivate snapshots and remove snapshot from host
RRR
6 Operator
•
5739 Posts
845
0
Posted September 10th, 2009 07:00