From owner-freebsd-fs@FreeBSD.ORG Tue Aug 24 21:00:51 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 239E41065674 for ; Tue, 24 Aug 2010 21:00:51 +0000 (UTC) (envelope-from freebsd-fs@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 3D4BE8FC1D for ; Tue, 24 Aug 2010 21:00:48 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Oo0bt-0004gs-Bk for freebsd-fs@freebsd.org; Tue, 24 Aug 2010 23:00:45 +0200 Received: from 193.33.173.33 ([193.33.173.33]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Aug 2010 23:00:45 +0200 Received: from c.kworr by 193.33.173.33 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Aug 2010 23:00:45 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-fs@freebsd.org From: Volodymyr Kostyrko Date: Wed, 25 Aug 2010 00:00:33 +0300 Lines: 36 Message-ID: References: <4C73DED0.7070308@darkbsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 193.33.173.33 User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; uk-UA; rv:1.9.2.8) Gecko/20100807 Thunderbird/3.1.2 In-Reply-To: <4C73DED0.7070308@darkbsd.org> Subject: Re: A way to alter ZFS metadata stored on a drive ? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2010 21:00:51 -0000 24.08.2010 18:01, DarkSoul wrote: > I now can't detach/remove/replace the following drive because "no valid > replicas" or because you "can't replace a replacing drive". > > I gather the problem would be solved if I had a drive with the proper > ZDB information and GUID to fool the pool, but I am clueless as to how > to generate this information, and it doesn't seem from what the manpage > says, that zdb allows you to modify this information. Maybe. > Either that, or find a way to remove these bogus devices, or have the > pool "forget" that it must replace a device that does not exist anymore, > with a device that does not exist anymore. > > I would gladly welcome any clue as to how the ZDB metadata work and are > stored on the disk, as I can't find written specifications short of > probing the ZFS code itself. > > I can provide any information required, such as the first 512K for each > drive (containing the ZDB copies). > > Thanks in advance for any help. http://hub.opensolaris.org/bin/download/Community+Group+zfs/docs/ondiskformat0822.pdf If you are familiar with python you can use this one: http://code.google.com/p/zfs-recover It's a sample python script that's trying to read ZFS from disk. I going to commit nvlists unwinding in two days or so. -- Sphinx of black quartz judge my vow.