gmirror bugs, how many?
João Carlos Mendes Luís
jonny at jonny.eng.br
Thu Nov 25 20:56:16 PST 2004
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
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
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
> +> 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
> +> 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.
João Carlos Mendes Luís - Networking Engineer - jonny at jonny.eng.br
More information about the freebsd-hackers