Samba, nmbd, HA
Nicolas.Williams at wdr.com
Fri Jan 29 23:27:39 GMT 1999
The point is this:
- When one server takes over the other, it takes over the failed host's
disks, IP addresses and other necessary resources, then starts or
updates various services so as to present, to the clients, the
illusion that the failed hosts is still there.
- When the failed host is brought back online one would like to have it
take over its resources and services.
- There's nothing to do as far as taking over a host's hostname/aliases
when DNS is the naming service. You just take over the IP addresses.
- But if the naming service is WINS/NetBIOS, then you have a problem,
because each host must register with WINS and/or answer broadcast
Thus, when taking over a failed host one needs to take over its
NetBIOS/WINS hostname and aliases but without just re-mapping them to
the takeover host's IP addresses. They failed host's names must still
resolve to the failed host's IP addresses so that you can later
restore the services to that host once its revived.
This is very important because NT clients cache their hostname
lookups (like any decent platform). So when an NT client has to
reconnect to its file servers it reconnects to the same IP it had
been connected to, unless (so I understand) its cached hostname
lookups have expired.
At any rate. What I was thinking of *does* work. I've just tested it.
What I suggested earlier, to recap, is:
- Keep two separate configuration files for nmbd: one for each host in
an HA pair. Copies of both files will be available locally on both
- Each of those two files is associated with the identity of one of the
two HA hosts.
Thus each file lists different netbios names and aliases.
- To make this work you must specify:
bind interfaces only = true
And you must list the IP addresses of the host to which the given
config file belongs with the 'interfaces' parameter.
- Under normal circumstances each HA host runs just ONE nmbd with the
configuration file that corresponds to that host.
- When one host takes over the other, it starts a second nmbd with the
failed host's configuration file.
- When the failed host is restored, the takeover host kills that second
nmbd process as part of the process of relinquishing the failed
host's resources; then the failed host, now restored, takes over its
own resources and starts its services, as normal. And thus all goes
back to normal.
It works for me.
I'll stick with this unless there's better way. You may want to include
a note about all this in the standard Samba docs...
Thanks to all that replied,
On Fri, Jan 29, 1999 at 12:12:34AM +1100, David Collier-Brown wrote:
> Nicolas Williams wrote:
> > But in an HA setup, when one server fails and the other one takes over
> > it's IP addresses and services, the NetBIOS identity of the failed
> > server must also be passed to the remaining server.
> My limited understanding is that the "new" server
> needs to broadcast it's identity at startup time
> in order to "claim" its name (which samba does).
> If the name is a duplicate, the "name server"
> queries the previous holder of the name to see if it's
> still alive. If not, the new server gets the name.
> If not, it gets told to go away.
> In the above "name server" is a deliberately vague term.
> It's a WINS server, a browse master or an elephant playing
> the trombone: I don't know which (:-))
> David Collier-Brown, | Always do right. This will gratify some people
> 185 Ellerslie Ave., | and astonish the rest. -- Mark Twain
> Willowdale, Ontario | http://java.science.yorku.ca/~davecb
> Work: (905) 477-0437 Home: (416) 223-8968 Email: davecb at canada.sun.com
More information about the samba