We use some essential cookies to make our website work.

We use optional cookies, as detailed in our cookie policy, to remember your settings and understand how you use our website.

Garik First
Posts: 25
Joined: Thu Jun 11, 2020 9:32 am

External HDD don’t reconnect after reboot

Thu Jun 11, 2020 9:44 am

Hi, I have a problem with my external HDD in Orico Enclosure, HDD is Western Digital Red 3TB, enclosure is ORICO 3139U3-CR (with it’s own power supply).

Pi detects HDD (and UASP worming and r/w speeds are good) and able to mount it, but, if I unmount drive by myself, then wait around 3-5 min, and then do sudo reboot everything is fine, but if I just reboot system, or unmount and reboot right after the unmount, I can’t see hdd in lsblk and lsusb, and got strange dmesg errors until I turn off/on hdd power by button on case - then system detects drive again.

dmesg output after "fast" reboot:
[ 632.066778] usb usb2-port2: attempt power cycle
[ 636.746563] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
[ 641.086642] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
[ 641.086939] usb usb2-port2: unable to enumerate USB device
[ 645.406716] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
[ 649.946790] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?

and after manual off/on enclosure power:
[ 653.037100] usb 2-2: new SuperSpeed Gen 1 USB device number 119 using xhci_hcd
[ 653.068350] usb 2-2: New USB device found, idVendor=0080, idProduct=0578, bcdDevice= 1.04
[ 653.068366] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 653.068380] usb 2-2: Product: External USB 3.0
[ 653.068392] usb 2-2: Manufacturer: JMicron
[ 653.068404] usb 2-2: SerialNumber: 2015033100077
[ 653.101849] scsi host0: uas
[ 653.103720] scsi 0:0:0:0: Direct-Access External USB 3.0 0104 PQ: 0 ANSI: 6
[ 653.110851] sd 0:0:0:0: [sda] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
[ 653.110868] sd 0:0:0:0: [sda] 4096-byte physical blocks
[ 653.111083] sd 0:0:0:0: [sda] Write Protect is off
[ 653.111098] sd 0:0:0:0: [sda] Mode Sense: 53 00 00 08
[ 653.120098] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 653.120949] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
[ 653.192944] sda: sda1
[ 653.195581] sd 0:0:0:0: [sda] Attached SCSI disk
[ 653.209509] sd 0:0:0:0: Attached scsi generic sg0 type 0

lsusb -t (after drive connects)
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
|__ Port 2: Dev 119, If 0, Class=Mass Storage, Driver=uas, 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

User avatar
Botspot
Posts: 2008
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas

Re: External HDD don’t reconnect after reboot

Thu Jun 11, 2020 11:29 pm

Is it possible that your hdd is still spinning upon the next "fast-boot", and that may be causing some interference?
Just a thought.
Easily install anything on your Pi using Pi-Apps. Over 2 million users.
Over 200 apps including image editors, IDEs, games, web browsers, appearance themes, and more to upgrade your Raspberry Pi desktop.
More info: https://github.com/Botspot/pi-apps

Garik First
Posts: 25
Joined: Thu Jun 11, 2020 9:32 am

Re: External HDD don’t reconnect after reboot

Fri Jun 12, 2020 10:14 am

Botspot wrote:
Thu Jun 11, 2020 11:29 pm
Is it possible that your hdd is still spinning upon the next "fast-boot", and that may be causing some interference?
Just a thought.
Maybe, but if it’s already happened - there is no way to reconnect it but force poweroff, reconnecting USB, etc - no result, no output from lsblk and lsusb. Also, disk spins all the time when case powered on (no spin down)

Garik First
Posts: 25
Joined: Thu Jun 11, 2020 9:32 am

Re: External HDD don’t reconnect after reboot

Wed Jun 24, 2020 8:24 am

Guys, any ideas? I still can’t find out the solution

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

Re: External HDD don’t reconnect after reboot

Wed Jun 24, 2020 11:28 am

