Powerdown package for unRAID v5 and v6 (DEPRECATED)


dlandon

Recommended Posts

  • Replies 678
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

When I reboot my system without the ctrl key I find a file syslog.zip in boot/Logs. I think this is the one saved by Powerdown. It doesn't have this line in the log- JacoBack powerdown[9248]: Powerdown V2.18, but it does have a line that references Powerdown V2.18. I can't attach logs in this forum but here's an example. syslog.zip. Maybe this isn't the log being mentioned?

 

The powerdown plugin replaces the standard unRAID powerdown script.  No matter how the system is shutdown, powerdown will always be run.

 

Here is the sequence of operations with each different click of the reboot:

- Click "Reboot".  The emhttp sequence is run to stop the array and reboot.  This is the same as pressing the stop button on the webgui, and then clicking reboot.

- Click "Reboot" with the CTRL key pressed.  Powerdown is executed to stop all running tasks, unmount the drives, and then reboot.  This is the same as typing "reboot" at the console.

 

Either sequence gets you the syslog saved.  If the array has been stopped when powerdown is called, it will merely save the log and reboot the systen.

 

The difference is that the emhttp initiated reboot can sometimes get hung waiting for a task to stop.  This is the situation where you see the unmounting drives message on the screen constantly.  Powerdown is a bit more forceful and will shut down the array even if a task is keeping it from doing that.

 

When powerdown is used to shut down the array and unmount the drives, you will see in the log a long list of entries where it is performing the work.  If it's only a few lines at the end, the array has already been stopped.

The million dollar question is, does the built in apcupsd plugin initiate the emhttp method or powerdown in case of power loss?

 

The gui restart is fine if it hangs, because if someone presses the button, that means someone is watching to make sure it really powers down.

 

But when it's initiated by power loss, that means most likely nobody is watching and if it hangs, you get unclean shutdown.

 

If powerdown is initiated and it is the one that is replaced by the script, no problem.

 

Thanks

Link to comment

When I reboot my system without the ctrl key I find a file syslog.zip in boot/Logs. I think this is the one saved by Powerdown. It doesn't have this line in the log- JacoBack powerdown[9248]: Powerdown V2.18, but it does have a line that references Powerdown V2.18. I can't attach logs in this forum but here's an example. syslog.zip. Maybe this isn't the log being mentioned?

 

The powerdown plugin replaces the standard unRAID powerdown script.  No matter how the system is shutdown, powerdown will always be run.

 

Here is the sequence of operations with each different click of the reboot:

- Click "Reboot".  The emhttp sequence is run to stop the array and reboot.  This is the same as pressing the stop button on the webgui, and then clicking reboot.

- Click "Reboot" with the CTRL key pressed.  Powerdown is executed to stop all running tasks, unmount the drives, and then reboot.  This is the same as typing "reboot" at the console.

 

Either sequence gets you the syslog saved.  If the array has been stopped when powerdown is called, it will merely save the log and reboot the systen.

 

The difference is that the emhttp initiated reboot can sometimes get hung waiting for a task to stop.  This is the situation where you see the unmounting drives message on the screen constantly.  Powerdown is a bit more forceful and will shut down the array even if a task is keeping it from doing that.

 

When powerdown is used to shut down the array and unmount the drives, you will see in the log a long list of entries where it is performing the work.  If it's only a few lines at the end, the array has already been stopped.

The million dollar question is, does the built in apcupsd plugin initiate the emhttp method or powerdown in case of power loss?

 

The gui restart is fine if it hangs, because if someone presses the button, that means someone is watching to make sure it really powers down.

 

But when it's initiated by power loss, that means most likely nobody is watching and if it hangs, you get unclean shutdown.

 

If powerdown is initiated and it is the one that is replaced by the script, no problem.

 

Thanks

 

When powerdown is installed all power events are sent to the powerdown plugin, including apcupsd.  Please re-read the OP and you'll see this described there.

Link to comment

When powerdown is installed all power events are sent to the powerdown plugin, including apcupsd.  Please re-read the OP and you'll see this described there.

It was that statement in the OP that confused me to start with. Just to make sure I'm understanding correctly; Powerdown handles power events differently depending on how that power event was initiated, so the end result can be different from one type of power event to another. Is that right?

 

Sorry if I'm being a little dense. Just trying to get a basic understanding.

Link to comment

When powerdown is installed all power events are sent to the powerdown plugin, including apcupsd.  Please re-read the OP and you'll see this described there.

