msiot
Posts: 3
Joined: Tue Apr 27, 2021 5:12 pm

Hard drives connected to RPi4 via USB 3 port get randomly disconnected

Tue Apr 27, 2021 7:11 pm

It seems that there are a lot of users having troubles with their storage drives attached to Raspberry Pi, however there is no proper solution of solving these issues. In a lot of topics users reported that their drive disconnects from Raspberry PI.
In this topic I wanna report my hardware and hopefully there is something that can be done about. Sorry that it is a bit long, but I think it is better if I provide as more information I can.

I own an Icy Box IB-RD3621U3 that is actually a box with its own power supply, a USB 3.0 connection with UASP support that can host 2 x 3.5 Inch SATA HDDs.
In my configuration I connected 2 x WD Red NAS Drive of 4 TB - WD40EFRX. Both HDDs are formatted in ext4 and the RAID support is disabled.

My purpose was to setup a simple NAS server solution where I can backup my files. By doing some tests I was quite satisfied regarding its performance as I could almost reach the maximum speed the 1Gbps Ethernet port and I could also use hd-idle to stop spinning the disks after 10 min of inactivity.

The trouble that I have is that randomly it resets or disconnects from Raspberry Pi.
To be more concise, I'm going to explain the exact behaviour. I connect the box to RPi and can play media for 2-3 hours without issues, leave it to rest for some other hours (3-4 hours) where disks won't be spinning. After that I can again access files and the drives start spinning and everything works as expected. Next day if I'm luck it will still work but most probably after 2 days the drives are not accessible anymore.

I tested this during more than 1 year and with several kernels or Raspbian releases including the latest releases.
I tried to add the quirks provided in this topic.
Nothing of these couldn't help me fix the issue and it is annoying and useless having such kind of unreliable system.

Some additional informations:

Code: Select all

lsusb
Bus 002 Device 016: ID 152d:0562 JMicron Technology Corp. / JMicron USA Technology Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Code: Select all

# UASP is disabled
lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
    |__ Port 2: Dev 16, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M

Code: Select all

# entries fstab
UUID=139a6cdc-e380-45e4-971b-34f6b86aa47f /media/usb0 ext4 noauto,x-systemd.automount,x-systemd.device-timeout=10,auto,users,rw,nofail 0 0
UUID=c757f3f9-38bd-4634-888b-92057f0b500b /media/usb1 ext4 noauto,x-systemd.automount,x-systemd.device-timeout=10,auto,users,rw,nofail 0 0

Code: Select all

lsblk -o NAME,SIZE,UUID,MOUNTPOINT,TYPE,REV,STATE,FSUSED
sdd          3.7T                                                 disk 0106 running
└─sdd1       3.7T 139a6cdc-e380-45e4-971b-34f6b86aa47f            part
sde          3.7T                                                 disk 0106 running
└─sde1       3.7T c757f3f9-38bd-4634-888b-92057f0b500b            part
The disks should normally mount to /dev/sda1 and /dev/sdb1, however after it disconnects takes the following /dev/sd* or in some cases they don't appear to be mounted anymore or just 1 of the disks mounted.
The solution to overcome this is that I manually unmount and mount again the disks or disconnect the usb cable and connect again. Everything will come back to normal in this case, but the situation repeats after 1-2 days or sometimes earlier.

Please let me know if I can provide additional information for debugging this or give me suggestion of what can I try.
I was thinking of creating a docker container that is watching the logs and remount partitions, however would like to get your opinion beforehand in case it can be solved in a different way.
Last edited by msiot on Tue Apr 27, 2021 7:16 pm, edited 1 time in total.


LTolledo
Posts: 5369
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Hard drives connected to RPi4 via USB 3 port get randomly disconnected

Thu May 06, 2021 9:11 pm

the usual suspect: JMicron

ever tried ones with ASMedia?
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

ejolson
Posts: 7248
Joined: Tue Mar 18, 2014 11:47 am

Re: Hard drives connected to RPi4 via USB 3 port get randomly disconnected

