interbrain
Posts: 4
Joined: Tue Aug 26, 2014 10:55 am

USB HDD disconnects

Tue Aug 26, 2014 11:39 am

Hello there,

I'm trying to set up a Pi B+ as a low-cost NAS. The network speed isn't a problem as it will mainly be used for streaming movies. Now, on to the problem.

I've got a powered 3TB USB 3.0 HDD that I'm hoping to use as the storage medium for movies and shared files. When I try to copy a file from the Pi over the network, the /dev/sda device disappears and reappears again as /dev/sdb or another letter. This causes the file transfer to fail. I've tried using a USB 2.0 HDD and it seems to work, so I presume it's a problem related to USB 3.0 and the fact that it uses more power than USB 2.0, or maybe due to differences in the SATA to USB adapters.

Judging from what I've been reading, it seems likely that connecting the Pi to a power supply with a high enough capacity would alleviate the problem, but it doesn't. I've tried several power adapters, ranging from 700mA to 4A. I've also tried connecting the HDD to a powered hub to eliminate the possibility that the Pi can't supply enough for the HDD USB interface. Adding max_usb_current=1 to /boot/config.txt doesn't make a difference either.

The drive only loses connection when the network is being stressed. I can read from the drive while SSH'd into the Pi without any problems, but sending files over the network always fails.

Here's the /var/log/syslog information from when it disconnects:

Code: Select all

