Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Oct 2006 13:40:00 -0500
From:      Damian Wiest <dwiest@vailsys.com>
To:        Jeremie Le Hen <jeremie@le-hen.org>
Cc:        freebsd-geom@FreeBSD.org
Subject:   Re: Weird thing with gmirror
Message-ID:  <20061003184000.GB724@dfwdamian.vail>
In-Reply-To: <20061003162216.GB1594@obiwan.tataz.chchile.org>
References:  <20061003162216.GB1594@obiwan.tataz.chchile.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 03, 2006 at 06:22:16PM +0200, Jeremie Le Hen wrote:
> Hi,
> 
> (Please Cc: me in your replies, I am not subscribed.)
> 
> I am using:
> % obiwan:tataz$ uname -mv
> % FreeBSD 6.1-STABLE #8: Sun Jun 25 18:27:14 CEST 2006     root@obiwan:/usr/obj/usr/src/sys/OBIWAN  i386
> 
> I have set up a mirror gm1 using gmirror(8), with ad1 and ad2 as providers.
> This had worked pretty well for weeks, until I got the following error:
> 
> % ad1: FAILURE - READ_DMA status=51<READY,DSC,ERROR> error=40<UNCORRECTABLE> LBA=6170832
> % GEOM_MIRROR: Request failed (error=5). ad1[READ(offset=3159465984, length=65536)]
> % GEOM_MIRROR: Device gm1: provider ad1 disconnected.

One of the drives had a read error and was removed from the mirror.

> Obviously, my hard drive (Maxtor's drives really, really suck) is going
> sick.  But as usual, a mere reboot seems to improves the disk state, for
> a while at least.

There's no need to reboot.

> I have rebooted the box, but now the kernel says:
> 
> % GEOM_MIRROR: Device gm1 created (id=1340871616).
> % GEOM_MIRROR: Device gm1: provider ad1 detected.
> % GEOM_MIRROR: Device gm1: provider ad2 detected.
> % GEOM_MIRROR: Component ad1 (device gm1) broken, skipping.
> 
> And gmirror(8)'s output is:
> 
> % Geom name: gm1
> % State: DEGRADED
> % Components: 2
> % Balance: split
> % Slice: 4096
> % Flags: NONE
> % GenID: 1
> % SyncID: 1
> % ID: 1340871616
> % Providers:
> % 1. Name: mirror/gm1
> %    Mediasize: 81964301824 (76G)
> %    Sectorsize: 512
> %    Mode: r1w1e2
> % Consumers:
> % 1. Name: ad2
> %    Mediasize: 81964302336 (76G)
> %    Sectorsize: 512
> %    Mode: r1w1e1
> %    State: ACTIVE
> %    Priority: 0
> %    Flags: NONE
> %    GenID: 1
> %    SyncID: 1
> %    ID: 1733588705
> 
> What am I suppose to do from here ?
> 
> I've performed the following commands:
> 
> % obiwan:root# gmirror forget gm1 ad1
> % obiwan:root# gmirror insert gm1 ad1
> 
> But the whole disk is then wholly resynchronized.  Is there any faster
> way to reconnecte ad1 to gm1 ?
> 
> Thank you !
> -- 
> Jeremie Le Hen
> < jeremie at le-hen dot org >< ttz at chchile dot org >
> _______________________________________________

I believe you could have omitted the "gmirror forget".

AFAIK, the disks must be resynchronized since it's possible that changes 
were made since the sub-mirror was detached.  Using a filesystem that 
does logging would allow the possibility of skipping a resync of the 
entire disk, but I don't believe geom supports this.

-Damian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061003184000.GB724>