MSA Storage
1748169 Members
3826 Online
108758 Solutions
New Discussion

Re: HP P2000 Automated Buildout of Storage

 
SOLVED
Go to solution
RobertJKrawchuk
Occasional Advisor

HP P2000 Automated Buildout of Storage

HI,

 

We purchase a number of the HP P2000 SANS that have a specific setup for their storage configuration. I would like to automate this using the CLI reference that is part of the system. I am connecting to it from a windows based system. I have plink installed which I use. I am able to do the following:

.\plink -ssh -l ####### -pw ####### 10.0.0.2 -m command.txt
HP StorageWorks MSA Storage P2000 G3 iSCSI
System Name: AIM-SAN01
System Location: SIG LAB
Version: TS250P003

#

The command.txt is as follows

show volumes

show disks

 

It doesn't seem to run the script, can anyone tell me how I can an automated script to run commands?

 

Thank you

10 REPLIES 10
Torsten.
Acclaimed Contributor

Re: HP P2000 Automated Buildout of Storage

Try

.\plink -ssh -l ####### -pw ####### 10.0.0.2 "show volumes"

if this works, you may have a problem with the command.txt file

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
RobertJKrawchuk
Occasional Advisor

Re: HP P2000 Automated Buildout of Storage

Thank you, I did try that but it just goes right to the hash prompt instead, waiting for input. Before when I did it from the command.txt, it would would run show vdisks and freeze instead.

Torsten.
Acclaimed Contributor

Re: HP P2000 Automated Buildout of Storage

see this thread

 

http://h30499.www3.hp.com/t5/Storage-Area-Networks-SAN-Small/UPS-Shutdown-P2000-G3-SAS/td-p/5418895#.UyiTMYXezoE


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
RobertJKrawchuk
Occasional Advisor

Re: HP P2000 Automated Buildout of Storage

Thank you, I did the exact same thing as the thread. Unfortunately, my issue is that I can ssh to the SAN with user name and password successfully, but then it just stops at the # prompt only. I can enter the commands manually but not through a script.

 

I do thank you for your help, but this is really frustrating.

Dennis Handly
Acclaimed Contributor

Re: HP P2000 Automated Buildout of Storage

>but not through a script.

 

You can't redirect the ssh input from a file or here doc?

RobertJKrawchuk
Occasional Advisor

Re: HP P2000 Automated Buildout of Storage

oes anyone know how to access the P2000 CLI through telnet or ssh so that a script can be run? I am runnign it from a windows 2008 server with the telnet client and I ahve installed plink. I am able to connect to the SMU through plink with the command : plink -l ##### -pw ##### 10.0.0.2 "show volumes"

 

I have redirected it from a script using the -m option and the same thing still happens where it ends at the hash promot, waiting for user input to proceeed. So it seems even though it is suppsoed to pass the command, it doesn't. Is there a setting on the SMU that must be set for this to occur? I ahve checked and I was unable to find anything.

 

Again, it connects me to the console by automatically logging in, but it does not process the command at all. I ahve tried the various suggestions in the forums and I am still running into the issue where the command is not processed.

 

I need to do this because we configure a number of P2000 SANS and I would like to automate this but so far nothing is working.

Torsten.
Acclaimed Contributor
Solution

Re: HP P2000 Automated Buildout of Storage

in the thread i linked the < symbol is used. take a look and try.

 

>> plink.exe YourServerIp -v -ssh -l UserName -pw YourPassword < p2000.txt

 

What is the final goal of this?


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
RobertJKrawchuk
Occasional Advisor

Re: HP P2000 Automated Buildout of Storage

Hi Torsten,

 

Thank you once again for your help. I did try the redirect symbol from the text file and it would fail.

 

Now it is just working with the redirect symbol after the night. I didn't make any changes I just came in this morning and tried it. I did restart each of the SMUs.

 

The final goal of this is to do the following.

Using powershell to read from a DB the settings of the P2000. Create a text file and script out the disk configuration. The reason for this is we use a lot of the P2000s for our product. It would be eqasier and less time consuming to build it out automatically rather than going through about 50 pages of configuration settings once this has been completed.

satHPec
Occasional Visitor

Re: HP P2000 Automated Buildout of Storage

I am facing the same issue.

 

The commands are not getting executed after the # prompt.

 

Grateful if you could sahre the solution if found.

 

 

 

TIA,

Sathya