Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 May 2006 13:39:54 -0500
From:      "Rick C. Petty" <rick-freebsd@kiwi-computer.com>
To:        Dave <dmehler26@woh.rr.com>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: gmirror, not synchronizing drives on freebsd6
Message-ID:  <20060510183954.GB68844@megan.kiwi-computer.com>
In-Reply-To: <00ac01c6745e$1e8ea310$0200a8c0@satellite>
References:  <00ac01c6745e$1e8ea310$0200a8c0@satellite>

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



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