MSA Storage
1753751 Members
5373 Online
108799 Solutions
New Discussion

UPS Shutdown P2000 G3 SAS

 
Friasa
New Member

UPS Shutdown P2000 G3 SAS

Hi,

 

Need a simple scrip to shutdown gracefully both Ctrl on my physical vcenter5 after all  VMs are down.

 

Any ideas are welcome.

 

Thanks in advanced

 

6 REPLIES 6
Joshua Small_2
Valued Contributor

Re: UPS Shutdown P2000 G3 SAS

Hi,

 

You can telnet or SSH to the controller and give it this command:

shutdown both

Torsten.
Acclaimed Contributor

Re: UPS Shutdown P2000 G3 SAS

There is a common problem in case of a power failure: you need to shutdown all servers first, then you need a system still running to execute the script to shutdown the array. Also you need to prevent a "shutdown by accident".

Normally it is not a real problem to not shutdown the array. If all servers are down, the cache is flushed and no longer in the cache.
But even with data in cache, the array can hold the cached data in case of power loss.

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!   
danzig69
Frequent Visitor

Re: UPS Shutdown P2000 G3 SAS

did you find a script solution?

Yes we can telnet or ssh with putty. But we need to put the user name and password. Also, did putty can be started within a batch file and the user name, pwd and the command shutdown both send automaticaly?

danzig69
Frequent Visitor

how to shutdown both storage controller of a P2000 from a batch file using plink and ssh connection

how to shutdown both storage controller of a P2000 from a batch file using plink and ssh connection. 

 

The computer that will send the shutdown command need a folder that I will call "shutdown" on the root of the c drive
so create a folder c:\shutdown

 

this folder will contain 4 files
p2000.txt
plink.exe
sendShutdownP2000.bat
sendShutdownOnce.bat this file will be delete after the first use


p2000.txt will have 3 lines
shutdown both
exit

 

the third one is empty but need to be there for the exit to be executed


plink.exe can be download from http://www.chiark.greenend.org.uk/~sgtatham/putty/ (03 april 2012) I've used beta 0.62

 

sendShutdownP2000.bat will have 4 lines and it's the file to execute to shutdown properly the P2000
c:
cd\
cd shutdown
plink.exe YourServerIp -v -ssh -l UserName -pw YourPassword < p2000.txt


sendShutdownOnce.bat will have 4 lines and is used only ONCE to be able to accept the key
c:
cd\
cd shutdown
plink.exe YourServerIp -v -ssh -l UserName -pw YourPassword


The first time you NEED to execute sendShutdownOnce.bat to be able to accept the key. After double clicking it, you will have to press Y to Store key in cache.
Then type : exit to quit the ssh session


Delete the file sendShutdownOnce.bat

 

You now just need to execute the sendShutdownP2000.bat file for your p2000 to shutdown properly

 

For all this to work, you need to be able to connect using ssh to your equipement for plink to work. You can also try "shutdown a" before putting "shutdown both" in the p2000.txt if your working on a production system. "shutdown both" will cause your p2000 to be no longuer usable by your server!!! Be carefull.

 

I wish this will save a couple of hour to people who are in the same situation than me using UPS to protect theyre environnment.
In my case I use this "script" in a bigger one that shutdown vmware esxi 5.0 before the P2000 with a command like this one :
"C:\Program Files (x86)\VMware\VMware vSphere CLI\bin\vicfg-hostops.pl" -a poweroff -f --server=xxxxxxxx --username aaaaaaaa --password bbbbbbb --operation shutdown
sleep 90         ;this is a command that stop the execution for 90 secondes the time to shutdown VM
"c:\shutdown\sendShutdownP2000.bat"

 

Fonctionnal with this equipement :

Windows server 2008 R2 x64
HP StorageWorks P2000 G3 FC/iSCSI Combo Modular Smart Array Controller (two 8Gb FC ports and two 1GbE iSCSI ports per controller) AP837A
HP StorageWorks P2000 G3 MSA FC/iSCSI Dual Combo Controller SFF Modular Smart Array System AW568A

Torsten.
Acclaimed Contributor

Re: how to shutdown both storage controller of a P2000 from a batch file using plink and ssh connect

A power loss is a worst case for a disk array, because there is a lot of data in the cache.

 

For this reason each array has a possibility to save the cache during a power loss.

 

Some arrays can keep the complete array alive on battery to write the data to the disks, some just buffer the memory to hold the data, some write the cached data to a special device.

 

The P2000 can write the cached data to a memory flash card that resides in each controller.

 

If the power comes back, the cached data will be written to the disks.

 

 

 

IMHO there is always a problem with such shutdown scripts. First you need to detect a real power loss. Then you need to wait until all connected servers have completed their shutdown. If all servers are down, you may start to shutdown the array. The tricky point is to prevent the execution of such script by accident.

 

 

IMHO such script is not needed at all.


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!   
Lobito
Frequent Visitor

Re: how to shutdown both storage controller of a P2000 from a batch file using plink and ssh connect

very useful!!!   after searching a lot, this has been what has solved my problem. My task was different but it worked.

Thanks a lot everybody specially danzig69