Jump to content
Squid

[Plugin] Fix Common Problems - Beta [THREAD NOW CLOSED]

54 posts in this topic Last Reply

Recommended Posts

This plugin is designed to scan your unRaid server looking for configuration errors, common problems, etc and offer up solutions to them.

 

Once installed, just go to Settings / User Utilities and click the Life Saver ( Fix Common Problems )

 

This is the initial beta release of this plugin, and while we iron out bugs / issues, the couple of automatic fixes that it has are going to be disabled, and the scheduled background scans (with notifications) are also going to be disabled.

 

Because both of my servers are production servers, and I am not currently willing to completely trash my system to test how the plugin responds to it (ie: corrupt the disks, remove disks, etc) I really could use everyone's help here in debugging this, and adding further suggestions for checks / fixes. 

 

In other words, it would be great if you think that you have a problem with your system, or if you are helping someone who has a problem with their system, or are just curious, then install or get them to install this plugin.

 

This beta version will not mess up your system

 

Install it either through CA (Fix Common Problems in the plugin section), or paste this URL into the Plugins tab:

 

https://raw.githubusercontent.com/Squidly271/fix.common.problems/master/plugins/fix.common.problems.plg

 

After we get this installed onto user's systems that have known problems, then I can check to see if my logic is actually correct in determining the problems, and coming up with the suggested fixes.

 

After a few Betas, I will allow the user to run the automatic fixes (currently for moving share contents to / from the cache drive), and also enable the scheduled background checks to run this periodically.

 

Additionally, I think that which checks the background program processes will be configurable so that you will not be notified about certain errors if you don't want to.

 

The current checks this plugin performs are:

 

The following checks should be 100% functional:

 

* Implied Cache Only shares do not have files / folders stored outside the cache drive

* Cache Only shares do not have files / folders stored outside the cache drive

* Array Only shares do not have files / folders stored on the cache drive

* Dynamix checking for plugin updates

* Community Applications Installed - Only because of its plugin auto update feature

* Community Applications set to auto update itself (because it affects the app experience)

* Dynamix WebUI set to auto update (via Community Applications)

* This plugin set to auto update itself (via Community Applications)

* Powerdown plugin installed

* Ability for the server to communicate to the outside world (ping github.com)

* Ability to write a file to each drive in array and cache

* Ability to write a file to the flash drive

* Ability to write a file to the docker image

* Similar named shares only differing by case (eg: MyShare and myshare)

* Default appdata storage location is set to /mnt/cache/.... (and not /mnt/user/...)

* Default appdata storage location is a cache only share

* Plugins not up to date

* Check for 32 bit packages in /boot/extra and /boot/packages

 

The checks below are very hard for me to test without playing with fire on my servers. (but I think they work)

 

* Look for disabled disks

* Look for missing disks

* Look for read errors on disks

* Look for file system errors (really not sure if this one works -> got a question in to eric / bonienl about an entry in disks.ini)

* Look for SSD's within the Array (since if they're there they can impact the ability to reconstruct a disk should a failure happen)

 

Yes, there is some overlap between what dynamix has notifications for, and what I'm checking for, but a big notable difference is that all my stuff is all on the same screen (with nothing else), and I also offer suggestions as to what to do.

 

These (and others hopefully forthcoming) will also be ultimately segregated into Errors and into Warnings with differing notification levels.

 

I think that this plugin has the potential to be a huge aid to all the people here in the forums (both people with problems, and those helping them).

 

Please, please, please if you have any suggestions as to what checks to add to this please post them here  (although I already have more checks that are not currently implemented here on my white board)

 

Known issue:

 

