RaspberryPi pukes on software RAID1 over USB

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
peter_b
Chatterbox
Posts: 383
Joined: Tue Nov 12, 2013 2:05 am

RaspberryPi pukes on software RAID1 over USB

Post by peter_b »

[PROBLEM]
I have 2 USB drives attached to a Raspberry Pi, mirroring one 500 GiB partition using Linux software RAID1.
In general, the RAID1 is up and running, but:
  • Synchronizing the RAID can't be done on the Raspberry Pi, because it causes the OS to freeze.
  • When the RAID is properly in-sync, copying larger amount of data onto the RAID1 partition causes the same freeze/lockup.
It comes without a warning, but I've found this in /var/log/messages:
ERROR::dwc_otg_hcd_urb_enqueue:515: Not connected
Haven't figured it out yet completely if this is related, but there are others having problem with USB, seeing the same error message:
[SOLUTION]
Thanks to the posts mentioned above, I was hinted into questioning the power supply. The power supply used was an "Emporia" with 1A and doing a good job for around 2 years already, but still.
I've replaced the Emporia power supply with a "Navilock" (also 1A) and now it seems to work!
  • Old power supply: Emporia travel charger "MSH-TR-018"
  • New power supply: Navilock ultra flat "61863"
Details about the kernel messages are in the post below.
Last edited by peter_b on Sat Mar 15, 2014 3:43 pm, edited 1 time in total.
User avatar
peter_b
Chatterbox
Posts: 383
Joined: Tue Nov 12, 2013 2:05 am

Re: RaspberryPi pukes on software RAID1 over USB

Post by peter_b »

Here are the interesting bits of the kernel logfile (/var/log/messages) before the crash:
NOTE: "..." means that the message was repeated several times.

Code: Select all

Mar 12 20:39:13 hostname kernel: [90750.049479] ERROR::dwc_otg_hcd_urb_enqueue:515: Not connected
Mar 12 20:39:13 hostname kernel: [90750.049479]
...
Mar 12 20:39:13 hostname kernel: [90750.071541] ERROR::dwc_otg_hcd_urb_enqueue:515: Not connected
Mar 12 20:39:13 hostname kernel: [90750.071541]
Then the following block comes right afterwards:

Code: Select all

Mar 12 20:39:13 hostname kernel: [90750.145029] sd 1:0:0:0: [sdb] Unhandled error code
Mar 12 20:39:13 hostname kernel: [90750.145066] sd 1:0:0:0: [sdb]
Mar 12 20:39:13 hostname kernel: [90750.145081] Result: hostbyte=0x07 driverbyte=0x00
Mar 12 20:39:13 hostname kernel: [90750.145097] sd 1:0:0:0: [sdb] CDB:
Mar 12 20:39:13 hostname kernel: [90750.145108] cdb[0]=0x2a: 2a 00 0b 77 5b b0 00 00 f0 00
Mar 12 20:39:13 hostname kernel: [90750.145287] sd 0:0:0:0: [sda] Unhandled error code
Mar 12 20:39:13 hostname kernel: [90750.145309] sd 0:0:0:0: [sda]
Mar 12 20:39:13 hostname kernel: [90750.145322] Result: hostbyte=0x07 driverbyte=0x00
Mar 12 20:39:13 hostname kernel: [90750.145337] sd 0:0:0:0: [sda] CDB:
Mar 12 20:39:13 hostname kernel: [90750.145347] cdb[0]=0x2a: 2a 00 0b 77 5d 90 00 00 f0 00
Mar 12 20:39:13 hostname kernel: [90750.244906] sd 0:0:0:0: [sda] Unhandled error code
Mar 12 20:39:13 hostname kernel: [90750.244943] sd 0:0:0:0: [sda]
Mar 12 20:39:13 hostname kernel: [90750.244958] Result: hostbyte=0x07 driverbyte=0x00
Mar 12 20:39:13 hostname kernel: [90750.244974] sd 0:0:0:0: [sda] CDB:
Mar 12 20:39:13 hostname kernel: [90750.244986] cdb[0]=0x2a: 2a 00 0b 77 5e 80 00 00 f0 00
Mar 12 20:39:13 hostname kernel: [90750.254915] usb 1-1: USB disconnect, device number 2
Mar 12 20:39:13 hostname kernel: [90750.254944] usb 1-1.1: USB disconnect, device number 3
Mar 12 20:39:13 hostname kernel: [90750.255305] smsc95xx 1-1.1:1.0 eth0: unregister 'smsc95xx' usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet
Mar 12 20:39:13 hostname kernel: [90750.255420] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
Followed by:

Code: Select all

