Samba in an HA environment

Nicolas Williams Nicolas.Williams at ubsw.com
Mon May 22 17:53:44 GMT 2000


The trick is to run two instances of nmbd/smbd on a machine that is
running two services (i.e., a machine that's taken over its disabled
HA partner). Each instance of nmbd/smbd should bind only to the IP
addresses of the virtual host they represent; see the 'interfaces' and
'bind interfaces only' configuration parameters in smb.conf(5). This
means that you must be using the HA model whereby a one host takes over
a disabled host's IP addresses and services.

'source environment' is helpful in configuring both HA personalities
with ONE smb.conf and an environment file or script that outputs an
environment.

E.,g.,

	...
	source environment = /etc/smb.conf.env.%$(HA_PERSONALITY)
	...

or

	...
	source environment = /sbin/samba_config_env %$(HA_PERSONALITY) |
	...


Nico


On Mon, May 22, 2000 at 06:30:15PM +0200, Larsson, Johan wrote:
> Hi!
> 
> I am trying to figure out how to use samba in an HA environment, split
> across two service groups. The ideal setup would look as follows:
> 
> service group: A
> IP address: 10.1.1.2
> disk group: adg
> samba share: /sg_a
> 
> service group: B
> IP address: 10.1.1.3
> disk group: bdg
> samba share: /sg_b
> 
> These two service groups would be served by a cluster of two servers. It
> would be straight forward in a normal situation, where the service groups
> are either split across the two servers or running only on one. The headache
> of course occurs when starting up and taking over. I dug out the discussion
> regarding your patch "source environment" which finally made it into 2.0.7,
> but I fail to see how it would help me... (This is me right!)
> 
> I don't know if I am totally out of bounds, but I would like to set it up so
> that a failure in one service group would not have any impact on the other
> if both service groups are running on the same server. That is, if one share
> needs to be dropped from samba because the service group is failing over to
> the standby server, the other share should not be impacted. Otherwise I
> could always work around it by always starting and stopping samba and
> copying different smb.conf files depending on what context samba was running
> in.
> 
> Grateful if you could point me into some kind of viable direction.
> 
> Best regards,
> Johan Larsson
> European Central Bank
> Frankfurt GERMANY
> 
--



More information about the samba-technical mailing list