It was that statement in the OP that confused me to start with. Just to make sure I'm understanding correctly; Powerdown handles power events differently depending on how that power event was initiated, so the end result can be different from one type of power event to another. Is that right?

 

Sorry if I'm being a little dense. Just trying to get a basic understanding.

 

No.  All power events are the same with powerdown handling them.  The only difference is whether or not the computer is powered off.

Link to comment

Ok..  please excuse my ignorance here..  I'm running a really old powerdown (1.02)!

I'd like to use the latest..  I'm still running V5.  From unmenu it says there is a 2.06..  But the link, I think, is broken.

I found a 2.18 version, but don't remember how to manually install it!  It's been a while since I've had to do any manual install.

 

I know V6 does things differently.. but I'm still on V5 with tgz file in the packages directory.

 

 

Link to comment

Ok..  please excuse my ignorance here..  I'm running a really old powerdown (1.02)!

I'd like to use the latest..  I'm still running V5.  From unmenu it says there is a 2.06..  But the link, I think, is broken.

I found a 2.18 version, but don't remember how to manually install it!  It's been a while since I've had to do any manual install.

 

I know V6 does things differently.. but I'm still on V5 with tgz file in the packages directory.

 

I moved the repository so that's why the unmenu link is broken.  Go to the OP and use the V5 plugin link to get the plugin and install it.  It will install V2.18 which should work fine with V5.  Let me know if you have any problems.

Link to comment

Is the the plg method? (installed in the plugins directory?)  Should I abandon the unmenu method then?

and I have some version of apcupsd installed through unmenu..  is there anything special I have to do with that?

 

Thanks!

 

Jim

 

Install the plugin in the /boot/config/plugins folder and then reboot and powerdown will install.

 

Yes.  The link is broken for unmenu.

 

If you're installing apcupsd and there is a reference in the plugin for powerdown, set the version to 2.18 and it will install the powerdown package and you won't need the powerdown plugin.

Link to comment

jbuszkie, please consider upgrading to UnRAID v6.

 

* All older versions have security vulnerabilities, increasingly so as time goes by.

* Support is getting harder and harder to provide, as older versions get farther from supporters memory.

* Tom and LimeTech want to end-of-life all older versions.

* Many more features in v6 ...

--- and ---

* Apcupsd is built in.

* System plugins like Powerdown are really easy to add, from the webGui, and almost automatically updated.

Link to comment
  • 2 weeks later...

Question r.e. the best way to install APCUPSD with v5  [i'm reverting one of my systems to v5 to do some tests on parity check speeds and want it to have the latest APCUPSD w/powerdown without bothering to install UnMenu ... just to keep it as "vanilla" as possible.]

 

Your OP says "... Apcupsd and Dynamix load powerdown as a part of their plugin for V5."    I've read that this was true for APCUPSD v3.14.10, so I assume all that's needed is to put this plugin in the Config\Plugins folder and reboot.  ... HOWEVER, there's no link to download the plugin !!    [This is shown on the OP for the APCUPSD 3.14.10 thread, but the link doesn't lead to any downloads:  "  The plugin can be download from the Unraid Plugin Wiki Page: http://lime-technology.com/wiki/index.php?title=UnRAID_Plugins "]

 

So ... question #1:  Is there a good download link for APCUPSD v3.14.10 ?

  and question #2:  Does that plugin indeed include the requisite Clean Powerdown package?  (or does it need to be installed separately, as is required with UnMenu ?)

 

Link to comment
  • 1 month later...

This might be a dumb question...  But does this powerdown script handle multiple log files for archiving?

Doesn't unraid move the syslog file to something like syslog_0 (I can't remember what it actually is) when the file gets to a certain size?

does the power down script attempt to copy those files too to the log directory on the flash drive? I was looking at the code and it doesn't not appear to.. unless I'm missing something...

Link to comment

This might be a dumb question...  But does this powerdown script handle multiple log files for archiving?

Doesn't unraid move the syslog file to something like syslog_0 (I can't remember what it actually is) when the file gets to a certain size?

does the power down script attempt to copy those files too to the log directory on the flash drive? I was looking at the code and it doesn't not appear to.. unless I'm missing something...

 

The only log archived on the flash drive is the latest.

Link to comment

This might be a dumb question...  But does this powerdown script handle multiple log files for archiving?

Doesn't unraid move the syslog file to something like syslog_0 (I can't remember what it actually is) when the file gets to a certain size?

does the power down script attempt to copy those files too to the log directory on the flash drive? I was looking at the code and it doesn't not appear to.. unless I'm missing something...

 

