Two UNRAID boxes and One UPS


Go to solution Solved by JonathanM,

Recommended Posts

Do these UPS Settings look alright for two UNRAID boxes connected to one UPS.  

 

Basically, I would like UNRAID 2 to shutdown after 5 min power outage, then UNRAID 1 to shutdown after 10 min power outage.

 

How about the Battery level and Runtime settings? Do they look alright.  Just would like another pair of eyes to take a look... basically I'd like UNRAID 2 to shutdown before UNRAID 1 no matter the circumstances, ie. power outage, battery levels, runtime  and time on battery

 

UNRAID 1

UPS cable: USB
UPS type: USB
Device: 

Battery level to initiate shutdown (%): 30
Runtime left to initiate shutdown (minutes): 10
Time on battery before shutdown (seconds): 600 / 10 mins
Turn off UPS after shutdown: No


UNRAID 2

UPS cable: Ether
UPS type: Net
Device: 192.168.1.2:3551

Battery level to initiate shutdown (%): 40
Runtime left to initiate shutdown (minutes): 20
Time on battery before shutdown (seconds): 300 / 5 mins
Turn off UPS after shutdown: No

 

Also what approach to run a safe power outage test. I would like to avoid a parity check (if possible) on the arrays if the UPS failed to switch to battery power or initiate shutdown properly?

 

Thanks.

Link to comment
  • Solution
9 hours ago, Pablo808 said:

Also what approach to run a safe power outage test.

Temporarily obtain 2 surge protecter power strips with switches. We need to turn off the power without breaking the ground circuit, so no yanking plugs out of the socket.

 

Obviously starting with both servers safely shut down, along with everything else you plan to plug into the UPS.

 

Plug all the power cords that will go to the UPS into surge protector 1. Plug the UPS input into surge protector 2

 

Make a (hopefully measured) educated guess on max power draw of everything plugged into surge protector 1. Bonus points if you have an accurate wattmeter to feed surge protector 1.

 

Leave the USB connection from the UPS going to Unraid 1. This is why you need surge protectors instead of yanking the plug. Very bad things can happen if the UPS ground isn't tied back to the PC when it loses power.

 

Fire up the UPS with nothing but the USB lead and power input connected.

 

Boot up all the equipment on surge protector 1. Start a non-correcting parity check on both Unraid servers, and have everything started and loaded like it would in a worst case unattended power outage. Read the power draw if you have meter of some sort.

 

Connect a similar draw non critical load to the output of the UPS. Good candidates are halogen work lights, incandescent lights if you have any around any more, space heaters on low, use your imagination to find enough load.

 

Now you are ready to start the actual testing portion. This should be done with observation only, resist the urge to manually intervene. You should have a way to watch the dashboard of both Unraids.

 

Turn off the surge protector feeding the UPS to start the "power failure".

 

Observe the loads connected to the UPS, look for flickering lights or fan speed variations on the heater, whatever you have connected.

 

Remember to turn off any tech not connected to UPS, to accurately simulate a power outage. Optionally for a more thorough test disconnect your outbound internet if you can do so safely, unless you are using cellular WAN, as a real power outage may drop the WAN outside of your control. Watch to see if you get notifications on the Unraid dashboards of a power failure. If everything is working to plan, Unraid 2 should start the shutdown process cleanly after 5 minutes. When it shuts down, you can adjust the load on the UPS to match, maybe turn off one of the lights connected. After the 10 minutes has elapsed, hopefully Unraid 1 starts a clean shutdown. When it's done, you can adjust the load on the UPS if you want. At this point if the UPS is still running the dummy loads, you can call it a success, depending on what you observed.

 

Other considerations.

 

After draining the batteries on a UPS, make sure you account for recharge time before depending on it for more backup, since a typical recharge rate is 10 to 20 times slower. If the UPS was running on battery for 15 minutes, allow at least 3 hours recharge time.

 

SLA UPS batteries, the most common type, get touchy about being drained more than 50%. Their capacity and lifetime is reduced the deeper the discharge, so try to stay in the top of the curve. If you are discharging too deeply, reduce the time on battery parameter.

 

Personally my secondary loads like client pc's, VM's, etc are all set to shut down after a minute or two of power outage. Keep in mind you can install apcupsd clients on any VM's hosted on Unraid to get them cleanly shut down prior to the main timeouts and reduce the shutdown time.

 

