Hi All,
I’m having some strange issues with my odroid XU4 cloudshell.
This device has an integrated JMicron JMS561 USB3.0 to Dual SATA GenIII Ports Bridge Chip on which i’ve attached two 3,5" Sata drives.
Its been running perfect for ages, but recently i’m having some strange issues.
Suddenly the SDA and SDB drives disappeared after a reboot.
No sd* devices can be found in the /dev/disk directory and even dietpi-drive-manager has no notion of the drives ever been available.
lsusb command however does show the jmicron JMS561 controller available and ready.
On boot the drives spin up, and start ratteling never mount or appear as mountable.
So it must be something i did in the setup, so flashed another SD card with a mint dietpi image. And voila they appear on first boot.
Could somebody help me out in troubleshooting?
PS: Running dietpi Buster image
Hi,
maybe you could have a look to kernel error messages right after reboot. Maybe there is something useful
dmesg -l err,crit,alert,emerg
if there are nothing strange, you could run dmesg alone to see what happen during boot and if your system is going to detect the HDD’s.
As well you could perform the same on your spare SD card installation, just to verify how it looks there.
Thanks for tips.
I’ve compared the dmesg output of the two sd cards.
And noticed the following:
working SD
Jun 4 21:43:03 DietPi kernel: [ 13.184239] usb 4-1.1: new SuperSpeed USB device number 3 using xhci-hcd
Jun 4 21:43:03 DietPi kernel: [ 13.216983] usb 4-1.1: New USB device found, idVendor=152d, idProduct=0561
Jun 4 21:43:03 DietPi kernel: [ 13.228943] usb 4-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=5
Jun 4 21:43:03 DietPi kernel: [ 13.241410] usb 4-1.1: Product: ODROID
Jun 4 21:43:03 DietPi kernel: [ 13.250313] usb 4-1.1: SerialNumber: DB01234567E2
Jun 4 21:43:03 DietPi kernel: [ 13.326112] SCSI subsystem initialized
Jun 4 21:43:03 DietPi kernel: [ 13.339682] usbcore: registered new interface driver usb-storage
Jun 4 21:43:03 DietPi kernel: [ 13.361622] scsi host0: uas
Jun 4 21:43:03 DietPi kernel: [ 13.366881] usbcore: registered new interface driver uas
Jun 4 21:43:03 DietPi kernel: [ 13.369342] scsi 0:0:0:0: Direct-Access ODROID 0 0004 PQ: 0 ANSI: 6
Jun 4 21:43:03 DietPi kernel: [ 13.386120] scsi 0:0:0:1: Direct-Access ODROID 1 0004 PQ: 0 ANSI: 6
Jun 4 21:43:03 DietPi kernel: [ 13.405943] scsi 0:0:0:0: Attached scsi generic sg0 type 0
Jun 4 21:43:03 DietPi kernel: [ 13.414080] scsi 0:0:0:1: Attached scsi generic sg1 type 0
Jun 4 21:43:03 DietPi kernel: [ 13.430492] sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
Jun 4 21:43:03 DietPi kernel: [ 13.430656] sd 0:0:0:1: [sdb] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB)
Jun 4 21:43:03 DietPi kernel: [ 13.440640] sd 0:0:0:0: [sda] Write Protect is off
Jun 4 21:43:03 DietPi kernel: [ 13.450371] sd 0:0:0:1: [sdb] Write Protect is off
Jun 4 21:43:03 DietPi kernel: [ 13.464416] sd 0:0:0:1: [sdb] Write cache: enabled, read cache: enabled, supports DPO and FUA
Jun 4 21:43:03 DietPi kernel: [ 13.464556] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
Jun 4 21:43:03 DietPi kernel: [ 13.478728] sd 0:0:0:1: [sdb] Optimal transfer size 33553920 bytes
Jun 4 21:43:03 DietPi kernel: [ 13.492235] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes
Jun 4 21:43:03 DietPi kernel: [ 13.606564] sdb: sdb1
Jun 4 21:43:03 DietPi kernel: [ 13.621082] sda: sda1
Jun 4 21:43:03 DietPi kernel: [ 13.623265] sd 0:0:0:1: [sdb] Attached SCSI disk
Jun 4 21:43:03 DietPi kernel: [ 13.636855] sd 0:0:0:0: [sda] Attached SCSI disk
Jun 4 21:43:04 DietPi kernel: [ 14.003225] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
This whole segment is missing in the other SD card.
Some thoughts:
-Could it be the modules for uas and usb_storage are not loaded?
-I recently did run a trim command on the sd card. Could this be the cause?
Just an idea to check if USB is loaded correctly. Can you remove your JMicron controller and try to connect a simple USB Stick? Just to check if it is loaded.
I did what you told me, and noticed in the dmesg that the usb recognised:
[ 1034.981552] usb 4-1.2: new SuperSpeed USB device number 3 using xhci-hcd
[ 1035.006866] usb 4-1.2: New USB device found, idVendor=0781, idProduct=5581
[ 1035.012687] usb 4-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1035.020026] usb 4-1.2: Product: Ultra
[ 1035.023448] usb 4-1.2: Manufacturer: SanDisk
[ 1035.027711] usb 4-1.2: SerialNumber: 040152960328e23a1e9bb8a2ec4d6c4627322eef13df4bcbb56aed73eeb7e7ee8edf000000000000000000003ee5255f000e79188155810788261d8d
But again dietpi-drive-manager does not show the usb-drive as mountable option (just the two partitions of the sd card)
root@DietPi:~# ls /dev/sd*
ls: cannot access '/dev/sd*': No such file or directory

I’ve found some info on usb sticks not mounting.
It noted to check if the usb_storage module is loaden.
So i ran
root@DietPi:~# lsmod | grep usb
usbhid 45056 0
extcon_usb_gpio 16384 0
So i tried to load the required module:
root@DietPi:~# modprobe usb-storage
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.176+/modules.dep.bin'
modprobe: FATAL: Module usb-storage not found in directory /lib/modules/4.14.176+
AHA! i forgot i did a dist-upgrade, but apparantly this requires the modules to be available on the path
/lib/modules/4.14.176+
But i only have
/lib/modules/4.14.180+
What should i do: downgrade to kernel 4.14.180+ (is that even possible?)
Or focus on realising the modules for kernel 4.14.176+
looks like something went wrong during kernel update
let’s check current kernel running uname -r.
Fixed it!
the usb modprobe command refered to a missing file in /lib/modules/4.14.176+
So i’ve taken a look at the working sd and compared it with the not working sd.
And i soon saw that the directory was empty. So i restored the directory and all is working well again.
Thanks for your help, Joulinar!
well not sure if it’s fixed. You copied the old kernel modules 4.14.176+ back. However you should have a kernel running 4.14.180+ isn’t it?
It seems im running kernel 4.14.176+
root@DietPi:~# uname -a
Linux DietPi 4.14.176+ #1 SMP PREEMPT Tue Apr 14 20:02:49 UTC 2020 armv7l GNU/Linux
root@DietPi:/lib/modules/4.14.176+# ls
build modules.alias modules.builtin modules.dep modules.devname modules.softdep modules.symbols.bin
kernel modules.alias.bin modules.builtin.bin modules.dep.bin modules.order modules.symbols
Dont know why the directory /lib/modules/4.14.180+ is present, i think i did messed up the kernel upgrade, and am still running 4.14.176+, but the modules were deleted.
Well you could run apt update to check if there are new packages available.