From owner-freebsd-fs@FreeBSD.ORG Wed Dec 3 22:39:25 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACB8DF91 for ; Wed, 3 Dec 2014 22:39:25 +0000 (UTC) Received: from mail-oi0-x22a.google.com (mail-oi0-x22a.google.com [IPv6:2607:f8b0:4003:c06::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 713EB8D6 for ; Wed, 3 Dec 2014 22:39:25 +0000 (UTC) Received: by mail-oi0-f42.google.com with SMTP id v63so11546693oia.15 for ; Wed, 03 Dec 2014 14:39:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=HmxySS/a/fGgCBzG2/U00NRqQZc07QB/uqxK8Eh7STA=; b=hlZ477Q7mTcZeet43XR2C/PuKA4QWqNn5kCtT3NZTIU1eDhbCa8Zm/nN+jvurr2JQi +w5b3Knd68MbZisuXz6g+VxG+kzZqrYNYfpxPfK27fzMc2JSr9+8Py7tauCu6lfjLViU RDCGJiWqBndzRxwfAD/q0CbDKQeT6EnpCZMG7m+9kktkC+pCW/ZtWSrn1k77+oWkcqWG 6ZKKiOX+SndcJryxihPp6yC5BfTyrxLUfOGuugR1NyPjfyG9IfuUJUaMGoOr51tWFObb Y0eh6Ie9pL68Mukws9cKNl4o+Eq3jCc3DiL4fPdMgQ5gp5N00Qc86BM305ITggosceW5 vgGQ== MIME-Version: 1.0 X-Received: by 10.182.65.105 with SMTP id w9mr4793991obs.60.1417646364811; Wed, 03 Dec 2014 14:39:24 -0800 (PST) Received: by 10.76.0.138 with HTTP; Wed, 3 Dec 2014 14:39:24 -0800 (PST) Date: Wed, 3 Dec 2014 17:39:24 -0500 Message-ID: Subject: Lies that ZFS/ZDB tell us. From: Zaphod Beeblebrox To: freebsd-fs Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Dec 2014 22:39:25 -0000 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?