From owner-freebsd-fs@freebsd.org Tue Apr 9 13:49:00 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91A9615818F1; Tue, 9 Apr 2019 13:49:00 +0000 (UTC) (envelope-from tech-lists@zyxst.net) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (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 6465B8E0A1; Tue, 9 Apr 2019 13:48:58 +0000 (UTC) (envelope-from tech-lists@zyxst.net) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 0E18E267F3; Tue, 9 Apr 2019 09:48:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 09 Apr 2019 09:48:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zyxst.net; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=mtpK4gTSDshRbqxO5kmtZ2cf79p Yp/tAW7woEtuvG0M=; b=qT0Tq7+I4hxZHZo2SRy48vFO+Zcz3yc07UQi5r8KhKI XWzW4vjvJAx4wDG10nEn7Qnfa0jq/MLyoTC9V/yufHYWryJ07Gk0Sr/oapCMAdBa HX6uEKXjWVnFgmic2Pderx9bVjHgrMc8d4aLn0rGvFhbe3VCFAD9Hv4lHB0vX+IY F28OlYHpUXlAihHXGrjABz3CB/7hU67NwfDunGsCBRUuYBBNWgRjhRVhdiwB0KOb bLghsXOPPFzmZJPOO982mnM+cA++i6mvPcf2l4AXgBP0mVSakZpXVHEzL+IoaaWN g7tOmE8TVgHLo6VaIaPds3X1ezQahi9i4FIKoAzdxZg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=mtpK4g TSDshRbqxO5kmtZ2cf79pYp/tAW7woEtuvG0M=; b=ItuIyy8JjTl5Ap9gVp7ahF /QMKsMv95DOebF1egi92XxtJHWIOuliVft5HPGe9P4K5nRiZpnSAkI0+Vi9rCM91 uwZr3VT++z80DdmIgsoM70hsU5PmoKdbws8FTY02H7sUvk7T7Wln5iDgJ1Bh38Xg 2Nfx4bg1FHZysJSPNkERzTbFsQJZGz8AiV9CUrjVEag8GCHmznqEiOzCjsiO76D8 TnDKlVNGY1IpM3fPcfAGXqKS05liEcd7dnkzvkzH4GRwI3p9GtjGpVMKh0YuyU+A eTT4662yyXHSwiSzRTxYq2o0hfhz9y4X4AKUs0dJmtXuTFtHImTbeW0anPS2WXFQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrudehgdeilecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtuggjfgesghdtre ertdervdenucfhrhhomhepthgvtghhqdhlihhsthhsuceothgvtghhqdhlihhsthhsseii hiigshhtrdhnvghtqeenucffohhmrghinhepshhmrghrthhmohhnthhoohhlshdrohhrgh enucfkphepkedvrdejtddrledurddutddunecurfgrrhgrmhepmhgrihhlfhhrohhmpeht vggthhdqlhhishhtshesiiihgihsthdrnhgvthenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from rpi3.zyxst.net (rpi3.zyxst.net [82.70.91.101]) by mail.messagingengine.com (Postfix) with ESMTPA id 402E1E4519; Tue, 9 Apr 2019 09:48:50 -0400 (EDT) Date: Tue, 9 Apr 2019 14:48:47 +0100 From: tech-lists To: freebsd-stable@freebsd.org Cc: freebsd-fs@freebsd.org Subject: Re: about zfs and ashift and changing ashift on existing zpool Message-ID: <20190409134847.GA57588@rpi3.zyxst.net> References: <20190407153639.GA41753@rpi3.zyxst.net> <20190408212822.GD13734@server.rulingia.com> <20190409000009.GA65388@neutralgood.org> <9590cb82-64be-a2f9-a812-36f0ea324e4d@grosbein.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="uAKRQypu60I7Lcqm" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 6465B8E0A1 X-Spamd-Bar: --------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=zyxst.net header.s=fm2 header.b=qT0Tq7+I; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=ItuIyy8J; spf=pass (mx1.freebsd.org: domain of tech-lists@zyxst.net designates 66.111.4.26 as permitted sender) smtp.mailfrom=tech-lists@zyxst.net X-Spamd-Result: default: False [-9.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[zyxst.net:s=fm2,messagingengine.com:s=fm2]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.26]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[zyxst.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[zyxst.net:+,messagingengine.com:+]; RCPT_COUNT_TWO(0.00)[2]; MX_GOOD(-0.01)[in2-smtp.messagingengine.com,in1-smtp.messagingengine.com,in2-smtp.messagingengine.com,in1-smtp.messagingengine.com,in2-smtp.messagingengine.com,in1-smtp.messagingengine.com]; SIGNED_PGP(-2.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.997,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US]; IP_SCORE(-3.39)[ip: (-8.97), ipnet: 66.111.4.0/24(-4.58), asn: 11403(-3.35), country: US(-0.06)]; RCVD_IN_DNSWL_LOW(-0.10)[26.4.111.66.list.dnswl.org : 127.0.5.1] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2019 13:49:00 -0000 --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 08, 2019 at 09:25:43PM -0400, Michael Butler wrote: >On 2019-04-08 20:55, Alexander Motin wrote: >> On 08.04.2019 20:21, Eugene Grosbein wrote: >>> 09.04.2019 7:00, Kevin P. Neal wrote: >>> >>>>> My guess (given that only ada1 is reporting a blocksize mismatch) is = that >>>>> your disks reported a 512B native blocksize. In the absence of any o= verride, >>>>> ZFS will then build an ashift=3D9 pool. >>> >>> [skip] >>> >>>> smartctl 7.0 2018-12-30 r4883 [FreeBSD 11.2-RELEASE-p4 amd64] (local b= uild) >>>> Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontool= s.org >>>> >>>> =3D=3D=3D START OF INFORMATION SECTION =3D=3D=3D >>>> Vendor: SEAGATE >>>> Product: ST2400MM0129 >>>> Revision: C003 >>>> Compliance: SPC-4 >>>> User Capacity: 2,400,476,553,216 bytes [2.40 TB] >>>> Logical block size: 512 bytes >>>> Physical block size: 4096 bytes >>> >>> Maybe it't time to prefer "Physical block size" over "Logical block siz= e" in relevant GEOMs >>> like GEOM_DISK, so upper levels such as ZFS would do the right thing au= tomatically. >> >> No. It is a bad idea. Changing logical block size for existing disks >> will most likely result in breaking compatibility and inability to read >> previously written data. ZFS already uses physical block size when >> possible -- on pool creation or new vdev addition. When not possible >> (pool already created wrong) it just complains about it, so that user >> would know that his configuration is imperfect and he should not expect >> full performance. > >And some drives just present 512 bytes for both .. no idea if this is >consistent with the underlying silicon :-( I built a ZFS pool on it >using 4k blocks anyway. > >smartctl 7.0 2018-12-30 r4883 [FreeBSD 13.0-CURRENT amd64] (local build) >Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org > >=3D=3D=3D START OF INFORMATION SECTION =3D=3D=3D >Device Model: WDC WDS100T2B0A-00SM50 >Serial Number: 1837B0803409 >LU WWN Device Id: 5 001b44 8b99f7560 >Firmware Version: X61190WD >User Capacity: 1,000,204,886,016 bytes [1.00 TB] >Sector Size: 512 bytes logical/physical >Rotation Rate: Solid State Device >Form Factor: 2.5 inches >Device is: Not in smartctl database [for details use: -P showall] >ATA Version is: ACS-4 T13/BSR INCITS 529 revision 5 >SATA Version is: SATA 3.3, 6.0 Gb/s (current: 6.0 Gb/s) >Local Time is: Mon Apr 8 21:22:15 2019 EDT >SMART support is: Available - device has SMART capability. >SMART support is: Enabled >AAM feature is: Unavailable >APM level is: 128 (minimum power consumption without standby) >Rd look-ahead is: Enabled >Write cache is: Enabled >DSN feature is: Unavailable >ATA Security is: Disabled, frozen [SEC2] >Wt Cache Reorder: Unavailable Yeah it's weird isn't it. So it seems it's not an issue with zfs at all as far as I can see. This is one of the drives that was replaced, and it's identical to the other two making up the array. So not unreasonably ashift was 9, as all three drives making up the array were 512 logical/physical. =3D=3D=3D START OF INFORMATION SECTION =3D=3D=3D Model Family: Western Digital Black Device Model: WDC WD4001FAEX-00MJRA0 Firmware Version: 01.01L01 User Capacity: 4,000,787,030,016 bytes [4.00 TB] Sector Size: 512 bytes logical/physical Device is: In smartctl database [for details use: -P show] ATA Version is: ATA8-ACS (minor revision not indicated) SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s) Local Time is: Tue Apr 9 12:47:01 2019 BST SMART support is: Available - device has SMART capability. SMART support is: Enabled I replaced one of them with an 8tb drive: TART OF INFORMATION SECTION =3D=3D=3D Model Family: Seagate Archive HDD Device Model: ST8000AS0002-1NA17Z Firmware Version: AR13 User Capacity: 8,001,563,222,016 bytes [8.00 TB] Sector Sizes: 512 bytes logical, 4096 bytes physical Rotation Rate: 5980 rpm Device is: In smartctl database [for details use: -P show] ATA Version is: ACS-2, ACS-3 T13/2161-D revision 3b SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s) Local Time is: Tue Apr 9 12:55:55 2019 BST SMART support is: Available - device has SMART capability. SMART support is: Enabled so the 2nd drive is emulating 512. But ZFS seems to see through that and correctly determines it's a 4k drive. In any case, the fix was to make a new pool (which automatically set ashift to 12 when the 8Tb disk was added) then zfs send from the old pool to the new one, then destroy the old pool. Fortunately this was easy because the system had zfs installed as an afterthought. So no root-on-zfs. The OS is on a SSD. All I can say is that zpool performance of a 4k drive in an a9 zpool is non-ideal. The new pool feels quicker (even though the disks aren't built for speed), and I've learned something new :D --=20 J. --uAKRQypu60I7Lcqm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE8n3tWhxW11Ccvv9/s8o7QhFzNAUFAlysorQACgkQs8o7QhFz NAV/Gg/+I5X1JnOvyhBH/oWzvCGEHDfl0eoFHAAr19RAthGTpzXj/1n30c4Eu+HN spg/jkGa562PyNEg7N5/65Il+vSXNISDKvBXAbkY8oO0V5OjRyPEkOu2HxfLjZKl t9J4CMgYDgeVJgHJY2hfXUD68tLIgvmRIkCu97IR91W6HAesQToymk2ZAXIziI8m Zd2Q1JYnQjY8elsqRGp3S4NiCtxqDpiQfEz5xNCEX/sqN2E68vsQ3q0OadInnb2V ILreKKz4bqZeocU+VFxyLi1lHe7AGLe2rzXH3Fjd2Xd6xItXAGRBfPGpW5tevD2U cm2YRWIzCTfC4UN1PvepWgrh4YOS5luQGdRU4oM9p1HgmvdB6VZ4OKdKKu9Oc9Rt roC4oYZOjPGKkryQvE2SmhK4XvpExrHDEpz6VcxSoXWMVOfA5B049ZFVMd5xsHvQ wv+kMsxQsREkev7e58g+UqKI3LHwzStMJkOUFq44EOarlPiUfeciW7ODRoolRYCA splmuJBB7ugoFKBtTo6JVdDlpczhTk43zU8kX3CvvbC4We01KYWXrjynXGWUq3S8 1+NLb26Y0oYLzReTm5ewolCDK9UO17jAO6KnhIvSGkRyQNNcSpWJ7fvtLAyJP2YQ ai7QRSWpkl6R/JvK7U3Vm9t5YvYyKuOQZMLbECEu+nTrxugcvgw= =2AUJ -----END PGP SIGNATURE----- --uAKRQypu60I7Lcqm--