SVCTools Setup

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 8

Steps to setup the SVC Master Console for using the SVC perl

scripts from www.alphaworks.ibm.com/tech/svctools


Assumptions:
1. The SVC Master Console already has PuTTY installed, so C:\Program
Files\PuTTY\plink.exe is available for use by perl scripts.
2. The SVC Master Console contains the admin SSH key file to login to the SVC cluster
at c:\program files\putty\icat.ppk, this file will be used by the perl scripts.
3. The login userid has administrator authority.

Setup Steps:
1. Download the free perl script package from
http://www.activestate.com/Products/activeperl/
2. Install the perl script package on SVC Master Console
3. Download the SVCTools package from
http://www.alphaworks.ibm.com/tech/svctools/download
4. Unzip/Extract the SVCTools.zip file (for example extract to C:\SVCTools)
5. Create a IBM directory in C:\perl\lib
6. Copy the C:\SVCTools\lib\IBM\SVC.pm file to the C:\perl\lib\IBM directory
7. To temporarily add the C:\Program Files\PuTTY path to the windows PATH
environment variable. This can be accomplished by entering in “PATH=C:\Program
Files\PuTTY;%PATH%” at a command prompt which will be used for the script. To
permanently add the PuTTY path see Appendix A.

If the user needs to update files from more recent SVCTools package, the SVC.pm file
needs to be updated with the same name and location with the more current file. The
individual scripts can run as they are named.

At this point, the SVC Master Console can run the example scripts or user created scripts
that utilize the SVC.pm perl module.

The user can change to the directory where the scripts are and run them locally.

For example … get the online help for the balance.pl script in a command prompt:
C:\SVCTools\examples\balance>perl balance.pl -h
balance.pl Usage:
balance.pl MDiskGrp [-t VDisk,VDisk,...] [-m MDisk,MDisk,...]
[-n number] [-e] [-f] [-r [delay]] -c cluster | -i ip
[-k keyfile] [-u username] [-s application] [-v] [-z [retry delay]] [-h]

balance.pl MDiskGrp
[-t|--target VDisk01,Vdisk02,...]
[-m|--media MDisk01,MDisk02,...]
[-n|--number migrate_limit]
[-e|--execute]
[-f|--force]
[-r|--recursive [delay]]
[-c|--cluster hostname | -i|--ip address]
[-k|--key file]
[-s|--ssh application]
[-u|--username name]
[-v|--verbose]
[-z|--zRetryDelay [retry delay]]
[-h|--help]

Invoke this script with the name of the MDiskGrp you wish to
rebalance. Additional options can be specified to alter behaviour:

-t, --target Specify which VDisks to balance. Default behaviour is to


balance all VDisks in the MDiskGrp.

-m, --media Specify which MDisks extents can be moved to and


from. Default behaviour is to use all MDisks.

-n, --number Constrain the total number of migrates. If the total


number of migrates running on the SVC is equal to or
greater than this figure, the script will not spawn
any more migrates. Only applicable when used with -e.

-e, --execute If this flag is set the script will execute the migrate
commands instead of just printing them to screen.

-f, --force The script will attempt to improve the distribution of


extents even if there is no possible optimal solution.

-r, --recursive Repeated passes are made by the script until an optimal
solution is reached. The script will wait for migrates
to finish and then run more. Optionally specify the.
delay between checks, applicable with -e.

-c, --cluster Specify the hostname of the cluster to connect to.

-i, --ip Specify the IP address of the cluster to connect to.


If -c is also specified both values are sent to IBM::SVC.

-k, --key Specify the key file for use in making SSH connections.

-s, --ssh Specify the application used for making SSH connections.

-u, --username Specify the username for use in making SSH connections.

-v, --verbose If this flag is set the script will provide more detail
and depth in the output.

-z, --zRetryDelay Specify the delay in seconds between retries in case of


SVC cluster connection failures.

-h, --help Prints this usage statement.

For more information, please consult the perldoc for this script.

For example … run the balance.pl script in a command prompt:


C:\SVCTools\examples\balance>perl balance.pl DS6K_4_old_Fast
-k "c:\program files\putty\icat.ppk" -i 9.82.39.193 -v -d -r 5 –z 10
Starting Extent Balance script.
Parameters:
MDiskGrp: DS6K_4_old_Fast
--recursive: 5
--ip: 9.82.39.193
--key: c:\program files\putty\icat.ppk
--verbose: enabled
--debug: enabled
--zRetryDelay: 10

[14:43:26 01/16/08] [balance.pl]


Created IBM::SVC instance.
Connected to SVC Cluster. MDiskGrp ID: 7.

[14:43:38 01/16/08] [balance.pl]


Creating $mdisk_ref data structure.
-->| SVC_LUN8 is a quorum disk.
>| Added MDisk: ID 6, SVC_LUN8, Free Extents 0, Capacity 5100273664.
>| Added MDisk: ID 7, SVC_LUN9, Free Extents 0, Capacity 5368709120.

Appendix A – How to permanently add the C:\Program Files\PuTTY path to the system

Click on Properties for My Computer (Win XP here).

Here is the Properties panel for Windows 2003 Server.


The process is the same for both Win XP and Windows 2003 Server.
Click on the Advanced tab, then select the Environment Variables button.
Click on the Edit button after highlighting the Path system variable.

Click on the Variable value field and move to the beginning of the field.

Add “C:\Program Files\PuTTY;” before the first entry and click OK.
Click OK
Click OK.

Verify via the windows command prompt … Done!

You might also like