From owner-freebsd-stable@FreeBSD.ORG Sat Sep 20 00:06:40 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B2C03E5; Sat, 20 Sep 2014 00:06:40 +0000 (UTC) Received: from mail.in-addr.com (mail.in-addr.com [IPv6:2a01:4f8:191:61e8::2525:2525]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96233DA5; Sat, 20 Sep 2014 00:06:39 +0000 (UTC) Received: from gjp by mail.in-addr.com with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1XV8CC-0003GW-Jd; Sat, 20 Sep 2014 01:06:36 +0100 Date: Sat, 20 Sep 2014 01:06:36 +0100 From: Gary Palmer To: Steven Hartland Subject: Re: getting to 4K disk blocks in ZFS Message-ID: <20140920000636.GD51285@in-addr.com> References: <540FF3C4.6010305@ish.com.au> <54114029.3060507@FreeBSD.org> <2128347.Ah5i0RTCvp@overcee.wemm.org> <541230F1.3060402@digiware.nl> <7D0869A9-C114-4C4F-877A-3FB26AD7737D@scsiguy.com> <607F83CE25104CE09C74935BA9E26485@multiplay.co.uk> <541CBD5B.8050603@denninger.net> 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 Cc: freebsd-stable@freebsd.org, Karl Denninger X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Sep 2014 00:06:40 -0000 On Sat, Sep 20, 2014 at 12:43:46AM +0100, Steven Hartland wrote: > > ----- Original Message ----- > From: "Karl Denninger" > > > >> I'm surprised that we have to constantly add quirks. Are these > > >> drives really > > >> failing to report their ata params correctly? Is there a reason we > > >> don't > > >> currently utilize the ata params data (which is already fetched for > > >> trim/unmap > > >> detection) to also set lbppbe (logical block per physical block > > >> exponent) and > > >> lalba (lowest aligned lba)? We may find that many of the existing > > >> quirks are > > >> unnecessary if we fix the probe code. > > > > > > On the contary I've not found a single drive which reports 4k sectors > > > on its > > > own, every single one that I've seen report 4k is because we've added a > > > quirk for it :( > > > > > > > > Where is Smartctl getting it from? > > > > smartctl -i /dev/da2 > > smartctl 6.3 2014-07-26 r3976 [FreeBSD 10.1-BETA1 amd64] (local build) > > Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org > > > > === START OF INFORMATION SECTION === > > Device Model: HGST HDN724040ALE640 > > Serial Number: PK2334PCG6NA0B > > LU WWN Device Id: 5 000cca 24cc30684 > > Firmware Version: MJAOA5E0 > > User Capacity: 4,000,787,030,016 bytes [4.00 TB] > > Sector Sizes: 512 bytes logical, 4096 bytes physical > > Rotation Rate: 7200 rpm > > Form Factor: 3.5 inches > > Device is: Not in smartctl database [for details use: -P showall] > > ATA Version is: ATA8-ACS T13/1699-D revision 4 > > SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s) > > Local Time is: Fri Sep 19 18:33:16 2014 CDT > > SMART support is: Available - device has SMART capability. > > SMART support is: Enabled > > > > It's not coming from a database, as Smartctl doesn't know about these > > (yet); they're too new. > > Exception to prove the rule? > > What to "camcontrol identify da2" report? I have some WD Red drives: ada2 at ahcich2 bus 0 scbus2 target 0 lun 0 ada2: ATA-9 SATA 3.x device ada2: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) ada2: Command Queueing enabled ada2: 2861588MB (5860533168 512 byte sectors: 16H 63S/T 16383C) ada2: quirks=0x1<4K> Note the quirk. If I tell smartctl to ignore it's database it still says it's a 4k AF drive $ smartctl -B /dev/null -i /dev/ada2 smartctl 6.3 2014-07-26 r3976 [FreeBSD 9.2-RELEASE-p10 amd64] (local build) Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Device Model: WDC WD30EFRX-68AX9N0 Serial Number: WD-WMC1T1329542 LU WWN Device Id: 5 0014ee 058cdc1f7 Firmware Version: 80.00A80 User Capacity: 3,000,592,982,016 bytes [3.00 TB] Sector Sizes: 512 bytes logical, 4096 bytes physical Device is: Not in smartctl database [for details use: -P showall] ATA Version is: ACS-2 (minor revision not indicated) SATA Version is: SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s) Local Time is: Sat Sep 20 01:01:41 2014 BST SMART support is: Available - device has SMART capability. SMART support is: Enabled $ camcontrol identify ada2 pass2: ATA-9 SATA 3.x device pass2: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) protocol ATA/ATAPI-9 SATA 3.x device model WDC WD30EFRX-68AX9N0 firmware revision 80.00A80 serial number WD-WMC1T1329542 WWN 50014ee058cdc1f7 cylinders 16383 heads 16 sectors/track 63 sector size logical 512, physical 4096, offset 0 LBA supported 268435455 sectors LBA48 supported 5860533168 sectors PIO supported PIO4 DMA supported WDMA2 UDMA6 Feature Support Enabled Value Vendor read ahead yes yes write cache yes yes flush cache yes yes overlap no Tagged Command Queuing (TCQ) no no Native Command Queuing (NCQ) yes 32 tags SMART yes yes microcode download yes yes security yes no power management yes yes advanced power management no no automatic acoustic management no no media status notification no no power-up in Standby yes no write-read-verify no no unload no no free-fall no no Data Set Management (DSM/TRIM) no Host Protected Area (HPA) yes no 5860533168/5860533168 HPA - Security no I'm not sure if camcontrol is getting it's data from the kernel (and therefore may be affected by the quirk) or not? I've got a similar story for some WD Green AF drives on a different box ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 ada0: ATA-8 SATA 3.x device ada0: Serial Number WD-WCAWZ2071970 ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) ada0: Command Queueing enabled ada0: 2861588MB (5860533168 512 byte sectors: 16H 63S/T 16383C) ada0: quirks=0x1<4K> $ smartctl -B /dev/null -i /dev/ada0 smartctl 6.3 2014-07-26 r3976 [FreeBSD 9.3-RELEASE-p1 amd64] (local build) Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Device Model: WDC WD30EZRX-00MMMB0 Serial Number: WD-WCAWZ2071970 LU WWN Device Id: 5 0014ee 2b17b776d Firmware Version: 80.00A80 User Capacity: 3,000,592,982,016 bytes [3.00 TB] Sector Sizes: 512 bytes logical, 4096 bytes physical Device is: Not in smartctl database [for details use: -P showall] ATA Version is: ATA8-ACS (minor revision not indicated) SATA Version is: SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s) Local Time is: Sat Sep 20 01:04:44 2014 BST SMART support is: Available - device has SMART capability. SMART support is: Enabled $ camcontrol identify ada0 pass0: ATA-8 SATA 3.x device pass0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) protocol ATA/ATAPI-8 SATA 3.x device model WDC WD30EZRX-00MMMB0 firmware revision 80.00A80 serial number WD-WCAWZ2071970 WWN 50014ee2b17b776d cylinders 16383 heads 16 sectors/track 63 sector size logical 512, physical 4096, offset 0 LBA supported 268435455 sectors LBA48 supported 5860533168 sectors PIO supported PIO4 DMA supported WDMA2 UDMA6 Feature Support Enabled Value Vendor read ahead yes yes write cache yes yes flush cache yes yes overlap no Tagged Command Queuing (TCQ) no no Native Command Queuing (NCQ) yes 32 tags NCQ Queue Management no NCQ Streaming no Receive & Send FPDMA Queued no SMART yes yes microcode download yes yes security yes no power management yes yes advanced power management no no automatic acoustic management no no media status notification no no power-up in Standby yes no write-read-verify no no unload no no general purpose logging yes yes free-fall no no Data Set Management (DSM/TRIM) no Host Protected Area (HPA) yes no 5860533168/5860533168 HPA - Security no Regards, Gary