From owner-freebsd-geom@FreeBSD.ORG Wed May 10 18:39:57 2006 Return-Path: X-Original-To: freebsd-geom@freebsd.org Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1651716AC1B for ; Wed, 10 May 2006 18:39:57 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from kiwi-computer.com (megan.kiwi-computer.com [63.224.10.3]) by mx1.FreeBSD.org (Postfix) with SMTP id 10F2A43D6D for ; Wed, 10 May 2006 18:39:55 +0000 (GMT) (envelope-from rick@kiwi-computer.com) Received: (qmail 69781 invoked by uid 2001); 10 May 2006 18:39:54 -0000 Date: Wed, 10 May 2006 13:39:54 -0500 From: "Rick C. Petty" To: Dave Message-ID: <20060510183954.GB68844@megan.kiwi-computer.com> References: <00ac01c6745e$1e8ea310$0200a8c0@satellite> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00ac01c6745e$1e8ea310$0200a8c0@satellite> User-Agent: Mutt/1.4.2.1i Cc: freebsd-geom@freebsd.org Subject: Re: gmirror, not synchronizing drives on freebsd6 X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2006 18:40:01 -0000 Your subject may be misleading. I'm using gmirror on a couple 6.x boxes, and it's synchronizing just fine. On Wed, May 10, 2006 at 02:18:20PM -0400, Dave wrote: > I've got a 6.0 box running gmirror as raid1. It uses gm0s1 and the two > identical 40-gb ide drives are ad0 and ad1. I'm getting an error from smartd How did you setup the mirror to begin with? > unrecoverable error. I am now starting to think ad0 is going bad. I powered > down the box and unplugged ad1 from the system and booted ad0 only. It > booted, but the data was not up to date at all, i could tell from the perl > version and some other packages i've since uninstalled. I then powered down Meaning that ad0 went bad at some point in the past, gmirror discovered this and stopped mirroring to it. You should be able to detect this by using "gmirror status". > Plug them both back in and ad1 is once again booting. This tells me that > there might not be an mbr on the second drive, so ad0 has to boot it when it > can't boot itself. What i'm wondering are: Sounds like there isn't an MBR on ad1, which leads me to wonder how you setup the mirror in the first place. > 1. Is there a way without destroying my setup to put an mbr on ad1, i do not > want to loose data, so that unplugging ad0 and ad1 will boot Yup. Try "fdisk -B ad1". Or use the sysinstall utility. The MBR only covers the first 1-2 sectors of the disk, before slice 1. It shouldn't destroy your slice. > 2. I'd like to confirm that ad0 is indeed going bad, and if it is replace > it. Try: "dd if=/dev/ad0 of=/dev/null conv=noerror" and see how many errors it reports. You can also look at the SMART detected errors, etc. > 3. Once the status of these drives is verified i'd like to replace it with > another 40 and sync up, can i do this without partitioning, just issue the > gmirror command and will it copy partitions, slices, and data over to the > blank drive You shouldn't need to repartition the blank drive as long as you were mirroring the whole drive in the first place. Just plug the new drive in, tell your BIOS to boot to the old, good drive (or move ad1 to ad0 and plug the new drive into ad1). Then you should be able to add the new drive to the mirror (make sure it's not still expecting to mirror to the bad drive) and it'll auto-sync. -- Rick C. Petty