From owner-freebsd-questions@FreeBSD.ORG Wed Jan 19 21:53:09 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 02D3816A4CE for ; Wed, 19 Jan 2005 21:53:09 +0000 (GMT) Received: from galilee.polands.org (CPE-24-208-53-189.new.rr.com [24.208.53.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 152FD43D39 for ; Wed, 19 Jan 2005 21:53:08 +0000 (GMT) (envelope-from djp@polands.org) Received: from jericho.polands.org (jericho.polands.org [172.16.1.35]) by galilee.polands.org (8.12.9/8.12.9) with ESMTP id j0JLr4RZ043841; Wed, 19 Jan 2005 15:53:04 -0600 (CST) (envelope-from djp@polands.org) Received: from jericho.polands.org (localhost [127.0.0.1]) by jericho.polands.org (8.13.1/8.13.1) with ESMTP id j0JLr4bo051858; Wed, 19 Jan 2005 15:53:04 -0600 (CST) (envelope-from djp@jericho.polands.org) Received: (from djp@localhost) by jericho.polands.org (8.13.1/8.13.1/Submit) id j0JLr3Oe051857; Wed, 19 Jan 2005 15:53:03 -0600 (CST) (envelope-from djp) Date: Wed, 19 Jan 2005 15:53:03 -0600 From: Doug Poland To: Christian Hiris <4711@chello.at> Message-ID: <20050119215303.GC51384@polands.org> References: <20050116201414.GA76014@polands.org> <3096.69.48.112.135.1106060568.squirrel@69.48.112.135> <20050119043619.GA97100@polands.org> <200501190656.07191.4711@chello.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200501190656.07191.4711@chello.at> User-Agent: Mutt/1.5.6i cc: freebsd-questions@freebsd.org 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 21:53:09 -0000 On Wed, Jan 19, 2005 at 06:55:53AM +0100, Christian Hiris wrote: > > > 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... > > > > 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 > This command took "a long time" and I didn't let it complete. I use the tcsh and would occassionaly hit T to track it's progress. I didn't see it writing data to the disk nor did I see disk activity. Did I not wait long enough? > 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 > Christian, Other than the issue with 2.2 above, the procedure worked and the "replacement" drive is now synchronizing. Now I'll print out a transcript of this and tape it to the box, Then, in three years, when a drive dies, I'll remember what to do :) Thanks again for all your help. -- Regards, Doug