gmirror: replacing failed disks

Doug Poland doug at polands.org
Wed Jan 19 13:53:09 PST 2005


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



More information about the freebsd-questions mailing list