[Samba] [samba4] Thank you to the Samba Team

François Lafont flafdivers at free.fr
Sun Jun 2 18:25:51 MDT 2013


Hello,

Le 03/06/2013 01:20, steve a écrit :
> On Mon, 2013-06-03 at 00:56 +0200, François Lafont wrote:
> 
>> - a second member server identical to the first one (except for the name and the ip address) which copied in real time the previous server's data just in case.
> 
> Hi
> Just curious. Did you rsync it? Did you try disabling the first file
> server and do an IP takeover on the second? Or was it a cluster?

The samba-2 server (the second member server) checked the smb connections in samba-1 (the first member server which contained the users homes) and for these users, we ran rsync in samba-2. Here is a simplified version of the script in samba-2:

#------------------------------------------------------------
# specific interface on samba-1 used just for the rsync.
IP_RSYNC="192.168.46.1"

while true; do

    # check if samba-1 is ok...

    connected_users=$(ssh $IP_RSYNC bash < get_smbstatus.bash)

    for user in $(cat "$connected_users"); do
        rsync -auzvAX --exclude '*.tmp' $IP_RSYNC:"/home/$user/" "/home/$user/"
    done

    sleep 10

done
#------------------------------------------------------------

samba-1 interfaces:
- eth0 --> 172.20.0.4
- eth0:0 --> 172.20.0.46 # alias IP
- eth1 --> 192.168.46.1 # just of the rsync

samba-2 interfaces:
- eth0 --> 172.20.0.6
- eth1 --> 192.168.46.2 # just of the rsync

DNS records:
- samba-1.capesdoc.priv --> 172.20.0.4
- samba-2.capesdoc.priv --> 172.20.0.6
- alexandrie.capesdoc.priv --> 172.20.0.46

And, for all the users, the profile path was "\\alexandrie.capesdoc.priv\myhome\profile" (and there were folder redirections like "\\alexandrie.capesdoc.priv\myhome\docs" etc).

If samba-1 is down, we delete the alias IP in samba-1 and create the alias IP "eth0:0 = 172.20.0.46" in samba-2. The routine were manual, with shell scripts, but manual. Samba-1 was checked by samba-2 and we received SMS if samba-1 had problems. I didn't wanted an automatic fail-over, I wanted a human operation. This case never took place during the examination. ;-)

I hope I have answered to your question.






-- 
François Lafont


More information about the samba mailing list