Dealing with unclean shutdowns


Recommended Posts

1 hour ago, jeffreywhunter said:

I'm wanting a clean reboot on a daily basis and I don't want to cause unclean shutdowns.  I run plex, mysql, pydio and other dockers.  Will this script work to cleanly shutdown the dockers, then reboot?  I'd put this in the User Scripts plugin...  

 


/etc/rc.d/rc.docker stop && /etc/rc.d/rc.docker start
/usr/local/sbin/powerdown -r

Thanks in advance!

Why do you stop and then restart the dockers?

Link to comment
To perform a clean shutdown use
/sbin/poweroff

To perform a clean reboot use

/sbin/reboot

 

Yes technically powerdown is deprecated. However, the day that it actually stops working will not be a happy day for me, and an immediate PR will be put it.
Link to comment
37 minutes ago, Squid said:

Yes technically powerdown is deprecated. However, the day that it actually stops working will not be a happy day for me, and an immediate PR will be put it.

 

It starts with educating people to use the "new" way... And hopefully one day that PR isn't necessary.

 

Link to comment
3 hours ago, jeffreywhunter said:

Is it /sbin/reboot or /usr/local/sbin/reboot?

 

It's like he said:

root@Mandaue:~# ls -l /sbin/reboot
lrwxrwxrwx 1 root root 4 Apr 21 19:00 /sbin/reboot -> halt*
root@Mandaue:~# ls -l /usr/local/sbin/reboot
/bin/ls: cannot access '/usr/local/sbin/reboot': No such file or directory
root@Mandaue:~#

 

Link to comment
1 hour ago, John_M said:

 

It's like he said:


root@Mandaue:~# ls -l /sbin/reboot
lrwxrwxrwx 1 root root 4 Apr 21 19:00 /sbin/reboot -> halt*
root@Mandaue:~# ls -l /usr/local/sbin/reboot
/bin/ls: cannot access '/usr/local/sbin/reboot': No such file or directory
root@Mandaue:~#

 

Sorry, should have been clearer.  My script is using 

/usr/local/sbin/reboot

And it works, so was wondering if the path was incomplete.  Evidently either works?

Link to comment
2 hours ago, jeffreywhunter said:

And it works, so was wondering if the path was incomplete.  Evidently either works?

 

The "/usr/local/sbin/reboot" command does not exist in the stock installation of unRAID. Something else must have it created.

I recommend to use the commands I have given earlier as these are the 'official' ones as used by the GUI too.

 

Edited by bonienl
Link to comment
2 hours ago, trurl said:

 

Maybe you have the deprecated shutdown plugin installed.

 

I rebuilt the server from scratch in December.  How would I have installed the deprecated shutdown plugin?  Perhaps in rebuilding the server, I inadvertently recreated the problem by installing something in error?  All of my plugins and nerd tools are fully updated as far as I can tell...

Installed Plugins as of 20180512.txt

Link to comment
  • 1 month later...
On 3/5/2018 at 4:02 PM, Frank1940 said:

 

Am I correct in assuming that one should enter    ssh  bash   in the field for the   Processes to kill before Array is Stopped:  parameter?

 

EDIT:

 

 

So per your advice, like this   ssh,bash     

So. If I do this will scripts set to run at array stop via user scripts still run?

Link to comment
  • 4 weeks later...

Hey guys,

 

I've got a huge Problem. I switch to another mainboard and CPU (power consumption is much lower) and I've got a popup which tells me that there is an unclean shutdown detected.

This happens in ~ 30 - 45 min after I start/reboot the server.

 

At the weekend I build everything in the old system and it worked perfectly but I want to use the new mainboard and CPU.

 

Can someone help me? :)

Edited by CreZo
Link to comment

I am confused.  What hardware are you currently using in the server?  

 

Does the problem happen every time after you start the server? 

 

How many times has it happened?

 

Did you run a 24 hour memtst on the RAM?  ( Memtst is an option in the boot menu and tests the installed memory.)

 

Please provide us with a list of the new hardware that is failing. 

 

 

Link to comment

Hey Frank,

 

old hardware:

  • Motherboard
        Gigabyte Technology Co. Ltd. Z170-HD3P-CF (U3E1)
  • CPU
        Intel Core i7 6700K

new hardware:

  • Motherboard
        Gigabyte GA-B250M-DS3H
  • CPU
        Intel Pentium G4560 (2x 3,5GHz + HT)
Quote

Does the problem happen every time after you start the server? 

Yes, it does.

Quote

Did you run a 24 hour memtst on the RAM? 

Yes, no errors.

 

Quote

Please provide us with a list of the new hardware that is failing. 

I don't know which hardware is failing.

 

I boot the server and everything is fine for ~30 - 45 minutes. After this time when I login into the GUI I get a popup which tells me that there is an unclean shutdown detected.

Also, the theme changed from dark to white. My docker and apps are still running but I can't see them in the dashboard anymore. 

Edited by CreZo
Link to comment

Do you have the Fix Common Problems plugin installed?  (If not , do it)  Turn on the 'Troubleshooting mode'.    That will write the syslog file periodically to the logs directory. Also connect a monitor up to the console and seen if you see anything on the screen.  You may have to sit there and watch it until it reboots. 

 

You want to keep an eye on the GUI and watch the system temperatures. Make sure that the CPU coolers are secured locked down to the MB.

 

That has been at least one person who had a flaky PS that caused similar issues.   

 

I am assume that the server is actually rebooting.  After the first reboot does it do it again in another 30 to 45 minutes? 

 

I would stop Docker, shut all of the VM's down and see  if that makes a difference.  That will tell you if you have some software/hardware conflict or just a hardware problem.  There have not been any reports of the base NAS doing anything like this.

 

 

Link to comment

Thank you, Frank and trurl for your answers.

 

I already did this Frank and there was no reboot or anything else. I also stopped all VM's and apps. Every time I got the same result, a popup with the message in it but the server didn't reboot or shut down. The server is still running. I don't get it but I will the 'Troubleshooting mode' and also the Temperature problem can be a fact maybe this can help.

Link to comment
14 hours ago, trurl said:

I suspect flash drive corruption

Or possibly flash drive USB port disconnected as some point.

 

Go to Tools - Diagnostics and post the complete zip if it happens again. You might also try putting the flash in your PC and letting it checkdisk.

 

 

Link to comment
  • 1 month later...

I've had a number of unclean shutdowns recently in which my server rebooted during heavy disk I/O. I've traced the problem to a failing HBA and I've replaced it and now I'm in the process of restoring lost data from backups. It made one disk "Unmountable: unsupported partition layout". The effects of a failing HBA can be quite catastrophic.

 

After a spontaneous reboot the Main page indicates that an unclean shutdown has occurred and starting the array will begin a parity check. That's all as expected. However, I notice that if instead of starting the array, I either do a manual reboot or power down in order to investigate the hardware and power up again later, the unclean shutdown message isn't displayed and starting the array doesn't force a parity check. I wondered if anyone else had noticed this and whether it's a quirk, a bug or something else? Running a correcting parity check manually found and fixed 1500 or so errors. A subsequent parity check found zero errors, as expected. This is unRAID 6.5.3.

Link to comment
10 hours ago, John_M said:

I've had a number of unclean shutdowns recently in which my server rebooted during heavy disk I/O. I've traced the problem to a failing HBA and I've replaced it and now I'm in the process of restoring lost data from backups. It made one disk "Unmountable: unsupported partition layout". The effects of a failing HBA can be quite catastrophic.

 

After a spontaneous reboot the Main page indicates that an unclean shutdown has occurred and starting the array will begin a parity check. That's all as expected. However, I notice that if instead of starting the array, I either do a manual reboot or power down in order to investigate the hardware and power up again later, the unclean shutdown message isn't displayed and starting the array doesn't force a parity check. I wondered if anyone else had noticed this and whether it's a quirk, a bug or something else? Running a correcting parity check manually found and fixed 1500 or so errors. A subsequent parity check found zero errors, as expected. This is unRAID 6.5.3.

That sounds like something @limetech ought to at least investigate.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.