-
- Posts: 25
- Joined: Thu Jun 11, 2020 9:32 am
External HDD don’t reconnect after reboot
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
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
Re: External HDD don’t reconnect after reboot
Is it possible that your hdd is still spinning upon the next "fast-boot", and that may be causing some interference?
Just a thought.
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
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
-
- Posts: 25
- Joined: Thu Jun 11, 2020 9:32 am
Re: External HDD don’t reconnect after reboot
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)
-
- Posts: 25
- Joined: Thu Jun 11, 2020 9:32 am
Re: External HDD don’t reconnect after reboot
Guys, any ideas? I still can’t find out the solution
Re: External HDD don’t reconnect after reboot
I have 2 connected on a RPi4B-2G (minus the actual case)
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?)
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!"
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!"
Re: External HDD don’t reconnect after reboot
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.
-
- Posts: 25
- Joined: Thu Jun 11, 2020 9:32 am
Re: External HDD don’t reconnect after reboot
How do I unload and load again usb module? This seems like working solution, but I can’t find what exactly should I do.ejolson wrote: ↑Wed Jun 24, 2020 3:01 pmHave 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.
-
- Posts: 25
- Joined: Thu Jun 11, 2020 9:32 am
Re: External HDD don’t reconnect after reboot
So, I tried to power off/on USB hub with uhubctl (when my HDD was in this no connected state):
But it seems like turning all off doesn’t working, because I see same error messages in dmesg:
And I got the same result after power cycle:
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
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?
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]
Re: External HDD don’t reconnect after reboot
Do you know whether the enclosure is normally mounted with usb_storage or UAS? Try typingGarik First wrote: ↑Sun Aug 02, 2020 7:24 amSo, I tried to power off/on USB hub with uhubctl (when my HDD was in this no connected state):But it seems like turning all off doesn’t working, because I see same error messages in dmesg: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
And I got the same result after power cycle: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?
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]
$ 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!
-
- Posts: 25
- Joined: Thu Jun 11, 2020 9:32 am
Re: External HDD don’t reconnect after reboot
Normally it’s UAS, when it cannot connect obviously there is nothing in lsusb output: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!
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?
Re: External HDD don’t reconnect after reboot
Have you tried reloading the UAS driver? What does lsusb look like when the drive is connected and working?Garik First wrote: ↑Mon Aug 03, 2020 7:38 amNormally it’s UAS, when it cannot connect obviously there is nothing in lsusb output: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!
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?
Re: External HDD don’t reconnect after reboot
Try the latest beta bootloader.
https://github.com/raspberrypi/rpi-eepr ... ons---beta
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.
-
- Posts: 25
- Joined: Thu Jun 11, 2020 9:32 am
Re: External HDD don’t reconnect after reboot
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
Tried lates beta boot loader without success - nothing changestrejan 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.
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
Re: External HDD don’t reconnect after reboot
-
- Posts: 25
- Joined: Thu Jun 11, 2020 9:32 am
Re: External HDD don’t reconnect after reboot
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).hydra3333 wrote: ↑Tue Aug 11, 2020 12:27 pmNot the same, but similar in nature to my USB3 external disk issue:
viewtopic.php?f=28&t=282372
-
- Posts: 25
- Joined: Thu Jun 11, 2020 9:32 am
Re: External HDD don’t reconnect after reboot
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.
-
- Posts: 1
- Joined: Wed Feb 10, 2021 5:04 pm
Re: External HDD don’t reconnect after reboot
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!
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!