Swixxy Posted February 22, 2015 Share Posted February 22, 2015 I currently have a cron job set up to restart my server every night. However if a parity check is running and has not completed, it gets interrupted by the shutdown process. Is there a way to check if a parity is running? Or ideally any disk process (like rebuilding a disk etc) I use the powerdown script to restart currently. I manually remove the cron when doing a parity check/disk upgrade. However would love to make it automated Quote Link to comment
archedraft Posted February 22, 2015 Share Posted February 22, 2015 Mind if I ask why you restart your server nightly? As for the cron, you could set your restart cron job to run everyday besides the 1st of the month (or whichever day you run your parity check). ie something like 0 23 2-31 * * /path/to/script Quote Link to comment
Squid Posted February 22, 2015 Share Posted February 22, 2015 I think that this works, however you might want to check with Bonienl cat /proc/mdcmd | grep 'mdResync=' If the value is >0 a check / rebuild is running Quote Link to comment
bonienl Posted February 22, 2015 Share Posted February 22, 2015 I currently have a cron job set up to restart my server every night. However if a parity check is running and has not completed, it gets interrupted by the shutdown process. Is there a way to check if a parity is running? Or ideally any disk process (like rebuilding a disk etc) I use the powerdown script to restart currently. I manually remove the cron when doing a parity check/disk upgrade. However would love to make it automated Have you tried the s3_sleep plugin? It has an option to powerdown the system. Quote Link to comment
Swixxy Posted February 22, 2015 Author Share Posted February 22, 2015 Mind if I ask why you restart your server nightly? As for the cron, you could set your restart cron job to run everyday besides the 1st of the month (or whichever day you run your parity check). ie something like 0 23 2-31 * * /path/to/script My plex docker and a few others seem to not respond sometimes after a while, the app seemingly hangs. This way all my dockers restart daily so I don't have to manually restart them sometimes. Ideally I'd just restart all dockers however I couldn't find a way to do this easily (without updating it for each docker I add) The system only takes 4 minutes to go fully down and back up though, so it's not really a problem, so far! Although I'm sure one day I'll need my files and curse it to high heaven for going offline at 4:40am ! I think that this works, however you might want to check with Bonienl cat /proc/mdcmd | grep 'mdResync=' If the value is >0 a check / rebuild is running This is what I was looking for. Thank you I will look into this. Quote Link to comment
BRiT Posted February 22, 2015 Share Posted February 22, 2015 Have you tried using the following commands: /etc/rc.d/rc.docker stop Sleep 60 /etc/rc.d/rc.docker start I dont know if the sleep between the stop and start are required. Quote Link to comment
Swixxy Posted February 22, 2015 Author Share Posted February 22, 2015 Have you tried using the following commands: /etc/rc.d/rc.docker stop Sleep 60 /etc/rc.d/rc.docker start I dont know if the sleep between the stop and start are required. have just tried this /etc/rc.d/rc.docker stop && /etc/rc.d/rc.docker start and it actually seems to be perfect for what i need! Thank you! I assumed that the dockers would not auto-start just using the docker command as i assumed (wrongly) that the dockers auto-starting was to-do with the unraid docker plugin rather than the actual rc.docker itself. 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.