delayed access to unRaid SMB shares from Windows 10


Recommended Posts

Hey everyone,

I think I'm having a weird issue with my SMB Shares and I couldn't find anyone describing the same problem.

There are several topics about access restrictions regarding the smb version or other authentication problems.

Also, I've read about the Lanman settings in gpedid, but all of the solutions apply if you couldn't connect to the shares at all.

 

My problem is a little different, but easy to describe:

The first time I try to access the network share from Windows 10, I get an error: \\server could not be accessed (network path was not found), BUT:

After approx. 30 seconds, it suddenly works fine.

 

After a while, the connection drops (even when streaming files) again for about 30 sec. Repeatedly.

 

The same problem from all Windows 10 machines.

 

From Ubuntu, it works instantly, so I guess it is a Windows -> SMB thing.

Disk spin down should therefore not be the reason, either.

Also, in the Windows "Network" folder overview, the server appears right away.

Any other connection, such as web interface, docker access, etc. do work smoothly and without interruptions.

 

I'm glad if someone has a suggestion.

If you need more info, please let me know 😃

Best regards

Edited by Kosmos
Link to comment

Does it work if you use \\IP-Address ?  Quicker without the names?

 

Guess by me is an issue with the Master Browser.  Arguments on the network as to where to find stuff.  The 30 second delay sounds like a slow name lookup, maybe kicking an election to sort out the Master to change and wake-up and reply.  Things are not where the Windows machine expects to see them.

 

Too many questions to ask.

1\ On the UNRAID server did you tick the "make master browser option"?  Try doing the opposite setting.

2\ Is every computer on the same Workgroup - and be careful as WORKGROUP and Workgroup can sometimes be different.  I always stick to ALL CAPS

3\ On the Windows machine what do you see in Network on Explorer?  Do you see all the machines listed or are some missing?

 

A network with a mix of OS will cause some possible confusions.  Slightly different interpretations of SMB rules.  There can be a 20 mins lag when changes occur to machine names \ power on for that to migrate around.  You have a "master browser" who holds a list of where the machines are, and each other PC should ask the Master browser what is going on.   A confused network can get two separate Master Browsers.  Usually a guess is made to "elect" the "newest\biggest" OS as the Master to hold that list.  Not sure how things behave with an UNRAID server saying "I am Master",  It should make things run cleaner.

  • Thanks 1
Link to comment

I have always suspected that Windows clients store the information about what computer was the Master Browser (Local Master) and looks to see if that computer still holds that title when restarted.  If so, everything tends to start up smoothly.  That is why systems where the Unraid server is always the Local Master tend to have fewer problems.   Unfortunately, that also means that the server will have to be on 24-7.

 

Let me say one more thing.  When a share (or a folder of a share) is mapped as a Windows drive, there can be a substantial delay while the file header information of the contents of that share are assembled and transferred to Windows Explorer.  This interval is further impacted if a large number of files are involved or if they are scattered across several drives in the array as each drive is spun up in sequence.

Link to comment
1 hour ago, Frank1940 said:

I have always suspected that Windows clients store the information about what computer was the Master Browser (Local Master) and looks to see if that computer still holds that title when restarted.

When restarting a Windows PC they should shout on the network "who is master server?".  They check the OS level of that machine and may kick off an election if they are a newer \ higher OS version.  That is why there is always a delay on start up.  And it can get messy as it can take 20mins to sort out that new argument as all the machines may start bickering then.  Not sure how this works with all the Win10 versions and SMB2.  It was easier to make sense of when a network was Win XP Home\Pro and Win 7 Home\Pro. :D 

 

