SOLVED UPS - Not shutting down properly in case of powerloss

Status
Not open for further replies.

Klontje

Dabbler
Joined
Feb 7, 2016
Messages
47
Hello all,

today the power switched off (earth leakage circuit breaker) while I was not at home because of thunderstorms. I did not receive any nice emails from FreeNAS about a shutdown or anything. When I came back home and turned the power back on FreeNAS booted without any issue and I started looking at ups and syslogs. My syslog shows no shutdown signals and the UPS log (shown below) doesn't show anything strange either. As you can see the last line from before the power outage at approximately 18:10 shows no errors and when I turned it back on the battery was fully drained. The UPS is a USB connected (to freenas) APC Smart UPS 750 which shows 7% load and has my FreeNAS + network equipment connected to it. I simulated a power outage when I installed the UPS about a month ago and it shutdown FreeNAS as designed. Does anybody know how to troubleshoot this or if it might be a known issue with the UPS in case of thunder?

Code:
ups.log
20170622 180045 100 NA NA [OL] NA NA
20170622 180545 100 NA NA [OL] NA NA
20170622 223413 3 NA NA [OL CHRG LB] NA NA
20170622 223913 6 NA NA [OL CHRG LB] NA NA
20170622 224413 9 NA NA [OL CHRG LB] NA NA
20170622 224913 13 NA NA [OL CHRG] NA NA
20170622 225413 16 NA NA [OL CHRG] NA NA
20170622 225913 20 NA NA [OL CHRG] NA NA
20170622 230413 24 NA NA [OL CHRG] NA NA
20170622 230913 27 NA NA [OL CHRG] NA NA
20170622 231413 30 NA NA [OL CHRG] NA NA
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
Hello all,

today the power switched off (earth leakage circuit breaker) while I was not at home because of thunderstorms. I did not receive any nice emails from FreeNAS about a shutdown or anything. When I came back home and turned the power back on FreeNAS booted without any issue and I started looking at ups and syslogs. My syslog shows no shutdown signals and the UPS log (shown below) doesn't show anything strange either. As you can see the last line from before the power outage at approximately 18:10 shows no errors and when I turned it back on the battery was fully drained. The UPS is a USB connected (to freenas) APC Smart UPS 750 which shows 7% load and has my FreeNAS + network equipment connected to it. I simulated a power outage when I installed the UPS about a month ago and it shutdown FreeNAS as designed. Does anybody know how to troubleshoot this or if it might be a known issue with the UPS in case of thunder?

Code:
ups.log
20170622 180045 100 NA NA [OL] NA NA
20170622 180545 100 NA NA [OL] NA NA
20170622 223413 3 NA NA [OL CHRG LB] NA NA
20170622 223913 6 NA NA [OL CHRG LB] NA NA
20170622 224413 9 NA NA [OL CHRG LB] NA NA
20170622 224913 13 NA NA [OL CHRG] NA NA
20170622 225413 16 NA NA [OL CHRG] NA NA
20170622 225913 20 NA NA [OL CHRG] NA NA
20170622 230413 24 NA NA [OL CHRG] NA NA
20170622 230913 27 NA NA [OL CHRG] NA NA
20170622 231413 30 NA NA [OL CHRG] NA NA
My guess is that FreeNAS was unable to shutdown before the battery completely drained.

Change the UPS service shutdown mode to "UPS goes on battery" rather than "UPS reaches low battery", specifying a reasonable interval for the shutdown timer. You can use the upsc command to find out the battery.runtime value; select a shutdown timer interval roughly half of this value. That will give your FreeNAS server plenty of time to shut down gracefully, with the added benefit of not completely draining your UPS battery, which is hard on them.

See my "Configuring UPS support for single or multiple FreeNAS servers" write-up in the Resources section for details.

Good luck!
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Also if your modern and router lose power you will not get an email.

Sent from my Nexus 5X using Tapatalk
 

Klontje

Dabbler
Joined
Feb 7, 2016
Messages
47
Edit: facepalm... Girlfriend changed power outlets when power was out last time so everything except server was connected to ups...
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Edit: facepalm... Girlfriend changed power outlets when power was out last time so everything except server was connected to ups...
Time to get new gf.


Sent from my Nexus 5X using Tapatalk
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Edit: facepalm... Girlfriend changed power outlets when power was out last time so everything except server was connected to ups...
I was about to respond to this post with something like: "I can guarantee a wife or child is related to whatever happened here", and then, boom, you figured it out before I could advise you.
 
Status
Not open for further replies.
Top