requires 3par inform CLI to be installed on the PC.
requires an text file containing a list of VVs to DO.
requires using "setpassword -saveonly -file filename" command to create encrypted password file so that you dont have to enter credentials for each loop.
This method runs one DO at a time, waits for it to finish before starting another. I prefer this method over issuing all 600 commands, and letting the system run 4 at time with the rest queued up. In case of performance impact, failed drives, etc, its much easier to control-C the batch file than it is to clean out the queue of pending jobs.
The script can/should be edited for snap_cpgs if you have those.
Code: Select all
@ECHO OFF
:: Set the hostname of the 3par storage system here
set TPDSYSNAME=ESFWT800-1
:: Set the location of the pwfile you created with "setpassword -saveonly -file"
set TPDPWFILE=ESFWT800-1_RW.pwfile
:: Add the path of the 3PAR cli bin folder to your existing path
set PATH=C:\Program Files (x86)\inform_cli_3.2.1\bin;%PATH%
:: Main loop, change the name of your file here, the parenthesis () need to stay. Also edit the name of the destination CPG. Input File should have no blank lines, headers/footers, one vv per line with no extra spaces at the end.
FOR /F %%i in (NAME_OF_YOUR_VV_FILE) do call :Begin %%i
echo ::: End of Loop
goto :END
:Begin
echo ::: Beginning Optimization of %1
call tunevv usr_cpg YOUR_DESTINATION_CPG_HERE -f -waittask %1
if ERRORLEVEL 1 pause
:END
Never run scripts you don't fully understand/comprehend yourself. This is provided for academic reasons, use at your own risk. It was designed for my environment, your mileage may vary.