I have 2 connected on a RPi4B-2G (minus the actual case)
RPi4B-2GNAS_top.jpg
RPi4B-2GNAS_top.jpg (253.41 KiB) Viewed 4670 times

HDDs always reconnects after reboot, both of them
the USB cables shown are even longer (and curled up inside) than the ones supplied by Orico

my PSU is a single 12v 4A power brick supplying power to the setup
a buck converter supplies power from 12v to 5.1v to the RPi4B-2G

(maybe 8TB is better than 3TB?)
"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: 13734
Joined: Tue Mar 18, 2014 11:47 am

Re: External HDD don’t reconnect after reboot

Wed Jun 24, 2020 3:01 pm

Garik First wrote:
Wed Jun 24, 2020 8:24 am
Guys, any ideas? I still can’t find out the solution
Have you tried unloading and reloading the USB storage module? It may also be possible to issue some sort of USB port reset that allows the drive to reconnect, but I've not experimented how this works on the 4B.

An alternative is to create a shutdown script which unmounts the drive and waits the minutes before continuing, as you indicate this as a work around.

That's a good heads up on the Orico enclosure, sounds like a timing issue. You could also try interesting a USB3 hub between the Pi and the enclosure to see if that makes a difference.

Garik First
Posts: 25
Joined: Thu Jun 11, 2020 9:32 am

Re: External HDD don’t reconnect after reboot

Thu Jul 30, 2020 5:23 pm

ejolson wrote:
Wed Jun 24, 2020 3:01 pm
Garik First wrote:
Wed Jun 24, 2020 8:24 am
Guys, any ideas? I still can’t find out the solution
Have you tried unloading and reloading the USB storage module? It may also be possible to issue some sort of USB port reset that allows the drive to reconnect, but I've not experimented how this works on the 4B.

An alternative is to create a shutdown script which unmounts the drive and waits the minutes before continuing, as you indicate this as a work around.

That's a good heads up on the Orico enclosure, sounds like a timing issue. You could also try interesting a USB3 hub between the Pi and the enclosure to see if that makes a difference.
How do I unload and load again usb module? This seems like working solution, but I can’t find what exactly should I do.

Garik First
Posts: 25
Joined: Thu Jun 11, 2020 9:32 am

Re: External HDD don’t reconnect after reboot

Sun Aug 02, 2020 7:24 am

So, I tried to power off/on USB hub with uhubctl (when my HDD was in this no connected state):

Code: Select all

pi@raspberrypi:~ $ sudo uhubctl -a 0
Current status for hub 2 [1d6b:0003 xHCI Host Controller 0000:01:00.0, USB 3.00, 4 ports]
  Port 1: 02a0 power 5gbps Rx.Detect
  Port 2: fffffff9 power reset oc connect []
  Port 3: 02a0 power 5gbps Rx.Detect
  Port 4: 02a0 power 5gbps Rx.Detect
Sent power off request
New status for hub 2 [1d6b:0003 xHCI Host Controller 0000:01:00.0, USB 3.00, 4 ports]
  Port 1: 0080 off
  Port 2: 0351 power 5gbps Compliance reset connect []
  Port 3: 0080 off
  Port 4: 0080 off
Current status for hub 1 [1d6b:0002 Linux 5.4.51-v7l+ xhci-hcd xHCI Host Controller 0000:01:00.0, USB 2.00, 1 ports]
  Port 1: 0507 power highspeed suspend enable connect [2109:3431 USB2.0 Hub, USB 2.10, 4 ports]
Sent power off request
New status for hub 1 [1d6b:0002 Linux 5.4.51-v7l+ xhci-hcd xHCI Host Controller 0000:01:00.0, USB 2.00, 1 ports]
  Port 1: 0000 off
But it seems like turning all off doesn’t working, because I see same error messages in dmesg:

Code: Select all

[74074.375498] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
[74078.725598] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
[74078.725955] usb usb2-port2: attempt power cycle
[74083.405661] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
And I got the same result after power cycle:

