From owner-freebsd-questions@FreeBSD.ORG  Mon Feb 13 19:25:04 2012
Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
Delivered-To: freebsd-questions@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B42DD106564A
	for <freebsd-questions@freebsd.org>;
	Mon, 13 Feb 2012 19:25:04 +0000 (UTC) (envelope-from DStaal@usa.net)
Received: from mail.magehandbook.com
	(173-8-4-45-WashingtonDC.hfc.comcastbusiness.net [173.8.4.45])
	by mx1.freebsd.org (Postfix) with ESMTP id 849948FC13
	for <freebsd-questions@freebsd.org>;
	Mon, 13 Feb 2012 19:25:03 +0000 (UTC)
Received: from www.magehandbook.com (unknown [192.168.1.100])
	by mail.magehandbook.com (Postfix) with ESMTP id 3TmxfQ6tB2z90
	for <freebsd-questions@freebsd.org>;
	Mon, 13 Feb 2012 14:25:02 -0500 (EST)
Received: from 152.121.16.252 (SquirrelMail authenticated user daniel)
	by www.magehandbook.com with HTTP; Mon, 13 Feb 2012 14:25:03 -0500
Message-ID: <4a62131a3c6a241b0fdcf3cd9061b6c4.squirrel@www.magehandbook.com>
In-Reply-To: <4F393AF8.4060003@bullseye.tv>
References: <4F393AF8.4060003@bullseye.tv>
Date: Mon, 13 Feb 2012 14:25:03 -0500
From: "Daniel Staal" <DStaal@usa.net>
To: freebsd-questions@freebsd.org
User-Agent: SquirrelMail/1.4.22
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
Importance: Normal
Subject: Re: vdevs in zpool spereated, unable to import
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
	<mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions>
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
	<mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Feb 2012 19:25:04 -0000


On Mon, February 13, 2012 11:31 am, Adam Coates wrote:
> More insight into my tomfoolery: I think the "different hostnames" issue
> may be because of my ignorance. If you can't tell I'm fairly new to zfs,
> and even newer to the revelation of zpools (I've been using one for over
> a year but had no idea, I wasn't the one who set it up). When I had
> finished the fresh os install I was originally trying to /mount/ the
> drives. I know I was running into an error of:
>
> "/dev/da0 is part of active pool 'tank'"
>
> with a suggestion that the mount could only proceed with the "-f"
> argument. I can't recall what exactly I did, but I may have tried to
> force a mount of da0 to /tank in pool "tank". This would make sense why
> I now can't import the original pool tank, and why there is a destroyed
> pool tank. Since these were raidz, is there any chance of recovering
> from my error?

You may have done some major damage, but things to try (in my thoughts on
order):

zpool import -f <id from /dev/da0>

That's trying to import by the numeric id, not the name.  At the very
least, you should get a different error message.  (You may need the -D as
well.)

zpool import -D -f -d /dev/da0 -d /dev/da1

Now we're trying to import destroyed pools, and looking at both drives
explicitly for data.

The next is a bit of hail mary, and if anyone else has a good idea, I'd
try that first...:  You can try mounting /dev/da1 like you did /dev/da0,
and *then* trying to import.  Basically, at that point you are trying to
get them both messed up the same way.

Since these were raidz: Where's the third disk?  If you have two of the
raidz disks, you should be able to rebuild the third.  (It's *possible*,
it appears, to run a raidz with two disks, but you don't get any benefits
over mirroring, and you complicate recovery - a mirror in this situation
would be directly usable.  In theory a two-disk raidz should be
recoverable from one disk, I think, but it may not have been well-tested.)

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------