From owner-freebsd-stable@FreeBSD.ORG Mon Jun 29 14:49:04 2009 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 709021065675 for ; Mon, 29 Jun 2009 14:49:04 +0000 (UTC) (envelope-from marius@nuenneri.ch) Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com [209.85.218.216]) by mx1.freebsd.org (Postfix) with ESMTP id DD9BC8FC12 for ; Mon, 29 Jun 2009 14:49:03 +0000 (UTC) (envelope-from marius@nuenneri.ch) Received: by bwz12 with SMTP id 12so384177bwz.43 for ; Mon, 29 Jun 2009 07:49:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.131.18 with SMTP id i18mr4128886mun.107.1246286942069; Mon, 29 Jun 2009 07:49:02 -0700 (PDT) In-Reply-To: References: <20090629094359.GB24054@hugo10.ka.punkt.de> <20090629114610.GA28731@hugo10.ka.punkt.de> <20090629141437.GD31011@hugo10.ka.punkt.de> Date: Mon, 29 Jun 2009 16:49:01 +0200 Message-ID: From: =?ISO-8859-1?Q?Marius_N=FCnnerich?= To: "Patrick M. Hausen" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Stable Mailing List Subject: Re: Zpool on raw disk and weird GEOM complaint 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: Mon, 29 Jun 2009 14:49:04 -0000 On Mon, Jun 29, 2009 at 16:41, Marius N=FCnnerich wrote= : > On Mon, Jun 29, 2009 at 16:14, Patrick M. Hausen wrote: >> Hi! >> >> On Mon, Jun 29, 2009 at 03:38:51PM +0200, Marius N=FCnnerich wrote: >> >>> I'm sorry, it should have said: >>> dd if=3D/dev/da0 count=3D4 | hd >> >> 00000000 =A000 00 00 00 00 00 00 00 =A000 00 00 00 00 00 00 00 =A0|.....= ...........| >> * >> 000001b0 =A000 00 00 00 00 00 00 00 =A000 00 00 00 00 00 00 ff =A0|.....= ...........| >> 000001c0 =A0ff ff ee ff ff ff 01 00 =A000 00 ff ff ff ff 00 00 =A0|.....= ...........| >> 000001d0 =A000 00 00 00 00 00 00 00 =A000 00 00 00 00 00 00 00 =A0|.....= ...........| >> * >> 000001f0 =A000 00 00 00 00 00 00 00 =A000 00 00 00 00 00 55 aa =A0|.....= .........U.| >> 00000200 =A045 46 49 20 50 41 52 54 =A000 00 01 00 5c 00 00 00 =A0|EFI P= ART....\...| >> 00000210 =A02d e8 5e 91 00 00 00 00 =A001 00 00 00 00 00 00 00 =A0|-.^..= ...........| >> 00000220 =A0ff ff 3f d1 01 00 00 00 =A022 00 00 00 00 00 00 00 =A0|..?..= ...".......| >> 00000230 =A0de ff 3f d1 01 00 00 00 =A047 b5 79 82 96 d5 dc 11 =A0|..?..= ...G.y.....| >> 00000240 =A0be 97 00 0a e4 85 78 5e =A002 00 00 00 00 00 00 00 =A0|.....= .x^........| >> 00000250 =A080 00 00 00 80 00 00 00 =A03e 0b 98 53 00 00 00 00 =A0|.....= ...>..S....| >> 00000260 =A000 00 00 00 00 00 00 00 =A000 00 00 00 00 00 00 00 =A0|.....= ...........| >> * >> 00000400 =A0b6 7c 6e 51 cf 6e d6 11 =A08f f8 00 02 2d 09 71 2b =A0|.|nQ.= n......-.q+| >> 00000410 =A016 b6 79 82 96 d5 dc 11 =A0be 97 00 0a e4 85 78 5e =A0|..y..= .........x^| >> 00000420 =A022 00 00 00 00 00 00 00 =A0de ff 3f d1 01 00 00 00 =A0|"....= .....?.....| >> 00000430 =A000 00 00 00 00 00 00 00 =A000 00 00 00 00 00 00 00 =A0|.....= ...........| >> * >> 00000490 =A026 b6 79 82 96 d5 dc 11 =A0be 97 00 0a e4 85 78 5e =A0|&.y..= .........x^| >> 000004a0 =A000 00 00 00 00 00 00 00 =A000 00 00 00 00 00 00 00 =A0|.....= ...........| >> * >> 00000510 =A037 b6 79 82 96 d5 dc 11 =A0be 97 00 0a e4 85 78 5e =A0|7.y..= .........x^| >> 00000520 =A000 00 00 00 00 00 00 00 =A000 00 00 00 00 00 00 00 =A0|.....= ...........| >> * >> 00000590 =A048 b6 79 82 96 d5 dc 11 =A0be 97 00 0a e4 85 78 5e =A0|H.y..= .........x^| >> 000005a0 =A000 00 00 00 00 00 00 00 =A000 00 00 00 00 00 00 00 =A0|.....= ...........| >> * >> 00000610 =A059 b6 79 82 96 d5 dc 11 =A0be 97 00 0a e4 85 78 5e =A0|Y.y..= .........x^| >> 00000620 =A000 00 00 00 00 00 00 00 =A000 00 00 00 00 00 00 00 =A0|.....= ...........| >> * >> 00000690 =A06a b6 79 82 96 d5 dc 11 =A0be 97 00 0a e4 85 78 5e =A0|j.y..= .........x^| >> 000006a0 =A000 00 00 00 00 00 00 00 =A000 00 00 00 00 00 00 00 =A0|.....= ...........| >> * >> 00000710 =A07a b6 79 82 96 d5 dc 11 =A0be 97 00 0a e4 85 78 5e =A0|z.y..= .........x^| >> 00000720 =A000 00 00 00 00 00 00 00 =A000 00 00 00 00 00 00 00 =A0|.....= ...........| >> * >> 00000790 =A08b b6 79 82 96 d5 dc 11 =A0be 97 00 0a e4 85 78 5e =A0|..y..= .........x^| >> 000007a0 =A000 00 00 00 00 00 00 00 =A000 00 00 00 00 00 00 00 =A0|.....= ...........| > > OK, there is the GPT signature which reads "EFI PART" at offset 0x200. > What was on the disk before? > I think it should look different. There is a document from sun which > explains the ZFS ondisk format and and I don't remember it to look > like a MBR and GPT ;) Sorry, I don't have the time right now to dig > through it. Found it quickly. Here is the document: http://opensolaris.org/os/community/zfs/docs/ondiskformat0822.pdf See section 1.3.1. ZFS is not cleaning the first 8KB of the raw device so GEOM_PART will taste it and it looks like a broken GPT to it. For future constructions of zpool's one should zero the first few sectors of a device. For your specific I would make a tested backup and then zero the first 1KB of da0. But beware that it's dangerous! Don't blame me if you lose data or hair!