Aug 26 08:26:14 raspberrypi kernel: [  570.034712] usb 1-1.5.1.4: USB disconnect, device number 14
Aug 26 08:26:14 raspberrypi kernel: [  570.053881] sd 4:0:0:0: [sdd] Unhandled error code
Aug 26 08:26:14 raspberrypi kernel: [  570.053919] sd 4:0:0:0: [sdd]
Aug 26 08:26:14 raspberrypi kernel: [  570.053932] Result: hostbyte=0x01 driverbyte=0x00
Aug 26 08:26:14 raspberrypi kernel: [  570.053949] sd 4:0:0:0: [sdd] CDB:
Aug 26 08:26:14 raspberrypi kernel: [  570.053960] cdb[0]=0x88: 88 00 00 00 00 00 00 07 a3 00 00 00 00 f0 00 00
Aug 26 08:26:14 raspberrypi kernel: [  570.054011] end_request: I/O error, dev sdd, sector 500480
Aug 26 08:26:14 raspberrypi kernel: [  570.054193] sd 4:0:0:0: [sdd] Unhandled error code
Aug 26 08:26:14 raspberrypi kernel: [  570.054218] sd 4:0:0:0: [sdd]
Aug 26 08:26:14 raspberrypi kernel: [  570.054229] Result: hostbyte=0x01 driverbyte=0x00
Aug 26 08:26:14 raspberrypi kernel: [  570.054242] sd 4:0:0:0: [sdd] CDB:
Aug 26 08:26:14 raspberrypi kernel: [  570.054252] cdb[0]=0x88: 88 00 00 00 00 00 00 07 a3 f0 00 00 00 10 00 00
Aug 26 08:26:14 raspberrypi kernel: [  570.054298] end_request: I/O error, dev sdd, sector 500720
Aug 26 08:26:14 raspberrypi kernel: [  570.064151] JBD2: Error -5 detected when updating journal superblock for sdd1-8.
Aug 26 08:26:14 raspberrypi kernel: [  570.064460] Aborting journal on device sdd1-8.
Aug 26 08:26:14 raspberrypi kernel: [  570.064527] JBD2: Error -5 detected when updating journal superblock for sdd1-8.
Aug 26 08:26:14 raspberrypi kernel: [  570.064598] journal commit I/O error
Aug 26 08:26:15 raspberrypi rsyslogd-2177: imuxsock begins to drop messages from pid 2757 due to rate-limiting
Aug 26 08:26:16 raspberrypi kernel: [  572.583938] usb 1-1.5.1.4: new high-speed USB device number 15 using dwc_otg
Aug 26 08:26:16 raspberrypi kernel: [  572.685407] usb 1-1.5.1.4: New USB device found, idVendor=2537, idProduct=1066
Aug 26 08:26:16 raspberrypi kernel: [  572.685445] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 26 08:26:16 raspberrypi kernel: [  572.685462] usb 1-1.5.1.4: Product: NS1066
Aug 26 08:26:16 raspberrypi kernel: [  572.685476] usb 1-1.5.1.4: Manufacturer: Norelsys
Aug 26 08:26:16 raspberrypi kernel: [  572.685490] usb 1-1.5.1.4: SerialNumber: 0123456789ABCDE
Aug 26 08:26:16 raspberrypi kernel: [  572.696194] usb-storage 1-1.5.1.4:1.0: USB Mass Storage device detected
Aug 26 08:26:16 raspberrypi kernel: [  572.704942] scsi5 : usb-storage 1-1.5.1.4:1.0
Aug 26 08:26:19 raspberrypi kernel: [  575.221831] scsi 5:0:0:0: Direct-Access     ATA      ST3000DM001-9YN1 CC9D PQ: 0 ANSI: 6
Aug 26 08:26:19 raspberrypi kernel: [  575.224840] sd 5:0:0:0: Attached scsi generic sg0 type 0
Aug 26 08:26:19 raspberrypi kernel: [  575.226713] sd 5:0:0:0: [sde] Very big device. Trying to use READ CAPACITY(16).
Aug 26 08:26:19 raspberrypi kernel: [  575.227294] sd 5:0:0:0: [sde] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB)
Aug 26 08:26:19 raspberrypi kernel: [  575.227320] sd 5:0:0:0: [sde] 4096-byte physical blocks
Aug 26 08:26:19 raspberrypi kernel: [  575.228012] sd 5:0:0:0: [sde] Write Protect is off
Aug 26 08:26:19 raspberrypi kernel: [  575.228048] sd 5:0:0:0: [sde] Mode Sense: 43 00 00 00
Aug 26 08:26:19 raspberrypi kernel: [  575.229264] sd 5:0:0:0: [sde] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Aug 26 08:26:19 raspberrypi kernel: [  575.230774] sd 5:0:0:0: [sde] Very big device. Trying to use READ CAPACITY(16).
Aug 26 08:26:19 raspberrypi kernel: [  575.298921]  sde: sde1
Aug 26 08:26:19 raspberrypi kernel: [  575.301092] sd 5:0:0:0: [sde] Very big device. Trying to use READ CAPACITY(16).
Aug 26 08:26:19 raspberrypi kernel: [  575.302864] sd 5:0:0:0: [sde] Attached SCSI disk
Sorry if I've been a bit wordy. Thanks for reading.

Tom

interbrain
Posts: 4
Joined: Tue Aug 26, 2014 10:55 am

Re: USB HDD disconnects

Thu Aug 28, 2014 1:13 am

The HDD no longer disconnects with dwc_otg.speed=1 added to /boot/cmdline.txt, but this reduces the network file transfer speed to 500KB/s from the previous 5MB/s, which is too slow. I was hoping for at least 2MB/s.

Anybody have any thoughts on this? I think https://github.com/raspberrypi/linux/issues/578 is the same issue.

User avatar
RaTTuS
Posts: 10829
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: USB HDD disconnects

Thu Aug 28, 2014 7:51 am

what make and model of the HD enclosure post links
what is the HD formatted as
could it be a dodgy lead and/or connection
is it the same when plugged in any port on the RPi?
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

interbrain
Posts: 4
Joined: Tue Aug 26, 2014 10:55 am

Re: USB HDD disconnects

Thu Aug 28, 2014 11:24 am

