From owner-freebsd-geom@freebsd.org Tue Apr 9 01:25:56 2019 Return-Path: Delivered-To: freebsd-geom@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 9F336156F903; Tue, 9 Apr 2019 01:25:56 +0000 (UTC) (envelope-from imb@protected-networks.net) Received: from mail.protected-networks.net (mail.protected-networks.net [202.12.127.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.protected-networks.net", Issuer "Protected Networks CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A66276DBC7; Tue, 9 Apr 2019 01:25:53 +0000 (UTC) (envelope-from imb@protected-networks.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= protected-networks.net; h=content-transfer-encoding :content-language:content-type:content-type:in-reply-to :mime-version:user-agent:date:date:message-id:from:from :references:subject:subject; s=201508; t=1554773144; bh=zK4gi2f4 X8bCWOeWwieqF63chhx0O+OD8z6e5dGhkDk=; b=mZLU7tL0+ZEHm8EOpdKJ6Nti RBC+CVDJzHXkUqthnI2hZECYa/09Myby4RBcQnPGJ/9nx7UWAhUo+HIDRaH/bz8l LVTZUheSMnCWRp2YIO/1/55KBCm4u2IEYOttHrYpAuOg++xCZ51ep1smWTZqzWkV MQxUbdoD/2XBqn274cs= Received: from toshi.auburn.protected-networks.net (toshi.auburn.protected-networks.net [192.168.1.10]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: imb@mail.protected-networks.net) by mail.protected-networks.net (Postfix) with ESMTPSA id 7D15F1285F; Mon, 8 Apr 2019 21:25:44 -0400 (EDT) Subject: Re: about zfs and ashift and changing ashift on existing zpool To: Alexander Motin , Eugene Grosbein , "Kevin P. Neal" , Peter Jeremy Cc: freebsd-fs@freebsd.org, freebsd-geom@freebsd.org, freebsd-stable@freebsd.org, tech-lists References: <20190407153639.GA41753@rpi3.zyxst.net> <20190408212822.GD13734@server.rulingia.com> <20190409000009.GA65388@neutralgood.org> <9590cb82-64be-a2f9-a812-36f0ea324e4d@grosbein.net> From: Michael Butler Openpgp: preference=signencrypt Message-ID: Date: Mon, 8 Apr 2019 21:25:43 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: A66276DBC7 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=protected-networks.net header.s=201508 header.b=mZLU7tL0; spf=pass (mx1.freebsd.org: domain of imb@protected-networks.net designates 202.12.127.228 as permitted sender) smtp.mailfrom=imb@protected-networks.net X-Spamd-Result: default: False [-1.83 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[protected-networks.net:s=201508]; NEURAL_HAM_MEDIUM(-0.85)[-0.853,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[protected-networks.net]; NEURAL_SPAM_SHORT(0.54)[0.542,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[protected-networks.net:+]; MX_GOOD(-0.01)[sarah.protected-networks.net,mail.protected-networks.net]; RCPT_COUNT_SEVEN(0.00)[8]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-0.01)[country: US(-0.06)]; ASN(0.00)[asn:5716, ipnet:202.12.127.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2019 01:25:56 -0000 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 override, >>>> ZFS will then build an ashift=9 pool. >> >> [skip] >> >>> smartctl 7.0 2018-12-30 r4883 [FreeBSD 11.2-RELEASE-p4 amd64] (local build) >>> Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org >>> >>> === START OF INFORMATION SECTION === >>> 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 size" in relevant GEOMs >> like GEOM_DISK, so upper levels such as ZFS would do the right thing automatically. > > 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 === START OF INFORMATION SECTION === 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 imb