Dealing with unclean shutdowns


Recommended Posts

  • 1 month later...
  • 4 weeks later...

Normally if I need to create a diagnostics zip file, I can go to Tools in the GUI and there's an option box to "Anonymise diagnostics". But in the case of an unclean shutdown, the file gets created automatically, so there's no option to anonymise. Should it be anonymised, and if so, how? Or is there a folder from the zip file that could be uploaded to the forum safely (e.g., just the logs folder)?

Link to comment

Thanks for the quick reply.

 

I run my server on a UPS because of occasional lightning power outages, and it's worked well. But over the last few months I've had unclean shutdowns. At first I thought it might be lack of battery capacity, but after shutting down the server (cleanly I thought) and then restarting after a holiday, I got the unclean shutdown message. Today there was a power outage and the UPS kicked in and should have shut down the server cleanly, but again on restarting I got the unclean shutdown message and the parity check started.

 

I'm on UNRAID 6.9.2, and there's usually one VM running and a few dockers. There's one unassigned device. I've attached the diagnostics file generated at the time of the shutdown. Hope someone can give some suggestions about how to fix the unclean shutdowns.

 

tower-diagnostics-20221216-1714.zip

Link to comment

You're also running multiple VMs

 

As we all know, something like Windows can take quite a while to shut itself down.  Even an open dialog window will prevent the Windows from shutting off, which will lead to the OS having to forcibly kill off the tasks and then having an unclean shutdown flagged, regardless of whatever times you set.

 

Always set in VM Settings for the powerdown action to be hibernate and install the QEMU guest tools in the VM.  Now when a poweroff gets issued, the VM will hibernate in a second or two instead of having to actually perform a shutdown.

  • Thanks 1
Link to comment
  • 1 month later...

Euhm..

My unRaid test-server crashed yesterday with a kernel panic.

 

image.thumb.png.9abe99d1785d620efedc085a54b70281.png

 

After a reboot the parity-check started. While this was running I wanted to copy some data from my registered unraid server and got this message in de log of the test server.

 

Jan 27 00:15:46 towerpve kernel: XFS (md1): Metadata corruption detected at xfs_buf_ioend+0xac/0x386 [xfs], xfs_inode block 0xa0 xfs_inode_buf_verify
Jan 27 00:15:46 towerpve kernel: XFS (md1): Unmount and run xfs_repair
Jan 27 00:15:46 towerpve kernel: XFS (md1): First 128 bytes of corrupted metadata buffer:
Jan 27 00:15:46 towerpve kernel: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Jan 27 00:15:46 towerpve kernel: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Jan 27 00:15:46 towerpve kernel: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Jan 27 00:15:46 towerpve kernel: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Jan 27 00:15:46 towerpve kernel: 00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Jan 27 00:15:46 towerpve kernel: 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Jan 27 00:15:46 towerpve kernel: 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Jan 27 00:15:46 towerpve kernel: 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Jan 27 00:15:46 towerpve kernel: XFS (md1): metadata I/O error in "xfs_imap_to_bp+0x50/0x70 [xfs]" at daddr 0xa0 len 32 error 117
Jan 27 00:15:47 towerpve kernel: XFS (md1): Metadata I/O Error (0x1) detected at xfs_trans_read_buf_map+0x198/0x26d [xfs] (fs/xfs/xfs_trans_buf.c:296).  Shutting down filesystem.
Jan 27 00:15:47 towerpve kernel: XFS (md1): Please unmount the filesystem and rectify the problem(s)

 

I'm not sure how to proceed - is this issue fixed by the parity-check or do I need to boot unraid in safe-mode or something.

 

The board I'm running this on is N5105 based equipped with 32G ram - docker and vms functionality is disabled as I'm not going to use that.

Edited by sjoerd
Link to comment
  • Malfurious featured this topic
  • 1 month later...

Today I had a weird one. I am on 6.12-rc2 after being on 6.9.X for almost a year. 

 

In the morning I realized that pihole must be gone beacuse of no DNS solving. Wanted to open the Unraid GUI to look up, it wasn't available. Looked at the router in terms of sudden change of IP adress or something. Nothing changed there, instead the unraid server was off it said.

 

Running down stairs to take a look: PC was running. But neither could I make it display the local terminal nor was I able to just write 'reboot'/'power off' to shutdown safely. Nothing happened after more than 10 mins after the initial command input. 

 

I also wan't able to WOL, press the usual power button for graceful shutdown. It simply didn't react at all to any inputs.

 

So I made a hard-reboot via the reset switch. Turned back on nicely, but of course wanted to do parity check first. Since there were no connections to the array from any kind of PC, I don't think I have to do it immediately. 

 

I thought there would be a diagnose folder/entry made by Unraid, but it didn't. 

 

A) Is there anything I can make and post here to investigate the already occurred problem after having already rebooted?

B) Mirroring the log to a Flash drive is the only thing to do now to investigate any kind of repetition of the same problem, right?

 

 

Link to comment
  • 4 weeks later...

Is there a manual way to do it. 

 

I have no vm and don't want any. I shut the vm off. 

I have docker and no shares (at the moment. 

 

My question is :

 

If I want to reboot manually, then what is the procedure ( like 1,2,3 etc) 

 

I'm dreadful everytime I need to make a reboot. Because every time I need to run the rclone mount and it has to install the fuse plugin everytime. And my igpu stops working everytime with a segment fault. 

 

Is it because I had an unclean shutdown everytime. I thought that unraid was halted and I shut it down with power off button. 

 

Now I have read this and I need to have more patience I can see. 

 

But I need to reboot manually and how to do it so I don't mess up my system. 

 

Regards from Denmark 🙂

Link to comment
  • 2 weeks later...
48 minutes ago, Enr379 said:

Hello. My server is shutting down all the time now. It can even happen multiple times a day. Where can I find the files containing the error logs so I can post it here and maybe get some fresh ideas on what to troubleshoot?

By default you will not have one as the logs are in RAM and thus lost on reboot.   To get persistent logs you need to use the syslog server.

Link to comment
11 hours ago, itimpi said:

By default you will not have one as the logs are in RAM and thus lost on reboot.   To get persistent logs you need to use the syslog server.

I followed your link, but I didn't manage to set it up. Because after the server crashed again there was still no files recorded. Is this the correct setup?

 

Thank you so far!

Unraid 2.PNG

Link to comment
4 hours ago, Enr379 said:

I followed your link, but I didn't manage to set it up. Because after the server crashed again there was still no files recorded. Is this the correct setup?

Since you have the Mirror to Flash option set you should be getting a file in the 'logs' folder on the flash drive.  Is that where you looked for the file?

Link to comment
28 minutes ago, itimpi said:

Since you have the Mirror to Flash option set you should be getting a file in the 'logs' folder on the flash drive.  Is that where you looked for the file?

How do i Access that? Just stick the usb in another pc?

Link to comment
Just now, Enr379 said:

How do i Access that? Just stick the usb in another pc?

That is one option.   

 

If you have the Dynamix File Manager plugin installed (or an equivalent for file managing) then you can use that to access the flash drive.

 

You can also click on the Boot device on the Main tab and go to the SMB settings to make it visible as the 'flash' share over the network.  By default it is not shared for security reasons.

 

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.