Mar 12 20:39:13 hostname kernel: [90750.257319] sd 1:0:0:0: [sdb] Unhandled error code
Mar 12 20:39:13 hostname kernel: [90750.257352] sd 1:0:0:0: [sdb]
Mar 12 20:39:13 hostname kernel: [90750.257367] Result: hostbyte=0x07 driverbyte=0x00
Mar 12 20:39:13 hostname kernel: [90750.257383] sd 1:0:0:0: [sdb] CDB:
Mar 12 20:39:13 hostname kernel: [90750.257395] cdb[0]=0x2a: 2a 00 0b 77 5c a0 00 00 f0 00
Mar 12 20:39:13 hostname kernel: [90750.296078] usb 1-1.3: USB disconnect, device number 5
Mar 12 20:39:13 hostname kernel: [90750.296113] usb 1-1.3.2: USB disconnect, device number 6
Mar 12 20:39:13 hostname kernel: [90750.304999] sd 0:0:0:0: [sda] Unhandled error code
Mar 12 20:39:13 hostname kernel: [90750.305038] sd 0:0:0:0: [sda]
Mar 12 20:39:13 hostname kernel: [90750.305052] Result: hostbyte=0x01 driverbyte=0x00
Mar 12 20:39:13 hostname kernel: [90750.305067] sd 0:0:0:0: [sda] CDB:
Mar 12 20:39:13 hostname kernel: [90750.305079] cdb[0]=0x2a: 2a 00 0b 77 5f 70 00 00 f0 00
Mar 12 20:39:13 hostname kernel: [90750.305769] md: super_written gets error=-5, uptodate=0
Mar 12 20:39:13 hostname kernel: [90750.305914] sd 0:0:0:0: [sda] Unhandled error code
Mar 12 20:39:13 hostname kernel: [90750.305936] sd 0:0:0:0: [sda]
Mar 12 20:39:13 hostname kernel: [90750.305949] Result: hostbyte=0x01 driverbyte=0x00
Mar 12 20:39:13 hostname kernel: [90750.305964] sd 0:0:0:0: [sda] CDB:
Mar 12 20:39:13 hostname kernel: [90750.305975] cdb[0]=0x2a: 2a 00 0b 77 60 60 00 00 f0 00
Mar 12 20:39:13 hostname kernel: [90750.310774] usb 1-1.3.3: USB disconnect, device number 7
Mar 12 20:39:13 hostname kernel: [90750.316534] sd 1:0:0:0: [sdb] Unhandled error code
Mar 12 20:39:13 hostname kernel: [90750.316568] sd 1:0:0:0: [sdb]
Mar 12 20:39:13 hostname kernel: [90750.316583] Result: hostbyte=0x01 driverbyte=0x00
Mar 12 20:39:13 hostname kernel: [90750.316599] sd 1:0:0:0: [sdb] CDB:
Mar 12 20:39:13 hostname kernel: [90750.316611] cdb[0]=0x2a: 2a 00 0b 77 5d 90 00 00 f0 00
Mar 12 20:39:13 hostname kernel: [90750.317402] sd 1:0:0:0: [sdb] Unhandled error code
Mar 12 20:39:13 hostname kernel: [90750.317430] sd 1:0:0:0: [sdb]
Mar 12 20:39:13 hostname kernel: [90750.317445] Result: hostbyte=0x01 driverbyte=0x00
Mar 12 20:39:13 hostname kernel: [90750.317461] sd 1:0:0:0: [sdb] CDB:
Mar 12 20:39:13 hostname kernel: [90750.317471] cdb[0]=0x2a: 2a 00 0b 77 5e 80 00 00 f0 00
Mar 12 20:39:13 hostname kernel: [90750.318156] EXT4-fs warning (device md0): ext4_end_bio:286: I/O error writing to inode 13762562 (offset 111878144 size 126976 starting block 24013490)
Mar 12 20:39:13 hostname kernel: [90750.318691] EXT4-fs warning (device md0): ext4_end_bio:286: I/O error writing to inode 13762562 (offset 112123904 size 126976 starting block 24013550)
...
continuing:

Code: Select all

