From owner-freebsd-geom@FreeBSD.ORG Tue Dec 13 23:21:08 2005 Return-Path: X-Original-To: freebsd-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 4DCF316A41F for ; Tue, 13 Dec 2005 23:21:08 +0000 (GMT) (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 EB99643D73 for ; Tue, 13 Dec 2005 23:21:04 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id E251C51B27; Wed, 14 Dec 2005 00:21:01 +0100 (CET) Received: from localhost (dkp188.neoplus.adsl.tpnet.pl [83.24.19.188]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 2FEF850F92 for ; Wed, 14 Dec 2005 00:20:55 +0100 (CET) Date: Wed, 14 Dec 2005 00:20:08 +0100 From: Pawel Jakub Dawidek To: freebsd-geom@freebsd.org Message-ID: <20051213232008.GA749@garage.freebsd.pl> References: <20051213131637.GC2188@rabbit> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="h31gzZEtNLTqOjlF" Content-Disposition: inline In-Reply-To: <20051213131637.GC2188@rabbit> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r535 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_00,RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Subject: Re: How to recover a gmirror from a disaster 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: Tue, 13 Dec 2005 23:21:08 -0000 --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 13, 2005 at 08:16:37AM -0500, Mark Bucciarelli wrote: +> The disaster: +>=20 +> 1. gmirror setup (full disk mirror, da0 + da1) +>=20 +> 2. disk head crash into platter on da1 +>=20 +> 3. reboot +>=20 +> 4. mirror starts to sync, hits bad spot on da1, halts +>=20 +> 5. restart (can work for a while b/f bad spot hit) +>=20 +> 6. Enter command "gmirror remove gm0 da1" +>=20 +> 7. Now on restart, da0 will not boot. +>=20 +> On attempting boot on da0, this is the last output b/f system hangs: +>=20 +> GEOM_MIRROR: Device gm0 created (id=3D...) +> GEOM_MIRROR: Device gm0: provider da0 detected +> GEOM_MIRROR: Device gm0 destroyed +> GEOM_MIRROR: Device gm0 created (id=3D...) +> GEOM_MIRROR: Device gm0: provider da0c detected +> GEOM_MIRROR: Device gm0 destroyed +> GEOM_MIRROR: Device gm0 created (id=3D...) +> GEOM_MIRROR: Device gm0: provider da0 detected +> GEOM_MIRROR: Device gm0 destroyed +> SMP: AP CPU #1 Launched! +> Mounting root from ufs:/dev/mirror/gm0s1a +> setrootbyname failed +> ffs_mountroot: can't find rootvp +> Root mount failed: 6 Could you add kern.geom.mirror.debug=3D3 to your /boot/loader.conf and boot again? +> This is 5.4-RELEASE. +>=20 +> The da0 disk is good (I did a surface scan) and I can mount it and=20 +> backup the data when I put it in bay #2. +>=20 +> So ... +>=20 +> Did my command in step #6 cause this mess? If so, what should I=20 +> have used--forget first? If da1 was disconnected you should get an error, that mirror is not complete. Yes, 'forget' is the right command. +> How can I get this disk to boot again? Actually you can simply: # gmirror label gm0 da0 No data will be lost. You can also boot from da0 directly. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --h31gzZEtNLTqOjlF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDn1coForvXbEpPzQRAgyUAKDOX6ffp90Sfcvf+XuMhDiF49i7qACgxFmh LVGHiPPbSqMNb/B7zE1HnuI= =Se5K -----END PGP SIGNATURE----- --h31gzZEtNLTqOjlF--