[Samba]RE: can samba be used in clustering

Dwight Tovey dtovey at itd.state.id.us
Tue Jan 29 09:36:01 GMT 2002


On Tue, 2002-01-29 at 09:04, Girish R S wrote:
> Dwight,
> Here are you refering to VM as a floating ip.

Right.  You probably have one IP address assigned to 'sasd04', another
one assigned to 'sass04', and then your "floating" address that is
assigned to your cluster service.  On your DNS server you have an A
record defined that maps your cluster name to that floating address.  It
is that cluster name that I am referring to as the VM.

> This doubt arises in me coz in
> a server we can have only one [global] in a server right. Since we are using
> a virtual ip, how do i write a smb.conf file, where do i store it.
> In our situation we have a floating ip and so how to write a conf file for
> the this situation.
> Now another question is - if i have a different hostname say sasv04 for the
> floating ip(which would internally map to sasd04 or sass04) what is seen on
> the users PC.If its sasv04, what is the conf file changes i should do.right
> now my conf file is simple as i said i am new.
> Thanks for your replies, since we have a dead line, it would be great if u
> could reply as soon as possible.
> Thanks and Rgds

Lets ignore the physical machines for now.  Lets assume that you only
need to provide access to some directories in the shared clustered disks
(lets call them a "disk service").  You want to write your smb.conf file
as if you only have one machine.  You will store that smb.conf file
somewhere on the disk service.  When you start your smbd, you will use
the '-s' flag to point smbd to that file.  Your smb.conf will look
something like this:
=================================8<-----------------------------
[global]
	workgroup = <whatever your NT workgroup or domain name is>
	netbios name = sasv04
	interfaces = <floating IP address>
	bind interfaces only = Yes
	security = <server if you are only using NT workgroups, domain 		    if
you have an NT domain>
	password server = <your SMB password authenticator or PDC>
	encrypt passwords = <probably Yes>
	lock directory = <some path on your disk service>
	smb passwd file = <some path on your disk service>/smbpasswd
[share]
	path = <the path on your disk service that you are 
		making available to your NT users>
	<other share definitions that you may need>
=================================8<-----------------------------

In my case, the shared mount point is '/oradev'.  I have my smb.conf
file stored in /oradev/samba/lib/smb.conf.  My 'lock directory' is
/oradev/samba/var/locks.  My 'smb passwd file' is
/oradev/samba/private/smbpasswd'.  

To join an NT domain, since the 'smbpasswd' command only uses the
compiled-in path to the smb.conf file, you will need to copy the file
from the disk service to that compiled-in location (probably
/usr/local/samba/lib/smb.conf unless you specified somewhere else when
you built samba).  On the machine that currently has the disk service
mounted, run the Domain join command: 
  smbpasswd -j <Domain> -r <NT PDC> -U <Admin ID>%<Admin Password>

This will create the MACHINE.SID and secrets.tdb files for your VM on
your disk service.  Once you have succesfully joined the domain, you can
remove the smb.conf file from the compiled-in location and just use the
copy on your disk service.

Now you can start your smbd & nmbd processes.  On the machine that has
the disk service mounted, run:
  smbd -D -s <path to smb.conf on disk service>
  nmbd -D -s <path to smb.conf on disk service>

On your PCs you should now be able to see 'sasv04' and access the shares
that you have defined.

If that physical machine goes down and you now mount the disk service on
the other machine, then you run the same smbd/nmbd commands on that
machine.  Your PC users shouldn't notice any difference.  If you just
need to move the disk service from one machine to the other without
taking the whole machine down, kill the smbd/nmbd processes for that VM,
move the disk service, then start smbd/nmbd on the new machine.  Again,
the PC users shouldn't notice any difference.

	/dwight

-- 
Dwight N. Tovey                     Unix System Administrator /
Developer
League of American Bicyclists       Idaho Transportation Dept.
     Certified Instructor #750-K-C  3311 W. State St.
Email: dwight at dtovey.net            Boise, ID.  83702
http://www.dtovey.net/dwight        (208)334-8166 / fax: (208)334-8121
---
I am in shape.  Round is a shape.





More information about the samba mailing list