UPS, "powerdown"


tucansam

Recommended Posts

The "powerdown" script has never resulted in a clean powerdown of any system I have used it on, ever.  Five different unraid installs across six years and various hardware.  If I forget to turn off the docker in "Settings" or forget to "exit" from the command line and therefore have a session that remains open, the infinite waiting for disks to unmount loops begins.  Issuing "powerdown" from the command line does nothing.  Sometimes, 50% of the time, issuing a second "powerdown" from a second command line initiates the powerdown.  The other 50% of the time, a second command also does nothing, and I have to turn the system off completely.

 

Every time I come back up after a "powerdown," whether it was successful or not (ie whether the server powered down or I powered it down), I get a parity check.  Every time.  And its been this way since I started using unraid.

 

So first question, am I doing something wrong, what can I check, etc.

 

I am getting ready to buy a larger UPS for my server, but its runtime won't be more than 10-15 minutes, and I want to be able to do a clean shutdown.  This means closing connections, shutting down the dockers, etc etc and powering down. Using the UPS app/plugin/whatever, how exactly does the server shut itself down after the UPS sends the command (what is the exact process) and how reliable is it?

 

Thanks.

 

 

Link to comment
3 hours ago, tucansam said:

Every time I come back up after a "powerdown," whether it was successful or not (ie whether the server powered down or I powered it down), I get a parity check.  Every time

If the shutdown is successful, the only reason you will ever get a parity check on a restart is if your flash drive is either corrupted or dropped offline.  If it also drops offline you *may* have issues with it shutting down period due to it attempting to collect and write diagnostics to the flash.

 

Check your syslog for "bread"

Link to comment

To elaborate on what Squid said, a clean shutdown requires unRAID to stop the array, and then, it has to be able to write to config/super.dat on the flash that the array was stopped. Then when it starts again, it will read config/super.dat to get your disk assignments and it will see that it is starting from an array that was stopped. If it can't do the write to flash when shutting down, then it won't know that it ever stopped and will consider it an unclean shutdown.

Link to comment

The flash drives I am using are older, however I have never had issues with them before, and no errors related to "bread" are in the syslog.  

 

Does "powerdown" often take a while to complete?  At one point during testing, I let it sit for about 30 minutes after execution before I tried again.

Link to comment

How can I begin to troubleshoot this?  Its happened on every server I've ever built, so it must be something I'm doing.  I don't want to change/test/change/test and end up with a zillion parity checks, even if they are largely unneeded and can be aborted.... This is going to be a problem moving forward with a UPS that my server can actually talk to.

Link to comment
On 7/20/2017 at 7:56 AM, tucansam said:

forget to "exit" from the command line and therefore have a session that remains open,

Known, and to be expected.  If you hit the command line, then you have to take the appropriate precautions.

7 minutes ago, tucansam said:

How can I begin to troubleshoot this?

The Open Files plugin might help.  Before shutting down, open a new tab pointed at it, and shut down from another tab..

 

Additionally, if off of a clean shutdown you get parity checks when rebooting, then try stopping the array.  Once its stopped, run diagnostics and then post.

 

Alternatively, install Fix Common Problems, toss it into troubleshooting mode, then try and stop / reboot the array.  Maybe something will show up in the syslog

 

 

Edited by Squid
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.