While CA now defaults to autoupdates for itself, and Dynamix WebUI, if you have not actually gone into the autoupdate settings and applied a change, this plugin will flag CA and WebUI as an error (not auto updating).  This requires an update to CA to fix (but since I just pumped one out yesterday, I figured that I'd wait a couple of days to release it)

Share this post


Link to post

And these are the suggested (summarized, not the exact wording.  Most of the wording used in the plugin is more detailed)

 

Files stored on array on implied cache share - Set the share settings appropriately, then rerun analysis

Cache only share, files stored on array - A button to run a script to move the files back to the cache drive (disabled during early betas)

Array only share, files stored on cache - A button to run a script to move the files back to the array (disabled during early betas)

Dynamix plug update check disabled - A button to go to Notification Settings

Dynamix WebUI, CA, this plugin not set to auto update - A button to go to CA's auto update section (check not performed if CA not installed)

CA not installed - A link to the CA thread (only because of the autoupdate feature)

Similar named shares (MyShare and myshare) - Suggestion to load dolphin / krusader to combine the shares into one

Powerdown not installed - Link to the powerdown thread

Unable to communicate with outside world - Button to Network settings, and suggestion to set DNS addresses or reset modem / router

File unable to be written to a drive / flash - Button to investigate at Main tab

Can't write to docker.img - Button to take you to Docker Settings

Docker appdata default location is /mnt/user/... - Explanation as to why its bad, and button to take you to Docker Settings

Docker appdata not in a cache only share - Explanation as to why its bad, and button to take you to the appdata Share Settings

Disabled Disks - Button to take you to unRaid Main

Missing Disks - Button to take you to unRaid Main

Read Errors - Explanation and button to take you to Disk Attributes

File System Errors - Short explanation of how to run fs checks, button to take you to unRaid main, and a note stating that if the drive is unmountable to never never never hit Format

SSD within Array - Note stating that SSDs are not supported in array, and may impact a drive rebuild due to changed sectors caused by garbage collection

Plugin xxx not up to date - Button to take you to the Plugins tab.  Doesn't display if the plugin is set to autoupdate through CA regardless if its not up to date

32 Bit Packages found - Note telling you to delete the file from the flash drive

Share this post


Link to post

This is a great idea and when done a must have plugin.

 

My suggestion:

 

I believe LT plans to add this in the future, but until they do, check all disks UDMA_CRC SMART attribute, ignore initial number, report if any disk increases by 2 or more on the next check and suggest to check/replace SATA cable.

 

P.S.: if you need to test any error/condition possible to recreate on my test server feel free to ask/pm me.

Share this post


Link to post

Just installed this and tried it. No problems found so maybe not a good test. I hesitate to create any problems just to test it though. ;D

Share this post


Link to post

Thanks for creating this plugin!

 

Since it already has the ability to check and keep the plugins up to date, would it be possible to check and keep installed Dockers up to date as well?

Share this post


Link to post

Need to ignore .Recycle.Bin share settings - as we can not change anything about its share plugin settings

Share this post


Link to post

Not sure if this falls into the common problems category, but it would be nice to have a notice if SMART tests haven't been carried out for a while or automated short / long tests

 

Share this post


Link to post

LOL... it isn't happy about me not setting auto update ;)

Share this post


Link to post

Sounds like a great idea, will be interesting to follow. No time to test it right now, though...

 

This beta version will not mess up your system

 

8)

Share this post


Link to post

Need to ignore .Recycle.Bin share settings - as we can not change anything about its share plugin settings

I use that plugin but I don't have that share. Are you sure you should have it? Maybe it is left over from an old version of the plugin.

Share this post


Link to post

This is a great idea and when done a must have plugin.

 

My suggestion:

 

I believe LT plans to add this in the future, but until they do, check all disks UDMA_CRC SMART attribute, ignore initial number, report if any disk increases by 2 or more on the next check and suggest to check/replace SATA cable.

 

P.S.: if you need to test any error/condition possible to recreate on my test server feel free to ask/pm me.

Initially.  ok...

 

Everything at the bottom of the list.  Missing disks... Disabled Disks.  Read errors (as reported by emhttp) on disks...  SSDs in array....  Corrupted file systems.... Unmountable disks...

 

Anything doesn't get picked up pm / post your /var/local/emhttp/disks.ini file

 

Actually, on the corrupted fs / unmountable disks can you send me the disks.ini anyways since I couldn't easily find any diagnostics that had fsErrors set within disks.ini

 

Share this post


Link to post

Just installed this and tried it. No problems found so maybe not a good test. I hesitate to create any problems just to test it though. ;D

Couple of problems are easy to create and fix.

 

CA - turn off update all plugins (set to no)

A share that uses the cache drive, set it to not use the cache drive when there's files on it.

 

You'll get the gist of what it does

 

 

Share this post


Link to post

Need to ignore .Recycle.Bin share settings - as we can not change anything about its share plugin settings

Need to ignore .Recycle.Bin share settings - as we can not change anything about its share plugin settings

I use that plugin but I don't have that share. Are you sure you should have it? Maybe it is left over from an old version of the plugin.

I'll have to ask dlandon about this.

 

I've actually got a .Trash-99 folder sitting on my cache drive that I can't easily get rid of

 

 

Share this post


Link to post

These were easy to check, will try some others when I have more time.

 

- Missing disks - not working, disks.ini attached below

- Disabled disks - didn't test but I believe it's reported the same as a missing disk - status="DISK_NP_DSBL"

- Read errors (as reported by emhttp) on disks - working

- File system errors - working with unmountable disks, not tested on ready only disks

- SSD's within the Array - working

 

disks.zip

Share this post


Link to post

LOL... it isn't happy about me not setting auto update ;)

auto update errors are one of the items which are on my list to be able to ignore.  I understand there may be a valid reason to ignore updates.  But, it will still pump out an error if the plug that it wants to be auto updatable is not current.

Share this post


Link to post

