From owner-freebsd-stable@FreeBSD.ORG Thu Jan 13 19:02:29 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 7ABC11065697 for ; Thu, 13 Jan 2011 19:02:29 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 339288FC1B for ; Thu, 13 Jan 2011 19:02:28 +0000 (UTC) Received: by gyf3 with SMTP id 3so834631gyf.13 for ; Thu, 13 Jan 2011 11:02:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=kVw1OFJi8lSHTdGeoU44mz3eOBxU4/T6Nb8KwbnxKyw=; b=K8w4ScFr8HLss0xYo84Kwdu5BZnxUDo9amD8qC6Gx+ZUBTVH+Ovgf/bEt09u+xvOkO RHoOl+hvsA3QkXyMvJfy9SngRmWB+Vb0wNMQYRPtoHlzdiwPfOjii7eTaqlVLoq2lMR5 EYRUmaCwxObznVPYTVs0tN8q7ws2PklwECbfw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=V+5wLda0HZ21uAH1U3IXmPyYMJoK+GXfYsYEciupZYwXu3diwZrQ5+Sr9f9Y+VBsk4 1NFoV+vFoCOFopPjzj6s0C+aatlsXydNlOF5gvCpcx/Q3SfsiPNv3sKSRO3+O4bNKbCn 9BcKc2x++cHrfyp6OpHFmsTNiaO8NgB04vvUE= MIME-Version: 1.0 Received: by 10.90.115.5 with SMTP id n5mr600agc.199.1294945347010; Thu, 13 Jan 2011 11:02:27 -0800 (PST) Received: by 10.90.153.20 with HTTP; Thu, 13 Jan 2011 11:02:26 -0800 (PST) In-Reply-To: <4D2F1534.7010500@acm.poly.edu> 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> <4D2F1534.7010500@acm.poly.edu> Date: Thu, 13 Jan 2011 11:02:26 -0800 Message-ID: From: Freddie Cash To: Boris Kochergin Content-Type: text/plain; charset=UTF-8 Cc: Alexander Leidinger , 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 19:02:29 -0000 On Thu, Jan 13, 2011 at 7:07 AM, Boris Kochergin wrote: > 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 PC-BSD has the following additions to their /etc/devd.conf file: # Sample ZFS problem reports handling. notify 10 { match "system" "ZFS"; match "type" "zpool"; action "logger -p kern.err 'ZFS: failed to load zpool $pool'"; }; notify 10 { match "system" "ZFS"; match "type" "vdev"; action "logger -p kern.err 'ZFS: vdev failure, zpool=$pool type=$type'"; }; notify 10 { match "system" "ZFS"; match "type" "data"; action "logger -p kern.warn 'ZFS: zpool I/O failure, zpool=$pool error=$zio_err'"; }; notify 10 { match "system" "ZFS"; match "type" "io"; action "logger -p kern.warn 'ZFS: vdev I/O failure, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size error=$zio_err'"; }; notify 10 { match "system" "ZFS"; match "type" "checksum"; action "logger -p kern.warn 'ZFS: checksum mismatch, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size'"; }; So it's very (relatively) easy to configure devd to do this. We just need some scripts to plug into the action lines above. :) -- Freddie Cash fjwcash@gmail.com