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.

[6.0 beta 7] Unable to trigger a clean shutdown using Power button

Featured Replies

unRAID OS Version:

6.0 beta 7

 

Description:

Unable to trigger a clean shutdown using Power button. Visible result is a parity check upon the following boot cycle

 

How to reproduce:

- Start system

- Wait for boot sequence to end and system to become idle

- Short press power button on the HW case to trigger a shutdown sequence

- Wait for system to shutdown

- Press power button again to start system

 

Expected results:

- System becomes idle when startup sequence finishes

 

Actual results:

- A parity check is triggered, indicating that the system did not shutdown cleanly

 

Other information:

On the 5.x branch and using the exact same system this feature was working without problems.

This is a default installation, without any extras or plugins and has been so since the beginning.

 

Please let me know in case you need further information from my side - at the moment, this issue seriously affects my usage of UnRaid.

On the 5.x branch and using the exact same system this feature was working without problems.

This is a default installation, without any extras or plugins and has been so since the beginning.

In my experience it did not work on a clean v5 system - you had to install the powerdown package (probably via unMenu).  I notice that there appears to be a 64-bit powerdown package listed in unMenu - not sure if this works on current v6 betas.  I have just installed it on my system so that I can test it out if I need to close down my own server.

 

I see that making this a built-in feature is on the roadmap for v6.0.  It is not indicated as fixed, but I would expect a fix for it to not be far off bearing in mind the quoted timescales for v6 final release.

Please let me know in case you need further information from my side - at the moment, this issue seriously affects my usage of UnRaid.

Very nice bug report, thank you.  I will look at this on Monday.

  • Author

Very nice bug report, thank you.  I will look at this on Monday.

 

I kinda do this for a living, so it better be! :D :D :D

The power button definitely does a clean shutdown for me - running v6.0b7 with powerdown package v2.06 installed.

  • Author

Yes, but you are using addons. This was never the case before for UnRaid and neither should it be for the future.

It is a basically functionality...

  • Author

Unfortunately, need to report this is still there for 6.0 beta 8 :(

Jaco2k is not alone.

 

I'm also seeing this in beta 8 on a system where a vanilla 5.x managed to always shut down nicely after a quick press on the power button.

 

Works for me, actually it has rarely not worked.  How about someone with this issue post a system log?

  • Author

Works for me, actually it has rarely not worked.  How about someone with this issue post a system log?

 

Sure do - if you give me the steps for it, I can provide a clean log to you.

The built-in powerdown with no plugins/addons running works fine.  When plugins/addons are added, unRAID waits for the plugins/addons to shut down so drives can be unmounted.  They won't shutdown without being told to.  Powerdown 2.07 walks through the /etc/rc.d directory looking for the rc.xxx files of plugins/addons and issues 'rc.xxx stop' so the plugins/addons can shutdown.

 

Works for me, actually it has rarely not worked.  How about someone with this issue post a system log?

 

Sure do - if you give me the steps for it, I can provide a clean log to you.

 

There are numerous ways to get the system log, e.g., click on Tools then System Log.  Capture that log, then click on Log button on menu bar to bring up a real-time log.  Then hit your power switch and let's see what is causing your unclean shutdown.

Alright - here are the logs as per request:

 

- System log

- The tail upon pressing Power button in case

- System log on first start after pressing power button

The tail shows that the shutdown DID start!

 

Do you have a screen attached as a console.  That is where I see most of the messages relating to shutdown.

  • Author

it is no news that the shutdown starts - it is just not a clean one ;)

 

I do have a screen if needed, but it is not going to show anything else than what is seen on those logs, but let's see what Tom says.

  • Author

BTW, attaching here also a log for a shutdown using the web interface which looks, even to my lame eye, quite different from the other log

Shutdown_log_via_web_interface.txt

There are numerous ways to get the system log, e.g., click on Tools then System Log.  Capture that log, then click on Log button on menu bar to bring up a real-time log.  Then hit your power switch and let's see what is causing your unclean shutdown.

 

Can't hurt with another log, I guess...

 

Shutdown via web interface: OK (never a problem)

Shutdown via power button when array hadn't been started: OK (6b9_powerbutton_arrayneverstarted.txt for comparison)

Shutdown via power button when array was started: Unclean shutdown detected (6b9_powerbutton_arraystarted.txt)

 

More or less a clean install of unRAID. Plex Media Server is installed a Docker app on the system, but the container was never started between boot and power down in any of the above situations.

 

I could probably connect to the servers remote management interface and capture a video of any console messages if necessary.

6b9_powerbutton_arrayneverstarted.txt

6b9_powerbutton_arraystarted.txt

The following methods seem to reliably result in clean shutdowns on my lab server:

  • Web UI (stop array, then checkbox+button)
  • Executing /root/powerdown (or the symlinked /usr/local/sbin/powerdown).
  • Quick press on the power button after stopping the array using the web UI.
  • Quick press on the power button after manually stopping the array in a manner I wouldn’t use on a non-lab server (/bin/umount on /dev/md* and /root/mdcmd stop)
  • Quick press on the power button with a Powerdown package installed (https://github.com/dlandon/unraid-snap/raw/master/powerdown-x86_64.plg)

The following method seems to reliably result in unclean shutdowns:

  • Quick press on the power button in other cases than listed above.

Docker is running without apps, but stopping Docker via either "/etc/rc.d/rc.docker stop" or the web UI before pressing the power button does not help, the shutdown is still unclean. I can only get a clean shutdown when the array is nicely stopped before powering down, and I can’t see that happening automatically in a stock 6b9 when the power button is pressed. Switching to runlevel 0, I don’t see any opportunity for an array stop via /etc/rc.d/rc.0, unless there is a custom stop script present in /boot/config/stop...

 

I’m probably overlooking something vital, as I can’t see how anyone could get a stock system to power down nicely when the power button was pressed (with the array running at the time). Would love to have someone point out what I’m missing so I can read up on it :-)

