From owner-freebsd-geom@FreeBSD.ORG Fri Oct 26 07:58:23 2007 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EE5516A419 for ; Fri, 26 Oct 2007 07:58:23 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id DDE0413C4A3 for ; Fri, 26 Oct 2007 07:58:22 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 78D03467E4; Fri, 26 Oct 2007 09:58:20 +0200 (CEST) Received: from localhost (pjd.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 5398F45FE9; Fri, 26 Oct 2007 09:58:15 +0200 (CEST) Date: Fri, 26 Oct 2007 09:57:56 +0200 From: Pawel Jakub Dawidek To: Mario Pranjic Message-ID: <20071026075756.GA1219@garage.freebsd.pl> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IS0zKkzwUGydFO0o" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-geom@freebsd.org Subject: Re: gmirror weird behaviour 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: Fri, 26 Oct 2007 07:58:23 -0000 --IS0zKkzwUGydFO0o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 26, 2007 at 12:02:40AM +0200, Mario Pranjic wrote: > Hi! >=20 > I have a system with 2 250 GB disks in mirror: > [root@haerbe ~]# gmirror status > Name Status Components > mirror/gmo COMPLETE ad0 > ad2 >=20 >=20 > system info: > FreeBSD haerbe.net 6.2-RELEASE-p7 FreeBSD 6.2-RELEASE-p7 #0: Wed Sep 5 > 06:24:11 CEST 2007 root@haerbe.net:/usr/obj/usr/src/sys/HAERBE i386 >=20 >=20 > At some point ad0 disk was detached from the system: > Oct 25 06:43:10 haerbe ad0: FAILURE - device detached > Oct 25 06:43:10 haerbe subdisk0: detached > Oct 25 06:43:10 haerbe ad0: detached > Oct 25 06:43:10 haerbe GEOM_MIRROR: Device gmo: provider ad0 disconnected. > Oct 25 06:43:10 haerbe g_vfs_done():mirror/gmos2e[READ(offset=3D105981870= 08, > length=3D16384)]error =3D 6 > Oct 25 06:43:10 haerbe g_vfs_done():mirror/gmos2e[READ(offset=3D302527447= 04, > length=3D16384)]error =3D 6 >=20 > Mirror status: > [root@haerbe /www/_backups/hrbwiki/2007-10-22]# gmirror status > Name Status Components > mirror/gmo DEGRADED ad2 > [root@haerbe /www/_backups/hrbwiki/2007-10-22]# gmirror list > Geom name: gmo > State: DEGRADED > Components: 2 > Balance: round-robin > Slice: 4096 > Flags: NONE > GenID: 0 > SyncID: 2 > ID: 3221909623 > Providers: > 1. Name: mirror/gmo > Mediasize: 250059349504 (233G) > Sectorsize: 512 > Mode: r8w8e10 > Consumers: > 1. Name: ad2 > Mediasize: 250059350016 (233G) > Sectorsize: 512 > Mode: r1w1e1 > State: ACTIVE > Priority: 0 > Flags: NONE > GenID: 0 > SyncID: 2 > ID: 1951693847 >=20 >=20 > I cleaned the mirror: > [root@haerbe]# gmirror forget gmo >=20 > [root@haerbe ~]# gmirror status > Name Status Components > mirror/gmo COMPLETE ad2 >=20 >=20 > After reboot the system is aware of both disks: > ad0: 238475MB at ata0-master UDMA100 > ad2: 238475MB at ata1-master UDMA100 >=20 >=20 > but after that: > GEOM_MIRROR: Cannot add disk ad2 to gmo (error=3D22). > Root mount waiting for: GMIRROR > Root mount waiting for: GMIRROR > Root mount waiting for: GMIRROR > GEOM_MIRROR: Force device gmo start due to timeout. > GEOM_MIRROR: Device gmo: provider ad0 activated. > GEOM_MIRROR: Device gmo: provider mirror/gmo launched. >=20 > And the system rebooted with ad0 in mirror and not ad2! > [root@haerbe ~]# gmirror list > Geom name: gmo > State: DEGRADED > Components: 2 > Balance: round-robin > Slice: 4096 > Flags: NONE > GenID: 0 > SyncID: 2 > ID: 3221909623 > Providers: > 1. Name: mirror/gmo > Mediasize: 250059349504 (233G) > Sectorsize: 512 > Mode: r8w8e10 > Consumers: > 1. Name: ad0 > Mediasize: 250059350016 (233G) > Sectorsize: 512 > Mode: r1w1e1 > State: ACTIVE > Priority: 0 > Flags: DIRTY > GenID: 0 > SyncID: 2 > ID: 2195860303 >=20 > [root@haerbe ~]# gmirror status > Name Status Components > mirror/gmo DEGRADED ad0 >=20 >=20 > Now I synced mirror again successfuly but this is weird. It should not be > happening. >=20 > Any ideas what is going on? No idea, but in the future could you add kern.geom.mirror.debug=3D1 to your /boot/loader.conf? This will tell us why you get EINVAL when gmirror tries to attach a disk. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --IS0zKkzwUGydFO0o Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHIZ4EForvXbEpPzQRAs3zAKCzqptXExoKFaK1yVMpma1vmhQt4gCbBt46 wwN/me2COJXF9MRctg6nHYU= =Er+2 -----END PGP SIGNATURE----- --IS0zKkzwUGydFO0o--