Need to ignore .Recycle.Bin share settings - as we can not change anything about its share plugin settings

Need to ignore .Recycle.Bin share settings - as we can not change anything about its share plugin settings

I use that plugin but I don't have that share. Are you sure you should have it? Maybe it is left over from an old version of the plugin.

I'll have to ask dlandon about this.

 

I've actually got a .Trash-99 folder sitting on my cache drive that I can't easily get rid of

Thought about it, and got a future proof work around.  Any share that's hidden is ignored on the errors for cache / array only settings

Share this post


Link to post

updated

 

If you got no errors yesterday, you might want to rerun it as there was an error in the coding where under certain circumstances the errors wouldn't display

 

Added docker update checks

Skip hidden shares on share checks

Change / update some of the suggestion text

 

Probably going to be another update by the end of the day  ;)

Share this post


Link to post

These were easy to check, will try some others when I have more time.

 

- Missing disks - not working, disks.ini attached below

- Disabled disks - didn't test but I believe it's reported the same as a missing disk - status="DISK_NP_DSBL"

- Read errors (as reported by emhttp) on disks - working

- File system errors - working with unmountable disks, not tested on ready only disks

- SSD's within the Array - working

Cool thanks.  Modified the code to include the fsError text in the description now that I see what the entry looks like. 

 

If you're able to mess it up on your test system, I'll try and include a test for it.

Share this post


Link to post

The .Recycle.Bin is not really a share, it is a folder created by SMB when a file is deleted.  It is not defined as a share to unraid.  If you have the disks and cache set up as shares, and a file is deleted on the disk or cache share, SMB will create a .Recycle.Bin folder.  The problem is that I think you see anything at the /mnt/diskx or /mnt/cache level as a share, even if it is not defined as a share.  For example if you have the cache sharing turned on:

 

/mnt/cache

/mnt/cache/.Recycle.Bin

/mnt/cache/appdata

/mnt/cache/domains

 

could all possibly be seen as shares.

 

I installed this plugin just to give it a go, so I think I understand what you are doing.  I don't understand what the problem is with the .Recycle.Bin, except I think you are flagging it as a share that is not defined?  Maybe all dot folders should be exceptions, or just the .Recycle.Bin.

 

I would make an exception on the .Recycle.Bin folder.

Share this post


Link to post

The .Recycle.Bin is not really a share, it is a folder created by SMB when a file is deleted.  It is not defined as a share to unraid.  If you have the disks and cache set up as shares, and a file is deleted on the disk or cache share, SMB will create a .Recycle.Bin folder.  The problem is that I think you see anything at the /mnt/diskx or /mnt/cache level as a share, even if it is not defined as a share.  For example if you have the cache sharing turned on:

 

/mnt/cache

/mnt/cache/.Recycle.Bin

/mnt/cache/appdata

/mnt/cache/domains

 

could all possibly be seen as shares.

 

I installed this plugin just to give it a go, so I think I understand what you are doing.  I don't understand what the problem is with the .Recycle.Bin, except I think you are flagging it as a share that is not defined?  Maybe all dot folders should be exceptions, or just the .Recycle.Bin.

 

I would make an exception on the .Recycle.Bin folder.

Already fixed where I ignore any hidden shares.

 

unRaid treats all top level folders as a share regardless of whether they are defined or not (and I look at top level folders within /mnt/cache and /mnt/user0).  If they are not defined, they are implied cache only because mover will not move any files contained on the cache drive within those folders to the array.  Hence why the suggestion that pops up when a implied cache share exists on the array and on the cache drive is to actually define where its supposed to be.

Share this post


Link to post

Attached pic shows a small issue, running v6.1.9, User Shares turned off, and Dockers currently off too.  Trying an earlier version showed no errors, just the same 3 auto-update notifications.  Otherwise fine.

 

This test took only a few seconds.  As a data point, the earlier test on my system took about a minute and a half, perhaps because it has to spin up all drives?  I'm not sure that has to be mentioned, but it's useful to know, that all your drives will be spun up.

 

My auto-update philosophy - All software releases and updates are minefields, so it's always best to let someone else step first.  It doesn't matter who's the author or whether it's a beta or a final or a simple point release.  And since there are always others happy to jump in ahead of me, I'm happy to let them!  I prefer auto-updates always turned off, and, depending on the complexity of the release, past history of the author, and the level of risk, I wait from a day to a month, observing the carnage.  When I feel like it, I update.  I suspect most computer veterans feel that way.  But that doesn't mean that I think auto-updates are not good for others.  After all, I do need them to find the mines!

ScreenPic-fix_common_problems.jpg.b56d1c6d82527f9f956b4b16385f7783.jpg

Share this post


Link to post

Cool, so you use the tool to fix itself 8)

Share this post


Link to post

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.