From owner-freebsd-questions@FreeBSD.ORG Mon May 2 12:34:07 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 18C0216A4CF for ; Mon, 2 May 2005 12:34:07 +0000 (GMT) Received: from lmail.bathnetworks.co.uk (mail.bathnetworks.com [84.92.24.252]) by mx1.FreeBSD.org (Postfix) with ESMTP id E923243D48 for ; Mon, 2 May 2005 12:34:05 +0000 (GMT) (envelope-from bsd@bathnetworks.com) Received: (qmail 32726 invoked by uid 510); 2 May 2005 13:37:51 +0100 Received: from 84.92.24.252 by lmail.bathnetworks.co.uk (envelope-from , uid 508) with qmail-scanner-1.24-st-qms (clamdscan: 0.83/710. spamassassin: 3.0.2. perlscan: 1.24-st-qms. Clear:RC:0(84.92.24.252):SA:0(-1.7/5.0):. Processed in 1.88257 secs); 02 May 2005 12:37:51 -0000 X-Spam-Status: No, hits=-1.7 required=5.0 X-Antivirus-MYDOMAIN-Mail-From: bsd@bathnetworks.com via lmail.bathnetworks.co.uk X-Antivirus-MYDOMAIN: 1.24-st-qms (Clear:RC:0(84.92.24.252):SA:0(-1.7/5.0):. Processed in 1.88257 secs Process 32719) Received: from mail.bathnetworks.com (HELO ?84.92.24.252?) (bsd@bathnetworks.com@84.92.24.252) by lmail.bathnetworks.co.uk with SMTP; 2 May 2005 13:37:49 +0100 From: Robert Slade To: "freebsd-questions@freebsd.org" In-Reply-To: <200505021132.j42BWWcO003878@unsane.co.uk> References: <200505021132.j42BWWcO003878@unsane.co.uk> Content-Type: text/plain Message-Id: <1115037469.29920.44.camel@lmail.bathnetworks.co.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 02 May 2005 13:37:49 +0100 Content-Transfer-Encoding: 7bit Subject: RE: FreeBSD + Heartbeat+ Samba+Rsync X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2005 12:34:07 -0000 On Mon, 2005-05-02 at 12:33, Vince wrote: > > > -----Original Message----- > > From: owner-freebsd-questions@freebsd.org > > [mailto:owner-freebsd-questions@freebsd.org] On Behalf Of Robert Slade > > Sent: 02 May 2005 09:58 > > To: freebsd-questions@freebsd.org > > Subject: FreeBSD + Heartbeat+ Samba+Rsync > > > > Hi, > > > > Futher to my previous mail, I have got HB & Samba running ok > > now on FreeBSD 5.3. > > > > I am still trying to sort out the Perl Scripts for running rsync. > > > > The bit I am having trouble with is: > > > > # /etc/password - System Password File > > # /etc/shadow - Actual Encrypted passwords. > > # /etc/group - System Group File > > # /etc/ld.so.conf - System Linked Libraries. > > # /etc/shells - Valid Login Shells > > my @filelist = ( "/etc/passwd", "/etc/shadow", > > "/etc/group", "/etc/ld.so.conf", "/etc/shells" ); > > foreach $filename (@filelist) { > > system "/usr/bin/rsync > > --rsh=$EnvConfig::sshpath > > $EnvConfig::rsyncoptions $filename local$other:$filename"; > > > > Sorry about the wrapping. > > > > As far as I tell, FreeBSD has no System linked Libraries > > hence no ld.so.conf. I am not sure what this bit of code is > > trying to do and what to replace it with. I don't want to > > install the Linux Compatibility libs just to run a Perl script. > > Looks like it is trying to synchronize essential files in /etc. > What do you need to be synchronized between the two boxes? The equivalent > files to the example on FreeBSD are: > # /etc/password - System Password File -- The Same > # /etc/shadow - Actual Encrypted passwords. -- /etc/master.passwd > # /etc/group - System Group File -- The Same > # /etc/ld.so.conf - System Linked Libraries. --- handled through rcNG in > FreeBSD and rc.conf so best use /etc/rc.conf > Also its trying to use /usr/bin/rsync while the ports system installs it in > /usr/local/bin > > I'd check what other system files you need synced though, (make.conf, pretty > > much anything you have edited in /etc I guess and possibly stuff in > /usr/local/etc) > > Vince > Thanks Vince, Your mail gave me the clue I was looking for. The Perl scripts are provided as an example. The example given was to keep several web servers in sync. My application is a lot simpler. I do not need to keep the configuration files synced. Essentially, all I am looking to do is sync say /home/share on NodeA with NodeB when NodeA is serving the cluster IP and reverse the sync when NodeB is serving the IP. It looks like all! I need to do is check which Node is serving the IP and stop or run rsync based on this. Thinking about it all I really need to do is start rsyncd running on the node serving the IP. The non serving Node can then run rsync as a cron job and vice versa. Rob