Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 Apr 2013 19:03:35 +0300
From:      Volodymyr Kostyrko <c.kworr@gmail.com>
To:        Beeblebrox <zaphod@berentweb.com>, freebsd-questions@freebsd.org
Subject:   Re: [ZFS] recover destroyed zpool - what are the available options?
Message-ID:  <515DA457.4000409@gmail.com>
In-Reply-To: <1365090630957-5801568.post@n5.nabble.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?515DA457.4000409>