From owner-freebsd-geom@FreeBSD.ORG Thu Nov 6 13:20:33 2008 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03F371065675 for ; Thu, 6 Nov 2008 13:20:33 +0000 (UTC) (envelope-from kurtseel@primetime.com) Received: from mail.primetime.com (mail.primetime.com [146.145.135.164]) by mx1.freebsd.org (Postfix) with ESMTP id CD3AE8FC1F for ; Thu, 6 Nov 2008 13:20:32 +0000 (UTC) (envelope-from kurtseel@primetime.com) Received: from Macintosh-6.local (unknown [10.200.1.137]) by mail.primetime.com (Postfix) with ESMTP id A93E9F9C511; Thu, 6 Nov 2008 07:47:40 -0500 (EST) Message-ID: <4912E80A.7090405@primetime.com> Date: Thu, 06 Nov 2008 07:50:18 -0500 From: kurt seel User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) MIME-Version: 1.0 To: Steve Kargl , freebsd-geom@freebsd.org References: <20081106042504.GA40254@troutmask.apl.washington.edu> In-Reply-To: <20081106042504.GA40254@troutmask.apl.washington.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: Method to mirror a single partition across the net X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Nov 2008 13:20:33 -0000 Tell me if this helps : http://bsdtips.utcorp.net/mediawiki/index.php/Mirroring_over_network If anything is wrong or unclear let me know. Steve Kargl wrote: > I was directed on freebsd-questions to ask my question on > freebsd-fs, but freebsd-geom is perhaps a mosre appropriate > list. > > I've read the Handbook's chapter on GEOM, gmirror(1), geom(8), ggated(8), > and ggatec(8), and I've search the web for a solution to the following > issue. > > I would like to mirror a single partition on system A to a partition on > system B. It would appear a combination of gmirror and ggated would work, > but I haven't found any example on setting up two systems. > > To be specific, /etc/fstab on the 2 systems is > > # Device Mountpoint FStype Options Dump Pass# > /dev/ad4s1b none swap sw 0 0 > /dev/ad4s1a / ufs rw 1 1 > /dev/ad4s1e /data ufs rw 2 2 > /dev/ad4s1d /usr ufs rw 2 2 > > I want to mirror 192.168.0.20:/dev/ad4s1e to 192.168.0.21:/dev/ad4s1e > > Does the following method work? > > On 192.168.0.21: > > # umount /dev/ad4s1e > # echo "192.168.0.21/24 RW /dev/ad4s1e" > /etc/gg.exports > # ggated > > On 192.168.0.20: > > # ggatec create -o rw 192.168.0.21 /dev/ad4s1e > # gmirror label data /dev/ad4s1e > # gmirror insert data /dev/ggate0 > > and /etc/fstab becomes > > # Device Mountpoint FStype Options Dump Pass# > /dev/ad4s1b none swap sw 0 0 > /dev/ad4s1a / ufs rw > 1 1 > /dev/ad4s1d /usr ufs rw 2 2 > /dev/mirror/data /data ufs rw 2 2 > > This also leads to the question that if one is (or both systems are) > rebooted, does the mirror automagically come back on boot? > >