Code: Select all

pi@raspberrypi:~ $ sudo uhubctl -l 2 -p 2 -a cycle
Current status for hub 2 [1d6b:0003 Linux 5.4.51-v7l+ xhci-hcd xHCI Host Controller 0000:01:00.0, USB 3.00, 4 ports]
Port 2: 0351 power 5gbps Compliance reset connect []
Sent power off request
New status for hub 2 [1d6b:0003 Linux 5.4.51-v7l+ xhci-hcd xHCI Host Controller 0000:01:00.0, USB 3.00, 4 ports]
Port 2: 0351 power 5gbps Compliance reset connect []
Sent power on request
New status for hub 2 [1d6b:0003 Linux 5.4.51-v7l+ xhci-hcd xHCI Host Controller 0000:01:00.0, USB 3.00, 4 ports]
Port 2: 0351 power 5gbps Compliance reset connect []
Current status for hub 1 [1d6b:0002 Linux 5.4.51-v7l+ xhci-hcd xHCI Host Controller 0000:01:00.0, USB 2.00, 1 ports]
Sent power off request
New status for hub 1 [1d6b:0002 Linux 5.4.51-v7l+ xhci-hcd xHCI Host Controller 0000:01:00.0, USB 2.00, 1 ports]
Sent power on request
New status for hub 1 [1d6b:0002 Linux 5.4.51-v7l+ xhci-hcd xHCI Host Controller 0000:01:00.0, USB 2.00, 1 ports]

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

Re: External HDD don’t reconnect after reboot

Sun Aug 02, 2020 2:58 pm

Garik First wrote:
Sun Aug 02, 2020 7:24 am
So, I tried to power off/on USB hub with uhubctl (when my HDD was in this no connected state):

Code: Select all

pi@raspberrypi:~ $ sudo uhubctl -a 0
Current status for hub 2 [1d6b:0003 xHCI Host Controller 0000:01:00.0, USB 3.00, 4 ports]
  Port 1: 02a0 power 5gbps Rx.Detect
  Port 2: fffffff9 power reset oc connect []
  Port 3: 02a0 power 5gbps Rx.Detect
  Port 4: 02a0 power 5gbps Rx.Detect
Sent power off request
New status for hub 2 [1d6b:0003 xHCI Host Controller 0000:01:00.0, USB 3.00, 4 ports]
  Port 1: 0080 off
  Port 2: 0351 power 5gbps Compliance reset connect []
  Port 3: 0080 off
  Port 4: 0080 off
Current status for hub 1 [1d6b:0002 Linux 5.4.51-v7l+ xhci-hcd xHCI Host Controller 0000:01:00.0, USB 2.00, 1 ports]
  Port 1: 0507 power highspeed suspend enable connect [2109:3431 USB2.0 Hub, USB 2.10, 4 ports]
Sent power off request
New status for hub 1 [1d6b:0002 Linux 5.4.51-v7l+ xhci-hcd xHCI Host Controller 0000:01:00.0, USB 2.00, 1 ports]
  Port 1: 0000 off
But it seems like turning all off doesn’t working, because I see same error messages in dmesg:

Code: Select all

[74074.375498] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
[74078.725598] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
[74078.725955] usb usb2-port2: attempt power cycle
[74083.405661] usb usb2-port2: Cannot enable. Maybe the USB cable is bad?
And I got the same result after power cycle:

Code: Select all

