HP P2000 Automated Buildout of Storage (548 Views)
Reply
Occasional Advisor
Posts: 7
Registered: ‎03-18-2014
Message 1 of 9 (548 Views)
Accepted Solution

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

Acclaimed Contributor
Posts: 23,782
Registered: ‎10-02-2001
Message 2 of 9 (541 Views)

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!   
Occasional Advisor
Posts: 7
Registered: ‎03-18-2014
Message 3 of 9 (535 Views)

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.

Acclaimed Contributor
Posts: 23,782
Registered: ‎10-02-2001
Message 4 of 9 (527 Views)

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#...


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!   
Occasional Advisor
Posts: 7
Registered: ‎03-18-2014
Message 5 of 9 (524 Views)

Re: HP P2000 Automated Buildout of Storage

[ Edited ]

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.

Acclaimed Contributor
Posts: 25,695
Registered: ‎03-06-2006
Message 6 of 9 (520 Views)

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?

Occasional Advisor
Posts: 7
Registered: ‎03-18-2014
Message 7 of 9 (514 Views)

Re: HP P2000 Automated Buildout of Storage

[ Edited ]

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.

Acclaimed Contributor
Posts: 23,782
Registered: ‎10-02-2001
Message 8 of 9 (510 Views)

Re: HP P2000 Automated Buildout of Storage

[ Edited ]

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!   
Occasional Advisor
Posts: 7
Registered: ‎03-18-2014
Message 9 of 9 (498 Views)

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.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.