From owner-freebsd-fs@FreeBSD.ORG Tue Jan 3 16:27:22 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 634C01065675 for ; Tue, 3 Jan 2012 16:27:22 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta06.emeryville.ca.mail.comcast.net (qmta06.emeryville.ca.mail.comcast.net [76.96.30.56]) by mx1.freebsd.org (Postfix) with ESMTP id 31F8D8FC22 for ; Tue, 3 Jan 2012 16:27:21 +0000 (UTC) Received: from omta24.emeryville.ca.mail.comcast.net ([76.96.30.92]) by qmta06.emeryville.ca.mail.comcast.net with comcast id H3df1i0021zF43QA64TFPn; Tue, 03 Jan 2012 16:27:15 +0000 Received: from koitsu.dyndns.org ([67.180.84.87]) by omta24.emeryville.ca.mail.comcast.net with comcast id H5HN1i0111t3BNj8k5HPH8; Tue, 03 Jan 2012 17:17:23 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id AE3AB102C19; Tue, 3 Jan 2012 08:27:20 -0800 (PST) Date: Tue, 3 Jan 2012 08:27:20 -0800 From: Jeremy Chadwick To: Olivier Smedts Message-ID: <20120103162720.GA18750@icarus.home.lan> References: <4F031654.1080200@icritical.com> <4F031BF7.8000900@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-fs@freebsd.org Subject: Re: ZFS v28 on -STABLE not using hot spare X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2012 16:27:22 -0000 On Tue, Jan 03, 2012 at 04:27:29PM +0100, Olivier Smedts wrote: > 2012/1/3 Johan Hendriks : > > ZFS on FreeBSD does not have 'HOT' spares. > > They are cold, and human intervention is needed to replace a disk in a pool. > > There are some topics about it on the net. > > > > I opt for a warning, because a lot of users get a false security sence when > > using the spares. > > zpool should not accept the spare without a warning to the user that it is a > > cold spare and not a hot one. > > > > it looks like there is some work planned for a zfs deamon that should > > overcome this problem on FreeBSD > > > > http://svnweb.freebsd.org/base?view=revision&revision=222836 > > > > On Solaris there is also a deamon running that does the actual replace. > > > > It should not be to hard to make a script that checks every minute or what > > time interval you want and check if a pool is degraded, then check if > > autoreplace is set for the pool, if so check if there is a spare, if so do > > the actual replace. > > Unfortunally i can not code :( > > Maybe some one has a script lying around. ?? > > Or maybe some devd.conf lines to handle this automatically ? At this time I'd recommend against that -- such a script would have to parse "zpool status" output *very carefully*. The output format from "zpool status" has also changed over time (on both Solaris and FreeBSD), so this complicates matters further. autoreplace defaults to off on FreeBSD because the necessary code bits in the kernel aren't completed. If folks need spares to be utilised automatically, they should run Solaris or OpenIndiana/Illumos. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB |