Zpool on raw disk and weird GEOM complaint
Marius Nünnerich
marius at nuenneri.ch
Mon Jun 29 14:49:04 UTC 2009
On Mon, Jun 29, 2009 at 16:41, Marius Nünnerich<marius at nuenneri.ch> wrote:
> On Mon, Jun 29, 2009 at 16:14, Patrick M. Hausen<hausen at 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!
More information about the freebsd-stable
mailing list