Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Sep 2008 13:23:37 +0100
From:      Pete French <petefrench@ticketswitch.com>
To:        pjd@FreeBSD.org
Cc:        freebsd-geom@freebsd.org
Subject:   Re: Could someone take a look at a small patch to gmirror ?
Message-ID:  <E1KbaLh-000MLo-3R@dilbert.ticketswitch.com>
In-Reply-To: <20080905073517.GA4021@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
> The possibility of setting priority only on insert time is a bit
> limiting (and mentioned in BUGS section in gmirror(8)), but I think the
> better way to do it is to just extend configure subcommand to allow
> priority change, eg.
>
> 	# gmirror label foo da0 da1
> 	# gmirror configure -p 7 foo da1
>
> We could also add -p option to label subcommand to define starting
> priority, but I'm not sure about that one.
>
> Would you like to work on such a patch maybe?

Actually, yes - indeed I was thinking of doing so. But the 'prefer-low'
is still required for when you change the mirror over in the situation I
decsribed, so the patch is still needed.

As an example, I have two discs in a mirror, priorityies 1 and 0 on
machines server1 and server0. Normally I use server1 and mount the drive from
server0 using ggate. Prefer keeps all my reads to disc with priority 1
so it all performs nicely.

But if I want to do some maintenenace on server 1 then I switch to using
server 0, and swap over the mounts - i.e. use ggate on server 0 to mount
the drive from server 1 in the mirror. Note that I am not changing any of
the drives, simply where I am running the mirror. So now I want to keep all
my reads to drive 0, and hence I need something which will prefer the lower
number.

The situation described above is my actual live setup - I am running mysql
on top of the mirrored pair, and I switch the machine being used when I
wish to upgrade the mysql software. This is why I added the prefer-low
algorithm.

I will, of course, look at the patch to configure too, but I would hope that
you can see why having the inverse algorithm is useful and will consider
acceopting that change too,

thanks,

-peete.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1KbaLh-000MLo-3R>