The following methods seem to reliably result in clean shutdowns on my lab server:

  • Web UI (stop array, then checkbox+button)
  • Executing /root/powerdown (or the symlinked /usr/local/sbin/powerdown).
  • Quick press on the power button after stopping the array using the web UI.
  • Quick press on the power button after manually stopping the array in a manner I wouldn’t use on a non-lab server (/bin/umount on /dev/md* and /root/mdcmd stop)
  • Quick press on the power button with a Powerdown package installed (https://github.com/dlandon/unraid-snap/raw/master/powerdown-x86_64.plg)

The following method seems to reliably result in unclean shutdowns:

  • Quick press on the power button in other cases than listed above.

Docker is running without apps, but stopping Docker via either "/etc/rc.d/rc.docker stop" or the web UI before pressing the power button does not help, the shutdown is still unclean. I can only get a clean shutdown when the array is nicely stopped before powering down, and I can’t see that happening automatically in a stock 6b9 when the power button is pressed. Switching to runlevel 0, I don’t see any opportunity for an array stop via /etc/rc.d/rc.0, unless there is a custom stop script present in /boot/config/stop...

 

I’m probably overlooking something vital, as I can’t see how anyone could get a stock system to power down nicely when the power button was pressed (with the array running at the time). Would love to have someone point out what I’m missing so I can read up on it :-)

 

Post a log of the unclean shutdown.  If powerdown is installed, the log is saved on the flash drive.

Post a log of the unclean shutdown.  If powerdown is installed, the log is saved on the flash drive.

 

I've tried powering down in so many situations, so I don't really consider it to be a specific "the unclean shutdown". The single line for "other cases" represent quite a few variations. See the attached 6b9_powerbutton_arraystarted.txt a couple of posts back for one of the unclean shutdowns. Should be valid enough still, although Docker might not have been manually stopped on that one before the power button was pressed.

 

As I wrote, shutdowns with Powerdown installed work reliably, clean and nice. Most likely because rc.unRAID is stopping the array if it’s running.

 

A few logs for comparison:

 

Powerdown package 2.08 installed:

OK (6b9_powerdown208_clean.txt)

 

Powerdown package 2.08 installed with rc.unRAID patched, the line with /root/mdcmd stop is commented out.

Unclean shutdown (6b9_powerdown208_patchednostop_unclean.txt)

 

Stock (without Powerdown package), Docker manually stopped before pressing power button. Missing the end of the log for obvious reasons...

Unclean shutdown (6b9_stock_dockeralreadystopped.txt)

6b9_powerdown208_clean.txt.gz

6b9_powerdown208_patchednostop_unclean.txt.gz

6b9_stock_dockeralreadystopped.txt.gz

Powerdown package 2.08 installed with rc.unRAID patched, the line with /root/mdcmd stop is commented out.

Unclean shutdown (6b9_powerdown208_patchednostop_unclean.txt)

 

This is guaranteed to cause an unclean shutdown.  The array is stopped by powerdown in the rc.unRAID script.

 

I looked back through this post, but never saw anything about the plugins or extra stuff you have installed.  Do you have any plugins running?

 

I can't work with the logs you posted.  I'd like to see a plain txt file of the powerdown shutdown.  It will tell me what powerdown is stopping that might be causing the unclean shutdowns of the stock unRAID.

Powerdown package 2.08 installed with rc.unRAID patched, the line with /root/mdcmd stop is commented out.

Unclean shutdown (6b9_powerdown208_patchednostop_unclean.txt)

 

This is guaranteed to cause an unclean shutdown.  The array is stopped by powerdown in the rc.unRAID script.

 

Well duh. That's the point I was trying to make in the post you replied to. Granted, English is not my first language :-)

 

I looked back through this post, but never saw anything about the plugins or extra stuff you have installed.  Do you have any plugins running?

 

For those logs - no plugins added, no extras added.

 

Except for the Powerdown package (when mentioned), there was nothing but Docker Manager and unRAID Server OS in the plugin list, and not a single Docker container in sight. The reason you didn't see anything about plugins or extra stuff in that post is because I didn't have them for those logs, and I expected the syslogs to speak for themselves in that regard.

 

I can't work with the logs you posted.  I'd like to see a plain txt file of the powerdown shutdown.  It will tell me what powerdown is stopping that might be causing the unclean shutdowns of the stock unRAID.

 

Depending on platform, might I suggest gunzip or 7-zip?

 

Where exactly does the stock unRAID try to stop the array if everything is working as expected?

The powerdown script was not connected properly to the power button event.  This is fixed in -beta10.  Under normal conditions the power button should now gracefully power down the system.  Therefore marking this bug solved.

So we still need to install powerdown plugin?

 

Not if the system is running correctly.  But there are other defect reports and feature request posts and this particular one was for the "correctly running" case - therefore closed.

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.