Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[SOLVED]The ultimate shutdown script

Featured Replies

I could not find a good answer for the below, if such exists sorry for a duplicate.

 

Is there any way to change unRAID shutdown script to make sure array really stops on shutdown? Even by killing all open files.

In my opinion the problem is important when there is a shutdown event generated by UPS, so no user intervention is possible and one wants to be sure array stops properly.

Array can not stop when there is any file opened on a user share , as it forever retries to unmount user shares. I witnessed the above at least once when I tried to stop my array manually and had been waiting for ~10min contemplating same message over and over  ;). I had to use lsof to kill some obscure hanging file referring to one of user shares.

 

When I have to automatically shut down unRAID due to power loss I don't care about any opened files. I want to kill them after say 1min.

 

Thanks.

There is a powerdown script that works much better. Not at home so can't link to it but I believe its available as an unmenu conf and as a plugin for v5. Search google for unraid powerdown script

  • Author

According to unmenu I had installed that one long time ago: powerdown-1.0.2

 

Does it also get executed when I manually press 'Stop Array'? That is when I noticed the problem and I concluded, that any powerdown script is invoking same procedure to stop the array prior to shutting down the Linux itself.

 

Does it also matter that I run unRAID in ESXi5.1 with Zeron vmtools? I guess VM shutdown call same unRAID script.

 

  • Author

Thanks,

but is it the same script I have installed via unMenu? Name and version is same.

According to unmenu I had installed that one long time ago: powerdown-1.0.2

 

Does it also get executed when I manually press 'Stop Array'?

No, it does not get invoked by the unRAID web-interface.
That is when I noticed the problem and I concluded, that any powerdown script is invoking same procedure to stop the array prior to shutting down the Linux itself.

no, different methods are used... unRAID'sStop button will NEVER kill anything.  It will wait forever  for disks to unmount (or until your syslog fills with "attempting to unmount" messages and your server crashes) whichever comes first.  ;)

 

Simple solution, if you want everything killed, install the powerdown script, when invoked via the apcupsd install ans subsequent power failure, it will kill everything it can.

Does it also matter that I run unRAID in ESXi5.1 with Zeron vmtools? I guess VM shutdown call same unRAID script.

Absolutely no idea.    You will have to test.  I have no experience with your method of running unRAID under ESXi.
  • Author

Joe L.->

 

OK, everything is clear now, Stop Array does not kill anything, powerdown script does, so in theory my UPS-triggered shutdown should take care of hanging files (since I have powerdown installed).

 

Appreciate all the help guys.

Joe L.->

 

OK, everything is clear now, Stop Array does not kill anything, powerdown script does, so in theory my UPS-triggered shutdown should take care of hanging files (since I have powerdown installed).

 

Appreciate all the help guys.

 

 

This is the case with this script. It hooks into runlevel 0 (shutdown) / 6 (restart).

ctrl-alt-del or a shutdown via the shutdown command or something triggered via apcupsd.

It's really a last resort kill everything so that the unraid array can be unmounted.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.