Hi, I'm back with this device. I need to get it as stable as possible - problem seems to be with USB.
Significant problem is, when I connect two USB disks to powered hub - it very soon makes error, disconnects and it's far from stability.
I thaught it's problem of specific drive so I leave one that seem stable on powered hub and it seemd to run well, but it makes errors also but with lower interval.
When I connect cable from USB hub (same power, same disks) to computer, disks works well.
Is there a way how to determine the source of problems? I have tried different cables also. Problems seem with BPI only.
typical kernel messages:
Code: Select all
Oct 7 12:06:00 bpi1 kernel: hub 1-1:1.0: cannot reset port 4 (err = -110)
Oct 7 12:06:05 bpi1 kernel: hub 1-1:1.0: Cannot enable port 4. Maybe the USB cable is bad?
Oct 7 12:06:06 bpi1 kernel: hub 1-1:1.0: cannot disable port 4 (err = -110)
Oct 7 12:06:25 bpi1 kernel: sd 1:0:0:0: Device offlined - not ready after error recovery
Oct 7 12:06:25 bpi1 kernel: sd 1:0:0:0: [sdb] Unhandled error code
Oct 7 12:06:25 bpi1 kernel: sd 1:0:0:0: [sdb]
Oct 7 12:06:25 bpi1 kernel: Result: hostbyte=0x05 driverbyte=0x00
Oct 7 12:06:25 bpi1 kernel: sd 1:0:0:0: [sdb] CDB:
Oct 7 12:06:25 bpi1 kernel: cdb[0]=0x2a: 2a 00 29 fb fc 80 00 00 f0 00
Oct 7 12:06:25 bpi1 kernel: end_request: I/O error, dev sdb, sector 704380032
Oct 7 12:06:25 bpi1 kernel: Buffer I/O error on device sdb1, logical block 88047248
Oct 7 12:06:25 bpi1 kernel: EXT4-fs warning (device sdb1): ext4_end_bio:286: I/O error writing to inode 91228057 (offset 359202816 size 126976 starting block 88047534)
Oct 7 12:06:25 bpi1 kernel: sd 1:0:0:0: rejecting I/O to offline device
Oct 7 12:06:25 bpi1 kernel: sd 1:0:0:0: [sdb] killing request
Code: Select all
# uname -a
Linux bpi1 3.10.107-BPI-M2U-Kernel #1 SMP Sun Sep 3 21:51:03 CEST 2017 armv7l ARMv7 Processor rev 5 (v7l) sun8iw11p1 GNU/Linux
hdparm:
sda is old 64GiB SATA disk kingston in SATA port
sdb is USB - powered-hub - USB3 ADATA 1TB disk
Code: Select all
# hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 574 MB in 2.00 seconds = 286.76 MB/sec
Timing buffered disk reads: 242 MB in 3.02 seconds = 80.13 MB/sec
# hdparm -tT /dev/sdb
/dev/sdb:
Timing cached reads: 554 MB in 2.00 seconds = 276.72 MB/sec
Timing buffered disk reads: 82 MB in 3.03 seconds = 27.09 MB/sec
Code: Select all
# cat /etc/local.d/irq_balance.start
#!/bin/sh
for i in $(awk -F":" '/ahci/ {print $1}' < /proc/interrupts); do echo 2 > /proc/irq/$i/smp_affinity; done
for i in $(awk -F":" '/ehci/ {print $1}' < /proc/interrupts); do echo 4 > /proc/irq/$i/smp_affinity; done
for i in $(awk -F":" '/gmac/ {print $1}' < /proc/interrupts); do echo 8 > /proc/irq/$i/smp_affinity; done
echo "IRQ SATA Balanced"
Code: Select all
# cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3
29: 808092 229030 191923 525777 GIC arch_timer
30: 0 0 0 0 GIC arch_timer
32: 0 0 0 0 GIC axp22_irq_chip
33: 283 0 0 0 GIC uart0
37: 0 0 0 0 GIC RemoteIR_RX
39: 6418 0 0 0 GIC twi0
40: 0 0 0 0 GIC twi1
41: 0 0 0 0 GIC twi2
42: 0 0 0 0 GIC spi0
54: 1573684 0 0 0 GIC sunxi_timer
56: 0 0 0 0 GIC rtc
59: 0 0 0 0 GIC 1c02000.dma-controller
60: 1 0 0 0 GIC PIN_GRP
63: 0 0 0 0 GIC sunxikbd
64: 66681 0 0 0 GIC sunxi-mmc
65: 25 0 0 0 GIC sunxi-mmc
66: 454 0 0 0 GIC sunxi-mmc
74: 0 0 0 0 GIC csi0
83: 3765639 0 0 0 GIC dispaly
85: 0 0 0 0 GIC cedar_dev
88: 2210 1977 0 0 GIC sunxi-ahci
96: 0 0 0 0 GIC ohci_hcd:usb3
97: 0 0 0 0 GIC ohci_hcd:usb4
98: 0 0 0 0 GIC mdfs
108: 28220 0 755028 0 GIC ehci_hcd:usb1
110: 0 0 0 0 GIC ehci_hcd:usb2
117: 277 0 0 6520688 GIC gmac0
121: 6 0 0 0 GIC twi4
174: 1 0 0 0 - jack-det
IPI0: 0 0 0 0 CPU wakeup interrupts
IPI1: 0 697484 201634 189187 Timer broadcast interrupts
IPI2: 263439 167860 140500 287001 Rescheduling interrupts
IPI3: 222 223 103 181 Function call interrupts
IPI4: 3 5 2 0 Single function call interrupts
IPI5: 0 0 0 0 CPU stop interrupts
IPI6: 0 0 0 0 completion interrupts
IPI7: 0 0 0 0 CPU backtrace
Err: 0
Code: Select all
# cat /sys/block/sda/queue/scheduler
noop deadline [cfq]
# cat /sys/block/sdb/queue/scheduler
noop deadline [cfq]