Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Jun 2009 16:49:01 +0200
From:      =?ISO-8859-1?Q?Marius_N=FCnnerich?= <marius@nuenneri.ch>
To:        "Patrick M. Hausen" <hausen@punkt.de>
Cc:        FreeBSD Stable Mailing List <freebsd-stable@freebsd.org>
Subject:   Re: Zpool on raw disk and weird GEOM complaint
Message-ID:  <b649e5e0906290749l657fe494xbf0cb3d19702d52f@mail.gmail.com>
In-Reply-To: <b649e5e0906290741h28dbaf1bwc05352a03c3b52aa@mail.gmail.com>
References:  <20090629094359.GB24054@hugo10.ka.punkt.de> <b649e5e0906290411n7b501affhfaec1cf1469073ff@mail.gmail.com> <20090629114610.GA28731@hugo10.ka.punkt.de> <b649e5e0906290638i5cf9f26en5e6a8dd9c43f2fb7@mail.gmail.com> <20090629141437.GD31011@hugo10.ka.punkt.de> <b649e5e0906290741h28dbaf1bwc05352a03c3b52aa@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Mon, Jun 29, 2009 at 16:41, Marius Nünnerich<marius@nuenneri.ch> wrote:
> On Mon, Jun 29, 2009 at 16:14, Patrick M. Hausen<hausen@punkt.de> wrote:
>> Hi!
>>
>> On Mon, Jun 29, 2009 at 03:38:51PM +0200, Marius Nünnerich wrote:
>>
>>> I'm sorry, it should have said:
>>> dd if=/dev/da0 count=4 | hd
>>
>> 00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> *
>> 000001b0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 ff  |................|
>> 000001c0  ff ff ee ff ff ff 01 00  00 00 ff ff ff ff 00 00  |................|
>> 000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> *
>> 000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
>> 00000200  45 46 49 20 50 41 52 54  00 00 01 00 5c 00 00 00  |EFI PART....\...|
>> 00000210  2d e8 5e 91 00 00 00 00  01 00 00 00 00 00 00 00  |-.^.............|
>> 00000220  ff ff 3f d1 01 00 00 00  22 00 00 00 00 00 00 00  |..?.....".......|
>> 00000230  de ff 3f d1 01 00 00 00  47 b5 79 82 96 d5 dc 11  |..?.....G.y.....|
>> 00000240  be 97 00 0a e4 85 78 5e  02 00 00 00 00 00 00 00  |......x^........|
>> 00000250  80 00 00 00 80 00 00 00  3e 0b 98 53 00 00 00 00  |........>..S....|
>> 00000260  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> *
>> 00000400  b6 7c 6e 51 cf 6e d6 11  8f f8 00 02 2d 09 71 2b  |.|nQ.n......-.q+|
>> 00000410  16 b6 79 82 96 d5 dc 11  be 97 00 0a e4 85 78 5e  |..y...........x^|
>> 00000420  22 00 00 00 00 00 00 00  de ff 3f d1 01 00 00 00  |".........?.....|
>> 00000430  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> *
>> 00000490  26 b6 79 82 96 d5 dc 11  be 97 00 0a e4 85 78 5e  |&.y...........x^|
>> 000004a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> *
>> 00000510  37 b6 79 82 96 d5 dc 11  be 97 00 0a e4 85 78 5e  |7.y...........x^|
>> 00000520  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> *
>> 00000590  48 b6 79 82 96 d5 dc 11  be 97 00 0a e4 85 78 5e  |H.y...........x^|
>> 000005a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> *
>> 00000610  59 b6 79 82 96 d5 dc 11  be 97 00 0a e4 85 78 5e  |Y.y...........x^|
>> 00000620  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> *
>> 00000690  6a b6 79 82 96 d5 dc 11  be 97 00 0a e4 85 78 5e  |j.y...........x^|
>> 000006a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> *
>> 00000710  7a b6 79 82 96 d5 dc 11  be 97 00 0a e4 85 78 5e  |z.y...........x^|
>> 00000720  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>> *
>> 00000790  8b b6 79 82 96 d5 dc 11  be 97 00 0a e4 85 78 5e  |..y...........x^|
>> 000007a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>
> 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!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b649e5e0906290749l657fe494xbf0cb3d19702d52f>