Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Nov 2007 16:32:25 -0500
From:      Juergen Heberling <pjah@hicom.net>
To:        freebsd-geom@freebsd.org
Subject:   GMIRROR uses wrong drive/provider after a problem with a drive/provider
Message-ID:  <4740AF69.8070003@hicom.net>

next in thread | raw e-mail | index | archive | help
Hi all,

I'm not sure what I'm doing wrong.  The above scenario has occurred to 
me 2x already.  I would appreciate any suggestions.

I'm running FB 6.1 with 4 mirrors, each mirror consisting of 2 drives, 
each drive in a mirror is on a different SCSI channel (da0, 2, 4,6 are 
on Channel A and DA1, 3, 5, 7 are on channel B).  da0 and da1 are 
providers for mirror "gm0" which is the "system"/"boot" mirror - I boot 
from da0. da2 and da3 are providers for mirror "mail".

I'm also running with:
kern.geom.mirror.disconnect_on_failure=0
My notes for using this option say
"so a component does not get disconnected in case of an error"
but I do not remember what originally prompted me to use this option.

So here is the scenario:
1. First I get a write error on da2 (mail), after a couple of retries I 
get:
GEOM_MIRROR: Device mail: provider da2 disconnected.
OK, now I'm happy that I'm running a mirror and mail is running fine on da3
2. About 1 minute later I get a write error on da0(gm0), after a couple 
of retries I get:
GEOM_MIRROR: Cannot update metadata on disk da0 (error=16).
and finally
GEOM_MIRROR: Device gm0: provider da0 disconnected.
So gm0 is now running solely using da1. OK so far.

Later on in the day (about 18 hours later), I try to rebuild the 
mirrors, for which I have to reboot (since the device entries were 
invalidated FB needs to find the drives again).  I try do this in 
single-user mode.

Problem :
Booting into single-user mode, gm0 detects and uses DA0 (the outdated 
drive!) and decides to NOT use da1, the "current" drive, in the mirror 
(that was good actually since now I can try to recover gm0 from da1).

(I expected FB to boot from da0, try to detect the various mirrors, and, 
when detecting mirror gm0, detect the providers of gm0, noting that da0 
needs upgrading from da1.)

It does the same for the mail mirror (uses da2, the outdated drive, and 
does NOT use da3, the current drive)

Question:
What do I need to do so GEOM/GMIRROR uses the most current version of 
the data in the mirrors?

Note - prior to booting into single-user mode, I could not access the 
defunct drives to clear the GMIRROR/GEOM metadata. I had tried 
camcontrol-reset against the defunct drives but did not want to risk 
camcontrol-rescan.

TIA
Juergen








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