From owner-freebsd-stable@FreeBSD.ORG Mon Jul 19 15:56:13 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 A2030106567D for ; Mon, 19 Jul 2010 15:56:13 +0000 (UTC) (envelope-from garrettmoore@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 591378FC18 for ; Mon, 19 Jul 2010 15:56:13 +0000 (UTC) Received: by gwb19 with SMTP id 19so2056644gwb.13 for ; Mon, 19 Jul 2010 08:56:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=4BgjzAXnuHUhnWcsvN8McYd9RFtl7v9EzG95ZXCAd0o=; b=uIzjC7Y5jxYHgBG63vL08wbv17rA7hnZo8aARIxnzMy34USxqhwReTpj8cwNgzgrDy f8ue+azMwRTOuA2O1DpPhXbnrM4h3RL7UGLCDDabmiLfshhxJKmSXr3vC7rg8Wrl8bUP sHPzk3T5k6/oIkD/46Q6X+s2UPveCGeHCK98w= 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=nJnVaeHmBKncixxB4Tw2eyN59/Cin/3LroMLwB490QyZ+BcWksrcKLI6xqZe8+Oh/K hpSgftSSsetIw2cpa9Zz0MdJcDLgDGT6H+Bob4+7qHsMNMOQv24PnZniJI0OAh2RBDYu imaus052CA/uUsEyjgnEJmPTm3S0SrpLcb85c= MIME-Version: 1.0 Received: by 10.150.69.36 with SMTP id r36mr4791806yba.123.1279554972572; Mon, 19 Jul 2010 08:56:12 -0700 (PDT) Received: by 10.231.117.72 with HTTP; Mon, 19 Jul 2010 08:56:12 -0700 (PDT) In-Reply-To: References: Date: Mon, 19 Jul 2010 11:56:12 -0400 Message-ID: From: Garrett Moore To: Freddie Cash Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-stable 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 15:56:13 -0000 So you think it's because when I switch from the old disk to the new disk, ZFS doesn't realize the disk has changed, and thinks the data is just corrupt now? Even if that happens, shouldn't the pool still be available, since it's RAIDZ1 and only one disk has gone away? I don't have / on ZFS; I'm only using it as a 'data' partition, so I should be able to try your suggestion. My only concern: is there any risk of trashing my pool if I try your instructions? Everything I've done so far, even when told "insufficient replicas / corrupt data", has not cost me any data as long as I switch back to the original (dying) drive. If I mix in export/import statements which might 'touch' the pool, is there a chance it will choke and trash my data? On Mon, Jul 19, 2010 at 11:45 AM, Freddie Cash wrote: > On Mon, Jul 19, 2010 at 8:21 AM, Garrett Moore > wrote: > > I have an 8-drive ZFS array consisting of WD15EADS drives. One of my > disks > > has started to fail, so I got a replacement disk. I have replaced a disk > > before by: > > > > zpool offline tank /dev/da5 > > shutting down, swapping from old disk to new disk > > booting > > zpool replace tank /dev/da5 > > > > This worked fine. > > > > This time the failing disk was da3, and I tried the same thing: > > zpool offline tank /dev/da3 > > zpool status showed da3 offline. > > shut down, swapped old disk to new disk. > > For some reason, ZFS is getting confused by the device names, possibly > due to the controller renumbering device nodes? > > Try the following: > zpool offline tank /dev/da3 > zpool status tank to make sure it offlined > the correct drive > zpool export tank might have to do this > from single-user mode > reboot > > zpool import tank this forces ZFS to > re-taste each drive to read the metadata > zpool replace tank /dev/da3 this should force it to use > the correct drive > > Note: if you have / on ZFS, the above may not be doable. > > -- > Freddie Cash > fjwcash@gmail.com > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >