From owner-freebsd-questions@FreeBSD.ORG Wed Jan 19 05:56:11 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 17B7716A4CE for ; Wed, 19 Jan 2005 05:56:11 +0000 (GMT) Received: from chello084114137224.1.15.vie.surfer.at (chello084114137224.1.15.vie.surfer.at [84.114.137.224]) by mx1.FreeBSD.org (Postfix) with SMTP id A312743D31 for ; Wed, 19 Jan 2005 05:56:09 +0000 (GMT) (envelope-from 4711@chello.at) Received: (qmail 17777 invoked from network); 19 Jan 2005 05:56:08 -0000 Received: from matrix010.matrix.net (192.168.123.10) by ns.matrix.net with SMTP; 19 Jan 2005 05:56:08 -0000 From: Christian Hiris <4711@chello.at> To: freebsd-questions@freebsd.org Date: Wed, 19 Jan 2005 06:55:53 +0100 User-Agent: KMail/1.7 References: <20050116201414.GA76014@polands.org> <3096.69.48.112.135.1106060568.squirrel@69.48.112.135> <20050119043619.GA97100@polands.org> In-Reply-To: <20050119043619.GA97100@polands.org> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200501190656.07191.4711@chello.at> Subject: Re: gmirror: replacing failed disks X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jan 2005 05:56:11 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday 19 January 2005 05:36, Doug Poland wrote: > On Tue, Jan 18, 2005 at 09:02:48AM -0600, Doug Poland wrote: > > >> GEOM_MIRROR: Component ad4 (device gm0s1) broken, skipping. > > >> GEOM_MIRROR: Cannot add disk ad4 to gm0s1 (error=22). > > > > > > You can set 'kern.geom.mirror.debug=2' in /boot/loader.conf. This > > > tells you more about what happens. I tested all this at a very early > > > stage of development, so gmirror's behaviour might have changed. > > > There is also a small chance that some bits in my brain got lost > > > since I tested his :) > > > > I set this while the OS is running. GEOM_MIRROR responds every 5 > > seconds.... > > > > GEOM_MIRROR[1]: Disk ad6 (device gm0s1) marked as clean. > > GEOM_MIRROR[2]: Metadata on ad6 updated. > > GEOM_MIRROR[1]: Disk ad6 (device gm0s1) marked as dirty. > > GEOM_MIRROR[2]: Metadata on ad6 updated. > > > > Can I get gmirror to attempt to connect to ad4 again? I tried an > > atcontrol reinit 2, that didn't do it. I also tried gmirror rebuild > > gm0s1 ad4, but gmirror said: "No such provider: ad4". > > Sorry to reply to my own post, but when I rebooted the box, this is what > I see in /var/log/messages concerning gmirror: > ... snip ... > GEOM_MIRROR[2]: Metadata on ad6 updated. Jan 18 21:07:17 sgwww02 kernel: > GEOM_MIRROR[1]: Disk ad6 (device gm0s1) marked as dirty. Jan 18 21:07:17 > sgwww02 kernel: GEOM_MIRROR[2]: Metadata on ad6 updated. > > and on and on... > > Not sure what to do to get gmirror to recogonize this disk. Hi Doug, seems to me, that when you pulled drive ad4, data on it were damaged. Thanks for trying this with ad4 as provider! Now simply try to simulate a replacement with a fresh disk, as you would do in real life. Please set 'sysctl -w kern.geom.mirror.debug=0' and remove the according line from your /boot/loader.config. The procedure below is similar to the example in the gmirror manpage, just added 2. and 3. to make ad4 appear as a fresh disk and re-create the slice ad4s1. 1. Let ad6 forget about all other gms01's providers # gmirror forget gms01 2. Clean up ad4 2.1. Blank out the first few blocks of ad4 # dd if=/dev/zero of=/dev/ad4 bs=512 count=128 2.2. Blank out gmirror metadata on ad4 # dd if=/dev/zero of=/dev/ad4 bs=512 skip=156301400 3. Initialize ad4 and create slize ad4s1 # fdisk -v -B -I /dev/ad4 4. Add /dev/ad4s1 to mirror gm0s1 # gmirror insert gm0s1 /dev/ad4s1 Cheers, ch - -- Christian Hiris <4711@chello.at> | OpenPGP KeyID 0x3BCA53BE OpenPGP-Key at hkp://wwwkeys.eu.pgp.net and http://pgp.mit.edu -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFB7fZ309WjGjvKU74RAu8bAJ90bGmDZ5WRG+cLWSvnR6dLt+whSgCaAkDS lNzBZNp+DVOlzNuA30rmKXQ= =ZPkt -----END PGP SIGNATURE-----