From owner-freebsd-stable@FreeBSD.ORG Sun Jul 25 21:01:08 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 B6E73106566B; Sun, 25 Jul 2010 21:01:08 +0000 (UTC) (envelope-from dan@langille.org) Received: from nyi.unixathome.org (nyi.unixathome.org [64.147.113.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8EDA18FC0A; Sun, 25 Jul 2010 21:01:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by nyi.unixathome.org (Postfix) with ESMTP id D13045093D; Sun, 25 Jul 2010 22:01:07 +0100 (BST) X-Virus-Scanned: amavisd-new at unixathome.org Received: from nyi.unixathome.org ([127.0.0.1]) by localhost (nyi.unixathome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eRCrhi8TKmnp; Sun, 25 Jul 2010 22:01:07 +0100 (BST) Received: from smtp-auth.unixathome.org (smtp-auth.unixathome.org [10.4.7.7]) (Authenticated sender: hidden) by nyi.unixathome.org (Postfix) with ESMTPSA id 108275089E ; Sun, 25 Jul 2010 22:01:07 +0100 (BST) Message-ID: <4C4CA608.9080803@langille.org> Date: Sun, 25 Jul 2010 17:00:56 -0400 From: Dan Langille Organization: The FreeBSD Diary User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1 MIME-Version: 1.0 To: Volodymyr Kostyrko References: <4C4C7B4A.7010003@langille.org> <4C4CA375.2030906@gmail.com> In-Reply-To: <4C4CA375.2030906@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: stable@freebsd.org, freebsd-stable@freebsd.org Subject: Re: zpool destroy causes panic 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: Sun, 25 Jul 2010 21:01:08 -0000 On 7/25/2010 4:49 PM, Volodymyr Kostyrko wrote: > 25.07.2010 20:58, Dan Langille wrote: >> NAME STATE READ WRITE CKSUM >> storage ONLINE 0 0 0 >> raidz2 ONLINE 0 0 0 >> gpt/disk01 ONLINE 0 0 0 >> gpt/disk02 ONLINE 0 0 0 >> gpt/disk03 ONLINE 0 0 0 >> gpt/disk04 ONLINE 0 0 0 >> gpt/disk05 ONLINE 0 0 0 >> /tmp/sparsefile1.img UNAVAIL 0 0 0 corrupted data >> /tmp/sparsefile2.img UNAVAIL 0 0 0 corrupted data > > 0k, i'll try it from here. UNAVAIL means ZFS can't locate correct vdev > for this pool member. Even if this file exists it's not used by ZFS > because it lacks ZFS headers/footers. > > You can (I think so) reinsert empty file to the pool with: > > # zpool replace storage /tmp/sparsefile1.img /tmp/sparsefile1.img > > ^- pool ^- ZFS old vdev name ^- current file > > If you replace both files you can theoretically bring pool to fully > consistent state. > > Also you can use md to convert files to devices: > > # mdconfig -a -t vnode -f /tmp/sparsefile1.img > md0 > > And you can use md0 with your pool. FYI, tried this, got a panic: errors: No known data errors # mdconfig -a -t vnode -f /tmp/sparsefile1.img md0 # mdconfig -a -t vnode -f /tmp/sparsefile2.img md1 # zpool replace storage /tmp/sparsefile1.img /dev/md0 -- Dan Langille - http://langille.org/