Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jan 2005 15:53:03 -0600
From:      Doug Poland <doug@polands.org>
To:        Christian Hiris <4711@chello.at>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: gmirror: replacing failed disks
Message-ID:  <20050119215303.GC51384@polands.org>
In-Reply-To: <200501190656.07191.4711@chello.at>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <ctrl> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050119215303.GC51384>