From owner-freebsd-fs@FreeBSD.ORG Tue Aug 24 15:20:48 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 E31FC1065697 for ; Tue, 24 Aug 2010 15:20:47 +0000 (UTC) (envelope-from darksoul@darkbsd.org) Received: from quasar.darkbsd.org (shinigami.darkbsd.org [82.227.96.182]) by mx1.freebsd.org (Postfix) with ESMTP id 149988FC16 for ; Tue, 24 Aug 2010 15:20:46 +0000 (UTC) Received: from quasar.darkbsd.org (localhost [127.0.0.1]) by quasar.darkbsd.org (Postfix) with ESMTP id E2AC657A3 for ; Tue, 24 Aug 2010 17:01:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=darkbsd.org; h=message-id :date:from:mime-version:to:subject:content-type; s=selector1; bh=Nv+9b68rrUR8TQQWXw3FYcQ6l9A=; b=c7SziiLYy88y/NEd4wuB47nprtIb bHMZDGy0rrXmZR/Aqj2+j8mxf+gxAypjfX8NxHwGp1s1WSTE3c9nSJx1xxqPWcBM dOQO2aUAJSMb4lQXdtWYWm4QkQfu/bbOY3r+mIDFtVsJtGuc/2Z5TxrvEqCqLlbP m6hT7gioF1ICl6Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=darkbsd.org; h=message-id :date:from:mime-version:to:subject:content-type; q=dns; s= selector1; b=0Alow0yup6We1jgPdQvwkuJPEqhrzQFxU4dj9+iw0aKaTj+q+U9 8vERm9BWOkQsVPrsAiE5ekL3ED7P55TUXnzHkj5Ut0E19zPmRD44s+UlU5XuVZEA ZdJT9Hy2iwLobS+htVdhj3lP5rlnTkl1nMqcavUSvTlcWfIRK2DlYjjo= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=darkbsd.org; h= content-type:content-type:subject:subject:mime-version :user-agent:from:from:date:date:message-id:received:received; s= selector1; t=1282662095; bh=wDMXpnnuadncwAHAAlsr/5WDwt3ZenyWorUh FJTr7zg=; b=WATCkf7zWcpt4HUGPBRKYNkHR14Mq+BXYwTUa0kwIebKZHeX9bp6 E5avGnGxvEx9TyfiKWwF+OYsK+2DdbThrAMSAu93m/uPQsXUIEiefhWPThCvxAHK sX38e9XD9glj12D+UMIwbvkBH1H1TcWiH5ZfIhwDKNk5HgdQAhuBek4= Received: from quasar.darkbsd.org ([127.0.0.1]) by quasar.darkbsd.org (quasar.darkbsd.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id yf7G+4pxkdgM for ; Tue, 24 Aug 2010 17:01:35 +0200 (CEST) Received: from [192.168.3.42] (archer.yomi.darkbsd.org [192.168.3.42]) (Authenticated sender: darksoul) by quasar.darkbsd.org (Postfix) with ESMTPSA id 3AF4A579C for ; Tue, 24 Aug 2010 17:01:33 +0200 (CEST) Message-ID: <4C73DED0.7070308@darkbsd.org> Date: Wed, 25 Aug 2010 00:01:36 +0900 From: DarkSoul User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12pre) Gecko/20100809 Shredder/3.0.7pre MIME-Version: 1.0 To: freebsd-fs@freebsd.org X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigDA26B68AD8F6B040659463B4" Subject: 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 15:20:48 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDA26B68AD8F6B040659463B4 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, I currently am bumping against this bug : http://bugs.opensolaris.org/view_bug.do?bug_id=3D6782540 Long story short, I had a dead drive on my pool, I tried to replace it only to have the planned spare drive die on me. Which led to this : pool: prana state: DEGRADED scrub: none requested config: NAME STATE READ WRITE CKSUM prana DEGRADED 0 0 0 raidz1 ONLINE 0 0 0 ad16 ONLINE 0 0 0 ad30 ONLINE 0 0 0 ad28 ONLINE 0 0 0 ad18 ONLINE 0 0 0 ad14 ONLINE 0 0 0 raidz1 DEGRADED 0 0 0 ada2 ONLINE 0 0 0 ad4 ONLINE 0 0 0 ad6 ONLINE 0 0 0 ad8 ONLINE 0 0 0 replacing UNAVAIL 0 12.2K 0 insufficient replicas 16391273719868046777 UNAVAIL 0 14.5K 0 was /dev/ada3/ol= d 17286942469715238412 UNAVAIL 0 14.5K 0 was /dev/ada3 raidz1 ONLINE 0 0 0 ada3 ONLINE 0 0 0 ada1 ONLINE 0 0 0 ada0 ONLINE 0 0 0 ad32 ONLINE 0 0 0 ad34 ONLINE 0 0 0 cache ad12 ONLINE 0 0 0 ad37 ONLINE 0 0 0 Here is the zdb dump : prana version=3D14 name=3D'prana' state=3D0 txg=3D3789517 pool_guid=3D4093564297936254749 hostname=3D'' vdev_tree type=3D'root' id=3D0 guid=3D4093564297936254749 children[0] type=3D'raidz' id=3D0 guid=3D2955456027802876323 nparity=3D1 metaslab_array=3D14 metaslab_shift=3D36 ashift=3D9 asize=3D7501485178880 is_log=3D0 children[0] type=3D'disk' id=3D0 guid=3D14068763453858628066 path=3D'/dev/ad16' whole_disk=3D0 DTL=3D706 children[1] type=3D'disk' id=3D1 guid=3D3644994118268583474 path=3D'/dev/ad30' whole_disk=3D0 DTL=3D4152 children[2] type=3D'disk' id=3D2 guid=3D14192589917373989656 path=3D'/dev/ad28' whole_disk=3D0 DTL=3D93 children[3] type=3D'disk' id=3D3 guid=3D12279545963786751752 path=3D'/dev/ad18' whole_disk=3D0 DTL=3D380 children[4] type=3D'disk' id=3D4 guid=3D9980201723692421139 path=3D'/dev/ad14' whole_disk=3D0 DTL=3D647 children[1] type=3D'raidz' id=3D1 guid=3D1078755695237588414 nparity=3D1 metaslab_array=3D175 metaslab_shift=3D36 ashift=3D9 asize=3D7501485178880 is_log=3D0 children[0] type=3D'disk' id=3D0 guid=3D12900041001921590764 path=3D'/dev/ada2' whole_disk=3D0 DTL=3D4127 children[1] type=3D'disk' id=3D1 guid=3D7067019390683734240 path=3D'/dev/ad4' whole_disk=3D0 DTL=3D198 children[2] type=3D'disk' id=3D2 guid=3D783285185901703545 path=3D'/dev/ad6' whole_disk=3D0 DTL=3D197 children[3] type=3D'disk' id=3D3 guid=3D9688838378677189049 path=3D'/dev/ad8' whole_disk=3D0 DTL=3D196 children[4] type=3D'replacing' id=3D4 guid=3D500478404305589015 whole_disk=3D0 children[0] type=3D'disk' id=3D0 guid=3D16391273719868046777 path=3D'/dev/ada3/old' whole_disk=3D0 not_present=3D1 DTL=3D195 children[1] type=3D'disk' id=3D1 guid=3D17286942469715238412 path=3D'/dev/ada3' whole_disk=3D0 not_present=3D1 DTL=3D4146 children[2] type=3D'raidz' id=3D2 guid=3D4090878701271390479 nparity=3D1 metaslab_array=3D164 metaslab_shift=3D36 ashift=3D9 asize=3D7501485178880 is_log=3D0 children[0] type=3D'disk' id=3D0 guid=3D2581994749932752632 path=3D'/dev/ada3' whole_disk=3D0 DTL=3D394 children[1] type=3D'disk' id=3D1 guid=3D3261576559815570039 path=3D'/dev/ada1' whole_disk=3D0 DTL=3D393 children[2] type=3D'disk' id=3D2 guid=3D2403801851152895606 path=3D'/dev/ada0' whole_disk=3D0 DTL=3D4105 children[3] type=3D'disk' id=3D3 guid=3D5795813053837736090 path=3D'/dev/ad32' whole_disk=3D0 DTL=3D391 children[4] type=3D'disk' id=3D4 guid=3D4547118883658878725 path=3D'/dev/ad34' whole_disk=3D0 DTL=3D390 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. 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. --=20 Stephane LAPIE, EPITA SRS, Promo 2005 "Even when they have digital readouts, I can't understand them." --MegaTokyo --------------enigDA26B68AD8F6B040659463B4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxz3tYACgkQ24Ql8u6TF2OimACg9g8vHDCE1ndEp7SzB4y3v89O 2bwAoL1zVbjaeH44PLW1mfdVKkHROHDZ =PUe+ -----END PGP SIGNATURE----- --------------enigDA26B68AD8F6B040659463B4--