pi@raspberrypi:~ $ sudo uhubctl -l 2 -p 2 -a cycle
Current status for hub 2 [1d6b:0003 Linux 5.4.51-v7l+ xhci-hcd xHCI Host Controller 0000:01:00.0, USB 3.00, 4 ports]
Port 2: 0351 power 5gbps Compliance reset connect []
Sent power off request
New status for hub 2 [1d6b:0003 Linux 5.4.51-v7l+ xhci-hcd xHCI Host Controller 0000:01:00.0, USB 3.00, 4 ports]
Port 2: 0351 power 5gbps Compliance reset connect []
Sent power on request
New status for hub 2 [1d6b:0003 Linux 5.4.51-v7l+ xhci-hcd xHCI Host Controller 0000:01:00.0, USB 3.00, 4 ports]
Port 2: 0351 power 5gbps Compliance reset connect []
Current status for hub 1 [1d6b:0002 Linux 5.4.51-v7l+ xhci-hcd xHCI Host Controller 0000:01:00.0, USB 2.00, 1 ports]
Sent power off request
New status for hub 1 [1d6b:0002 Linux 5.4.51-v7l+ xhci-hcd xHCI Host Controller 0000:01:00.0, USB 2.00, 1 ports]
Sent power on request
New status for hub 1 [1d6b:0002 Linux 5.4.51-v7l+ xhci-hcd xHCI Host Controller 0000:01:00.0, USB 2.00, 1 ports]
Do you know whether the enclosure is normally mounted with usb_storage or UAS? Try typing

$ sudo lsusb -t

to find out. After this, it may be possible to unload and load the stuck drivers.

I suspect it might be easier to add a shutdown script that automatically waits 3 minutes after the drives have been unmounted than to figure out how to unwedge hardware that got stuck because it was in the wrong state during the reboot. Good luck!

Garik First
Posts: 25
Joined: Thu Jun 11, 2020 9:32 am

Re: External HDD don’t reconnect after reboot

Mon Aug 03, 2020 7:38 am

ejolson wrote:
Sun Aug 02, 2020 2:58 pm

Do you know whether the enclosure is normally mounted with usb_storage or UAS? Try typing

$ sudo lsusb -t

to find out. After this, it may be possible to unload and load the stuck drivers.

I suspect it might be easier to add a shutdown script that automatically waits 3 minutes after the drives have been unmounted than to figure out how to unwedge hardware that got stuck because it was in the wrong state during the reboot. Good luck!
Normally it’s UAS, when it cannot connect obviously there is nothing in lsusb output:

pi@raspberrypi:~ $ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 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

Can you give me suggestion what driver I have to unload in my case?

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

Re: External HDD don’t reconnect after reboot

Mon Aug 03, 2020 4:52 pm

Garik First wrote:
Mon Aug 03, 2020 7:38 am
ejolson wrote:
Sun Aug 02, 2020 2:58 pm

Do you know whether the enclosure is normally mounted with usb_storage or UAS? Try typing

$ sudo lsusb -t

to find out. After this, it may be possible to unload and load the stuck drivers.

I suspect it might be easier to add a shutdown script that automatically waits 3 minutes after the drives have been unmounted than to figure out how to unwedge hardware that got stuck because it was in the wrong state during the reboot. Good luck!
Normally it’s UAS, when it cannot connect obviously there is nothing in lsusb output:

pi@raspberrypi:~ $ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 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

Can you give me suggestion what driver I have to unload in my case?
Have you tried reloading the UAS driver? What does lsusb look like when the drive is connected and working?

trejan
Posts: 7690
Joined: Tue Jul 02, 2019 2:28 pm

Re: External HDD don’t reconnect after reboot

Mon Aug 03, 2020 9:30 pm

Try the latest beta bootloader.

https://github.com/raspberrypi/rpi-eepr ... ons---beta
Turn off USB port power for 1-second regardless of boot-mode. This appears to resolve an issue on R1.3 and older board revisions where some USB devices would fail upon reboot. On R1.4 USB port power is turned off automatically by the PMIC so this is just held in reset for longer. For earlier board revisions the USB port power is explicitly turned off via XHCI. This can be overriden via USB_MSD_PWR_OFF_TIME in the EEPROM config.

Garik First
Posts: 25
Joined: Thu Jun 11, 2020 9:32 am

Re: External HDD don’t reconnect after reboot

Tue Aug 11, 2020 5:18 am