Mar 12 20:39:14 hostname kernel: [90750.509640] EXT4-fs warning (device md0): ext4_end_bio:286: I/O error writing to inode 13762562 (offset 112001024 size 126976 starting block 24013520)
Mar 12 20:39:14 hostname kernel: [90750.535257] md: super_written gets error=-19, uptodate=0
Mar 12 20:39:14 hostname kernel: [90750.715010] md: super_written gets error=-19, uptodate=0
Mar 12 20:39:14 hostname kernel: [90750.985019] Indeed it is in host mode hprt0 = 00021501
Mar 12 20:39:14 hostname kernel: [90751.265087] usb 1-1: new high-speed USB device number 8 using dwc_otg
Mar 12 20:39:14 hostname kernel: [90751.265417] Indeed it is in host mode hprt0 = 00001101
Mar 12 20:39:14 hostname kernel: [90751.505475] usb 1-1: New USB device found, idVendor=0424, idProduct=9512
Mar 12 20:39:14 hostname kernel: [90751.505524] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Mar 12 20:39:14 hostname kernel: [90751.506640] hub 1-1:1.0: USB hub found
Mar 12 20:39:14 hostname kernel: [90751.506873] hub 1-1:1.0: 3 ports detected
Mar 12 20:39:15 hostname kernel: [90751.785369] usb 1-1.1: new high-speed USB device number 9 using dwc_otg
Mar 12 20:39:15 hostname kernel: [90751.885802] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
Mar 12 20:39:15 hostname kernel: [90751.885839] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Mar 12 20:39:15 hostname kernel: [90751.889046] smsc95xx v1.0.4
Mar 12 20:39:15 hostname kernel: [90751.952907] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:13:af:5d
Mar 12 20:39:15 hostname kernel: [90752.035212] usb 1-1.3: new high-speed USB device number 10 using dwc_otg
Mar 12 20:39:15 hostname kernel: [90752.136604] usb 1-1.3: New USB device found, idVendor=2109, idProduct=2811
Mar 12 20:39:15 hostname kernel: [90752.136639] usb 1-1.3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
Mar 12 20:39:15 hostname kernel: [90752.136659] usb 1-1.3: Product: USB 2.0 HUB
Mar 12 20:39:15 hostname kernel: [90752.136659]
Mar 12 20:39:15 hostname kernel: [90752.140758] hub 1-1.3:1.0: USB hub found
Mar 12 20:39:15 hostname kernel: [90752.141229] hub 1-1.3:1.0: 4 ports detected
Mar 12 20:39:15 hostname kernel: [90752.435328] usb 1-1.3.2: new high-speed USB device number 11 using dwc_otg
Mar 12 20:39:15 hostname kernel: [90752.479874] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
Mar 12 20:39:16 hostname kernel: [90752.546864] usb 1-1.3.2: New USB device found, idVendor=1058, idProduct=1021
Mar 12 20:39:16 hostname kernel: [90752.546897] usb 1-1.3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Mar 12 20:39:16 hostname kernel: [90752.546916] usb 1-1.3.2: Product: Ext HDD 1021
Mar 12 20:39:16 hostname kernel: [90752.546933] usb 1-1.3.2: Manufacturer: Western Digital
Mar 12 20:39:16 hostname kernel: [90752.546950] usb 1-1.3.2: SerialNumber: xxx
Mar 12 20:39:16 hostname kernel: [90752.548040] usb-storage 1-1.3.2:1.0: USB Mass Storage device detected
Mar 12 20:39:16 hostname kernel: [90752.552149] scsi2 : usb-storage 1-1.3.2:1.0
Mar 12 20:39:16 hostname kernel: [90752.645184] usb 1-1.3.3: new high-speed USB device number 12 using dwc_otg
Mar 12 20:39:16 hostname kernel: [90752.756783] usb 1-1.3.3: New USB device found, idVendor=1058, idProduct=1021
Mar 12 20:39:16 hostname kernel: [90752.756819] usb 1-1.3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Mar 12 20:39:16 hostname kernel: [90752.756837] usb 1-1.3.3: Product: Ext HDD 1021
Mar 12 20:39:16 hostname kernel: [90752.756853] usb 1-1.3.3: Manufacturer: Western Digital
Mar 12 20:39:16 hostname kernel: [90752.756870] usb 1-1.3.3: SerialNumber: xxx
Mar 12 20:39:16 hostname kernel: [90752.757944] usb-storage 1-1.3.3:1.0: USB Mass Storage device detected
Mar 12 20:39:16 hostname kernel: [90752.762198] scsi3 : usb-storage 1-1.3.3:1.0
Mar 12 20:39:17 hostname kernel: [90753.552283] scsi 2:0:0:0: Direct-Access     WD       Ext HDD 1021     2002 PQ: 0 ANSI: 4
Mar 12 20:39:17 hostname kernel: [90753.556824] sd 2:0:0:0: [sdc] 2930272256 512-byte logical blocks: (1.50 TB/1.36 TiB)
...
Doing that "device gone, device reconnected" again until it finally bails out with this:

Code: Select all

Mar 12 20:39:18 hostname kernel: [90754.873680] EXT4-fs warning (device md0): ext4_end_bio:286: I/O error writing to inode 13762562 (offset 125681664 size 126976 starting block 24016860)
Mar 12 20:39:18 hostname kernel: [90754.873812] EXT4-fs warning (device md0): ext4_end_bio:286: I/O error writing to inode 13762562 (offset 125804544 size 24576 starting block 24016890)
Mar 12 20:39:18 hostname kernel: [90754.873858] lost page write due to I/O error on md0
Mar 12 20:39:18 hostname kernel: [90754.915236] lost page write due to I/O error on md0
Mar 12 20:39:18 hostname kernel: [90755.125069] md: super_written gets error=-19, uptodate=0
Mar 12 20:46:19 hostname kernel: [91175.584311] lost page write due to I/O error on sda2
Mar 12 20:46:19 hostname kernel: [91175.593637] lost page write due to I/O error on sdb2
Post Reply