If during the test the batteries are drained before the timed shutdown is done, you need to upsize the UPS, or restructure to multiple UPS since you are aiming for less than 50% drain, and you can't shorten the delay meaningfully.

 

If the communication path between devices is broken or interrupted, the shutdown signal will be lost. Make sure all network infrastructure can outlast the full shutdown period.

 

I recommend NOT trying to have things automatically recover after a power loss event. Much better to manage the recovery hands on, watching and controlling, especially checking UPS battery condition to ensure enough capacity to handle another shutdown if power goes out again during the boot up process.

  • Upvote 1
Link to comment

@Pablo808, also remember that the UPS has to power the Network devices (router, switches, etc.)  for Unraid 2 to be shutdown.  This means that the network devices will continue to be active even after both servers are shutdown. 

 

This means that these devices will continue to draw power from the UPS battery.  It has been my experience (in  my neck of the world) that if my power is out for 30 seconds, it will be out for a minimum of 2 hours. (About twenty years ago, I was out for a week--  Christmas eve to New Years eve  --after an ice storm!)  So when the power does come back on, you may have little to no  reserve left in that battery and it might take 24-36 hours to fully recharge that battery. 

 

Unless you already have an business type of UPS, look to get a second UPS for the other server.  (I found out the hard way that the battery cost for small VA capacity UPS's is a fraction of what the battery pack cost is for the high capacity UPS's!) 

 

You should investigate the actual Amp-Hour rating of the battery used in any UPS before you buy.  A 300VA UPS may use the identical battery as 800VA UPS.  The spec that changes is the time at full load!

  • Upvote 1
Link to comment

@JonathanM If there was a power switch at the wall socket, could I just switch that off to simulate a power outage?

 

Thank you for the suggestion.  Going by that, I would do something like this:

 

UNRAID 1 --- PSU ---> Surge Protector 1
UNRAID 1 --- USB ---> UPS
UNRAID 2 --- PSU ---> Surge Protector 1
Network Switch --- Power ---> Surge Protector 1
UPS ---> Surge Protector 2 --> Mains Power (wall socket)


Therefore: Mains Power --> Surge Protector 2 --> Surge Protector 1


1) All devices OFF
2) Power on Surge Protector 2
3) Power on Surge Protector 1
4) Power on UNRAID 1, UNRAID 2, (Network Switch already ON)

Start Test

1) Power off Surge Protector 2

Watch for:

2) UNRAID 2 shutdown
3) UNRAID 1 shutdown


Adjust power outage trigger time to 1 or 2 mins (depending on UPS capacity) to reduce UPS battery drain.

 

Thanks.

Link to comment
23 minutes ago, Pablo808 said:

 If there was a power switch at the wall socket, could I just switch that off to simulate a power outage?

Sure, as long as the surge protector with all the computers and stuff has continous power when you switch the UPS source power off.

 

If you can cut the power to the UPS without unplugging it you don't need that surge protector in line with it. Most wall sockets in the US don't have switches so I specified a switchable surge protector to provide a way to turn off the power to the UPS without disturbing the earth connection.

 

30 minutes ago, Pablo808 said:

Therefore: Mains Power --> Surge Protector 2 --> Surge Protector 1

Not quite sure I understand this. Computers and stuff should have a constant source of power throughout the test, the only thing switched is the UPS input. The reason I specified a surge protector for the critical equipment is to have them all on the same circuit with some level of protection from power issues.

 

Do you have a way to figure out the power draw of the servers and network equipment? The test accuracy depends on the dummy load being close to the actual load.

Link to comment

@JonathanM OK. I think I got it now.

 

Mains Power --> Surge Protector 1 --> UNRAID 1 and UNRAID 2

Mains Power --> UPS Power --> Surge Protector 2 --> Dummy load. ie. like light bulbs that draw equivalent Wattage

 

For the 'test', cut the power on Surge Protector 2 with the simulated 'load'.  

 

UNRAID 1 and UNRAID 2 does not loose power during the test (Surge Protector 1 does not get switched off).

 

My two UNRAID boxes draw about ~120W (with disks spinning) and the UPS is rated at 650VA/390W.

 

Thanks.

Link to comment
16 hours ago, JonathanM said:

How did you measure that? It seems low to me. Don't forget to add the network equipment that will be running on the UPS as well.

 

 

By looking at the UNRAID UPS Panel - UPS Load parameter.  I've added the switch, my servers idle at 27W each and when the 4 disks are running go up to about 60W.

 

Thanks. I will give the power outage simulation a shot this weekend.

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.