Patch to allow gmirror to set priority of a disk

Pawel Jakub Dawidek pjd at FreeBSD.org
Thu Sep 3 13:57:45 UTC 2009


On Thu, Sep 03, 2009 at 03:48:37PM +0200, Mel Flynn wrote:
> On Thursday 03 September 2009 14:44:07 Pawel Jakub Dawidek wrote:
> > 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?

Yes, you are correct.

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

> 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,

Looks good.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20090903/9a6a06eb/attachment.pgp


More information about the freebsd-fs mailing list