gmirror issues (fdisk?, disklabel?, newfs?)

Fernan Aguero fernan.aguero at gmail.com
Wed Dec 27 09:58:32 PST 2006


On 12/27/06, Fluffles <etc at fluffles.net> wrote:
> Fernan Aguero wrote:
> > gmirror label -n -v -b round-robin gm0s3 /dev/ad6s3 => SUCCESS
> > Metadata value stored on /dev/ad6s3
> > Done.
> > gmirror load => SUCCESS
> >
> > Next I try to create partitions on the newly created gm0s3:
> >
> > bsdlabel -w -B /dev/mirror/gm0s3 => FAIL
> > bsdlabel: write /dev/mirror/gm0s3: Operation not permitted
> >
> > Why is this failing?
>
> Because the GEOM device is 'in use' by gmirror; you have labeled it and
> it's probably configured then; no direct write access to the geom device
> is possible then unless you play with debugvars. I suggest you label
> (install bootblock etc) before you give a "gmirror label" command.

Veronica,

thanks for the help. I just did all of fdisk+disklabel+newfs/tunefs before
creating (labeling) and activating the mirror and it worked fine!

Actually now that I think about it, what you say sounds pretty reasonable,
but none of the articles I read mention anything about being unable to label or
partition after loading (activating) the gmirror. In fact, they all
activate gmirror
before either bsdlabel/newfs or even before fdisk:
http://people.freebsd.org/~rse/mirror/ (see second example to mirror slices)
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/geom-mirror.html

I have just but guess that none of the examples in those articles can
be reproduced :|

Thanks again,

Fernan

> Make
> sure gmirror is unloaded, too, because if it's loaded it will look for
> the last sector on all geom providers for stored metadata; and configure
> a mirror device automatically thus denying you any direct write access
> to the device.
>
> - Veronica
>


-- 
Fernan Aguero


More information about the freebsd-geom mailing list