Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Nov 2004 02:56:15 -0200
From:      =?ISO-8859-1?Q?Jo=E3o_Carlos_Mendes_Lu=EDs?= <jonny@jonny.eng.br>
To:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: gmirror bugs, how many?
Message-ID:  <41A6B76F.4020101@jonny.eng.br>
In-Reply-To: <20041125224547.GB7232@darkness.comp.waw.pl>
References:  <41A4FD60.4050501@jonny.eng.br> <20041125224547.GB7232@darkness.comp.waw.pl>

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


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



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