getting to 4K disk blocks in ZFS

Gary Palmer gpalmer at freebsd.org
Sat Sep 20 00:06:40 UTC 2014


On Sat, Sep 20, 2014 at 12:43:46AM +0100, Steven Hartland wrote:
> 
> ----- Original Message ----- 
> From: "Karl Denninger" <karl at 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

Regards,

Gary


More information about the freebsd-stable mailing list