I am fairly certain having the UNRAID server set as master should keep things more stable.  Having only just added UNRAID to my house I am yet to see the difference.  (It certainly hasn't broken anything)  It is also possible to edit the SMB.cfg file on a linux server to set a higher level so it kept as master.  Certainly best to have the master on an always awake machine.  (Been fighting these oddities for a few decades.  LOL)

Edited by Batter Pudding
Link to comment
43 minutes ago, Batter Pudding said:

It is also possible to edit the SMB.cfg file on a linux server to set a higher level so it kept as master. 

 

See here for How-to:

      https://forums.unraid.net/topic/53023-network-trouble/?tab=comments#comment-519012

 

For anyone who wants to know how the whole SMB thing is suppose to work, you can read MS's explanation here:

 

       https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc737661(v=ws.10)?redirectedfrom=MSDN

 

One thing to look at is the time required for changes to propagate through the chain.  (SMB was released in Windows for Workgroups 3.1 when the 386-20MHz was king-of-hill and that CPU had single core and a single thread.  Real time user response was a major concern.  There was nothing like typing a dozen characters on your keyboard and not have them appear on the screen for a couple of seconds-- and, occasionally, up to five or six seconds--  and then burst up almost instantaneous!  So SMB housekeeping was pushed pretty far down on the  list of priorities of things to be done by the OS and it has not changed since then.)

 

By the way, I have often seen other Windows clients missing from my Windows (client, for the most part) computer for a considerable period of time when they first boot up for the day.  (This can cause problems if you want to link to a shared resource on that client.)   I have never had any real luck using Search to 'find' that missing client.  I usually end up just waiting until it shows up on the list of computers on the network. 

  • Thanks 1
Link to comment
2 minutes ago, Frank1940 said:

I usually end up just waiting until it shows up on the list of computers on the network. 

I find Windows network is like Guinness - you have to wait for it to settle... 🍺

 

This is why I often use the IP address and bypass the whole naming scheme.  I've always found the delays are just stuck in the naming lookups and you can go straight there with the IP Address. 

 

I like the fact that UNRAID notes that you can "cheat" Windows with user credentials as it Windows treats \\NAME as a different entity to \\IP-ADDRESS.  As you note, SMB goes back to Windows for Workgroups and therefore predates the TCP\IP stack in Windows!  🎺

  • Haha 1
Link to comment

Hey, thanks for your replies 😃

 

7 hours ago, Batter Pudding said:

Does it work if you use \\IP-Address ?  Quicker without the names?

Actually, yes. IP seems working fine. So your guess with Master Browser might be correct.

When I go to SMB settings, master browser election works quite fast.

 

Quote

1\ On the UNRAID server did you tick the "make master browser option"?  Try doing the opposite setting.

2\ Is every computer on the same Workgroup - and be careful as WORKGROUP and Workgroup can sometimes be different.  I always stick to ALL CAPS

3\ On the Windows machine what do you see in Network on Explorer?  Do you see all the machines listed or are some missing?

1\ I tried, but nothing changed.

2\ yes, they are and all caps.

3\ yes, I see all of the computers right away. Besides, there are some "other", "multimedia" and "network infrastructure" devices.

 

4 hours ago, Frank1940 said:

One thing to look at is the time required for changes to propagate through the chain. 

How would I do that? Is there some Windows tool for that?

 

 

Anyway, I wouldn't mind about the initial delay, if the connection wouldn't drop from time to time.

Any idea about that?

 

Best regards 😃

Link to comment
1 hour ago, Kosmos said:

How would I do that? Is there some Windows tool for that?

Read about the delays that are inherent in SMB in the link that is just above the statement.  I will  add the link below:

 

   https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc737661(v=ws.10)?redirectedfrom=MSDN

 

1 hour ago, Kosmos said:

Anyway, I wouldn't mind about the initial delay, if the connection wouldn't drop from time to time.

Any idea about that?

 

Dropped connections are not that common occurrence with Unraid itself.  (I can't remember one for the longest time.  A few years back there was a problem with some RealTek NIC drivers but even that was limited to MB's with slow CPU's.)   I would start with looking at your physical network.  Reboot all switches and routers.  (These devices are all small computers running Linux and a reboot can  often resolve small problems...)  Make sure everything is running at the expected speed for the devices that are in that segment of the network--i.e., a segment running at 100Mbs when it should be at 1Gbs. Once in a while an NIC will go bad.  Also make sure that the NIC driver on your Windows PC is up-to-date.  Several years back, I had a speed issue that was solved when I upgrade the NIC driver on my Windows PC.  (Best to get these from the MB or PC manufacturer if possible.  MS is not always the best source for device drivers!) 

 

You might want to verify that the connection is actually dropping and not just slowing way, way down...

  • Thanks 1
Link to comment
On 5/23/2021 at 10:50 PM, Kosmos said:

Actually, yes. IP seems working fine. So your guess with Master Browser might be correct.

A couple of decades of working with SMB you learn the tricks.  And where the real headaches lie.  (Taming Windows 95 devices required use of a cattle prod)

 

On 5/23/2021 at 10:50 PM, Kosmos said:

Is there some Windows tool for that?

Haha.  A Windows tool to help?  Nah - just that pint of Guinness and a stop watch.

 

My real suggestion is to look at what is on your network.  What are the devices and who may be trying to boss into the election.  Each time they start arguing you have the potential for two different answer coming back and your network getting split into two.  You can also get the Master Browser falling asleep and needing to be woken up to reply with the list.

 

I would sketch out a network on a pad of paper and look who is involved.  Disconnect a few machines for a test.  Does the network behave okay when it is just UNRAID, the Win10 machines and the router?  Leave the Unbuntu disconnected.  After a few hours of testing, and more Guinness, reintroduce some of the other machines in batches.  Some devices just have different SMB implementations and cause confusions.  Or could be causing arguments by having differing settings within their SMB setups.

 

If you have been reading around, have you been doing registry tweaks to "fix" these issues?  Often those tweaks are very out of date and can cause more problems than needed.  My current home network is a mix of Win10, Unraid, Pi, TV boxes, HiFi, Printers all bickering over that same SMB network.  I let UNRAID take over as Master Browser.  No tweaks on any of the other machines and that Win10 box connected first time to Unraid shares over SMB.

 

During the test, when you reintroduce machines, give them 30mins to settle.  Crack another beer and walk away before testing.  I am not saying the Unbuntu is "wrong", just it may be talking a slightly different flavour of disruption.

 

This is one reason I think it is worth trying to get the UNRAID server to take over as master browser by hitting that tick.  If one machine is fixed as master it stops the elections and means the Win10 boxes know who to talk to directly every time. (I am assume you have an always on UNRAID box)  It could also be that your Master Browser is a PC that just falls asleep a lot.  So when you try and browse it is needing to get a kick to wake it up causing that delay.

 

Also I'll add something to @Frank1940 - check your cables.  Any old cheapo Ethernet cables on the important machines?  Try swapping them out.  Only last month I had a cable fail after sitting there happy for 20 years... Or then there was that office where I found an ancient cheap 10BASE-T hub still in use complete with leaking capacitors inside...  Sometimes it is the simple things

Edited by Batter Pudding
  • Like 1
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.