Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Nov 2004 09:23:40 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Jo?o Carlos Mendes =?iso-8859-2?Q?Lu=EDs?= <jonny@jonny.eng.br>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: gmirror bugs, how many?
Message-ID:  <20041126082340.GC7232@darkness.comp.waw.pl>
In-Reply-To: <41A6B76F.4020101@jonny.eng.br>
References:  <41A4FD60.4050501@jonny.eng.br> <20041125224547.GB7232@darkness.comp.waw.pl> <41A6B76F.4020101@jonny.eng.br>

next in thread | previous in thread | raw e-mail | index | archive | help

--5wdX5gfZV4kojQYf
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Nov 26, 2004 at 02:56:15AM -0200, Jo?o Carlos Mendes Lu=EDs wrote:
+> Pawel Jakub Dawidek wrote:
+> >First mistake - wrong order. Create a mirror, than partition a mirror
+> >provider.
+>=20
+> Is this a constraint in the design?  Im my point of view, geom would=20
+> treat all block devices equally, no matter if they are whole disks or=20
+> single partitions.

You're right and it does so.

+> If this is not the case, them maybe this should be noted in the man page.
+>=20
+> Note that sometimes it is not necessary to have a whole disk redundant.=
=20
+>  I could use part of it to temporary data, for example.  I've done this=
=20
+> with vinum in 4-stable more than once: I get two disks, each with a copy=
=20
+> of the root partition (which I intended to mirror with gmirror), a swap=
=20
+> partition, a mirror vinum subdisk and a stripe vinum subdisk.  Note that=
=20
+> in this case the data integrity and cost is more important than=20
+> continuous operation.  If a disk fail, the server will stop, but no=20
+> *important* data will get lost.  This is the scenario which I was testin=
g.

You can do that with gmirror.
All I'm saying is that you first should create a mirror, then create slices
and partitions on top of mirror provider, because you want to use
mirror/vol0s1a, not ad0s1a. Note, that mirror/vol0 is one sector shorter
than ad0 and imagine a situation when gmirror stores metadata in the same
place where BSD stores it - if you first create a mirror and then
partitions on ad0 you'll overwrite gmirror metadata. This very painful,
that in MBR metadata is visible on traffic providers and I don't want to
repeat that mistake.

+> >+>     Now, lets reboot.  I could not unload geom_mirror, since it was=
=20
+> >+> preloaded during boot, is this expected?  The device could not be=20
+> >+> unloaded, but the volume disapeared (gmirror list, ls /dev/mirror).=
=20
+> >
+> >If there is no mirror configured, you should be able to unload it.
+>=20
+> Before putting it in /boot/loader.conf, unload worked, even with mirror=
=20
+> devices configured, IIRC.  Only after loader.conf preloading this=20
+> problem appeared.

What error do you get when you try to do this?

+> The man page says only:
+>=20
+> -h           Hardcode providers' names in metadata.
+>=20
+> and does not explain when I should use this.
+>=20
+> Do you mean that if I want it to use ad1s1 as the provider, and not ad1,=
=20
+> -h is what I want?

Only when you share the last sector between those two providers.
You can still create ad1s1, which is one sector shorter.

+> >
+> >+>     Is there any gmirror hacker around to fix these?
+> >
+> >There is nothing to fix.
+>=20
+> Surely there is.  At least the manual.

I've to agree here.:)

+> And even if gmirror is correct, there's also the problem shown with=20
+> disklabel in my previous email.

What problem is there when you use proper order of doing things?

--=20
Pawel Jakub Dawidek                       http://www.FreeBSD.org
pjd@FreeBSD.org                           http://garage.freebsd.pl
FreeBSD committer                         Am I Evil? Yes, I Am!

--5wdX5gfZV4kojQYf
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFBpugMForvXbEpPzQRAlaZAJ94XHe06WhbEQIG0hEg89I++GBEIwCeKGmR
DzedhLHUa7o6bDKfSjqx/tw=
=fby2
-----END PGP SIGNATURE-----

--5wdX5gfZV4kojQYf--



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