From owner-freebsd-stable@freebsd.org Sun Oct 16 18:42:58 2016 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74CE1C14500 for ; Sun, 16 Oct 2016 18:42:58 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 626F2138F for ; Sun, 16 Oct 2016 18:42:58 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 61CFEC144FF; Sun, 16 Oct 2016 18:42:58 +0000 (UTC) Delivered-To: stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61780C144FE for ; Sun, 16 Oct 2016 18:42:58 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from mail.in-addr.com (mail.in-addr.com [IPv6:2a01:4f8:191:61e8::2525:2525]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DBFD138E for ; Sun, 16 Oct 2016 18:42:58 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from gjp by mail.in-addr.com with local (Exim 4.87 (FreeBSD)) (envelope-from ) id 1bvqOe-000CsX-2d; Sun, 16 Oct 2016 19:42:56 +0100 Date: Sun, 16 Oct 2016 19:42:55 +0100 From: Gary Palmer To: "Eugene M. Zheganin" Cc: "stable@freebsd.org" Subject: Re: zfs/raidz: seems like I'm failing with math Message-ID: <20161016184255.GA2241@in-addr.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on mail.in-addr.com); SAEximRunCond expanded to false X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2016 18:42:58 -0000 On Sun, Oct 16, 2016 at 09:56:10PM +0500, Eugene M. Zheganin wrote: > Hi. > > FreeBSD 11.0-RC1 r303979, zfs raidz1: > > ===Cut=== > > # zpool status gamestop > pool: gamestop > state: ONLINE > scan: none requested > config: > > NAME STATE READ WRITE CKSUM > gamestop ONLINE 0 0 0 > raidz1-0 ONLINE 0 0 0 > da0 ONLINE 0 0 0 > da1 ONLINE 0 0 0 > da2 ONLINE 0 0 0 > da3 ONLINE 0 0 0 > da4 ONLINE 0 0 0 > da5 ONLINE 0 0 0 > > ===Cut=== > > 6 disks 960 Gbs each: > > ===Cut=== > > # smartctl -a /dev/da0 > smartctl 6.5 2016-05-07 r4318 [FreeBSD 11.0-RC1 amd64] (local build) > Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org > > === START OF INFORMATION SECTION === > Model Family: Samsung based SSDs > Device Model: SAMSUNG MZ7KM960HAHP-00005 > Serial Number: S2HTNX0H507466 > LU WWN Device Id: 5 002538 c402bdac1 > Firmware Version: GXM1003Q > User Capacity: 960 197 124 096 bytes [960 GB] You're confusing disk manufacturer gigabytes with real (power of two) gigabytes. The below turns 960 197 124 096 into real gigabytes % bc scale = 4 960197124096 / 1024 / 1024 / 1024 894.2532 > Sector Size: 512 bytes logical/physical > > [...] > > ===Cut=== > > But: > > ===Cut=== > > # zpool list gamestop > NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT > gamestop 5,22T 4,38T 861G - 24% 83% 1.00x ONLINE - > > ===Cut=== > > Why 5.22T ? If zpool is displaying raw size, it should be 960 x 6 = 5760 > Gb = 5.65 T. If it's displaying the actual data, then it should be 960 x > 5 = 4800 Gb = 4.68 T. 5.22 T is neither of these. I'm stuck, please > explain. :) Take 6 disks, size calculated above, and turn that into power of two TB: 894.2532 * 6 / 1024 5.2397 Close enough to 5.22, especially after ZFS has some overhead for it's own data structures Regards, Gary