February 13, 20251 yr I recently experienced an issue where Unraid would hang when executing a shutdown because the Unassigned Devices plugin could not unmount a remote SMB mount where the target server was offline. Many thanks to @dlandon for identifying and fixing the issue quickly. However, this brought up a larger question in my mind. Should a plugin (or VM or Docker container or any other process) be allowed to cause a potential hang on shutdown? I did see a "forcing shutdown" message in the syslog during the hang but the shutdown still never completed. To this end I'd like to request that a feature be added to the shutdown script such that, after some reasonable (perhaps user defined) period of time, the script forces the shutdown no matter what (even if potential data corruption could be the result). This could be presented as an option in Disk Settings (or whichever settings section is appropriate) so that users could choose not to activate this feature. For those interested, here's an example of how this affected me in a real scenario. I was away from home when a power loss occurred. Normally, the UPS would trigger a shutdown and then Unraid would turn off the UPS once the shutdown was completed. However in this case the shutdown experienced the hang and never sent the turn off command to the UPS. Power was restored before the UPS was exhausted and so the UPS never cycled power (it always cycles power if it gets the turn off command even if power is restored). Thus my Unraid server remained offline until I was able to return home meaning that all the hosted services I run were also offline. Thanks DM
February 13, 20251 yr Solution This is the way Unraid works. It does a forced shutdown after a set amount of time that can be configured. The issue that we run into (this is what happened to UD), is several Linux commands will hang and never fail or time out. Some examples are 'stat', 'df', 'lsof', and 'fuser' when a mount point is unresponsive. A forced shutdown cannot happen when one of these Lnux commands is hung. The only answer, which is what I had to do, is to time out the command hanging UDF so it would eventually fail and not hang. The best we can do is to continue to find and fix these issues. There has been a lot of time invested in UD to prevent this kind of issue when a remote server goes offline and is not responsive. It's an incredible challenge to handle all the different cases from the varied remote servers users connect with.
February 14, 20251 yr Author 33 minutes ago, dlandon said: This is the way Unraid works. It does a forced shutdown after a set amount of time that can be configured. The issue that we run into (this is what happened to UD), is several Linux commands will hang and never fail or time out. Some examples are 'stat', 'df', 'lsof', and 'fuser' when a mount point is unresponsive. A forced shutdown cannot happen when one of these Lnux commands is hung. The only answer, which is what I had to do, is to time out the command hanging UDF so it would eventually fail and not hang. The best we can do is to continue to find and fix these issues. There has been a lot of time invested in UD to prevent this kind of issue when a remote server goes offline and is not responsive. It's an incredible challenge to handle all the different cases from the varied remote servers users connect with. Thank you for the clarification. I understand the issue better now. DM
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.