Is UPS automatic clean shutdown script possible?


Recommended Posts

We had another power outage yesterday, this one a little worse than those of recent times.  One of my Unraid servers is showing 2 failed HDD's I'll investigae a little further when I get home.

 

What strange is that neither server had a single HDD spun up at the time.

 

I've had a UPS on my ToDo list for some time and have only recently, within the last couple of days, moved my servers to a location where I can easily add one.

 

What I'm wondering is...

 

If I buy a UPS with a scripting solution is there any way to get this to trigger both critical unraids (via Telnet or HTTP perhaps?) to shut down cleanly on loss of power?  I have an XP-Pro PC in the same area that could be connected to the same UPS as the servers.  One consideration is that I have passwords on my UnRaid servers.

 

Ideally the UPS would keep all running for 5 minutes or so and if the power doesn't come back on then cleanly shut down the servers.

 

Anyone have a working solution?

 

Thanks,

 

Mark.

Link to comment

Take a look at this thread.

 

 

http://lime-technology.com/forum/index.php?topic=1528.0

 

I think what you want to do is possible using apcupsd, if you buy an APC brand UPS.

 

dave

 

That's a complex thread of discovery there, I'll watch with interest, thank you.

 

I lost an HDD in Monday's outage, despite the fact none were spun up at all.  It was an old 250gb, originally from my Pre-UnRaid Suse Server days, so it may have just been it's time to expire.

 

I was taking a look at APC UPS's from work today and my wife rings to tell me we've had another outage, only a few seconds but enough to send everything into "parityland" again.  I need to sort a UPS out soon and the APC ones seem to come bundled with "Powerchute" software.

 

Anyone have a recommendation for a specific model for 2 x Fully Populated (16HDD) Unraid servers and a modest Shuttle PC?  They seem to be pretty big things these UPS's!  All I need is sufficient power to survive a couple of minutes outage and be able to cleanly shut down if longer than that.

 

Thanks,

 

Mark.

Link to comment

Any UPS big enough to handle two servers (with the simultaneous load of 32 disks spinning up) plus a workstation PC is going to be pretty big by itself.  Even though you only need a few minutes time to shut down, you have a peak load somewhere between 500 - 1000 watts.

 

I would suggest you stay within the APC family of UPS's and look into a refurbished/used version of one of their SmartUPS models.  These are available in the 1000 to 1500 watt range, output a true sine wave, and are not too expensive.  These can be found on eBay, or locally. (preferably because of shipping weight)

 

I have two in my home theater, one powering the projector (SmartUPS 1400), the other the remainder of my audio equipment rack (SmartUPS 1100).  These are older models can be connected via a serial cable to the PC running monitoring software.  Newer models use USB cables (I have an APC BackUPS 750 on my unRAID server), or plug directly into your LAN. 

 

New, these models are fairly expensive, but used/surplus they can be had for $150 - $200 range.  Most important are the condition of the batteries.  All batteries in all UPS supplies need replacement every 3-5 years.  Here is one rack-mount example on eBay http://cgi.ebay.com/APC-Smartups-1400-2U-Smart-Ups-Rackmount-SU1400RM2U_W0QQitemZ130242143716QQihZ003QQcategoryZ99265QQssPageNameZWDVWQQrdZ1QQcmdZViewItem

Here is an example of a unit that sits on a shelf, or on the floor http://cgi.ebay.com/APC-SUA1000-SMART-UPS-1000VA-670W-120V-SU1000NET-BLACK_W0QQitemZ280250034532QQihZ018QQcategoryZ99265QQssPageNameZWDVWQQrdZ1QQcmdZViewItem

These are NOT a small UPS, most weigh between 50 and 60 lbs.  You can't cheat physics.  Lots of wattage and long runtime = large, and heavy batteries.

 

My unRAID server has 11 drives and shows a runtime of less than 10 minutes with the 750 watt unit I currently use.  This is enough to shut my unit down safely.

Your two fully loaded servers will need a UPS that is much bigger.  I would go for the 1400 watt range (or bigger).

apcaccess status

APC      : 001,038,0928

DATE    : Sun Jul 06 00:20:15 EDT 2008

HOSTNAME : Tower

RELEASE  : 3.14.3

VERSION  : 3.14.3 (20 January 2008) slackware

UPSNAME  : Tower

CABLE    : USB Cable

MODEL    : Back-UPS ES 750

UPSMODE  : Stand Alone

STARTTIME: Sun Jul 06 00:16:00 EDT 2008

STATUS  : ONLINE

LINEV    : 123.0 Volts

LOADPCT  :  40.0 Percent Load Capacity

BCHARGE  : 100.0 Percent

TIMELEFT :  10.1 Minutes

 

Joe L.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.