Operating System - HP-UX
1829557 Members
1739 Online
109992 Solutions
New Discussion

Redundant UPS configuration

 
Bruce Link
Occasional Contributor

Redundant UPS configuration

We've got a 7405 Rackmounted here with a couple of SAN switches, 7100 disk array, and 3 UPS each on it's own circuit. Long and the short of it is that we can stand to lose one UPS and the system will remain up. Should we lose two, we're up the creek.

Does anyone know of a way to configure ups_mond to only send a notification (e-mail or otherwise) if only 1 UPS loses AC, and 2 remain, and to initiate a shutdown if > 2 lose AC?

To add another fly to the ointment, we have a 2405 in one of the racks that is on one of the three UPSs in that rack. We intend for the serial link from that UPS to be attached to the 7405 (as the 2405 is only a test machine). Is there any way for the 7405 to communicate to the 2405 that shutting down would be a good idea *only if* a particular UPS goes down?

TIA
Bruce
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: Redundant UPS configuration

At no point do you actually define the model number of the UPS involved.

The ups_mond.conf configured and can handle a UPS per serial port.

The 7405 can communicate with the 2405.

Here is how I would do it.

Upon detecting shutdown conditions, the 7405 sends an email to root@hostname_2405

That email will be immediately procesed by sendmail to a file called /var/mail/root

This file can be processed regularly by a cron script, say every 5 minutes.

Make sure a pharase unlikely to come in a regular email is sent by the 7405

SHUTDOWNISAGOODIDEA in all caps is unlikely to come in a normal email.

This automated solution does make the 2405 vulnerable to an email attack, so make the phrase you use is important.

here is a script stub.

shutdown=$(cat /var/mail/root | grep SHUTDOWNISAGOODIDEA | wc -l)

if [ $shutdown -ge 1 ]
then
shutdown -ry 180
fi

This should do the trick so long as the NIC card, switch and sendmail deamon are still running.

As far as multiple ups goes, you should be able to configure as many devices as you have serial ports.

You may be able to find a way to process the GSP logs to figure out which UPS went down, but I have no idea how to do this.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Elmar P. Kolkman
Honored Contributor

Re: Redundant UPS configuration

I would not do it with the mail, since the mail will remain in your mail file, resulting in a repeating reboot...

Why not connect the console of the 2405 on another serial port on the 7405 and initiate the reboot through that link? (create a user without password that can only login on the console and will reboot the server) Then you only have to send that username to the serial port.

Mind that sending this only makes sense if the UPS the 2405 is connected to is still up ;-/
Every problem has at least one solution. Only some solutions are harder to find.
Bruce Link
Occasional Contributor

Re: Redundant UPS configuration

My apologies, the UPS' in question are all model A1356A.

The serial port idea sounds reaonable. Any ideas on how to go about this only when a specific ups loses power?

Thanks again.
Bruce