The enclosure is an ORICO 3588US3-BK (http://www.amazon.com/ORICO-3588US3-3-5 ... B00GAML7OK). There's a 3TB Seagate Barracude ST3000DM001 inside.

The format is ext4. I've tried reformatting as ext2 and fat32, but no difference.

Tried a couple of different cables and all the ports on the Pi. Still refuses to behave.

User avatar
RaTTuS
Posts: 10829
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: USB HDD disconnects

Thu Aug 28, 2014 12:04 pm

My bet is the USB3 - switch it to a USB 2 - you are not going to get USB3 speeds out of it
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

interbrain
Posts: 4
Joined: Tue Aug 26, 2014 10:55 am

Re: USB HDD disconnects

Sat Aug 30, 2014 12:20 pm

USB 2.0 cable in the USB 3.0 port didn't make any difference. Unfortunately the USB 2.0 enclosure only supports up to 2 TB and reports the 3 TB HDD as 756GB.

The issue on GitHub I linked is also for an Orico SATA to USB 3.0 adapter, so maybe there's something funky going on with Orico adapters. I still don't understand why it doesn't disconnect when there's no Ethernet traffic though.

This is actually for a friend, so I don't really want to tell him to just buy another enclosure. Not sure what to do at this point. USB Y cable maybe?

tester_30
Posts: 2
Joined: Tue Dec 09, 2014 5:22 pm

Re: USB HDD disconnects

Tue Dec 09, 2014 5:25 pm

same issue
I use ORICO 3588US3 with WD Green 500 Gb
there is no solution?
Last edited by tester_30 on Wed Dec 10, 2014 6:12 pm, edited 2 times in total.

tester_30
Posts: 2
Joined: Tue Dec 09, 2014 5:22 pm

Re: USB HDD disconnects

Tue Dec 09, 2014 5:45 pm

Code: Select all

Dec  9 19:36:18 raspberrypi kernel: [ 3090.524426] usb 1-1.3.1.1: USB disconnect, device number 6
Dec  9 19:36:18 raspberrypi kernel: [ 3090.532470] sd 0:0:0:0: [sda] Unhandled error code
Dec  9 19:36:18 raspberrypi kernel: [ 3090.532648] sd 0:0:0:0: [sda]  
Dec  9 19:36:18 raspberrypi kernel: [ 3090.532668] Result: hostbyte=0x01 driverbyte=0x00
Dec  9 19:36:18 raspberrypi kernel: [ 3090.532685] sd 0:0:0:0: [sda] CDB: 
Dec  9 19:36:18 raspberrypi kernel: [ 3090.532695] cdb[0]=0x28: 28 00 00 05 f9 88 00 00 f0 00
Dec  9 19:36:18 raspberrypi kernel: [ 3090.532740] end_request: I/O error, dev sda, sector 391560
Dec  9 19:36:18 raspberrypi kernel: [ 3090.534768] sd 0:0:0:0: [sda] Unhandled error code
Dec  9 19:36:18 raspberrypi kernel: [ 3090.534807] sd 0:0:0:0: [sda]  
Dec  9 19:36:18 raspberrypi kernel: [ 3090.534820] Result: hostbyte=0x01 driverbyte=0x00
Dec  9 19:36:18 raspberrypi kernel: [ 3090.534834] sd 0:0:0:0: [sda] CDB: 
Dec  9 19:36:18 raspberrypi kernel: [ 3090.534844] cdb[0]=0x28: 28 00 00 05 fa 78 00 00 f0 00
Dec  9 19:36:18 raspberrypi kernel: [ 3090.534888] end_request: I/O error, dev sda, sector 391800
Dec  9 19:36:19 raspberrypi kernel: [ 3090.609927] EXT4-fs error (device sda): ext4_find_entry:1309: inode #3407880: comm transmission-da: reading directory lblock 0
Dec  9 19:36:19 raspberrypi kernel: [ 3090.625559] EXT4-fs error (device sda): ext4_find_entry:1309: inode #3407880: comm transmission-da: reading directory lblock 0
Dec  9 19:36:19 raspberrypi kernel: [ 3090.641046] EXT4-fs error (device sda): ext4_find_entry:1309: inode #3407880: comm transmission-da: reading directory lblock 0
Dec  9 19:36:19 raspberrypi kernel: [ 3090.656689] EXT4-fs error (device sda): ext4_find_entry:1309: inode #3407880: comm transmission-da: reading directory lblock 0
Dec  9 19:36:19 raspberrypi kernel: [ 3090.672641] EXT4-fs error (device sda): ext4_find_entry:1309: inode #3407880: comm transmission-da: reading directory lblock 0
Dec  9 19:36:19 raspberrypi kernel: [ 3090.688918] EXT4-fs error (device sda): ext4_find_entry:1309: inode #3407880: comm transmission-da: reading directory lblock 0
Dec  9 19:36:19 raspberrypi kernel: [ 3090.962256] usb 1-1.3.1.1: new high-speed USB device number 7 using dwc_otg
Dec  9 19:36:19 raspberrypi kernel: [ 3091.073535] usb 1-1.3.1.1: New USB device found, idVendor=2537, idProduct=1066
Dec  9 19:36:19 raspberrypi kernel: [ 3091.073573] usb 1-1.3.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Dec  9 19:36:19 raspberrypi kernel: [ 3091.073589] usb 1-1.3.1.1: Product: NS1066
Dec  9 19:36:19 raspberrypi kernel: [ 3091.073603] usb 1-1.3.1.1: Manufacturer: Norelsys
Dec  9 19:36:19 raspberrypi kernel: [ 3091.073617] usb 1-1.3.1.1: SerialNumber: 0123456789ABCDE
Dec  9 19:36:19 raspberrypi kernel: [ 3091.082351] usb-storage 1-1.3.1.1:1.0: USB Mass Storage device detected
Dec  9 19:36:19 raspberrypi kernel: [ 3091.087726] scsi1 : usb-storage 1-1.3.1.1:1.0
Dec  9 19:36:21 raspberrypi kernel: [ 3092.612848] scsi 1:0:0:0: Direct-Access     NORELSYS 106X             0A01 PQ: 0 ANSI: 6
Dec  9 19:36:21 raspberrypi kernel: [ 3092.616810] sd 1:0:0:0: Attached scsi generic sg0 type 0
Dec  9 19:36:21 raspberrypi kernel: [ 3092.617825] sd 1:0:0:0: [sdb] 976771055 512-byte logical blocks: (500 GB/465 GiB)
Dec  9 19:36:21 raspberrypi kernel: [ 3092.618523] sd 1:0:0:0: [sdb] Write Protect is off
Dec  9 19:36:21 raspberrypi kernel: [ 3092.618556] sd 1:0:0:0: [sdb] Mode Sense: 43 00 00 00
Dec  9 19:36:21 raspberrypi kernel: [ 3092.619226] sd 1:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Dec  9 19:36:21 raspberrypi kernel: [ 3092.641539]  sdb: unknown partition table
Dec  9 19:36:21 raspberrypi kernel: [ 3092.645595] sd 1:0:0:0: [sdb] Attached SCSI disk
Last edited by tester_30 on Wed Dec 10, 2014 2:04 am, edited 1 time in total.

rpitest
Posts: 1
Joined: Tue Jan 06, 2015 6:41 pm

Re: USB HDD disconnects

Tue Jan 06, 2015 6:56 pm

The same issue. RPI + ORICO 3588US3 USB 3.0 + WD Blue 640 Gb ext3. The drive causes errors after some activity via network (playing movie from shared samba resource)

Code: Select all

pi@raspberrypi ~ $ tail -f /var/log/messages
Jan  6 18:19:27 raspberrypi kernel: [   16.253973] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
Jan  6 18:19:27 raspberrypi kernel: [   16.342421] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
Jan  6 18:19:27 raspberrypi kernel: [   19.211895] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
Jan  6 18:19:27 raspberrypi kernel: [   20.703467] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1
Jan  6 18:19:30 raspberrypi kernel: [   26.591655] Adding 102396k swap on /var/swap.  Priority:-1 extents:1 across:102396k SSFS
Jan  6 18:29:43 raspberrypi rsyslogd-2177: imuxsock begins to drop messages from pid 2154 due to rate-limiting
Jan  6 18:29:55 raspberrypi rsyslogd-2177: imuxsock lost 144 messages from pid 2154 due to rate-limiting
Jan  6 18:29:55 raspberrypi rsyslogd-2177: imuxsock begins to drop messages from pid 2154 due to rate-limiting
Jan  6 18:34:49 raspberrypi kernel: [  349.020237] usb 1-1.3: USB disconnect, device number 4
Jan  6 18:34:49 raspberrypi kernel: [  349.040063] sd 0:0:0:0: [sda] Unhandled error code
Jan  6 18:34:49 raspberrypi kernel: [  349.040105] sd 0:0:0:0: [sda]
Jan  6 18:34:49 raspberrypi kernel: [  349.040118] Result: hostbyte=0x01 driverbyte=0x00
Jan  6 18:34:49 raspberrypi kernel: [  349.040132] sd 0:0:0:0: [sda] CDB:
Jan  6 18:34:49 raspberrypi kernel: [  349.040142] cdb[0]=0x28: 28 00 28 63 95 29 00 00 90 00
Jan  6 18:34:49 raspberrypi kernel: [  349.040374] sd 0:0:0:0: [sda] Unhandled error code
Jan  6 18:34:49 raspberrypi kernel: [  349.040398] sd 0:0:0:0: [sda]
Jan  6 18:34:49 raspberrypi kernel: [  349.040409] Result: hostbyte=0x01 driverbyte=0x00
Jan  6 18:34:49 raspberrypi kernel: [  349.040422] sd 0:0:0:0: [sda] CDB:
Jan  6 18:34:49 raspberrypi kernel: [  349.040431] cdb[0]=0x28: 28 00 28 63 96 09 00 00 20 00
Jan  6 18:34:49 raspberrypi kernel: [  349.439358] usb 1-1.3: new high-speed USB device number 5 using dwc_otg
Jan  6 18:34:49 raspberrypi kernel: [  349.540607] usb 1-1.3: New USB device found, idVendor=2537, idProduct=1066
Jan  6 18:34:49 raspberrypi kernel: [  349.540641] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan  6 18:34:49 raspberrypi kernel: [  349.540657] usb 1-1.3: Product: NS1066
Jan  6 18:34:49 raspberrypi kernel: [  349.540674] usb 1-1.3: Manufacturer: Norelsys
Jan  6 18:34:49 raspberrypi kernel: [  349.540688] usb 1-1.3: SerialNumber: 0123456789ABCDE
Jan  6 18:34:49 raspberrypi kernel: [  349.544450] usb-storage 1-1.3:1.0: USB Mass Storage device detected
Jan  6 18:34:49 raspberrypi kernel: [  349.545262] scsi1 : usb-storage 1-1.3:1.0
Jan  6 18:34:51 raspberrypi kernel: [  351.069701] scsi 1:0:0:0: Direct-Access     NORELSYS 106X             3B01 PQ: 0 ANSI: 6
Jan  6 18:34:51 raspberrypi kernel: [  351.073726] sd 1:0:0:0: Attached scsi generic sg0 type 0
Jan  6 18:34:51 raspberrypi kernel: [  351.074632] sd 1:0:0:0: [sdb] 1250263728 512-byte logical blocks: (640 GB/596 GiB)
Jan  6 18:34:51 raspberrypi kernel: [  351.075326] sd 1:0:0:0: [sdb] Write Protect is off
Jan  6 18:34:51 raspberrypi kernel: [  351.076046] sd 1:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Jan  6 18:34:51 raspberrypi kernel: [  351.120532]  sdb: sdb1
Jan  6 18:34:51 raspberrypi kernel: [  351.125092] sd 1:0:0:0: [sdb] Attached SCSI disk
Jan  6 18:35:11 raspberrypi kernel: [  371.235241] EXT4-fs warning (device sda1): __ext4_read_dirblock:674: error reading directory block (ino 12541953, block 0)
Jan  6 18:35:11 raspberrypi kernel: [  371.235461] EXT4-fs warning (device sda1): __ext4_read_dirblock:674: error reading directory block (ino 12541953, block 0)
Jan  6 18:35:11 raspberrypi kernel: [  371.238035] EXT4-fs warning (device sda1): __ext4_read_dirblock:674: error reading directory block (ino 12541953, block 0)
Jan  6 18:35:11 raspberrypi kernel: [  371.242541] EXT4-fs warning (device sda1): __ext4_read_dirblock:674: error reading directory block (ino 12541953, block 0)
Jan  6 18:35:11 raspberrypi kernel: [  371.244885] EXT4-fs warning (device sda1): __ext4_read_dirblock:674: error reading directory block (ino 12541953, block 0)
Jan  6 18:35:11 raspberrypi kernel: [  371.256415] EXT4-fs warning (device sda1): __ext4_read_dirblock:674: error reading directory block (ino 12541953, block 0)

danm
Posts: 1
Joined: Thu May 21, 2015 10:37 pm

Re: USB HDD disconnects

Thu May 21, 2015 10:38 pm

Have you by chance tried installing the latest firmware for the controller from here? http://prolificusa.com/portfolio/pl-277 ... ontroller/

I am curious if this fixes the issue, but sadly I do not have a handy Windows computer with which I can try the firmware updater.

cageyz
Posts: 1
Joined: Fri Jun 19, 2015 7:00 pm

Re: USB HDD disconnects

Fri Jun 19, 2015 7:02 pm

I have solved this problem. The ns1066 chipset (used by orico 6518US3) has some compatibility issues so that when I changed the disk dock to orico 6518S3(which uses ASM1153E chipset), there is no disconnection anymore. Leave ns1066 far away from Raspberry PI.

skydiver
Posts: 1
Joined: Sat Sep 26, 2015 8:05 pm

Re: USB HDD disconnects

Sat Sep 26, 2015 8:12 pm

Time goes by but the problem persists.
Have the exact same issue: ORICO 3588US3 enclosure containing a 2TB disk, ntfs-3g mounted and Samba shared on RPi Model B+ running Raspbian.

I actually have two of those connected and am experiencing the same behavior on both drives: they goes out of sync with errors in syslog as described in previous posts.

Is this anyhow solvable?

standin000
Posts: 19
Joined: Wed Dec 03, 2014 5:34 am

Re: USB HDD disconnects

Fri Jan 20, 2017 9:24 am

interbrain wrote:The HDD no longer disconnects with dwc_otg.speed=1 added to /boot/cmdline.txt, but this reduces the network file transfer speed to 500KB/s from the previous 5MB/s, which is too slow. I was hoping for at least 2MB/s.

Anybody have any thoughts on this? I think https://github.com/raspberrypi/linux/issues/578 is the same issue.

thanks, I got the reason of my problem.

sbrabec
Posts: 1
Joined: Sun Jul 28, 2019 5:33 am

Re: USB HDD disconnects

Sun Jul 28, 2019 5:45 am

At least Orico 3588US3-V1 has one ugly bug in the firmware:
The auto-shutdown feature ignores running reads. To prevent auto-shutdown while reading, you have to regularly write.
I am using following work around:

Code: Select all

while touch /run/media/sbrabec/Orico/temp_stamp ; do rm /run/media/sbrabec/Orico/temp_stamp ; sleep 20 ; done
Maybe it is possible to write a kernel quirk for that (without actually writing any data to the disk), but I am satisfied with this solution. When this script is running, Orico 3588US3-V1 works 100% reliably.

Return to “Troubleshooting”