Jump to content

[FEATURE REQUEST] Add Local Master Status to GUI


Frank1940

Recommended Posts

It would be useful to add an indicator as to whether the unRAID server is the Local Master for SMB.  It could aid many users in troubleshooting SMB issues.  (Many of these issues seem to revolve around the Local Master being moved from computer to computer and the time it takes for these changes to propagate through all the networked computers.)

 

I would propose adding it to the 'SMB' settings page under the 'Workgroup Settings' tab.

 

While it might be ideal to know exactly which computer is the local master at any one time,  I can see some problems in implementing this.  At this point, I would be grateful just to know if the current server is serving as the Local Master! 

Link to comment

I did a bit of research and found that a Linux command that returns the IP address of the Local (or Master) Browser. 

 

root@Rose:~# nmblookup -M HOME
192.168.1.245 HOME<1d>

 

( Where  "HOME"  is the name of the Workgroup to which this server is assigned.)

 

While this does not provide the name of the Local Master directly, it should not be difficult to compare the returned IP address to that of the server to determine if it is the Local Master.

 

I hope this helps!

 

Link to comment

I did a bit of research and found that a Linux command that returns the IP address of the Local (or Master) Browser. 

 

root@Rose:~# nmblookup -M HOME
192.168.1.245 HOME<1d>

 

( Where  "HOME"  is the name of the Workgroup to which this server is assigned.)

 

While this does not provide the name of the Local Master directly, it should not be difficult to compare the returned IP address to that of the server to determine if it is the Local Master.

 

I hope this helps!

 

Interesting, but when I run the command I get an IP address that isn't part of my LAN..

 

Looking into it..

Link to comment

I get 192.168.122.1 which ifconfig reveals to be virbr0

I got that as well.  I wonder if that is an underlying bug as I would not have thought that it should be possible for virbr0 to become the local master?  It might explain why sometimes clients have trouble finding the unRAID server.

Link to comment

I get 192.168.122.1 which ifconfig reveals to be virbr0

I got that as well.  I wonder if that is an underlying bug as I would not have thought that it should be possible for virbr0 to become the local master?  It might explain why sometimes clients have trouble finding the unRAID server.

 

It doesn't seem quite right that's for sure, I wonder if jumperalex & Frank1940 use virtual machines at all?

Link to comment

I created an extension to the SMB workgroup settings which checks for the local master browser, and dynamically updates the setting as long as the page is viewed. This allows the user to see any changes in real-time.

 

See the attachment below.

 

To obtain the local master browser, I do the following:

# nmblookup -M -- -
10.0.1.2 __MSBROWSE__<01>

The system which has _MSBROWSE_ is the master.

 

You can also run nmblookup -S WORKGROUP to get a complete overview of all your systems in your network (WORKGROUP is the name of the workgroup in your network).

localmaster.png.885de092d3ee4bd9e1ec9bc10452f858.png

no-localmaster.png.16d2cd3e76c78317e964fbb7972c48af.png

Link to comment

I created an extension to the SMB workgroup settings which checks for the local master browser, and dynamically updates the setting as long as the page is viewed. This allows the user to see any changes in real-time.

 

See the attachment below.

 

To obtain the local master browser, I do the following:

# nmblookup -M -- -
10.0.1.2 __MSBROWSE__<01>

The system which has _MSBROWSE_ is the master.

 

You can also run nmblookup -S WORKGROUP to get a complete overview of all your systems in your network (WORKGROUP is the name of the workgroup in your network).

 

Thank you, bonienl!    Is this extension available for download yet?  Or will be it a part of the next update?  (I do admit that I am still on 6.0.1.  I will probably wait until 6.1 is released before I update and give a chance for all of the problems from the security changes to sort themselves out.  I do realize that the security issues had to be addressed before someone really ended up with a big problem.)

 

I also have a 'plain jane' server setup for both of my servers.  NO VMs or containers at this point.  The AMD Sempron 140 series of processors leave a bit to be desired when it comes to processing power.

 

Link to comment

No, this is just works in progress to see the feasibility of the request.

 

I added another little item... when the server is the local master browser then an icon in the top right is displayed next to server (see attachment). Again this is dynamically updated so users know all the time their server is local master or not.

localmaster-main.png.5a2a9bec794bd5ac95dfeca789ccd971.png

Link to comment

I created an extension to the SMB workgroup settings which checks for the local master browser, and dynamically updates the setting as long as the page is viewed. This allows the user to see any changes in real-time.

 

See the attachment below.

 

To obtain the local master browser, I do the following:

# nmblookup -M -- -
10.0.1.2 __MSBROWSE__<01>

The system which has _MSBROWSE_ is the master.

 

You can also run nmblookup -S WORKGROUP to get a complete overview of all your systems in your network (WORKGROUP is the name of the workgroup in your network).

 

Any thoughts as to why it returns a different IP when virbr0 is active?

Link to comment

Any thoughts as to why it returns a different IP when virbr0 is active?

 

Not sure why this is happening.

 

I had to fiddle with the smb-extra settings to get a guaranteed election of unRAID. I am using the following.

[b]/boot/config/smb-extra.conf[/b]

[global]
domain master = yes
preferred master = yes
os level = 255

Would be interesting to hear how others are doing this!

 

Link to comment

I am not a samba expert, but your settings don't seem to have anything specific with regards to local master election.

 

Btw when you do nmblookup -S NAME (name=your workgroup name)

 

Does it show your unRAID system as master (MSBROWSE) or some other system ?

 

I get 192.168.122.1 which ifconfig reveals to be virbr0

 

Unraid is set to be the local master in the webui.

Link to comment

 

I had to fiddle with the smb-extra settings to get a guaranteed election of unRAID. I am using the following.

[b]/boot/config/smb-extra.conf[/b]

[global]
domain master = yes
preferred master = yes
os level = 255

Would be interesting to hear how others are doing this!

 

I am asking this question so that others will have some information about doing this.  You are saying that if I put a smb-extra.conf file in the config folder on my flash drive it will be loaded at boot time?   

 

As further piece of information, higher the number is for the os level parameter increases the chances of that server being elected as the Local Master.  The allowable range is from 1 to 255.

Link to comment

I don't quite get what you're asking but for science ...

 

root@Tower:~# nmblookup -S WORKGROUP
10.0.0.4 WORKGROUP<00>
Looking up status of 10.0.0.4
        TOWER           <00> -         B <ACTIVE>
        TOWER           <03> -         B <ACTIVE>
        TOWER           <20> -         B <ACTIVE>
        ..__MSBROWSE__. <01> - <GROUP> B <ACTIVE>
        WORKGROUP       <00> - <GROUP> B <ACTIVE>
        WORKGROUP       <1d> -         B <ACTIVE>
        WORKGROUP       <1e> - <GROUP> B <ACTIVE>

        MAC Address = 00-00-00-00-00-00

10.0.0.6 WORKGROUP<00>
Looking up status of 10.0.0.6
        TARA            <00> -         B <ACTIVE>
        WORKGROUP       <00> - <GROUP> B <ACTIVE>
        TARA            <20> -         B <ACTIVE>
        WORKGROUP       <1e> - <GROUP> B <ACTIVE>

        MAC Address = 00-24-8C-08-6D-3E

Link to comment

I don't quite get what you're asking but for science ...

 

<<snip>>

 

It is for those cases when folks are having problems with computers and server(s) 'disappearing' from the samba network.  Or a computer not being able to find the server.  It simply provides a tool for diagnosing the problem.  Believe me when I say that fixing SAMBA issues usually seems more like 'witchcraft' than 'science'! (It dates back to Windows for Workgroups if you can remember that far back.  And a computer still running that operating system is still able to connect!)  Samba is, at best, a kludge that is simple and works most of the time.  When it doesn't, fixing it is a morose. And, often, when you have gotten it working, you have no idea why.  Any help that can be provided to assist is finding out what is happening is anyways appreciated!

 

I don't think it really necessary for everyone to create a smb-extra.conf file to force an unRAID server server to become the Local Master but, in some cases, it may well be necessary.  (Again the witchcraft solution!)

 

There have been several threads in the past from folks who have an issue with SAMBA and trying to help them is difficult.  Especially since there is not a list of guaranteed ways to fix their problem.  Knowing which computer on the network is the Local Master helps the experts trying to assist.  But this knowledge is not a magic bullet, it is another tool to reduce the number of posts required to get the solution.

 

Reason for Edit:  corrected wrong spell-check word replacement! 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...