Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOL] Only Banan-PI M2-Ultra USB ext.HDD write error Else OK
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
DeIM
Guru
Guru


Joined: 11 Apr 2006
Posts: 429

PostPosted: Sat Sep 02, 2017 8:25 pm    Post subject: [SOL] Only Banan-PI M2-Ultra USB ext.HDD write error Else OK Reply with quote

Hi, I reconnected HDD from RPI to BPI-M2-Ultra USB (tried powered HUB also) and when reading it is OK, but writes after some time ends with errors.
RPI OK, other gentoo machines OK too - even on same USB HUB.

Here are the log entries:
Code:
Sep  2 21:55:40 bpi1 kernel: usb 2-1: reset high-speed USB device number 2 using sunxi-ehci
Sep  2 21:55:55 bpi1 kernel: usb 2-1: device descriptor read/64, error -110
Sep  2 21:56:10 bpi1 kernel: usb 2-1: device descriptor read/64, error -110
Sep  2 21:56:10 bpi1 kernel: ehci_irq: highspeed device disconnect
Sep  2 21:56:10 bpi1 kernel: ehci_irq: highspeed device connect
Sep  2 21:56:10 bpi1 kernel: usb 2-1: reset high-speed USB device number 2 using sunxi-ehci
Sep  2 21:56:26 bpi1 kernel: usb 2-1: USB disconnect, device number 2
Sep  2 21:56:26 bpi1 kernel: sd 1:0:0:0: Device offlined - not ready after error recovery
Sep  2 21:56:26 bpi1 kernel: sd 1:0:0:0: [sdb] Unhandled error code
Sep  2 21:56:26 bpi1 kernel: sd 1:0:0:0: [sdb] 
Sep  2 21:56:26 bpi1 kernel: Result: hostbyte=0x05 driverbyte=0x00
Sep  2 21:56:26 bpi1 kernel: sd 1:0:0:0: [sdb] CDB:
Sep  2 21:56:26 bpi1 kernel: cdb[0]=0x2a: 2a 00 00 33 d9 d0 00 00 f0 00
Sep  2 21:56:26 bpi1 kernel: end_request: I/O error, dev sdb, sector 3398096
Sep  2 21:56:26 bpi1 kernel: Buffer I/O error on device sdb1, logical block 424506
...


after that sdb disappears and becomes sdd (sdc is WD external HDD which is OK - connected to powered USB HUB. This WD is taking more power than problematic disk)

Here's hdparm output:
Code:
# hdparm -I /dev/sdd

/dev/sdd:

ATA device, with non-removable media
        Model Number:       TOSHIBA MQ01ABD100                     
        Serial Number:      [...]
        Firmware Revision:  AX1P1A 
        Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6
Standards:
        Supported: 8 7 6 5
        Likely used: 8
Configuration:
        Logical         max     current
        cylinders       16383   16383
        heads           16      16
        sectors/track   63      63
        --
        CHS current addressable sectors:    16514064
        LBA    user addressable sectors:   268435455
        LBA48  user addressable sectors:  1953525168
        Logical  Sector size:                   512 bytes
        Physical Sector size:                  4096 bytes
        Logical Sector-0 offset:                  0 bytes
        device size with M = 1024*1024:      953869 MBytes
        device size with M = 1000*1000:     1000204 MBytes (1000 GB)
        cache/buffer size  = 8192 KBytes
        Form Factor: 2.5 inch
        Nominal Media Rotation Rate: 5400
Capabilities:
        LBA, IORDY(can be disabled)
        Queue depth: 32
        Standby timer values: spec'd by Standard, no device specific minimum
        R/W multiple sector transfer: Max = 16  Current = 16
        Advanced power management level: 127
        DMA: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
             Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
        Enabled Supported:
           *    SMART feature set
                Security Mode feature set
           *    Power Management feature set
           *    Write cache
           *    Look-ahead
           *    Host Protected Area feature set
           *    WRITE_BUFFER command
           *    READ_BUFFER command
           *    NOP cmd
           *    DOWNLOAD_MICROCODE
           *    Advanced Power Management feature set
                Power-Up In Standby feature set
           *    SET_FEATURES required to spinup after power up
                SET_MAX security extension
           *    48-bit Address feature set
           *    Device Configuration Overlay feature set
           *    Mandatory FLUSH_CACHE
           *    FLUSH_CACHE_EXT
           *    SMART error logging
           *    SMART self-test
           *    General Purpose Logging feature set
           *    WRITE_{DMA|MULTIPLE}_FUA_EXT
           *    64-bit World wide name
           *    IDLE_IMMEDIATE with UNLOAD
           *    WRITE_UNCORRECTABLE_EXT command
           *    {READ,WRITE}_DMA_EXT_GPL commands
           *    Segmented DOWNLOAD_MICROCODE
           *    Gen1 signaling speed (1.5Gb/s)
           *    Gen2 signaling speed (3.0Gb/s)
           *    Native Command Queueing (NCQ)
           *    Host-initiated interface power management
           *    Phy event counters
           *    Idle-Unload when NCQ is active
                DMA Setup Auto-Activate optimization
                Device-initiated interface power management
           *    Software settings preservation
           *    SMART Command Transport (SCT) feature set
           *    SCT Write Same (AC2)
           *    SCT Error Recovery Control (AC3)
           *    SCT Features Control (AC4)
           *    SCT Data Tables (AC5)
Security:
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
        not     frozen
        not     expired: security count
                supported: enhanced erase
        224min for SECURITY ERASE UNIT. 224min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: [...]
        NAA             : [...]
        IEEE OUI        : [...]
        Unique ID       : [...]
Checksum: correct


WD, which is OK for comparison:
Code:
# hdparm -I /dev/sdc