Thu May 06, 2021 9:35 pm

msiot wrote:
Tue Apr 27, 2021 7:11 pm
It seems that there are a lot of users having troubles with their storage drives attached to Raspberry Pi, however there is no proper solution of solving these issues. In a lot of topics users reported that their drive disconnects from Raspberry PI.
In this topic I wanna report my hardware and hopefully there is something that can be done about. Sorry that it is a bit long, but I think it is better if I provide as more information I can.

I own an Icy Box IB-RD3621U3 that is actually a box with its own power supply, a USB 3.0 connection with UASP support that can host 2 x 3.5 Inch SATA HDDs.
In my configuration I connected 2 x WD Red NAS Drive of 4 TB - WD40EFRX. Both HDDs are formatted in ext4 and the RAID support is disabled.

My purpose was to setup a simple NAS server solution where I can backup my files. By doing some tests I was quite satisfied regarding its performance as I could almost reach the maximum speed the 1Gbps Ethernet port and I could also use hd-idle to stop spinning the disks after 10 min of inactivity.

The trouble that I have is that randomly it resets or disconnects from Raspberry Pi.
To be more concise, I'm going to explain the exact behaviour. I connect the box to RPi and can play media for 2-3 hours without issues, leave it to rest for some other hours (3-4 hours) where disks won't be spinning. After that I can again access files and the drives start spinning and everything works as expected. Next day if I'm luck it will still work but most probably after 2 days the drives are not accessible anymore.

I tested this during more than 1 year and with several kernels or Raspbian releases including the latest releases.
I tried to add the quirks provided in this topic.
Nothing of these couldn't help me fix the issue and it is annoying and useless having such kind of unreliable system.

Some additional informations:

Code: Select all

lsusb
Bus 002 Device 016: ID 152d:0562 JMicron Technology Corp. / JMicron USA Technology Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Code: Select all

# UASP is disabled
lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
    |__ Port 2: Dev 16, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M

Code: Select all

# entries fstab
UUID=139a6cdc-e380-45e4-971b-34f6b86aa47f /media/usb0 ext4 noauto,x-systemd.automount,x-systemd.device-timeout=10,auto,users,rw,nofail 0 0
UUID=c757f3f9-38bd-4634-888b-92057f0b500b /media/usb1 ext4 noauto,x-systemd.automount,x-systemd.device-timeout=10,auto,users,rw,nofail 0 0

Code: Select all

lsblk -o NAME,SIZE,UUID,MOUNTPOINT,TYPE,REV,STATE,FSUSED
sdd          3.7T                                                 disk 0106 running
└─sdd1       3.7T 139a6cdc-e380-45e4-971b-34f6b86aa47f            part
sde          3.7T                                                 disk 0106 running
└─sde1       3.7T c757f3f9-38bd-4634-888b-92057f0b500b            part
The disks should normally mount to /dev/sda1 and /dev/sdb1, however after it disconnects takes the following /dev/sd* or in some cases they don't appear to be mounted anymore or just 1 of the disks mounted.
The solution to overcome this is that I manually unmount and mount again the disks or disconnect the usb cable and connect again. Everything will come back to normal in this case, but the situation repeats after 1-2 days or sometimes earlier.

Please let me know if I can provide additional information for debugging this or give me suggestion of what can I try.
I was thinking of creating a docker container that is watching the logs and remount partitions, however would like to get your opinion beforehand in case it can be solved in a different way.
Can you verify whether the USB enclosure is accidentally feeding powering power to the Pi backwards through the USB cable?

I think the noise from the fighting which occurs when two power are connected together like that may be responsible for the recurring disconnects you see.

If anyone has an easy way way to check if an enclosure or hub has this fault, it would be great to hear about it.

User avatar
Gavinmc42
Posts: 5694
Joined: Wed Aug 28, 2013 3:31 am

Re: Hard drives connected to RPi4 via USB 3 port get randomly disconnected

Fri May 07, 2021 1:08 am

