gmirror issues (fdisk?, disklabel?, newfs?)
R. B. Riddick
arne_woerner at yahoo.com
Wed Dec 27 15:43:36 PST 2006
--- "Rick C. Petty" <rick-freebsd at kiwi-computer.com> wrote:
> 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:
Ohoh... [Tubby play with pudding-machine...]^2
Since I do not want to use my DSL flat-rate too much, I did not test 6.2-RC1...
But I will try R6.2, as soon as possible...
> # boot0cfg -B ad1
> boot0cfg: /dev/ad1: Geom not found
> boot0cfg: write_mbr: /dev/ad1: No such file or directory
Hmm... The error message is misleading...
But it is OK, that /dev/ad1 cannot be opened for writing as soon as gmirror
uses it as a consumer, because: gmirror has no chance to notice changes that go
directly to /dev/ad1, so that /dev/ad0 would stay unchanged (and so possibly
the mirror is not sync'ed and gmirror does not mention that immediately).
> # gmirror status
> Name Status Components
> mirror/gm0 COMPLETE ad0
> # boot0cfg -B /dev/mirror/gm0
> boot0cfg: /dev/mirror/gm0: Geom not found
> boot0cfg: /dev/mirror/gm0: ioctl DIOCSMBR: Operation not permitted
This is strange, because: gmirror should certainly allow write access to its
devices (providers)... Sounds really strange...
Luckily someone mentioned that before R6.2... :-)
> 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.
Hmm... But why does it work here on my box with R6.1?
I just used boot0cfg on my /dev/ad0, which has geom_bsd (/dev/ad0s1) and
gmirror (e.g.: /dev/ad0s1a and /dev/ad1s1a build one gmirror) on top (I could
successfully change the ticks and the default choice)...
> 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
Yup - some special cases r not handled as gracefully as they could be
I had another one:
gmirror out of ad1s1a and ad0s1a, where ad0s1a was rebuilding... in order to
stop rebuild I decided to remove ad1s1a which left a unusable gmirror device
and a panic (certainly after reboot, too). Unfortunately I do not remember the
kind of panic... If it was a bad memory access or just an ASSERT... But it
crashed repeatedly until I disconnected the disk that had that bad
> 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.
I would say this "untaste" command wouldnt be necessary, if the geom classes
would handle every single special case as gracefully as possible...
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
More information about the freebsd-geom