From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 26 08:23:42 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9FCA016A4CE for ; Fri, 26 Nov 2004 08:23:42 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id D35D343D41 for ; Fri, 26 Nov 2004 08:23:41 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 6999BACAF1; Fri, 26 Nov 2004 09:23:40 +0100 (CET) Date: Fri, 26 Nov 2004 09:23:40 +0100 From: Pawel Jakub Dawidek To: Jo?o Carlos Mendes =?iso-8859-2?Q?Lu=EDs?= Message-ID: <20041126082340.GC7232@darkness.comp.waw.pl> References: <41A4FD60.4050501@jonny.eng.br> <20041125224547.GB7232@darkness.comp.waw.pl> <41A6B76F.4020101@jonny.eng.br> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5wdX5gfZV4kojQYf" Content-Disposition: inline In-Reply-To: <41A6B76F.4020101@jonny.eng.br> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-hackers@freebsd.org Subject: Re: gmirror bugs, how many? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Nov 2004 08:23:42 -0000 --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--