Hello,

I've got a bootable gmirror running on identical SATA drives on
5.3-STABLE.  The technique I've used to build the gmirror can be found
on http://people.freebsd.org/~rse/gmirror, under the heading "GEOM
mirror Approach 2: Single Slice, Preferred, More Flexible".  Now I'd
like to experiment with replacing a "failed" drive.  This particular box
has hot-swappable drives, so all I need to do is pull a drive out while
the box is running.  

The man page states:

   One disk failed. Replace it with a brand new one:

           gmirror forget data
           gmirror insert data da1

(My system has a provider gm0s1 with ad4 and ad6 as consumers, so I'll
use those device names)

Simulate ad4 failing:

pull the drive
put the drive back in, reboot if necessary to detect drive

# gmirror forget gm0s1
# dd if=/dev/zero of=/dev/ad4 bs=512 count=79

# size=`fdisk ad6 | grep ', size ' | head -1 | sed -e 's;^.*size 
\([0-9]*\).*$;\1;'` (echo "p 1 165 63 $size"; echo "a 1") | fdisk -v -B -f- -i 
/dev/ad4
  OR 
# fdisk -v -B -I /dev/ad4

# gmirror insert gm0s1 /dev/ad4s1

(Now wait two hours for the drives synchronize)

That should work, yes?  How does gmirror know about /dev/ad4s1 if that
drive was previously unformatted or brand new?


-- 
Regards,
Doug
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to