I recently acquired the NanoPi R4S device and installed a Linux distribution called FriendlyWrt on it. The device is functioning well. The NanoPi R4S is equipped with two USB 3.0 ports, which led me to expand its capabilities by adding an additional 1TB SSD drive. However, I encountered an issue: upon booting up, the system fails to recognize my 1TB SSD. It is not a driver problem because when I disconnect and reconnect the USB cable, the device recognizes the SSD correctly. Ideally, I would like to see the following output:
lsusb
Bus 007 Device 001: ID 1d6b:0002 Linux 5.15.78 xhci-hcd xHCI Host Controller
Bus 002 Device 001: ID 1d6b:0002 Linux 5.15.78 ehci_hcd EHCI Host Controller
Bus 004 Device 001: ID 1d6b:0001 Linux 5.15.78 ohci_hcd Generic Platform OHCI controller
Bus 006 Device 001: ID 1d6b:0003 Linux 5.15.78 xhci-hcd xHCI Host Controller
Bus 008 Device 005: ID 152d:0578 JMicron USB3.0 External HDD
Bus 008 Device 001: ID 1d6b:0003 Linux 5.15.78 xhci-hcd xHCI Host Controller
Bus 005 Device 002: ID 058f:6387 Generic Mass Storage
Bus 001 Device 001: ID 1d6b:0002 Linux 5.15.78 ehci_hcd EHCI Host Controller
Bus 003 Device 001: ID 1d6b:0001 Linux 5.15.78 ohci_hcd Generic Platform OHCI controller
Bus 005 Device 001: ID 1d6b:0002 Linux 5.15.78 xhci-hcd xHCI Host Controller
JMicron USB3.0 External HDD is my SSD
Generic Mass Storage is my another device (8GB Flash drive)
After the system boots up, the following output is displayed:
lsusb
Bus 007 Device 001: ID 1d6b:0002 Linux 5.15.78 xhci-hcd xHCI Host Controller
Bus 002 Device 001: ID 1d6b:0002 Linux 5.15.78 ehci_hcd EHCI Host Controller
Bus 004 Device 001: ID 1d6b:0001 Linux 5.15.78 ohci_hcd Generic Platform OHCI controller
Bus 006 Device 001: ID 1d6b:0003 Linux 5.15.78 xhci-hcd xHCI Host Controller
Bus 008 Device 001: ID 1d6b:0003 Linux 5.15.78 xhci-hcd xHCI Host Controller
Bus 005 Device 002: ID 058f:6387 Generic Mass Storage
Bus 001 Device 001: ID 1d6b:0002 Linux 5.15.78 ehci_hcd EHCI Host Controller
Bus 003 Device 001: ID 1d6b:0001 Linux 5.15.78 ohci_hcd Generic Platform OHCI controller
Bus 005 Device 001: ID 1d6b:0002 Linux 5.15.78 xhci-hcd xHCI Host Controller
As you can see, my 8GB flash drive is detected, but there is no sign of the 1TB SSD. I have attempted various steps to resolve the issue. I wrote scripts to search for and toggle each USB port individually, which works when my SSD is reconnected. Unfortunately, I cannot control it until the system becomes aware of it.
I also posted a similar topic on the OpenWrt forum here, but it seems that no one has a solution to this particular problem yet.
Is there a way to reconnect the drive through the terminal? Are there any viable options or specific reasons why the drive is present after a reboot but remains inaccessible?
This SSD drive is critical to me as it stores Docker containers, images, volumes, and other essential data. If power is lost, the system will not start properly if the disk is missing.
FriendlyWrt is limited to some packages so no all tools can be installed on it like on regular Linux unfortunatelly.
Edit: I have found a couple related problems bellow.
Above approaches are great, but them doesn't work in my case. Firstly device has to be visible - then you can turn it on/off. How to achieve it by terminal / script?
You have to add an entry in the
/etc/fstab
file so that your drive can mount automatically when the system boots.You can refer to this tutorial: https://adamtheautomator.com/mount-a-drive-in-ubuntu/