December 1, 20241 yr I am continually having issues with my array not stopping. Various reasons (often "stopping filesystem"). This isn't normally an issue as I've developed a script that I run which shuts everything down nicely and the array always stops properly. But yesterday I stupidly bumped the power button on my server. So it started shutting down. And of course didn't finish and I had to dirty restart. I'm not looking to troubleshoot why it didn't shutdown. I've wasted dozens of hours on this and as my array stop script works perfectly every time I'm wondering if there is a way to implement that on my system? So "shutdown" runs my script, then shuts down. Is this possible?
December 2, 20241 yr Community Expert Have you tried running the script via the User Scripts plugin and scheduling it to run at “Stopping of Array”? Not sure if that is early enough but easy to try. If that does not work then it should be possible to get it to run on a particular Unraid event firing.
December 2, 20241 yr Author I hadn't thought of that. I'll try that. Would be awesome if it works. When manually stopping the array I run it in the background via userscripts and always works. I'll update when I am able to stop the array.
December 2, 20241 yr Author I gave that a try and I'm afraid it didn't run. Which to me seems strange as it says "stopping of array". Which would have to be before the array is stopped as I don't think you can run a userscript when the array is offline. Or can you? Nevertheless I'll need to work out an alternative way to get the script to run as per usual it's been 20 minutes and hasn't shutdown so I'll no doubt need to restart it.
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.