the usual suspect: JMicron
ever tried ones with ASMedia?
What is the current situation with JMicron and the VL805?
https://github.com/raspberrypi/rpi-eeprom/issues/316

VL805 firmware
https://www.raspberrypi.org/documentati ... teeprom.md

Nice to know when this changed. What revision does OP have?
The VLI805 USB firmware EEPROM image - ignored on 1.4 board revision which does not have a dedicated VLI EEPROM
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

ejolson
Posts: 7248
Joined: Tue Mar 18, 2014 11:47 am

Re: Hard drives connected to RPi4 via USB 3 port get randomly disconnected

Fri May 07, 2021 2:47 am

Gavinmc42 wrote:
Fri May 07, 2021 1:08 am
the usual suspect: JMicron
ever tried ones with ASMedia?
What is the current situation with JMicron and the VL805?
https://github.com/raspberrypi/rpi-eeprom/issues/316

VL805 firmware
https://www.raspberrypi.org/documentati ... teeprom.md

Nice to know when this changed. What revision does OP have?
The VLI805 USB firmware EEPROM image - ignored on 1.4 board revision which does not have a dedicated VLI EEPROM
I don't know. Fido loaned me a 4-bay USB enclosure because the SMR drives were causing problems with the ZFS port for the SuperPET. It identifies as

Code: Select all

JMicron Technology Corp. / JMicron USA Technology Corp. External Disk 3.0
and has never given any trouble on a Pi, though right now it's connected to x86 server that provides backing store for the 2U Pi Cloud.

My impression is the manufacturer of that 4-bay enclosure is third tier while ICY DOCK is possibly fourth tier (whatever that means). The fact that the ICY DOCK mentioned in the original post of this thread works well for a couple days at a time is promising; however, it would be nice if the stability problems could be fixed. I suspect power back feeding or an insufficient supply are the more likely problems, but who knows.

Bartolo
Posts: 66
Joined: Fri Apr 03, 2020 2:57 pm

Re: Hard drives connected to RPi4 via USB 3 port get randomly disconnected

Fri May 07, 2021 1:40 pm

Isn't this related to this problem? If so there is kind of a solution.

msiot
Posts: 3
Joined: Tue Apr 27, 2021 5:12 pm

Re: Hard drives connected to RPi4 via USB 3 port get randomly disconnected

Mon May 17, 2021 6:57 pm

LTolledo wrote:
Thu May 06, 2021 9:11 pm
the usual suspect: JMicron

ever tried ones with ASMedia?
I could read in many places that indeed JMicron is a bad chip. I don't have one with ASMedia and would like to give a try, however doesn't seems be an easy option to connect 2 x HDDs of 3.5 inch. Would be great the issue can be solved using my current setup.


ejolson wrote:
Thu May 06, 2021 9:35 pm
Can you verify whether the USB enclosure is accidentally feeding powering power to the Pi backwards through the USB cable?

I think the noise from the fighting which occurs when two power are connected together like that may be responsible for the recurring disconnects you see.

If anyone has an easy way way to check if an enclosure or hub has this fault, it would be great to hear about it.
Would be nice to know how can I check that. I tried to measure the voltage between first and forth usb pin (usb cable disconnected from pi) and don't get any voltage. I think this happens because when I pull out usb cable, HDDs and cooler stop spinning (suspend mode).

Gavinmc42 wrote:
Fri May 07, 2021 1:08 am
VL805 firmware
Mine is identified as:

Code: Select all

Bus 002 Device 026: ID 152d:0562 JMicron Technology Corp. / JMicron USA Technology Corp.
and in syslog I can see it as

Code: Select all

Product: JMS56x Series
Manufacturer: JMicron
SerialNumber: RANDOM__1ACDEBB6A084
Bartolo wrote:
Fri May 07, 2021 1:40 pm
Isn't this related to this problem? If so there is kind of a solution.
I already tried the quirk, the quirk is applied but still it doesn't help.

Return to “Troubleshooting”