From owner-freebsd-questions@FreeBSD.ORG Thu Apr 4 16:03:44 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 59364D5 for ; Thu, 4 Apr 2013 16:03:44 +0000 (UTC) (envelope-from c.kworr@gmail.com) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com [209.85.217.170]) by mx1.freebsd.org (Postfix) with ESMTP id D38EED4F for ; Thu, 4 Apr 2013 16:03:43 +0000 (UTC) Received: by mail-lb0-f170.google.com with SMTP id x11so2890836lbi.1 for ; Thu, 04 Apr 2013 09:03:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=gqDi1Bdm3umj1Tu8nIw0zOn1Vmzftwse6G6pmTc6Kgc=; b=Db6SN/lOt8Hs0Sf3Uh3+TE0CQlHY5hw5YIHVBSv0AGu2bVCvG1eXsQaHjiCEHDQ8Lv lJU8mgKn2XsGailefuQKM6QJbBKMkUfqG/vdKwMkKhvQSPYrNtXU9OA+6eRfs2pCdefI Z6YOOuSR1KfkRNfvQ3v2EuXPFfHGVbu3VvEXk3Zmif9z1Y6KVpzfa8nCdlrPd+SeQOGC x8rgpNaywFlcpipO3wxno3fCoOaK/JrFelO5/wQ65GKT/SBs+7Kj2rNtaekfPBTQ1ztw 242d4OMwpvfS62Pgy/gkApkAJaRwqbg9N7qW6W3U7NJQloL4S8vM5ndWqXwFBNDj8RQp Jokg== X-Received: by 10.112.129.2 with SMTP id ns2mr3894572lbb.53.1365091416959; Thu, 04 Apr 2013 09:03:36 -0700 (PDT) Received: from [192.168.1.128] ([91.196.229.122]) by mx.google.com with ESMTPS id c7sm4170481lbe.6.2013.04.04.09.03.35 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 04 Apr 2013 09:03:36 -0700 (PDT) Message-ID: <515DA457.4000409@gmail.com> Date: Thu, 04 Apr 2013 19:03:35 +0300 From: Volodymyr Kostyrko User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:20.0) Gecko/20100101 Firefox/20.0 SeaMonkey/2.17 MIME-Version: 1.0 To: Beeblebrox , freebsd-questions@freebsd.org Subject: Re: [ZFS] recover destroyed zpool - what are the available options? References: <1364711810171-5800299.post@n5.nabble.com> <1365002276096-5801335.post@n5.nabble.com> <515C4B14.80300@gmail.com> <1365004246715-5801356.post@n5.nabble.com> <1365087055.99393.YahooMailRC@web184303.mail.ne1.yahoo.com> <1365090630957-5801568.post@n5.nabble.com> In-Reply-To: <1365090630957-5801568.post@n5.nabble.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Apr 2013 16:03:44 -0000 2013-04-04 18:50, Beeblebrox wrote: > Hi Mark. > >>> What does "gpart show" return? > => 34 625142381 ada0 GPT (298G) > 34 62914560 1 freebsd-zfs (30G) > 62914594 562227821 2 freebsd-zfs (268G) > >>> Are all the pool members there and working? > Yes - ada0p2 is the ONLY pool member. > >>> My guess is that one member is missing or a mbr is bad. > After 'zpool destroy', I also deleted the partition before realising my > mistake, I tried to recover the partition table with testdisk, but this was > not successful. Next I created a new GPT table and the 2 partitions at the > original size as I recalled them - so ada0p1 and ada0p2 have been > re-created. > > I just realized a problem: gpart show -r => > 62914594 562227821 2 516e7cba-6ecf-11d6-8ff8-00022d09712b (268G) > The guid (?) that ZFS is looking for is most likely wrong. I need to find > the ID that ZFS is looking for and change the ID of ada0p2 to that number - > am I correct? ZFS operates on metadata. If ZFS can clearly see one side of the partition it would see it all, you can try reconstruct partitions taking in account data obtained from zdb. And again - when you obtained correct zdb data ZFS was available. Maybe or maybe the slice was too small... Oh hey, you uzed `zdb -C`, testing what local machine knows about the pool. When recreating partitions test them with `zdb -l device`. When the output would be correct - you guessed your slice! -- Sphinx of black quartz, judge my vow.