[Samba] How to get netbios aliases not show up in browse list?
Francesco De Rose
fdr at nic-nac-project.de
Tue May 31 16:36:06 GMT 2005
John H Terpstra:
> The whole purpose of the 'netbios aliases' is so that they WILL show up in the
> browse list. I am stunned by your question. Why would you use an option that
> is designed to cause the names to show up and not want it to do what it is
> designed to do? Perplexed!
> - John T.
Heck yeah, you're perfectly right, it's quite an unusual thing. Let's
see if I manage to explain it. :-)
I have two machines, namely federica and giulia, that manage two drbd
resources, namely ra and rb. federica is the primary for ra; likewise
giulia is the primary for rb: then those resources (partitions) are
respectively mounted on those machines during normal operation. In the
event of a failure (machine death), heartbeat will act and mount both
resources on the surviving machine.
Now, here comes samba. :-)
I want to set up on both machines a share containing two links towards
the two resources. The interesting thing is that there is no immediate
way to know on which machine they are mounted, if you don't examine the
output of mount, that is.
I thought that dfs with multiple targets could come into help and set it
up this way:
ln -s msdfs:federica/ra,giulia/ra linkra
ln -s msdfs:giulia/rb,federica/rb linkrb
This works on the hypothesis that the client first contacts the leftmost
target, and goes on to the right in case of a timeout (i.e., if the
machine is dead).
Of course (as Murphy's law says) such hypothesis seems to be false, at
least according with my tests with a windows 2000 client.
It would seem that when my client connects to federica and I click on
linkrb, the client skips to the rightmost target and tries to get
federica/rb. But, since we're in regular operation, resource rb is
actually only mounted on giulia, and the access fails. Probably the
client behaves this way in order not to have to resolve one more netbios
name, since it already knows of federica.
Now, my quick & dirty fix. Let's give federica a netbios alias, for
instance 'haprimary'. (Likewise should be done on giulia)
The client connects to haprimary, then I click on linkrb. Since it
doesn't know about either federica or giulia, it follows the right order
and is redirected to giulia, which is the Right Thing. And this seems to
work on both machines. :-)
But at this point my browse list is filled up with four names: two
netbios names and two aliases. I'd like to shorten it up, by hiding some
of them. (if you hide the names, the links should work fine, if you hide
the aliases, you should change the msdfs links a little...).
So, here is why I need to hide them from the browse list. I fully
understand your perplexity, it's kind of an unusual setup, I guess. I'm
quite perplexed myself in the first place. :-)
Any suggestion, *please*, *please*, *please*? (Or any advice about
making my design a little less clumsy, please?)
Thanks and have a nice day,
More information about the samba