From owner-freebsd-stable@FreeBSD.ORG Mon Jul 19 20:33:18 2010 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 EC3DA106564A for ; Mon, 19 Jul 2010 20:33:18 +0000 (UTC) (envelope-from hirez@libeljournal.com) Received: from v-smtp-auth-relay-2.gradwell.net (v-smtp-auth-relay-2.gradwell.net [79.135.125.41]) by mx1.freebsd.org (Postfix) with ESMTP id 545658FC1D for ; Mon, 19 Jul 2010 20:33:17 +0000 (UTC) Received: from cpc2-chap5-0-0-cust256.aztw.cable.virginmedia.com ([77.103.165.1] helo=propellor.libeljournal.com country=GB ident=hirez) by v-smtp-auth-relay-2.gradwell.net with esmtpa (Gradwell gwh-smtpd 1.290) id 4c44b10e.5557.1e for freebsd-stable@freebsd.org; Mon, 19 Jul 2010 21:09:50 +0100 (envelope-sender ) Received: from localhost (localhost [127.0.0.1]) by propellor.libeljournal.com (Postfix) with ESMTP id EA0A81709E for ; Mon, 19 Jul 2010 21:09:49 +0100 (BST) X-Virus-Scanned: amavisd-new at libeljournal.com Received: from propellor.libeljournal.com ([127.0.0.1]) by localhost (propellor.libeljournal.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c88V6Z+DXeqK for ; Mon, 19 Jul 2010 21:09:46 +0100 (BST) Received: from [172.16.0.10] (twister.libeljournal.com [172.16.0.10]) by propellor.libeljournal.com (Postfix) with ESMTPA id BF3301707B for ; Mon, 19 Jul 2010 21:09:46 +0100 (BST) Message-ID: <4C44B104.2050000@libeljournal.com> Date: Mon, 19 Jul 2010 21:09:40 +0100 From: John Hawkes-Reed User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1 MIME-Version: 1.0 To: freebsd-stable References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Problems replacing failing drive in ZFS pool 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: Mon, 19 Jul 2010 20:33:19 -0000 On 19/07/2010 17:52, Garrett Moore wrote: > I'm nervous to trust the hotswap features and camcontrol to set things up > properly, but I guess I could try it. When I first set the system up before > I put data on the array I tried the hotswap functionality and drives > wouldn't always re-attach when reinserted, even if I fiddled with > camcontrol, but I can't remember exactly what I did then. We've a pair of medium-sized ZFS boxes with Supermicro boards (X8DTi, IIRC) in hotswap chassis. They've both got one hot-spare drive. Well, I say 'hot spare'. I mean 'Ought to be a hot-spare if my shoddy Perl works when triggered by devd'. What we've found to work is this: Drive fails (thus far simulated by pulling the drive from the backplane) ZFS error reported. Pool in degraded state. 'zpool replace pool da9 da23' (Where da23 is the hot spare and where this *should* happen automagically.) Wait for resilvering. Go on and swap the failed drive (da9 in this case) 'camcontrol rescan all' (new drive shows up in /var/log/messages) 'zpool replace da9' Wait while resilvering happens. Hot-swap drive returns to 'avail' status. [ ... ] -- JH-R