From owner-freebsd-current@FreeBSD.ORG Fri Oct 8 05:58:39 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BEEA416A4CE; Fri, 8 Oct 2004 05:58:39 +0000 (GMT) Received: from zibbi.icomtek.csir.co.za (zibbi.icomtek.csir.co.za [146.64.24.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7AE0843D5A; Fri, 8 Oct 2004 05:58:35 +0000 (GMT) (envelope-from jhay@icomtek.csir.co.za) Received: from zibbi.icomtek.csir.co.za (localhost [127.0.0.1]) i985wXZV072131; Fri, 8 Oct 2004 07:58:33 +0200 (SAST) (envelope-from jhay@zibbi.icomtek.csir.co.za) Received: (from jhay@localhost)i985wX4W072130; Fri, 8 Oct 2004 07:58:33 +0200 (SAST) (envelope-from jhay) Date: Fri, 8 Oct 2004 07:58:33 +0200 From: John Hay To: Pawel Jakub Dawidek Message-ID: <20041008055833.GB42075@zibbi.icomtek.csir.co.za> References: <20041006195428.GA8886@zibbi.icomtek.csir.co.za> <20041007055209.GU73767@darkness.comp.waw.pl> <20041007065125.GA29164@zibbi.icomtek.csir.co.za> <20041007082652.GX73767@darkness.comp.waw.pl> <20041007085920.GA32875@zibbi.icomtek.csir.co.za> <20041007090656.GY73767@darkness.comp.waw.pl> <20041007132421.GA41532@zibbi.icomtek.csir.co.za> <20041007133537.GC73767@darkness.comp.waw.pl> <20041007202326.GA55025@zibbi.icomtek.csir.co.za> <20041008051359.GF73767@darkness.comp.waw.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041008051359.GF73767@darkness.comp.waw.pl> User-Agent: Mutt/1.4.1i cc: freebsd-current@FreeBSD.org Subject: Re: geom mirror problem X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Oct 2004 05:58:40 -0000 On Fri, Oct 08, 2004 at 07:13:59AM +0200, Pawel Jakub Dawidek wrote: > On Thu, Oct 07, 2004 at 10:23:27PM +0200, John Hay wrote: > +> > This is because ad0 is open with exclusive bit, so gmirror cannot open > +> > it for writing and it gets (EPERM - error=1 - errno(2)). > +> > gmirror.patch should eliminate this race. > +> > +> With gmirror.patch I don't see the geom_mirror error messages, but then > +> it doesn't finish booting: > +> > +> ####################################################### > +> GEOM_MIRROR: Device gm0 created (id=861616013) > +> GEOM_MIRROR: Device gm0: provider ad0 detected > +> GEOM_MIRROR: Device gm0: provider ad2 detected > +> Mounting root from ufs:/dev/mirror/gm0s1a > +> setrootbyname failed > +> Root mount failed: 6 > +> Manual root filesystem specification > +> ... > +> mountroot> > +> ####################################################### > +> > +> So how do I go from here? Is there something else I can try? > > I wonder how is this possible with g_mirror.c rev.1.36... > Could you try this patch and send me the output: > > http://people.freebsd.org/~pjd/patches/gmirror.3.patch I just added this on top of the rest of the patches and it finished booting! Strange, I wonder of there can still be a timing problem. The mirror is degraded though, but it automatically started syncing as opposed to before all the patched where I had to do a "gmirror activate ...". I'll let it sync and then reboot again. I do have swap inside the mirror, but have the swapoff command in rc.d/swap1. The last part of dmesg looks like this: ####################################################### ad0: 114473MB [232581/16/63] at ata0-master UDMA100 ad2: 114473MB [232581/16/63] at ata1-master UDMA100 GEOM_MIRROR: g_mirror_can_go: geom mirror:taste GEOM_MIRROR: g_mirror_can_go: NULL softc GEOM_MIRROR: g_mirror_can_go: can_go=0 GEOM_MIRROR: Device gm0 created (id=861616013). GEOM_MIRROR: Device gm0: provider ad0 detected. GEOM_MIRROR: Device gm0: provider ad2 detected. GEOM_MIRROR: g_mirror_can_go: geom gm0.sync GEOM_MIRROR: g_mirror_can_go: NULL provider GEOM_MIRROR: g_mirror_can_go: can_go=0 GEOM_MIRROR: Device gm0: provider ad2 activated. GEOM_MIRROR: Device gm0: provider mirror/gm0 launched. GEOM_MIRROR: Device gm0: rebuilding provider ad0. GEOM_MIRROR: g_mirror_can_go: geom gm0.sync GEOM_MIRROR: g_mirror_can_go: geom is ready GEOM_MIRROR: g_mirror_can_go: geom gm0 GEOM_MIRROR: g_mirror_can_go: geom is ready GEOM_MIRROR: g_mirror_can_go: can_go=1 Mounting root from ufs:/dev/mirror/gm0s1a ####################################################### And a gmirror list looks like this: ####################################################### Geom name: gm0 State: DEGRADED Components: 2 Balance: load Slice: 4096 Flags: NONE SyncID: 15 ID: 861616013 Providers: 1. Name: mirror/gm0 Mediasize: 120034123264 (112G) Sectorsize: 512 Mode: r6w5e2 Consumers: 1. Name: ad0 Mediasize: 120034123776 (112G) Sectorsize: 512 Mode: r0w1e1 State: SYNCHRONIZING Priority: 0 Flags: DIRTY, HARDCODED, SYNCHRONIZING SyncID: 15 Synchronized: 7% ID: 460446288 2. Name: ad2 Mediasize: 120034123776 (112G) Sectorsize: 512 Mode: r6w5e3 State: ACTIVE Priority: 0 Flags: DIRTY, HARDCODED SyncID: 15 ID: 3011562079 Geom name: gm0.sync Consumers: 1. Name: mirror/gm0 Mediasize: 120034123264 (112G) Sectorsize: 512 Mode: r1w0e0 ####################################################### John -- John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org