Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Sep 2009 15:48:37 +0200
From:      Mel Flynn <mel.flynn+fbsd.fs@mailing.thruhere.net>
To:        freebsd-fs@freebsd.org
Cc:        freeebsd-geom@freebsd.org, Pawel Jakub Dawidek <pjd@freebsd.org>
Subject:   Re: Patch to allow gmirror to set priority of a disk
Message-ID:  <200909031548.37887.mel.flynn%2Bfbsd.fs@mailing.thruhere.net>
In-Reply-To: <20090903124407.GJ1821@garage.freebsd.pl>
References:  <200909030000.11961.mel.flynn%2Bfbsd.fs@mailing.thruhere.net> <20090903124407.GJ1821@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
--Boundary-00=_1k8nKwVXxDS7SoY
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Thursday 03 September 2009 14:44:07 Pawel Jakub Dawidek wrote:
> On Thu, Sep 03, 2009 at 12:00:11AM +0200, Mel Flynn wrote:

> > Unfortunately, due to geographic relocation, I no longer have physical
> > access to the machine, so I have only compile tested this patch, but I
> > wanted to get some feedback about it:
> > - Have I made some mistakes that would trash my mirror? ;)
> > - Is there any desire to have this feature other then my own?
> > - Any style issues?
>
> Thank you for working on this, this is a long missing bit, although I've
> some comments.
>
> You assume that you can write to the mirror component, so you also
> assume that your mirror if offline, because if it would be online you
> won't be able to write to one of its components.

Ah, that's a gotcha I didn't catch.

> So what we need more is to be able to change priority of a mirror
> component which is part of an online mirror, so we need to comunicate
> with the kernel.  Would you like to implement this functionality this
> way?

Yes.

> I'd suggest doing this not as separate gmirror(8) subcommand, but as an
> extension to 'configure' subcommand, where one can provide priority by
> giving '-p' argument.

Except I didn't see how configure was implemented. Am I correct that this is 
g_mirror_ctl_configure in sys/geom/mirror/g_mirror_ctl.c?

> PS. In case of 'gmirror insert' you already can change the priority with
>     the '-p' option.

Right. Dunno how I missed that.

On a related note, perhaps the attached can be applied so that there's no 
question about the priority numbering?
-- 
Mel

--Boundary-00=_1k8nKwVXxDS7SoY
Content-Type: text/plain;
  charset="UTF-8";
  name="gmirror.8.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="gmirror.8.txt"

Index: sbin/geom/class/mirror/gmirror.8
===================================================================
--- sbin/geom/class/mirror/gmirror.8	(revision 196776)
+++ sbin/geom/class/mirror/gmirror.8	(working copy)
@@ -115,8 +115,8 @@
 .It Cm label
 Create a mirror.
 The order of components is important, because a component's priority is based on its position
-(starting from 0).
-The component with the biggest priority is used by the
+(starting from 0 to 255).
+The component with the biggest priority (the lowest number) is used by the
 .Cm prefer
 balance algorithm
 and is also used as a master component when resynchronization is needed,

--Boundary-00=_1k8nKwVXxDS7SoY--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909031548.37887.mel.flynn%2Bfbsd.fs>