From owner-freebsd-cluster@FreeBSD.ORG Tue Aug 5 15:53:07 2008 Return-Path: Delivered-To: freebsd-cluster@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55E54106566C; Tue, 5 Aug 2008 15:53:07 +0000 (UTC) (envelope-from sk.paix@gmail.com) Received: from office.xitex.net (excite.donbass.com [195.184.200.34]) by mx1.freebsd.org (Postfix) with ESMTP id BB7A58FC08; Tue, 5 Aug 2008 15:53:06 +0000 (UTC) (envelope-from sk.paix@gmail.com) Received: from office.xitex.net (localhost [127.0.0.1]) by office.xitex.net (Postfix) with ESMTP id 3AD16242D1; Tue, 5 Aug 2008 12:39:45 +0300 (EEST) Received: from [192.168.0.77] (unknown [192.168.0.77]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by office.xitex.net (Postfix) with ESMTP id C23ED242CF; Tue, 5 Aug 2008 12:39:43 +0300 (EEST) Message-ID: <48981FDF.9040206@gmail.com> Date: Tue, 05 Aug 2008 12:39:43 +0300 From: Sergej Kandyla User-Agent: Thunderbird 2.0.0.14 (X11/20080709) MIME-Version: 1.0 To: Michael Christie References: <4898065A.5080008@powerzone.net.au> In-Reply-To: <4898065A.5080008@powerzone.net.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Cc: freebsd-questions@freebsd.org, freebsd-cluster@freebsd.org Subject: Re: High Availability FreeBSD www cluster X-BeenThere: freebsd-cluster@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Clustering FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Aug 2008 15:53:07 -0000 Michael Christie wrote: > Hi all , > > I want to cluster some freeBSD servers, The purpose of this is to > learn. I would like to run some basic services like www and mail on > a test network. I would like to set up the servers so if one server > falls over the other will take over the services automatically, load > balanceing would be good as well. > > web links any thing to help me get started would be good. No I do not > want to change over to linux. > > High Availability means that your cluster should work even some system components fail. http://en.wikipedia.org/wiki/High-availability_cluster For building HA cluster you should have at last two machines, first will run in master mode, second in slave( standby )mode. In every time only one machine works and provide some services (www, db, etc) Very good idea is to use NAS(SAN) - Network Access Storage ( http://en.wikipedia.org/wiki/Network-attached_storage ) with shared disk. Both nodes of HA cluster will use this shared disk (but only one in certain time). If one node fails, second node (standby node) will become a master of cluster and will start some services, that cluster provided. But NAS systems is not cheap!! Another way is to use software systems such us DRBD, NFS, chironfs, rsync etc. Most of this high-availability software solution works by replicating a disk partition in a master/slave mode. Heartbeat + DRBD is one of most popular redundant solutions. DRBD mirrors a partition between two machines allowing only one of them to mount it at a time. Heartbeat then monitors the machines, and if it detects that one of the machines has died, it takes control by mounting the mirrored disk and starting all the services the other machine is running. Unfortunately DRBD runs only on linux but I recommend you to see how it works for understanding this technology. http://www.rhic.bnl.gov/hepix/talks/041020am/miers.pdf http://www.linux-ha.org http://www.linux-ha.org/DRBD/GettingStarted http://www.linuxjournal.com/article/9074 For freebsd to mirror content on bouth nodes you can use rsync as in this howto: http://www.taygeta.com/ha-postgresql.html Another way like as DRBD is to use chironfs + nfs (sysutils/fusefs-chironfs/) http://www.furquim.org/chironfs Also look at CARP (Common Address Redundancy Protocol) man carp http://www.openbsd.org/faq/pf/carp.html http://www.postgresql.org/docs/8.3/static/high-availability.html (for databases) ps. sorry for my eng -- Best Wishes, PAIX-UANIC | SK3929-RIPE