From owner-freebsd-questions@FreeBSD.ORG Wed Jun 4 12:39:13 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2337274 for ; Wed, 4 Jun 2014 12:39:13 +0000 (UTC) Received: from smtpb.telissant.net (smtpb.telissant.net [199.233.230.156]) by mx1.freebsd.org (Postfix) with ESMTP id 7EE0B2D4F for ; Wed, 4 Jun 2014 12:39:12 +0000 (UTC) Received: from barrida.3dresearch.com (localhost [127.0.0.1]) by smtpb.telissant.net (Postfix) with ESMTP id EC31F273F2 for ; Wed, 4 Jun 2014 08:39:11 -0400 (EDT) X-Virus-Scanned: amavisd-new at telissant.net Received: from smtpb.telissant.net ([127.0.0.1]) by barrida.3dresearch.com (barrida.3dresearch.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tlMHeBKZ351T for ; Wed, 4 Jun 2014 08:38:53 -0400 (EDT) Received: from doncurzio.3dresearch.com (pool-71-112-8-6.pitbpa.east.verizon.net [71.112.8.6]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtpb.telissant.net (Postfix) with ESMTPSA id A5B89273C3 for ; Wed, 4 Jun 2014 08:38:53 -0400 (EDT) Received: from doncurzio.3dresearch.com (localhost [127.0.0.1]) by doncurzio.3dresearch.com (Postfix) with SMTP id 14E90A1E2C for ; Wed, 4 Jun 2014 08:38:53 -0400 (EDT) Date: Wed, 4 Jun 2014 08:38:47 -0400 From: Janos Dohanics To: FreeBSD Questions Subject: Re: zpool offline - no such device Message-Id: <20140604083847.ce10b00c6d2ac6e934965648@3dresearch.com> In-Reply-To: <9D00B0534C785E4CE751D6F7@[192.168.1.50]> References: <20140603104416.a13299f4a2bbdbdb36782dee@3dresearch.com> <9D00B0534C785E4CE751D6F7@[192.168.1.50]> X-Mailer: Sylpheed 3.3.0 (GTK+ 2.24.19; amd64-portbld-freebsd9.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 12:39:13 -0000 On Tue, 03 Jun 2014 17:55:46 -0400 Daniel Staal wrote: > --As of June 3, 2014 10:44:16 AM -0400, Janos Dohanics is alleged to > have said: > > > NAME STATE > > READ WRITE CKSUM > > vol1 DEGRADED 0 > > 0 0 raidz1-0 > > DEGRADED 0 0 0 > > gptid/e433f9c3-0545-11e1-812d-8c89a53220c1 ONLINE 0 0 0 > > gptid/e485eeba-0545-11e1-812d-8c89a53220c1 FAULTED > > 49 260 0 too many errors > > gptid/e4d8ee9d-0545-11e1-812d-8c89a53220c1 ONLINE 0 > > 0 0 > > > > errors: No known data errors > > > > From the output of "gpart list", > > gptid/e485eeba-0545-11e1-812d-8c89a53220c1 corresponds to ada1p2. > > > > So, using the example from the handbook, I tried: > > > ># zpool offline vol1 ada1 > > cannot offline ada1: no such device in pool > > > > Why is it that zpool doesn't know about the ada1 device? > > Because ada1 isn't in your pool - > 'gptid/e485eeba-0545-11e1-812d-8c89a53220c1' aka 'ada1p2' is. > > That is only one of the partitions of ada1 - there may be more. > (It's entirely possible that *all* of the devices in the zpool are on > ada1...) In fact there is likely at least one more: ada1p1. Thanks for your reply. > Before you do anything else, it's probably a good idea to figure out > exactly what is on that disk and how many partitions it has. Pulling > it out may not affect the zpool - but it may break other things in > your system, depending on what's on there. Here is what gpart says about ada1: # gpart show -p [...] => 34 1953525101 ada1 GPT (931G) 34 94 - free - (47k) 128 4194304 ada1p1 freebsd-swap (2.0G) 4194432 1949330696 ada1p2 freebsd-zfs (929G) 1953525128 7 - free - (3.5k) > > For the failing drive, "zdb" gives: > > > > guid: 16455153587833556178 > > > > Should I try "zpool offline vol1 [guid]"? > > I would try `zpool offline > gptid/e485eeba-0545-11e1-812d-8c89a53220c1` - that's what zfs calls > the disk. But I'm not entirely sure about it either > - it would be a lot easier if these partitions had gpt lables, which > I know work well with ZFS. > > > When I'm replacing the failing drive with a new one (in the same USB > > slot), can I expect "zpool replace vol1 ada1" to work? > > That should probably work - but remember the mention above of working > out what *else* is on that drive. This command would take the whole > disk for ZFS, and you may want to replace the other partitions of the > bad disk with something. > > Daniel T. Staal So, I should do gpart backup/restore first? -- Janos Dohanics