Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Sep 2014 01:16:01 +0100
From:      Gary Palmer <gpalmer@freebsd.org>
To:        Steven Hartland <killing@multiplay.co.uk>
Cc:        freebsd-stable@freebsd.org, Karl Denninger <karl@denninger.net>
Subject:   Re: getting to 4K disk blocks in ZFS
Message-ID:  <20140920001601.GE51285@in-addr.com>
In-Reply-To: <20140920000636.GD51285@in-addr.com>
References:  <540FF3C4.6010305@ish.com.au> <A0A549F7A4094F519A3660697AB4983F@multiplay.co.uk> <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> <BA7CD0B47D5F47159BF73FB196563166@multiplay.co.uk> <20140920000636.GD51285@in-addr.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Sep 20, 2014 at 01:06:36AM +0100, Gary Palmer wrote:
> On Sat, Sep 20, 2014 at 12:43:46AM +0100, Steven Hartland wrote:
> > 
> > ----- Original Message ----- 
> > From: "Karl Denninger" <karl@denninger.net>
> > 
> > > >> 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: <WDC WD30EFRX-68AX9N0 80.00A80> 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: <WDC WD30EFRX-68AX9N0 80.00A80> 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: <WDC WD30EZRX-00MMMB0 80.00A80> 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: <WDC WD30EZRX-00MMMB0 80.00A80> 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

Actually, just found another couple of drives I didn't check
were AF, and aren't detected as such by the 9.2 kernel - so my zpool is
now ashift=9 and wrong :-(  Explains some of the performance I was
seeing.

ada0: <TOSHIBA DT01ACA300 MX6OABB0> ATA-8 SATA 3.x device
ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 2861588MB (5860533168 512 byte sectors: 16H 63S/T 16383C)
ada0: Previously was known as ad4

% camcontrol identify ada0
pass0: <TOSHIBA DT01ACA300 MX6OABB0> ATA-8 SATA 3.x device
pass0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)

protocol              ATA/ATAPI-8 SATA 3.x
device model          TOSHIBA DT01ACA300
firmware revision     MX6OABB0
serial number         13F7R9BGS
WWN                   5000039ff4c38251
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 
media RPM             7200

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      yes      no      0/0x00
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

% smartctl -B /dev/null -i /dev/ada0
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:     TOSHIBA DT01ACA300
Serial Number:    13F7R9BGS
LU WWN Device Id: 5 000039 ff4c38251
Firmware Version: MX6OABB0
User Capacity:    3,000,592,982,016 bytes [3.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:    Sat Sep 20 01:14:36 2014 BST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

Regards,

Gary



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140920001601.GE51285>