Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Dec 2014 17:39:24 -0500
From:      Zaphod Beeblebrox <zbeeble@gmail.com>
To:        freebsd-fs <freebsd-fs@freebsd.org>
Subject:   Lies that ZFS/ZDB tell us.
Message-ID:  <CACpH0Md62b9KgMw0w4iiivFcMUDMKAnyE6rQmiNgAaWD3BTAng@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
So... I'm trying to get down to the ZFS on-disk format and read something.
Since I've been having trouble with that, I've made a test zpool, populated
it with one zfs filesystem and one file (a copy of usr/dict/words).  The
zdb -dddd starts off:

               0 L1  0:434000:4000 0:780114000:4000 4000L/600P F=20 B=12/12
               0  L0 0:114000:28000 20000L/20000P F=1 B=12/12
           20000  L0 0:13c000:28000 20000L/20000P F=1 B=12/12

(you can see the whole file at http://pastebin.ca/2881508)

So... the L1 bit is the indirect block, and the L0 (I've shown two) say
that in commit 12, this file was laid down in 20000 (hex --- 128k) blocks.
I'll upload the first two blocks above for your perusal, but the weird
thing is that they contain more than the given 128k (20000 hex) data.

Both blocks have text data from 0 to FFFF, then 0's from 10000 to 11FFF,
then text from 12000 to !BFFF, then random bytes (I assume parity) from
1C000 to 1DFFF, then text again from 1E000 to 28FFF.

block1:
https://uk.eicat.ca/owncloud/public.php?service=files&t=f91b4abc1debb2b3d240d450b4b8c426
block2:
https://uk.eicat.ca/owncloud/public.php?service=files&t=0e82fa1d1635bd26853e018fb0b36189

... so that's 24000 (hex) bytes, not 20000 (the 20000L/20000P bit says it
should be 20000 bytes of content).  There's also only 2000 (hex) of parity
... which (with 8 disks) is only enough to protect E000 bytes of payload.

What gives?  is ZDB -R completely broken?



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