Samba, nmbd, HA
Nicolas.Williams at wdr.com
Wed Jan 27 17:41:09 GMT 1999
Has anyone ever setup a pair of fileservers running Samba such that each
server can takeover the other server's functionality and identity?
It seems to me that a Samba HA setup would be very similar to a virtual
server Samba setup. In other words, use the 'include' directive in
conjunction with the %L variable to make each smbd process act as the
server named by the client.
So far so good.
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.
How should one accomplish this? Can it be as simple as restarting nmbd
with a different config file naming the failed server's NetBIOS name and
aliases as aliases of the server that takes over?
Or should one use the 'bind interfaces only' and 'interfaces'
configuration parameters in two configuration files and run two nmbd
processes on the server that takes over?
Looking at the source I see that SO_REUSEADDR is set before binding all
listening TCP sockets and, most importantly, all UDP sockets used by
nmbd. This should allow two nmbd processes to run in daemon mode if they
have 'bind interfaces only' set to 'true' and disjoint interface address
sets specified in their 'interfaces' parameter. [When using 'bind
interfaces only' nmbd will open a socket for each interface and a socket
bound to INADDR_ANY for receiving broadcast UDP packets, thus my
interest in SO_REUSEADDR. I.e., will the two nmbd processes co-exist?]
Thus, the takeover process for SMB services would consist simply of
starting an nmbd process with a smb.conf file specifying 'bind
interfaces only = true' and an 'interfaces' list that contains only the
IP addresses of the failover host.
As for the smbd processes, the use of an 'include' directive that use
'%L' substitutions in the path of the included file should suffice.
Yes? Or should the takeover server simply change nmbd's configuration
and [not strictly necessary] restart/HUP nmbd so it takes the failed
server's NetBIOS name and aliases and adds them as aliases to the
I'm leaning to having two nmbd processes. Has anyone done this before?
What platforms does it work with?
I'm using Samba 1.9.18pl10 on Solaris 2.6 systems.
PS: Which is the most appropriate list for these questions?
PPS: I did search the archives and the standard documentation, a bit.
More information about the samba