ejolson wrote:
Mon Aug 03, 2020 4:52 pm
Have you tried reloading the UAS driver? What does lsusb look like when the drive is connected and working?
[/quote]

Here is output when drive normally connected:
pi@raspberrypi:~ $ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
|__ Port 2: Dev 53, If 0, Class=Mass Storage, Driver=uas, 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
trejan wrote: Try the latest beta bootloader.

https://github.com/raspberrypi/rpi-eepr ... ons---beta
Turn off USB port power for 1-second regardless of boot-mode. This appears to resolve an issue on R1.3 and older board revisions where some USB devices would fail upon reboot. On R1.4 USB port power is turned off automatically by the PMIC so this is just held in reset for longer. For earlier board revisions the USB port power is explicitly turned off via XHCI. This can be overriden via USB_MSD_PWR_OFF_TIME in the EEPROM config.
Tried lates beta boot loader without success - nothing changes
pi@raspberrypi:~ $ sudo rpi-eeprom-update
BCM2711 detected
Dedicated VL805 EEPROM detected
BOOTLOADER: up-to-date
CURRENT: Fri 31 Jul 13:43:39 UTC 2020 (1596203019)
LATEST: Thu 16 Jul 15:15:46 UTC 2020 (1594912546)
FW DIR: /lib/firmware/raspberrypi/bootloader/stable
VL805: up-to-date
CURRENT: 000138a1
LATEST: 000138a1

hydra3333
Posts: 333
Joined: Thu Jan 10, 2013 11:48 pm

Re: External HDD don’t reconnect after reboot

Tue Aug 11, 2020 12:27 pm

Not the same, but similar in nature to my USB3 external disk issue:

viewtopic.php?f=28&t=282372
hydra3333 wrote:
Mon Aug 10, 2020 2:38 pm
the 10Tb USB3 external drive still fails to mount after a "sudo reboot now" yet mounts successfully during boot after a power cycle on the new "Pi4B 8Gb" computer.

Garik First
Posts: 25
Joined: Thu Jun 11, 2020 9:32 am

Re: External HDD don’t reconnect after reboot

Thu Aug 20, 2020 8:54 am

hydra3333 wrote:
Tue Aug 11, 2020 12:27 pm
Not the same, but similar in nature to my USB3 external disk issue:

viewtopic.php?f=28&t=282372
hydra3333 wrote:
Mon Aug 10, 2020 2:38 pm
the 10Tb USB3 external drive still fails to mount after a "sudo reboot now" yet mounts successfully during boot after a power cycle on the new "Pi4B 8Gb" computer.
Yea, it’s quite the same in nature. Also I see you too don’t found any solution yet. Be aware about hard power off - my FS was broken last time and fsck couldn’t fix it (so I have to redownload all movies and stuff I store on that hdd).

Garik First
Posts: 25
Joined: Thu Jun 11, 2020 9:32 am

Re: External HDD don’t reconnect after reboot

Sat Aug 29, 2020 7:43 am

Have checked this on another host - Ubuntu VM on Mac - no errors, no warning, stable reconnect after reboot, clearly it is rpi problem, not hdd or enclosure itself.

gothfebrio
Posts: 1
Joined: Wed Feb 10, 2021 5:04 pm

Re: External HDD don’t reconnect after reboot

Wed Feb 10, 2021 5:13 pm

Hey,

I have a similar setup. Western Digital Red 4TB with Orico 3139U3 and facing the same issue. after i run sudo reboot, the drive basically cant be found until i power cycle the drive.

Further digging i stumbled upon a firmware update for the case and it solves my problem.

apparently according to this http://my.orico.cc/drive.php
"This update is mainly used to solve the use of greater than 2TB capacity (with data ) of the hard disk can not be properly identified, shown as GPT protected partition or need to re-initialize the hard disk."

you can download the firmware here https://www.orico.cc/th/download.html?s ... 0enclosure

theres a guide it in and u need a windows machine.

cheers!

Return to “Troubleshooting”