From owner-freebsd-stable@FreeBSD.ORG Thu Jan 13 15:07:28 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E9141065673 for ; Thu, 13 Jan 2011 15:07:28 +0000 (UTC) (envelope-from spawk@acm.poly.edu) Received: from acm.poly.edu (acm.poly.edu [128.238.9.200]) by mx1.freebsd.org (Postfix) with ESMTP id 9D0E28FC17 for ; Thu, 13 Jan 2011 15:07:27 +0000 (UTC) Received: (qmail 6891 invoked from network); 13 Jan 2011 15:07:26 -0000 Received: from unknown (HELO ?10.0.0.179?) (spawk@128.238.64.31) by acm.poly.edu with CAMELLIA256-SHA encrypted SMTP; 13 Jan 2011 15:07:26 -0000 Message-ID: <4D2F1534.7010500@acm.poly.edu> Date: Thu, 13 Jan 2011 10:07:32 -0500 From: Boris Kochergin User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.12) Gecko/20101106 Thunderbird/3.1.6 MIME-Version: 1.0 To: Alexander Leidinger References: <4D228F41.7040403@langille.org> <4D23504D.8060103@libeljournal.com> <4D2BD0A7.9060003@langille.org> <4D2C810E.2070007@libeljournal.com> <4D2E4C61.80407@acm.poly.edu> <20110113154249.12101reh2to1rqe8@webmail.leidinger.net> In-Reply-To: <20110113154249.12101reh2to1rqe8@webmail.leidinger.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable , Chris Forgeron Subject: Re: ZFS - hot spares : automatic or not? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2011 15:07:28 -0000 On 01/13/11 09:42, Alexander Leidinger wrote: > Quoting Boris Kochergin (from Wed, 12 Jan 2011 > 19:50:41 -0500): > >> On 01/12/11 19:32, Chris Forgeron wrote: > >>> Solaris runs a separate process called Fault Management Daemon (fmd) >>> that looks to handle this logic - This means that it's really not >>> inside the ZFS code to handle this, and FreeBSD would need something >>> similar, hopefully less kludgy than a user script. >>> >>> I wonder if anyone has been eyeing the fma code in the cddl with a >>> thought for porting it - It looks to be a really neat bit of code - >>> I'm still quite new with it, having only been working with Solaris >>> the last few months. > > It depends upon a lot of standardized kernel notifications. Basically > (big picture view) it is the same as our devd (reacting to events) > with some logig what to do with it (which we can do without our devd > too). > >> Would the people with custom hot-spare scripts, or nothing automated >> at all, be content if the sysutils/geomWatch program grew support for >> hot spares in a future version? I already became somewhat familiar >> with the userland ZFS API when I added ZFS support to it. > > I had a look at geomWatch and it seems it is polling based. For > something like zfs hotspare replacement you normally want to have the > reaction event based (= devd). I even go further and think that things > which geomWatch is doing, should be done with devd (may it be > directly, or by delegating some events via a non-existing-yet > interface (which could be even script driven) to another daemon). It > may be that this would need some more events to be produced by > different geom parts. > > IMO it would be great if those people with hotspare-scripts would > publish them. This way a joined effort could be initiated to come up > with some generic way of handling this which could be included in the > base system. > > Bye, > Alexander. > Did a little research. In at least the ZFS case, it appears that events are available through devctl(4) and are therefore accessible through devd: http://2007.asiabsdcon.org/papers/P16-paper.pdf - section 3.7 -Boris