Recovering from power outage


Recommended Posts

My unRAID system is plugged into a UPS and has the UPS driver installed and working.  I had about a 3 hour power outage today as we had a wicked wind storm here in Toronto.  

 

I think my UPS caused the system to shut down nicely, but how do I access the logs to see this as my current log just shows history back to the power up.

 

My system did not automatically power back on.  Do I need to go into the BIOS/UEFI and change the option so that on AC power restore that the system turns on?  I am not sure but I am guessing that it is set to "revert to last state".

Link to comment

Are there any plugins that would write the log to a hard drive during system shutdown?  Surely I am not the only one who would want to see logs from prior sessions - wouldn't this be very useful to document problem with one's system?

 

My unRAID server runs SageTV media server which feeds SageTV extenders at every TV so the family may not be able to watch TV until I am home and able to check things our.  They might have to, horror of horrors, watch Live TV.  I am not sure my kids even understand what Live TV is.

Link to comment

Did you check your    logs     folder/directory to see if there were log files in there.  The  Tips and Tweaks  plugin  will keep the last ten syslog files on a normal shutdown by default.  When I looked this evening, I also found the diagnostics file for the last time I upgraded both of my systems.  I am not quite sure what process (or plugin) provided those...

 

By the way, you can assume that you had a clean shutdown after a power outage if the server restarts without automatically starting a parity check.  (In other words, an unclean shutdown will trigger a parity check on restart.)  

  • Like 1
Link to comment

By logs folder do you mean /var/log?  That doesn't appear to have older logs.  Thanks for the tip on the Tips and Tweaks - I have installed that.  Where do you acess the archived logs?  I don't see anything in the plugin to access them and I don't see a mention of this capability in the Tips and Tweaks wiki.

 

My system did not do a parity check so I guess I had a clean shutdown.  So now I will have to do a shutdown and go and change the BIOS setting so that it powers up when power is restored.

 

Link to comment

I mean the    logs     folder/directory on your flash drive. That is the /boot/logs  directory from the Linux side of things.   You have to remember that the unRAID operating system is in stalled in RAM on bootup using the information that is on the Flash Drive.  If you are browsing the installed unRAID file system, please understand that most of it is on a RAM disk.  When power is shutdown (or last), it completely disappears!  The only way any portion of it can be preserved is if it copied to either the array of to the Flash Drive. 

 

9 minutes ago, wayner said:

Thanks for the tip on the Tips and Tweaks - I have installed that.  Where do you acess the archived logs? 

 

 

Go to Settings   >>>  Tips and Tweaks    and the click on the 'Tweaks' tab  and look for "Number of syslogs to Archive:" setting box.  By the way  Help is your friend in the GUI.  The logs files will be stored in the   logs   folder on the Flash Drive.  (See above for reason.)

Link to comment

Thanks - the log was there in the /boot/logs/<servername>-diagnostics-20180504-1739.zip file and I can see that the power failed at 17:18 and that shutdown was initiated at 17:34.  

 

I will change my BIOS so that the system automatically boots up when AC power is restored.  I guess the only instance where that won't help is if the system shuts down and then AC power comes back before the UPS is exhausted so that the server's power supply never really loses AC power.  It would be nice if a UPS had a way to send a signal to power up upon restore of AC power.

Link to comment
39 minutes ago, wayner said:

I will change my BIOS so that the system automatically boots up when AC power is restored.

 

There is a disadvantage to doing that. Suppose the power comes back briefly and then drops out again. Your server will start up automatically but your UPS might not have sufficient battery power for another ~16 minutes of run time, causing an unclean shutdown. If you were to leave it as it is and power it up manually you would be able to make a judgement as to whether the power is back permanently.

  • Upvote 1
Link to comment
14 hours ago, John_M said:

 

There is a disadvantage to doing that. Suppose the power comes back briefly and then drops out again. Your server will start up automatically but your UPS might not have sufficient battery power for another ~16 minutes of run time, causing an unclean shutdown. If you were to leave it as it is and power it up manually you would be able to make a judgement as to whether the power is back permanently.

 

In fact, after looking at what happens when the power goes out in my part of the world (State of Ohio), I have a thirty second delay between the time the power goes out and when I start the server shutdown.  (My observation is that if it is out that long, it will probably be out for longer than any consumer-type UPS will carry an unRAID server.)  While the battery on the larger of my two UPS's will last about thirty times longer than that when the battery is NEW, when it about four -to five years old, it is probably only good for about two minutes longer than it takes to shut the server down!    Plus, not doing a deep discharge on the battery will extended its life considerably.  

  • Upvote 1
Link to comment
On 5/4/2018 at 9:22 PM, wayner said:

the family may not be able to watch TV until I am home and able to check things our. 

You could enable WOL on your server, that way you could connect remotely through any number of different methods and bring up the server that way. It really isn't a good idea to automate restarts after power failure, for all the reasons stated earlier.

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.