gmirror RAID-1: rebuilding freezes machine

Jared Ring jared at little-miracles.org
Thu Sep 14 01:34:50 PDT 2006


I have cvsup'd today to make sure I get the updated g_mirror.c, have 
rebuilt world and kernel, installed both. however when i rebuild the 
degraded drive the same thing happens.

during the rebuild the good drive is reading, but the dirty drive is not 
gettin written to according to gstat.

all i have done is a gmirror remove gm0 ad0 after i realised what had 
happened, updated to the reverted version, gmirror insert gm0 ad0. the 
rebuild process began automatically.

Am I missing something? Do i have to wipe and start again?

This isnt a production machine, its still preproduction, but its 
supposed to be deployed in a week.

Michael Butler wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I'm backing out the attached change to see if it fixes it ..
> 
>     Michael
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (FreeBSD)
> 
> iD8DBQFE/2/mQv9rrgRC1JIRArNYAJsEuTtrmig9bdW4aDQQ8W1May+EfQCfUjDQ
> Xc1A9gUrrLS2jgbDP4xyC7I=
> =5DtW
> -----END PGP SIGNATURE-----
> 
> 
> ------------------------------------------------------------------------
> 
> Index: src/sys/geom/mirror/g_mirror.c
> ===================================================================
> RCS file: /usr/home/ncvs/src/sys/geom/mirror/g_mirror.c,v
> retrieving revision 1.66.2.7
> retrieving revision 1.66.2.8
> diff -u -r1.66.2.7 -r1.66.2.8
> --- src/sys/geom/mirror/g_mirror.c	16 Jul 2006 15:47:46 -0000	1.66.2.7
> +++ src/sys/geom/mirror/g_mirror.c	4 Sep 2006 12:55:43 -0000	1.66.2.8
> @@ -1813,12 +1813,19 @@
>  		bioq_remove(&sc->sc_queue, bp);
>  		mtx_unlock(&sc->sc_queue_mtx);
>  
> -		if ((bp->bio_cflags & G_MIRROR_BIO_FLAG_REGULAR) != 0)
> -			g_mirror_regular_request(bp);
> -		else if ((bp->bio_cflags & G_MIRROR_BIO_FLAG_SYNC) != 0)
> -			g_mirror_sync_request(bp);
> -		else
> +		if (bp->bio_to != sc->sc_provider) {
> +			if ((bp->bio_cflags & G_MIRROR_BIO_FLAG_REGULAR) != 0)
> +				g_mirror_regular_request(bp);
> +			else if ((bp->bio_cflags & G_MIRROR_BIO_FLAG_SYNC) != 0)
> +				g_mirror_sync_request(bp);
> +			else {
> +				KASSERT(0,
> +				    ("Invalid request cflags=0x%hhx to=%s.",
> +				    bp->bio_cflags, bp->bio_to->name));
> +			}
> +		} else {
>  			g_mirror_register_request(bp);
> +		}
>  		G_MIRROR_DEBUG(5, "%s: I'm here 9.", __func__);
>  	}
>  }
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"


More information about the freebsd-stable mailing list