Jump to content

UPS/power loss/recovery edge cases


drumstyx

Recommended Posts

I've got my UPS and server configured such that after 5 or 10 minutes (I forget which) of lack of power, the server shuts down, then shuts down the UPS, and then when power comes back, the UPS is configured to turn back on, and the server is configured to power on on power restoration.

 

Great, right? It is! Power flickers, no problem, UPS handles it, power goes out for an extended period then comes back, no problem, server just comes back when power is available.

 

Ok, but what if the power comes back during the rather lengthy (because of docker apps presumably) shutdown process? I've set the shutdown threshold to a timespan I figure would most likely indicate a longer outage (most often it's either just a few seconds, a couple minutes, or 20+ minutes, not that I get frequent outages), but that's just a guess, and does nothing for actually handling the case of power restoration during shutdown.

 

The most ideal solution would be for the script/software that asks the UPS to shutdown after gracefully killing everything to make a final query -- if the power is back, reboot normally, if not, finish the server and UPS shutdown. There'd still be a second or two of that edge case, but much better than the minute plus for a regular shutdown.

Another way would be the UPS being aware that it should come back on if it's told to shut down shortly after recovering from a power outage. It'd shut down, and attempt to power back up after a few seconds.

 

Anyone else solve this issue?

Link to comment

It is normally recommended that you do not have the unRAID server set to automatically restart once the UPS initiated closedown sequence is initiated.   There are too many edge cases where having auto-start on the unRAID server can lead to potential data loss if the UPS powers back on before it is fully recharged and another power cut occurs.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...