dikkiedirk Posted September 23, 2012 Share Posted September 23, 2012 In QNAP and Thecus NASes I can set-up a schedule to power off and power on the NAS at certain times. Is this at all possible in Unraid? I can probably set a cron job to call the powerdown script but power up will be impossible then. So it should be putting the server to sleep and waking up then? Quote Link to comment
Joe L. Posted September 23, 2012 Share Posted September 23, 2012 In QNAP and Thecus NASes I can set-up a schedule to power off and power on the NAS at certain times. Is this at all possible in Unraid? I can probably set a cron job to call the powerdown script but power up will be impossible then. So it should be putting the server to sleep and waking up then? It depends on your BIOS. Some BIOS have the ability turn on at a certain time, others do not. It entirely depends on your motherboard. As you said, you can set up a cron task to stop the array and power down. Joe L. Quote Link to comment
dikkiedirk Posted September 24, 2012 Author Share Posted September 24, 2012 Thanks Joe, I guess I am out of luck then. I have a Supermicro X9SCM-F. I haven't seen that option in the BIOS. Not even S3. Quote Link to comment
Helmonder Posted September 24, 2012 Share Posted September 24, 2012 Most bioses have an option for "resume on powerloss". Whenever power is gone you can choose between "on / off / last state". If you put that on "on" and setup a cheap power/timer clock between pc and wall socket you can get what you want : 01:00 shut down array and power down system 01:30 cut power using the timer 06:00 restore power using timer On restore of power system will turn on abd boot into unraid. What is my major issue with this is that I allmost always have to do manual stuff to get the system to shudown without a parity check on restart. Quote Link to comment
dikkiedirk Posted September 24, 2012 Author Share Posted September 24, 2012 Most bioses have an option for "resume on powerloss". Whenever power is gone you can choose between "on / off / last state". If you put that on "on" and setup a cheap power/timer clock between pc and wall socket you can get what you want : 01:00 shut down array and power down system 01:30 cut power using the timer 06:00 restore power using timer On restore of power system will turn on abd boot into unraid. What is my major issue with this is that I allmost always have to do manual stuff to get the system to shudown without a parity check on restart. Will this work on the X9SCM-F with BIOS 2.0a too? Would be nice if this could be done with a UPS. Quote Link to comment
jowi Posted September 24, 2012 Share Posted September 24, 2012 Most bioses have an option for "resume on powerloss". Whenever power is gone you can choose between "on / off / last state". If you put that on "on" and setup a cheap power/timer clock between pc and wall socket you can get what you want : 01:00 shut down array and power down system 01:30 cut power using the timer 06:00 restore power using timer On restore of power system will turn on abd boot into unraid. What is my major issue with this is that I allmost always have to do manual stuff to get the system to shudown without a parity check on restart. You can't just cut the power on the unraid server, i assume you're using a UPS in this scenario, which will do a clean powerdown when you cut power. Besides the fact that you are abusing the UPS this way, there is a bigger risk. Normally, in case of a power loss, you not only want to powerdown the unraid server in a clean way ASAP, but after that is done, also shutdown the UPS. If you don't, in case the power returns for like a minute or a few seconds and powers down AGAIN, you will be in the middel of starting up your unraid server again (because your using 'resume on powerloss') and you can't do a nice powerdown since the UPS probably is empty or near empty... this is why you do NOT want to resume on powerloss. Just stay off. So, do not use the UPS as a handy on/off switch... it's an emergency device, treat it as such. Quote Link to comment
JonathanM Posted September 24, 2012 Share Posted September 24, 2012 Most bioses have an option for "resume on powerloss". Whenever power is gone you can choose between "on / off / last state". If you put that on "on" and setup a cheap power/timer clock between pc and wall socket you can get what you want : 01:00 shut down array and power down system 01:30 cut power using the timer 06:00 restore power using timer On restore of power system will turn on abd boot into unraid. What is my major issue with this is that I allmost always have to do manual stuff to get the system to shudown without a parity check on restart. You can't just cut the power on the unraid server, i assume you're using a UPS in this scenario, which will do a clean powerdown when you cut power. Besides the fact that you are abusing the UPS this way, there is a bigger risk. Normally, in case of a power loss, you not only want to powerdown the unraid server in a clean way ASAP, but after that is done, also shutdown the UPS. If you don't, in case the power returns for like a minute or a few seconds and powers down AGAIN, you will be in the middel of starting up your unraid server again (because your using 'resume on powerloss') and you can't do a nice powerdown since the UPS probably is empty or near empty... this is why you do NOT want to resume on powerloss. Just stay off. So, do not use the UPS as a handy on/off switch... it's an emergency device, treat it as such. While I fully agree with what you said regarding a UPS, that is not what was being recommended. Nowhere in the original post was UPS mentioned, but it should have been. The timer use case would be directly on the server power cord, on the OUTPUT of the UPS, not the wall side of the UPS. I agree that a UPS should always be used with a server, and the original suggestion should have made clear which SIDE of the UPS the timer should be controlling. With a properly sized and controlled UPS, resume on powerloss can be applied with minimal risk. Quote Link to comment
Joe L. Posted September 24, 2012 Share Posted September 24, 2012 If you were using a physical timer/clock I would put it BETWEEN the wall outlet and the UPS. Then, set up unRAID to cleanly stop itself when power is lost while powered by the UPS (set it to power down after 15 seconds or so) Set it to power down the UPS too, so its batteries are not exhausted. Then, when timer is set to provide power back to the UPS, it will power up the server. That will work as long as you are able to cleanly stop all processes using the disks when powering down. Joe L. Quote Link to comment
Rusty Posted September 25, 2012 Share Posted September 25, 2012 I have been wondering how to do this with my server (I am currently building it so havent actually tried my method yet, but in theorie it should work) Thought I would share, perhaps it can help you. My router supports the dd-wrt custom firmware, I am planning to flash it to this. What I will do that is setup a WOL daemon on the router that will wake up my server every day at a specific time. (http://www.dd-wrt.com/wiki/index.php/WOL) And run a cron job on the server itself to switch off at a certain time everyday Quote Link to comment
xrqp Posted September 29, 2023 Share Posted September 29, 2023 On 9/23/2012 at 2:24 PM, Joe L. said: Some BIOS have the ability turn on at a certain time, Is that uncommon? I am wondering if it is worth it to hook up a monitor and keyboard to my unraid and look into this. Right now, I am guessing my odds are low. I got a run-of-the-mill board: ASUSTeK COMPUTER INC. PRIME Q270M-C , Version Rev X.0x American Megatrends Inc., Version 1607, BIOS dated: Mon 21 Oct 2019 Quote Link to comment
Vr2Io Posted September 29, 2023 Share Posted September 29, 2023 (edited) RTC real time clock wakeup can set by command, so you just need enable RTC wakeup in BIOS, then wake up on program time. Edited September 29, 2023 by Vr2Io Quote Link to comment
itimpi Posted September 29, 2023 Share Posted September 29, 2023 9 hours ago, xrqp said: Is that uncommon? In my experience waking at a specified time is almost universal. What is less common is Wake-on-LAN. I personally make use of that in conjunction with the Parity Check Tuning plugin option to restart array operations (from previous point reached) to allow me to automatically power my system off every night without it causing me issues. Quote Link to comment
xrqp Posted October 7, 2023 Share Posted October 7, 2023 How can you shutdown Unraid automatically based on time? What is a chron job? I am unable to write code etc. Quote Link to comment
Squid Posted October 8, 2023 Share Posted October 8, 2023 Powering off / restarting on a schedule is easy with the User Scripts plugin Powerdown: powerdown Restart powerdown -r As mentioned turning on after a powerdown is dependent upon your BIOS and you have to investigate within it. 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.