From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 26 04:56:15 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 EBB5C16A4CE; Fri, 26 Nov 2004 04:56:15 +0000 (GMT) Received: from smtp.uol.com.br (smtpout6.uol.com.br [200.221.4.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5A99643D41; Fri, 26 Nov 2004 04:56:15 +0000 (GMT) (envelope-from jonny@jonny.eng.br) Received: from [200.217.130.124] (unknown [200.217.130.124]) by scorpion6.uol.com.br (Postfix) with ESMTP id 2197E7B26; Fri, 26 Nov 2004 02:56:11 -0200 (BRST) Message-ID: <41A6B76F.4020101@jonny.eng.br> Date: Fri, 26 Nov 2004 02:56:15 -0200 From: =?ISO-8859-1?Q?Jo=E3o_Carlos_Mendes_Lu=EDs?= User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <41A4FD60.4050501@jonny.eng.br> <20041125224547.GB7232@darkness.comp.waw.pl> In-Reply-To: <20041125224547.GB7232@darkness.comp.waw.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit 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 04:56:16 -0000 Pawel Jakub Dawidek wrote: > On Wed, Nov 24, 2004 at 07:30:08PM -0200, Jo?o Carlos Mendes Luís wrote: > +> First, I partioned (fdisk) for a full FreeBSD system, with > +> sysinstall, which got me this: > [...] > +> Then I tried to compose a single disk gmirror with the whole ad1 disk: > [...] > > First mistake - wrong order. Create a mirror, than partition a mirror > provider. Is this a constraint in the design? Im my point of view, geom would treat all block devices equally, no matter if they are whole disks or single partitions. If this is not the case, them maybe this should be noted in the man page. Note that sometimes it is not necessary to have a whole disk redundant. I could use part of it to temporary data, for example. I've done this with vinum in 4-stable more than once: I get two disks, each with a copy of the root partition (which I intended to mirror with gmirror), a swap partition, a mirror vinum subdisk and a stripe vinum subdisk. Note that in this case the data integrity and cost is more important than continuous operation. If a disk fail, the server will stop, but no *important* data will get lost. This is the scenario which I was testing. > > +> Now, lets reboot. I could not unload geom_mirror, since it was > +> preloaded during boot, is this expected? The device could not be > +> unloaded, but the volume disapeared (gmirror list, ls /dev/mirror). > > If there is no mirror configured, you should be able to unload it. Before putting it in /boot/loader.conf, unload worked, even with mirror devices configured, IIRC. Only after loader.conf preloading this problem appeared. > +> Ok, now let's try something diferent. Let's suppose that I only > +> want one slice mirrored. Maybe the other slices could be standalone, or > +> striped, this is not important now. Let's just say I do want to mirror > +> ad1s1, instead of the whole ad1. > [...] > +> But the consumer name is still ad1, and not ad1s1. Hey, let's check: > > Read manual page. Gmirror uses the last provider's sector for metadata. > If two or more providers share the same last sector (as in your case), > use '-h' option. The man page says only: -h Hardcode providers' names in metadata. and does not explain when I should use this. Do you mean that if I want it to use ad1s1 as the provider, and not ad1, -h is what I want? I do not have access to the test machine right now, will try tomorrow morning. > > +> Is there any gmirror hacker around to fix these? > > There is nothing to fix. Surely there is. At least the manual. And even if gmirror is correct, there's also the problem shown with disklabel in my previous email. Jonny -- João Carlos Mendes Luís - Networking Engineer - jonny@jonny.eng.br