From owner-freebsd-questions@FreeBSD.ORG Sun Jan 16 20:14:17 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 2EEBA16A4CE for ; Sun, 16 Jan 2005 20:14:17 +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 4F6D643D1F for ; Sun, 16 Jan 2005 20:14:16 +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 j0GKEFRZ035729 for ; Sun, 16 Jan 2005 14:14:15 -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 j0GKEEnU081231 for ; Sun, 16 Jan 2005 14:14:14 -0600 (CST) (envelope-from djp@jericho.polands.org) Received: (from djp@localhost) by jericho.polands.org (8.13.1/8.13.1/Submit) id j0GKEEFT081230 for questions@freebsd.org; Sun, 16 Jan 2005 14:14:14 -0600 (CST) (envelope-from djp) Date: Sun, 16 Jan 2005 14:14:14 -0600 From: Doug Poland To: questions@freebsd.org Message-ID: <20050116201414.GA76014@polands.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Subject: 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: Sun, 16 Jan 2005 20:14:17 -0000 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