From owner-freebsd-geom@FreeBSD.ORG Wed Feb 1 22:35:22 2006 Return-Path: X-Original-To: geom@freebsd.org Delivered-To: freebsd-geom@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F5E316A420 for ; Wed, 1 Feb 2006 22:35:22 +0000 (GMT) (envelope-from gbaratto@superb.net) Received: from smail2.superb.net (smail2.superb.net [64.251.80.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E48B43D46 for ; Wed, 1 Feb 2006 22:35:21 +0000 (GMT) (envelope-from gbaratto@superb.net) Received: from [64.251.80.100] (100.80.251.64.yvr1.superb.net [64.251.80.100]) by smail2.superb.net (Postfix) with ESMTP id C56C41F8EE3 for ; Wed, 1 Feb 2006 14:35:20 -0800 (PST) Message-ID: <43E137A9.9060701@superb.net> Date: Wed, 01 Feb 2006 14:35:21 -0800 From: "Gustavo A. Baratto" User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: geom@freebsd.org References: <013c01c622cb$43256ef0$6450fb40@guinness> <43D97268.2030700@fer.hr> <01a601c622eb$f5d62970$6450fb40@guinness> <20060127085517.GA789@garage.freebsd.pl> In-Reply-To: <20060127085517.GA789@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: gmirror + ggate 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: Wed, 01 Feb 2006 22:35:22 -0000 Hey all... ggate doesnt seem to have a start script like other geom classes. What's the best way to mount a gmirrored ggated device at start up? Before gmirror was running in this server, I just created a simple script in /usr/local/etc/rc.d to mount the ggate devices: --------- #!/bin/sh /sbin/ggatec create -R 262144 -S 262144 -o rw 10.10.10.3 /dev/da0s1g /sbin/ggatec create -R 262144 -S 262144 -o rw 10.10.10.4 /dev/da0s1g /sbin/mount /dev/ggate0 /mount_point_0 /sbin/mount /dev/ggate1 /mount_point_1 --------- Now... If at boot time I want to startup these two ggate devices gmirrored, what's the best approach? I was thinking I could add 'geom_mirror_load="YES"' in loader.conf, then then run 'gmirror configure -h gm0' Is that the recommended approach? If yes, do I still need to run the script above to plumb the ggate devices, or -h does that for us? Cheers all ;) Pawel Jakub Dawidek wrote: > On Thu, Jan 26, 2006 at 06:47:06PM -0800, Gustavo A. Baratto wrote: > +> Thanks for the links Ivan... > +> > +> They answered some of my questions, but mostly they don't really describe what I wanna do, because they mostly refer to more than one client mounting a gmirrored+ggated > +> device. I want just one server to mount a gmirrored device, exported from two different boxes through ggated. > +> > +> Being more specific: > +> > +> - Servers X and Y will be file server. They will have big sized identical partitions (for example /dev/da0s1f), that will be exported through ggated, and of course not > +> mounted on servers X and Y. > +> > +> - Server A will ggatec the remote /dev/da0s1f devices from both servers X and Y (/dev/ggate0 and /dev/ggate1). > +> Then, server A will create the mirror with the devices ggate0 and ggate1: > +> # gmirror label -v -b round-robin data ggate0 > +> # gmirror insert data ggate1 > +> # mount /dev/mirror/data /mnt > +> > +> Just server A will mount /dev/mirror/data RW (or even RO). > > There will be a problem when you lost connection to one of the servers - > ggate will return EIO (or ENXIO) on every I/O request, so gmirror will > mark this component as broken and will remove it from the mirror so it > won't be automatically reconnected when the connection come back. > > I was wondering how to handle this better. I think we can return ENXIO > from ggate and just disconnect provider on error != EIO (without marking > it as broken). >