/dev/sdc:

ATA device, with non-removable media
        Model Number:       WDC WD10JPVX-22JC3T0                   
        Serial Number:      [...]
        Firmware Revision:  01.01A01
        Transport:          Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
        Supported: 9 8 7 6 5
        Likely used: 9
Configuration:
        Logical         max     current
        cylinders       16383   16383
        heads           16      16
        sectors/track   63      63
        --
        CHS current addressable sectors:    16514064
        LBA    user addressable sectors:   268435455
        LBA48  user addressable sectors:  1953525168
        Logical  Sector size:                   512 bytes
        Physical Sector size:                  4096 bytes
        Logical Sector-0 offset:                  0 bytes
        device size with M = 1024*1024:      953869 MBytes
        device size with M = 1000*1000:     1000204 MBytes (1000 GB)
        cache/buffer size  = 8192 KBytes
        Nominal Media Rotation Rate: 5400
Capabilities:
        LBA, IORDY(can be disabled)
        Queue depth: 32
        Standby timer values: spec'd by Standard, with device specific minimum
        R/W multiple sector transfer: Max = 16  Current = 0
        Advanced power management level: disabled
        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
             Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
        Enabled Supported:
           *    SMART feature set
                Security Mode feature set
           *    Power Management feature set
           *    Write cache
           *    Look-ahead
           *    Host Protected Area feature set
           *    WRITE_BUFFER command
           *    READ_BUFFER command
           *    NOP cmd
           *    DOWNLOAD_MICROCODE
                Advanced Power Management feature set
                Power-Up In Standby feature set
           *    SET_FEATURES required to spinup after power up
                SET_MAX security extension
           *    48-bit Address feature set
           *    Device Configuration Overlay feature set
           *    Mandatory FLUSH_CACHE
           *    FLUSH_CACHE_EXT
           *    SMART error logging
           *    SMART self-test
           *    General Purpose Logging feature set
           *    64-bit World wide name
           *    IDLE_IMMEDIATE with UNLOAD
           *    {READ,WRITE}_DMA_EXT_GPL commands
           *    Segmented DOWNLOAD_MICROCODE
           *    Gen1 signaling speed (1.5Gb/s)
           *    Gen2 signaling speed (3.0Gb/s)
           *    Gen3 signaling speed (6.0Gb/s)
           *    Native Command Queueing (NCQ)
           *    Host-initiated interface power management
           *    Phy event counters
           *    Idle-Unload when NCQ is active
           *    NCQ priority information
           *    Host automatic Partial to Slumber transitions
           *    Device automatic Partial to Slumber transitions
           *    READ_LOG_DMA_EXT equivalent to READ_LOG_EXT
                DMA Setup Auto-Activate optimization
                Device-initiated interface power management
           *    Software settings preservation
           *    SMART Command Transport (SCT) feature set
           *    SCT Write Same (AC2)
           *    SCT Features Control (AC4)
           *    SCT Data Tables (AC5)
                unknown 206[12] (vendor specific)
                unknown 206[13] (vendor specific)
                unknown 206[14] (vendor specific)
Security:
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
        not     frozen
        not     expired: security count
                supported: enhanced erase
        182min for SECURITY ERASE UNIT. 182min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: [...]
        NAA             : [...]
        IEEE OUI        : [...]
        Unique ID       : [...]
Checksum: correct


Kernel:
Linux bpi1 3.10.65-BPI-M2U-Kernel #3 SMP Mon Feb 20 17:27:12 CET 2017 armv7l ARMv7 Processor rev 5 (v7l) sun8iw11p1 GNU/Linux

Could someone help me understand what's going on here?
Could newest kernel version from BPI help?

Thanks in advance! :wink:


Last edited by DeIM on Fri Nov 03, 2017 10:49 am; edited 1 time in total
Back to top
View user's profile Send private message
DeIM
Guru
Guru


Joined: 11 Apr 2006
Posts: 429

PostPosted: Thu Oct 26, 2017 5:44 pm    Post subject: Reply with quote

I have a technical question:
Is it possible that it's a problem of grounding?
Since there is no connection to ground is isolation working?
Doesn't USB cables tend to interference or noise then?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54174
Location: 56N 3W

PostPosted: Thu Oct 26, 2017 6:18 pm    Post subject: Reply with quote

DeIM,

USB 2 is only specified to provide 500mA for all connected devices.
Most USB hard drives need more that that for the spin motor alone.
What happens when you try to draw more that 500mA varies depending on the device providing the power, options are,

1, It destroys the tracks on the motherboard as there is no overcurrent protection.
2. The overloaded bus still works
3. The bus controller powers down some devices to get the load under 500mA
4. The bus controller shuts down the USB root hub.

This is why many bus powered USB HDD are provided with a Y cable, so that they can be powered from two different USB root hubs.
Its not ideal but it is at least, honest.

I don't think is a USB cable noise problem, its probably PSU related.
Many USB phone chargers,marked as 5v, used for powering SBCs, only provide 4.7v to suit Lithium batteries. That 300mv matters, as the voltage drops further when the PSU is working hard. At 4.5v normal operation is not expected.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
DeIM
Guru
Guru


Joined: 11 Apr 2006
Posts: 429

PostPosted: Fri Nov 03, 2017 10:48 am    Post subject: Reply with quote

Seems to be solved now - I replaced cable BPI <--> HUB. The cable was really bad in random situations.
Just as a tip - Since HUB is powered, I removed +5V pin on USB connector. It seemed to be the error when I tried to replace cable first time (but didn't verify).
I've tried two disks at once with bonnie++ tests and no error so far.

Thanks everyone who read this and thought about reasons, esp. thanks to NeddySeagoon :wink:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum