Free BSD & Heartbeat + Samba + Rsync

Robert Slade bsd at bathnetworks.com
Mon May 9 15:01:15 PDT 2005


On Mon, 2005-05-09 at 07:48, David P. Discher wrote:
> Rob -

Snip

David,

My setup is fairly simple, a couple of minor points regarding what I set
out to do and how I set about it:

1. My network is fairly small (3 to 4 internal users and 2 to 3
external), but I needed to have a reasonably safe storage as the loss of
data would be a major problem. I was running a W2k server with 2 250Gig
drives mirrored as a file server, but that relies on the HW not failing
(yes it happened). I had used CDs and tape to backup data but this a
pain. I had a couple of spare machines and some 250Gig IDE hds so I
thought that I would put together what is in effect a NAS on the cheap. 

2. I setup the spare machines with a small hd with Free BSD 5.3 ( I
chose Free BSD as I got fedup with the rapid updates on Linux and looked
for something more stable. I do like Solaris and have used it in past
but the HW is expensive). I added 2 250 Gig drives to both machines
concatenated to form a 500 Gig drive mounted as /home/share/ and setup
samba to share this on the network as the storage for the network.

3. I used 2 Gigabyte NICs to connect the machines directly with another
NIc to the internal network. HA is setup using IPFAIL so that if the
connection to the internal network fails the the alias IP is swapped to
the 2nd node and samba starts on that machine.

4. The problem of rsync and timing is discussed in the HA Docs. In my
case the timing is not too critical, as the files synced do not change
that much. Again there are suggestions with the HA Doc's - I have mine
set at 5 mins. There are also some Perl scripts for running rsynch which
covers the issue of reversing the sync if the nodes change over.  These
are for linux and are quite complex s I have written my own. It checks
to see which node is master, if the other node is running and if rsync
is already running. The script does not do anything if the machine is
not master, and warns if the other node is not running or rsync has not
finished the previous run. Cron runs the script of both machines. I will
be reducing the intervals between the Cron jobs and keeping an eye on
the warnings to try and optimise the timing.

There are possibilities of using other forms of syncing the files.
Unfortunately the suggestions on the HA site don't run on Free BSD. 

Rob     

  



More information about the freebsd-questions mailing list