Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Dec 2006 17:27:12 -0600
From:      "Rick C. Petty" <rick-freebsd@kiwi-computer.com>
To:        "R. B. Riddick" <arne_woerner@yahoo.com>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: gmirror issues (fdisk?, disklabel?, newfs?)
Message-ID:  <20061227232712.GA90336@keira.kiwi-computer.com>
In-Reply-To: <20061227181812.86067.qmail@web30310.mail.mud.yahoo.com>
References:  <4592AAA9.70008@fluffles.net> <20061227181812.86067.qmail@web30310.mail.mud.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Dec 27, 2006 at 10:18:12AM -0800, R. B. Riddick wrote:
>
> On R6.1 it works like it should:

I've seen just the opposite behavior, in 6.2-R.  Once geom_mirror is
loaded, I can't use bsdlabel or fdisk:

# boot0cfg -B ad1
boot0cfg: /dev/ad1: Geom not found
boot0cfg: write_mbr: /dev/ad1: No such file or directory
# ls /dev/ad*
/dev/ad0    /dev/ad2    /dev/ad2s1a /dev/ad2s1c /dev/ad2s1e /dev/ad2s1g
/dev/ad1    /dev/ad2s1  /dev/ad2s1b /dev/ad2s1d /dev/ad2s1f

# gmirror status
      Name    Status  Components
mirror/gm0  COMPLETE  ad0
                      ad1

I have the same problem with "fdisk -B".  Once geom opens the device, none
of the fdisk/bsdlabel/boot0cfg tools work anymore.  However, I wouldn't
expect them to, but this also fails:

# boot0cfg -B /dev/mirror/gm0
boot0cfg: /dev/mirror/gm0: Geom not found
boot0cfg: /dev/mirror/gm0: ioctl DIOCSMBR: Operation not permitted

So, once you enable any geom layer, you no longer have write access to the
boot blocks or otherwise.  This has been broken ever since GEOM was
introduced in 5.0.  I've been bitten many times by this in:  gmirror,
gvinum, gpt, glabel, etc.

What's worse is that these modules don't have a way to "untaste".  If you
load the module, all providers get tasted and there's no way back.  I got
burned last week when gmirror decided to flip out and it whacked ad1.
The system panicked on every boot.  The only remedy was to boot a 5.5-R
media (IIRC) and do "gmirror clear ad1" *before* geom_mirror was loaded.
IIRC, 6.0, 6.1, and all the other 5.x media I had didn't work.  What a
PITA!

It would be nice if the tools had a "load but don't taste" command, an
"untaste" command, and a "taste" command.  Until then, it all just feels
so incomplete, like it was hacked together.

-- Rick C. Petty



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