From owner-freebsd-questions@FreeBSD.ORG Wed Nov 5 21:36:11 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25920106564A for ; Wed, 5 Nov 2008 21:36:11 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.freebsd.org (Postfix) with ESMTP id 063778FC1C for ; Wed, 5 Nov 2008 21:36:11 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.3/8.14.3) with ESMTP id mA5LaA4O002679; Wed, 5 Nov 2008 13:36:10 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.3/8.14.3/Submit) id mA5LaA5L002678; Wed, 5 Nov 2008 13:36:10 -0800 (PST) (envelope-from sgk) Date: Wed, 5 Nov 2008 13:36:10 -0800 From: Steve Kargl To: Wojciech Puchar Message-ID: <20081105213610.GA29688@troutmask.apl.washington.edu> References: <20081105202758.GA12666@troutmask.apl.washington.edu> <20081105220050.A20422@wojtek.tensor.gdynia.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081105220050.A20422@wojtek.tensor.gdynia.pl> User-Agent: Mutt/1.4.2.3i Cc: freebsd-questions@freebsd.org Subject: Re: Method to mirror a single partition across the net. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Nov 2008 21:36:11 -0000 On Wed, Nov 05, 2008 at 10:01:24PM +0100, Wojciech Puchar wrote: > >following issue. > > > >I would like to mirror a single partition on system A to a > >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. > you are right. > > just create device with ggatec and insert it to the mirror. Thanks for the reply. Perhaps, I'm missing an important detail, but gmirror(8) seems to suggest that it operates on an entire disk. Note, in my original email I used the word partition but showed a disk slice. I really do mean a partition within a slice. Does the following work where I want to mirror only 192.168.0.20:/dev/ad4s1e to 192.168.0.21:/dev/ad4s1e? 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 -- Steve