RobJ Posted December 18, 2015 Share Posted December 18, 2015 Quick question: is is possible to shut down a remote unRAID server (Backup Server) by using the Powerdown package? I would like to add it to my rsync script to shut down the machine after the backup is complete. Thank you. If you want to shut down the server at the completion of your rsync script, just add 'powerdown' to the end of the script. If you meant you want to remotely shut the server down, there are tools that can open a Telnet or SSH session, and send the powerdown command. One of the oldest is TST10 (search that), the Telnet Scripting Tool. There are newer and more secure ways too, but I'm not familiar with them. Quote Link to comment
PIETRO95 Posted January 12, 2016 Share Posted January 12, 2016 Hello. I have a problem with this plugin in my unraid 6.1.6: it won't shutdown: it get stuck at INIT: no more processes left in this runlevel. I tried turning off all my apps but it still doesn't work. If I first stop the array it will turn off properly. These are the apps and plugin that I have installed: - CouchPotato - Transmission - Plex - DDClient - A Windows 10 VM - Powerdown Package 2.18 - Dynamix Sys Stats, Temp, Info, Button, S3 Sleep. Thanks. (Sorry If I made any language mistake but I'm Italian) Quote Link to comment
avpap Posted January 16, 2016 Share Posted January 16, 2016 Firstly let me apologise if this issue has been raised before already. I also have unassigned devices plugin installed to access another nas through SMB. Whenever I try to powerdown the unraid server the whole shutting down process hangs. I have tried both through the gui and through the console (shutdown -now). When I unmount the remote drives there is no problem. Is this an issue with the powerdown plugin? Is there any way for powerdown to automatically unmount remote drives before going through the shutdown process? My concern is that the process hangs also when there is a power cut. The UPS plugin of unraid undestands that there is a power cut and gives the command for the server to shut down, but the process hangs. Thank you very much Quote Link to comment
dlandon Posted January 16, 2016 Author Share Posted January 16, 2016 Firstly let me apologise if this issue has been raised before already. I also have unassigned devices plugin installed to access another nas through SMB. Whenever I try to powerdown the unraid server the whole shutting down process hangs. I have tried both through the gui and through the console (shutdown -now). When I unmount the remote drives there is no problem. Is this an issue with the powerdown plugin? Is there any way for powerdown to automatically unmount remote drives before going through the shutdown process? My concern is that the process hangs also when there is a power cut. The UPS plugin of unraid undestands that there is a power cut and gives the command for the server to shut down, but the process hangs. Thank you very much It is the responsibility of unassigned devices to unmount the remote drives, not powerdown. Quote Link to comment
wedge22 Posted February 29, 2016 Share Posted February 29, 2016 I must be missing something simple here but how do I create a script to powerdown my server via Putty and also stop my Windows 10 VM? Quote Link to comment
danioj Posted March 25, 2016 Share Posted March 25, 2016 There was some discussion about capturing logs on power down over in a thread I started: http://lime-technology.com/forum/index.php?topic=47732.msg458309 It seems that while my intentions were good, the majority of users that replied saw the capturing of a diagnostics file was better placed in this plugin - seemingly after the press of the Power Button. If I am correct, could this be as simple as adding: /usr/local/sbin/diagnostics to the code which is executed when the Power Button Press event is captured? Quote Link to comment
dlandon Posted March 25, 2016 Author Share Posted March 25, 2016 There was some discussion about capturing logs on power down over in a thread I started: http://lime-technology.com/forum/index.php?topic=47732.msg458309 I looked over the thread. It seems that while my intentions were good, the majority of users that replied saw the capturing of a diagnostics file was better placed in this plugin - seemingly after the press of the Power Button. Since powerdown captures shutdown events, it probably does make sense. If I am correct, could this be as simple as adding: /usr/local/sbin/diagnostics to the code which is executed when the Power Button Press event is captured? Yes. I just need to consider where in the process it makes sense to do this and if the diagnostics script will run if the system is hung. I haven't worked with the diagnostics script so I am not sure how it works or its dependencies. Tell me more about what you are concerned about. I sense it is that you want diagnostics if unraid does not respond to the web interface or a telnet or ssh session cannot be started and you want the diagnostics to troubleshoot the problem. Does this happen a lot? Quote Link to comment
Frank1940 Posted March 25, 2016 Share Posted March 25, 2016 .... Does this happen a lot? ..... I would say at least once a week. Here is an example: http://lime-technology.com/forum/index.php?topic=47823.0 Quote Link to comment
danioj Posted March 25, 2016 Share Posted March 25, 2016 There was some discussion about capturing logs on power down over in a thread I started: http://lime-technology.com/forum/index.php?topic=47732.msg458309 I looked over the thread. It seems that while my intentions were good, the majority of users that replied saw the capturing of a diagnostics file was better placed in this plugin - seemingly after the press of the Power Button. Since powerdown captures shutdown events, it probably does make sense. If I am correct, could this be as simple as adding: /usr/local/sbin/diagnostics to the code which is executed when the Power Button Press event is captured? Yes. I just need to consider where in the process it makes sense to do this and if the diagnostics script will run if the system is hung. I haven't worked with the diagnostics script so I am not sure how it works or its dependencies. Tell me more about what you are concerned about. I sense it is that you want diagnostics if unraid does not respond to the web interface or a telnet or ssh session cannot be started and you want the diagnostics to troubleshoot the problem. Does this happen a lot? Thanks buddy. Sorry an initiative of mine seems be resulting in more work for you. It wasn't my intention. The concern is that with the introduction of virtualisation features in unRAID "I" feel the core system is becoming less stable under different situations. The whole concept that you can run these things on top of unRAID without impacting the core OS I don't think always rings true. Anyway, irrespective of my opinion I have observed / experienced a greatly increased number of instances over the past year of crashes / resets / interface unavailability / system instability (for vaying reasons). Often the dialog with these users (following a request for support) goes like this: - support request indicating issue - request if user captured syslog before issue occurred - response in the negative - indication that support is difficult to impossible without something to go on User at this point has no option but to do things like try and wait for the issue (eg the system to crash) and hopefully capture the logs or embark on an investigation of isolation tests etc. That thread was about being proactive about capturing logs and not reactive in preparation for a failure. Anyway that is my concern - you probably wish you'd never asked. The truth is unRAID experiences crashes and related issues allot more than people (including me) like to admit. Quote Link to comment
dlandon Posted March 25, 2016 Author Share Posted March 25, 2016 The concern I have is if Linux has stopped working, then the powerdown script can do nothing to capture diagnostics. If the only way to get the server to shutdown is to hold the power button and do a hard reset, then the powerdown script will never be executed and cannot capture diagnostics. Holding down the power button powers down the computer and Linux never sees that event. Linux will only see a momentary press of the power button. It may be helpful to include a diagnostics capture in the powerdown script, but I don't want to set an unrealistic expectation that it will work in all cases of a forced shutdown. Quote Link to comment
dlandon Posted March 27, 2016 Author Share Posted March 27, 2016 I've added diagnostics capture to the powerdown script. Whenever a shutdown or reboot occurs a diagnostics is saved to the /boot/logs directory. Hopefully this will help those that have issues with unraid locking up. Caveat: it will not work if Linux has crashed. i.e. if you have to hard reset the system, powerdown cannot capture diagnostics. When unraid locks up, try a single press of the power button and a clean shutdown should occur and diagnostics will be saved. Quote Link to comment
danioj Posted March 27, 2016 Share Posted March 27, 2016 I've added diagnostics capture to the powerdown script. Whenever a shutdown or reboot occurs a diagnostics is saved to the /boot/logs directory. Hopefully this will help those that have issues with unraid locking up. Caveat: it will not work if Linux has crashed. i.e. if you have to hard reset the system, powerdown cannot capture diagnostics. When unraid locks up, try a single press of the power button and a clean shutdown should occur and diagnostics will be saved. Nice job mate! Quote Link to comment
bonienl Posted March 27, 2016 Share Posted March 27, 2016 I've added diagnostics capture to the powerdown script. Whenever a shutdown or reboot occurs a diagnostics is saved to the /boot/logs directory. Hopefully this will help those that have issues with unraid locking up. Caveat: it will not work if Linux has crashed. i.e. if you have to hard reset the system, powerdown cannot capture diagnostics. When unraid locks up, try a single press of the power button and a clean shutdown should occur and diagnostics will be saved. Nice job mate! +1 Quote Link to comment
garycase Posted March 27, 2016 Share Posted March 27, 2016 Excellent addition to an already very nice package. Quote Link to comment
archedraft Posted April 4, 2016 Share Posted April 4, 2016 Could you check and see if the 2016.03.26 (2.20) update breaks the Sxx and Kxx scripts? My Sxx scripts were working fine with 2016.02.14a (2.19) but do not seem to load with 2.20. EDIT: Disregard, error is in my end. Quote Link to comment
blingbling1384 Posted April 18, 2016 Share Posted April 18, 2016 I don't seem to be able to install the Powerdown plugin. unRAID and Dynamix are both on the latest versions. I attached the log I get when I try to download from github to this post. Any ideas? log.txt Quote Link to comment
Squid Posted April 19, 2016 Share Posted April 19, 2016 I don't seem to be able to install the Powerdown plugin. unRAID and Dynamix are both on the latest versions. I attached the log I get when I try to download from github to this post. Any ideas? Try settings static DNS addresses of 8.8.8.8 and 8.8.4.4 in Settings Network Settings Quote Link to comment
blingbling1384 Posted April 19, 2016 Share Posted April 19, 2016 I don't seem to be able to install the Powerdown plugin. unRAID and Dynamix are both on the latest versions. I attached the log I get when I try to download from github to this post. Any ideas? Try settings static DNS addresses of 8.8.8.8 and 8.8.4.4 in Settings Network Settings Changing DNS did not make a difference. Quote Link to comment
RobJ Posted May 22, 2016 Share Posted May 22, 2016 (minor) First post here still says 2.18. Quote Link to comment
fiscalcon Posted June 1, 2016 Share Posted June 1, 2016 I've been finding my unRAID server off randomly recently. I thought I was running into a hardware issue, but upon each boot I found that a parity check wasn't running. Checking logs, the powerdown script is causing the shutdowns. Thankful nothing more harmful isn't happening, but still want to find the cause. Started on the 27th here: syslog-20160527-144522.txt:May 27 14:43:45 Tower powerdown[28631]: Powerdown initiated syslog-20160529-130606.txt:May 29 13:04:32 Tower powerdown[28291]: Powerdown initiated syslog-20160529-192940.txt:May 29 19:28:29 Tower powerdown[22133]: Powerdown initiated syslog-20160530-142415.txt:May 30 14:22:42 Tower powerdown[15032]: Powerdown initiated syslog-20160531-081411.txt:May 31 08:12:56 Tower powerdown[15053]: Powerdown initiated We haven't had any power outages, at least ones long enough to mess with the microwave/stove clock. I disabled the APC daemon as a test and the power down script shut the server down again today. Looking at the log I only see a start of the APC daemon, not a stop. Checked settings and it was definitely off today during the 8am shutdown. I've attached a syslog from the last time it happened. I could be missing something, but I don't see anywhere that says what is calling the powerdown script. Anything I can add to try and capture what is calling it? Let me know if there is anything more I can provide to assist. syslog-20160531-081411.txt Quote Link to comment
Squid Posted June 1, 2016 Share Posted June 1, 2016 Sure it's not as simple as a flakely power switch? Sent from my SM-T560NU using Tapatalk Quote Link to comment
JonathanM Posted June 1, 2016 Share Posted June 1, 2016 Sure it's not as simple as a flakely power switch?Or a pet or a kid? Quote Link to comment
fiscalcon Posted June 7, 2016 Share Posted June 7, 2016 Well I think it was the cat. I was on my computer next to my unRaid, he jumps onto the tower and unRaid starts to shutdown as you can hear all the disks spinning up. Wasn't the first of the month and wasn't 3 in the morning, then off it goes. I've covered the power switch to stop him from hitting it. I had uninstalled the power down script and it was still happening. Thanks for the simple but easily missed checks. Quote Link to comment
JonathanM Posted June 7, 2016 Share Posted June 7, 2016 Well I think it was the cat. You are not the first to have this happen, and you will not be the last. Cats love sleeping on warm electronics. Servers should not have exposed power or reset buttons. They need covers, like missile or gun controls on war planes. Quote Link to comment
Recommended Posts
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.