The only log archived on the flash drive is the latest.

hmm..  Maybe I'll have to try and hack it so it will save all of the syslogs..  Thanks for the confirmation.

 

Jim

Link to comment

In general, the only reason the syslog is rotated (making additional huge syslog files) is because something is seriously wrong, in which case the diagnostics zip would probably be a better choice, and it DOES include all syslog files.  Perhaps if you are modifying Powerdown, execute 'diagnostics' if more than one syslog file exists. 

Link to comment

In general, the only reason the syslog is rotated (making additional huge syslog files) is because something is seriously wrong, in which case the diagnostics zip would probably be a better choice, and it DOES include all syslog files.  Perhaps if you are modifying Powerdown, execute 'diagnostics' if more than one syslog file exists.

Considering it could be months between powercycles..  The syslogs could get big.  I know the mover generates a lot of syslog entries..  If you've got a crapload of files that get moved....  But that might be a good idea anyway to do the diagnostic thing..

 

Jim

Link to comment
  • 2 weeks later...

Is powerdown designed to send the Kxx.sh scripts twice when unRAID gets rebooted? My logs show it happening twice:

 

Nov 30 14:08:58 Pithos powerdown[29990]: Powerdown initiated
Nov 30 14:08:58 Pithos powerdown[29996]: Powerdown V2.18
Nov 30 14:08:58 Pithos rc.unRAID[30000][30004]: Processing /etc/rc.d/rc.unRAID.d/ kill services scripts.
Nov 30 14:08:58 Pithos rc.unRAID[30008][30012]: Processing /etc/rc.d/rc.unRAID.d/ kill scripts.
Nov 30 14:08:58 Pithos rc.unRAID[30008][30016]: Running: "/etc/rc.d/rc.unRAID.d/K00.sh"
.... 30ish lines removed ....
Nov 30 14:10:21 Pithos logger: Stopping libvirtd...
Nov 30 14:10:24 Pithos rc.unRAID[30194][31694]: Running: "/usr/local/emhttp/plugins/powerdown/event/stopping_svcs"
Nov 30 14:10:24 Pithos rc.unRAID[31698][31702]: Processing /etc/rc.d/rc.unRAID.d/ kill services scripts.
Nov 30 14:10:24 Pithos rc.unRAID[30194][31706]: Running: "/usr/local/emhttp/plugins/powerdown/event/unmounting_disks"
Nov 30 14:10:24 Pithos rc.unRAID[31710][31715]: Processing /etc/rc.d/rc.unRAID.d/ kill scripts.
Nov 30 14:10:24 Pithos rc.unRAID[31710][31719]: Running: "/etc/rc.d/rc.unRAID.d/K00.sh"

Link to comment

Is powerdown designed to send the Kxx.sh scripts twice when unRAID gets rebooted? My logs show it happening twice:

 

Nov 30 14:08:58 Pithos powerdown[29990]: Powerdown initiated
Nov 30 14:08:58 Pithos powerdown[29996]: Powerdown V2.18
Nov 30 14:08:58 Pithos rc.unRAID[30000][30004]: Processing /etc/rc.d/rc.unRAID.d/ kill services scripts.
Nov 30 14:08:58 Pithos rc.unRAID[30008][30012]: Processing /etc/rc.d/rc.unRAID.d/ kill scripts.
Nov 30 14:08:58 Pithos rc.unRAID[30008][30016]: Running: "/etc/rc.d/rc.unRAID.d/K00.sh"
.... 30ish lines removed ....
Nov 30 14:10:21 Pithos logger: Stopping libvirtd...
Nov 30 14:10:24 Pithos rc.unRAID[30194][31694]: Running: "/usr/local/emhttp/plugins/powerdown/event/stopping_svcs"
Nov 30 14:10:24 Pithos rc.unRAID[31698][31702]: Processing /etc/rc.d/rc.unRAID.d/ kill services scripts.
Nov 30 14:10:24 Pithos rc.unRAID[30194][31706]: Running: "/usr/local/emhttp/plugins/powerdown/event/unmounting_disks"
Nov 30 14:10:24 Pithos rc.unRAID[31710][31715]: Processing /etc/rc.d/rc.unRAID.d/ kill scripts.
Nov 30 14:10:24 Pithos rc.unRAID[31710][31719]: Running: "/etc/rc.d/rc.unRAID.d/K00.sh"

 

No.  Can you post the complete log?  It looks like powerdown was started a second time about two minutes later.  There is supposed to be a block to prevent it from running if it is already running.

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.