Date: Tue, 6 Jul 2004 11:48:10 -0700 From: John-Mark Gurney <gurney_j@resnet.uoregon.edu> To: Pawel Jakub Dawidek <pjd@FreeBSD.org> Cc: geom@FreeBSD.org Subject: Re: GEOM and retaste. Message-ID: <20040706184810.GQ57659@funkthat.com> In-Reply-To: <20040706181325.GM12007@darkness.comp.waw.pl> References: <20040706113242.GK12007@darkness.comp.waw.pl> <20040706175554.GP57659@funkthat.com> <20040706181325.GM12007@darkness.comp.waw.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
Pawel Jakub Dawidek wrote this message on Tue, Jul 06, 2004 at 20:13 +0200: > On Tue, Jul 06, 2004 at 10:55:54AM -0700, John-Mark Gurney wrote: > +> Pawel Jakub Dawidek wrote this message on Tue, Jul 06, 2004 at 13:32 +0200: > +> > I'm still fighting with 'stop' command for geom_mirror class. > +> > It should works, just like in my other class: turn off the given > +> > geom/provider/device. > +> > But for geom_mirror, I need to open all disks with r1w1e1 perms, > +> > so when I call 'stop' command and I close those disks, they are > +> > retasted and mirror is created once again. > +> > I don't want to touch metadata to mark all disks as inactve, because > +> > after kld module is unloaded and loaded again I want this mirror > +> > to be setup automatically. > +> > > +> > Any ideas? > +> > +> Add state to the geom_mirror class to know what mirrors are disabled... > +> then when they appear, you just ignore them... and make sure the > +> memory used by the state table is destroyed upon unload... and then > +> reload, they'll be back... > > Imagine that box have few years of uptime and there were many mirrors > enabled/disabled... Well, when you enable a mirror, you just delete the entry... and I can't imagine a box that you attached 100's of mirrors to it... You could time out entries, but that would be against POLA... > +> I can't think of any other way since geom itself doesn't know enough > +> information about the class to prevent you from tasting the devices > +> (and possibly coming up with only part of the mirror)... > > But it does know that I was the one who made the last close of provider > (then retaste event is send) and it could pass some flag to taste > function to tell me about it. And it could be argued, that even if someone else opened and closed it, you still want it disabled if you support that... and then you wouldn't get said flag the second time around.... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040706184810.GQ57659>