Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: Usb ssd disconnect after a few minutes
#1
Shocked 
Hello,

I installed new mode 9.0.3, and reapply all my previous configuration (8.x).

I have a local usb ssd with my near 500GB library, but after a few minutes the disk dissapear, it not happens before with the previous version.

Anyone has a problem like mine?
Reply
#2
(06-24-2024, 01:34 PM)magostinelli Wrote: Hello,

I installed new mode 9.0.3, and reapply all my previous configuration (8.x).

I have a local usb ssd with my near 500GB library, but after a few minutes the disk dissapear, it not happens before with the previous version.

Anyone has a problem like mine?

Curious.

We need more information. First, what does "disappear" mean, e.g., how is this manifested?

As always, posting the terminal output you get  from the command moodeutl -l after a reboot is helpful.

Also, post the terminal output from the command lsblk -fm, both before and after the disk disappears.


Regards,
Kent
Reply
#3
Inside dmesg log i see:
Code:
[  331.744513] sd 0:0:0:0: [sda] tag#25 uas_eh_abort_handler 0 uas-tag 18 inflig                                                                                                                       ht: CMD
[  331.744522] sd 0:0:0:0: [sda] tag#25 CDB: opcode=0x28 28 00 31 c0 00 40 00 00                                                                                                                        18 00
[  331.744530] sd 0:0:0:0: [sda] tag#24 uas_eh_abort_handler 0 uas-tag 17 inflig                                                                                                                       ht: CMD
[  331.744535] sd 0:0:0:0: [sda] tag#24 CDB: opcode=0x28 28 00 31 80 00 80 00 00                                                                                                                        40 00
[  331.744542] sd 0:0:0:0: [sda] tag#23 uas_eh_abort_handler 0 uas-tag 16 inflig                                                                                                                       ht: CMD
[  331.744547] sd 0:0:0:0: [sda] tag#23 CDB: opcode=0x28 28 00 31 80 00 68 00 00                                                                                                                        08 00
[  331.744553] sd 0:0:0:0: [sda] tag#22 uas_eh_abort_handler 0 uas-tag 15 inflig                                                                                                                       ht: CMD
[  331.744558] sd 0:0:0:0: [sda] tag#22 CDB: opcode=0x28 28 00 31 80 00 50 00 00                                                                                                                        10 00
[  331.744564] sd 0:0:0:0: [sda] tag#21 uas_eh_abort_handler 0 uas-tag 14 inflig                                                                                                                       ht: CMD
[  331.744569] sd 0:0:0:0: [sda] tag#21 CDB: opcode=0x28 28 00 31 80 00 40 00 00                                                                                                                        08 00
[  331.744575] sd 0:0:0:0: [sda] tag#20 uas_eh_abort_handler 0 uas-tag 13 inflig                                                                                                                       ht: CMD
[  331.744580] sd 0:0:0:0: [sda] tag#20 CDB: opcode=0x28 28 00 31 40 00 b8 00 00                                                                                                                        08 00
[  331.744586] sd 0:0:0:0: [sda] tag#19 uas_eh_abort_handler 0 uas-tag 12 inflig                                                                                                                       ht: CMD
[  331.744590] sd 0:0:0:0: [sda] tag#19 CDB: opcode=0x28 28 00 31 40 00 a8 00 00                                                                                                                        08 00
[  331.744596] sd 0:0:0:0: [sda] tag#18 uas_eh_abort_handler 0 uas-tag 11 inflig                                                                                                                       ht: CMD
[  331.744601] sd 0:0:0:0: [sda] tag#18 CDB: opcode=0x28 28 00 31 40 00 98 00 00                                                                                                                        08 00
[  331.744607] sd 0:0:0:0: [sda] tag#17 uas_eh_abort_handler 0 uas-tag 10 inflig                                                                                                                       ht: CMD
[  331.744611] sd 0:0:0:0: [sda] tag#17 CDB: opcode=0x28 28 00 31 40 00 88 00 00                                                                                                                        08 00
[  331.744617] sd 0:0:0:0: [sda] tag#16 uas_eh_abort_handler 0 uas-tag 9 infligh                                                                                                                       t: CMD
[  331.744622] sd 0:0:0:0: [sda] tag#16 CDB: opcode=0x28 28 00 31 40 00 68 00 00                                                                                                                        18 00
[  331.744628] sd 0:0:0:0: [sda] tag#15 uas_eh_abort_handler 0 uas-tag 8 infligh                                                                                                                       t: CMD
[  331.744633] sd 0:0:0:0: [sda] tag#15 CDB: opcode=0x28 28 00 31 40 00 40 00 00                                                                                                                        20 00
[  331.744639] sd 0:0:0:0: [sda] tag#14 uas_eh_abort_handler 0 uas-tag 7 infligh                                                                                                                       t: CMD
[  331.744643] sd 0:0:0:0: [sda] tag#14 CDB: opcode=0x28 28 00 31 00 00 40 00 00                                                                                                                        78 00
[  331.744649] sd 0:0:0:0: [sda] tag#13 uas_eh_abort_handler 0 uas-tag 6 infligh                                                                                                                       t: CMD
[  331.744654] sd 0:0:0:0: [sda] tag#13 CDB: opcode=0x28 28 00 30 c0 00 40 00 00                                                                                                                        80 00
[  331.744660] sd 0:0:0:0: [sda] tag#12 uas_eh_abort_handler 0 uas-tag 5 infligh                                                                                                                       t: CMD
[  331.744665] sd 0:0:0:0: [sda] tag#12 CDB: opcode=0x28 28 00 30 80 00 58 00 00                                                                                                                        68 00
[  331.744671] sd 0:0:0:0: [sda] tag#10 uas_eh_abort_handler 0 uas-tag 4 infligh                                                                                                                       t: CMD
[  331.744675] sd 0:0:0:0: [sda] tag#10 CDB: opcode=0x28 28 00 30 80 00 40 00 00                                                                                                                        10 00
[  331.744746] usb 1-1: USB disconnect, device number 2
[  331.745302] usb 2-1: USB disconnect, device number 2
[  331.745861] device offline error, dev sda, sector 0 op 0x1:(WRITE) flags 0x80                                                                                                                       0 phys_seg 0 prio class 2
[  331.745890] EXT4-fs (sda1): shut down requested (2)
[  331.745907] Aborting journal on device sda1-8.
[  331.745933] device offline error, dev sda, sector 511967296 op 0x1:(WRITE) fl                                                                                                                       ags 0x9800 phys_seg 1 prio class 2
[  331.745940] device offline error, dev sda, sector 511967296 op 0x1:(WRITE) fl                                                                                                                       ags 0x9800 phys_seg 1 prio class 2
[  331.745946] Buffer I/O error on dev sda1, logical block 63995904, lost sync p                                                                                                                       age write
[  331.745958] JBD2: I/O error when updating journal superblock for sda1-8.
[  331.764858] sd 0:0:0:0: Device offlined - not ready after error recovery
[  331.764876] sd 0:0:0:0: Device offlined - not ready after error recovery
[  331.764880] sd 0:0:0:0: Device offlined - not ready after error recovery
[  331.764884] sd 0:0:0:0: Device offlined - not ready after error recovery
[  331.764887] sd 0:0:0:0: Device offlined - not ready after error recovery
[  331.764891] sd 0:0:0:0: Device offlined - not ready after error recovery
[  331.764894] sd 0:0:0:0: Device offlined - not ready after error recovery
[  331.764898] sd 0:0:0:0: Device offlined - not ready after error recovery
[  331.764901] sd 0:0:0:0: Device offlined - not ready after error recovery
[  331.764905] sd 0:0:0:0: Device offlined - not ready after error recovery
[  331.764908] sd 0:0:0:0: Device offlined - not ready after error recovery
[  331.764912] sd 0:0:0:0: Device offlined - not ready after error recovery
[  331.764916] sd 0:0:0:0: Device offlined - not ready after error recovery
[  331.764919] sd 0:0:0:0: Device offlined - not ready after error recovery
[  331.764922] sd 0:0:0:0: Device offlined - not ready after error recovery
[  331.764926] sd 0:0:0:0: Device offlined - not ready after error recovery
[  331.764929] sd 0:0:0:0: Device offlined - not ready after error recovery
[  331.764933] sd 0:0:0:0: Device offlined - not ready after error recovery
[  331.800434] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[  331.883504] EXT4-fs (sda1): unmounting filesystem cccefe5e-5e56-49c5-9831-083                                                                                                                       8e6322c1b.
[  332.068360] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=                                                                                                                       0x07 driverbyte=DRIVER_OK
[  332.084809] xhci_hcd 0000:01:00.0: WARN Can't disable streams for endpoint 0x                                                                                                                       82, streams are being disabled already
With lsblk the disk is no more visible after the error.

I tryed the disk in another PC and is ok (fedora desktop).
Reply
#4
@magostinelli

That dmesg output isn't encouraging but I was hoping also for the lsblk -fm report while the SSD was visible so I could see which drive it is and how it's partitioned and formatted.

Regards,
Kent
Reply
#5
(06-25-2024, 08:39 PM)TheOldPresbyope Wrote: @magostinelli

That dmesg output isn't encouraging but I was hoping also for the lsblk -fm report while the SSD was visible so I could see which drive it is and how it's partitioned and formatted.

Regards,
Kent

Couldn't it be also a power-related issue? As the drive write operation might require more current, the PSU of the Pi might fail at delivering...
Reply
#6
(06-26-2024, 10:17 PM)Nutul Wrote:
(06-25-2024, 08:39 PM)TheOldPresbyope Wrote: @magostinelli

That dmesg output isn't encouraging but I was hoping also for the lsblk -fm report while the SSD was visible so I could see which drive it is and how it's partitioned and formatted.

Regards,
Kent

Couldn't it be also a power-related issue? As the drive write operation might require more current, the PSU of the Pi might fail at delivering...

I suppose the same, but with the previous version I don't have this problem, maybe the new kernel require more power to access the disk?
Reply
#7
(06-25-2024, 08:39 PM)TheOldPresbyope Wrote: @magostinelli

That dmesg output isn't encouraging but I was hoping also for the lsblk -fm report while the SSD was visible so I could see which drive it is and how it's partitioned and formatted.

Regards,
Kent

sda                                                                                                                              489G root  disk  brw-rw----

└─sda1      ext4   1.0          cccefe5e-5e56-49c5-9831-0838e6322c1b   21.2G    90% /media/cccefe5e-5e56-49c5-9831-0838e6322c1b  489G root  disk  brw-rw----
Reply
#8
Hello @magostinelli, I have experienced similar issues in the past, most of the times it was due to power issues. The Pi cannot provide a lot of power. Powered hubs are generally better but the best for me has always been represented by devices of the type "usb dock", some can also allow two drives to be connected.
In the case of direct connection to the pi, cable quality can play a role: some might cause a relevant voltage drop.
You can also check if the pi has throttled down with:

vcgencmd get_throttled

Also, some users reported jmicron controllers to be problematic, so maybe check the output of

lsusb
A good Last.fm scrobbler solution for Moode here, docker image here
Reply
#9
@magostinelli 

I agree with the observations of both @Nutul  and @GioF_71.

Basically, this isn't a moOde code issue*. It is an issue with your specific hardware setup and all we can do is toss suggestions your way.

I had done some tests last night with the first external SSD drive I could find near at hand, which is a 1TB Samsung m.2 NVMe SSD module in an SSK USB adapter. I plugged it into a Pi 3B running moOde 9.0.3 and powered by a Canakit 5v/2.5a powerpack.

From lsblk I get the drive's device assignment, partitioning, formatting, and mountpoints.


Code:
rho@red:~ $ lsblk -fm
NAME        FSTYPE FSVER LABEL  UUID                                 FSAVAIL FSUSE% MOUNTPOINTS      SIZE OWNER GROUP MODE
sda                                                                                                931.5G root  disk  brw-rw----
└─sda1      exfat  1.0   Data   677C-FA64                             930.8G     0% /media/Data    931.5G root  disk  brw-rw----
mmcblk0                                                                                             14.8G root  disk  brw-rw----
├─mmcblk0p1 vfat   FAT32 bootfs AF49-3217                             446.9M    12% /boot/firmware   512M root  disk  brw-rw----
└─mmcblk0p2 ext4   1.0   rootfs ef4e2b66-9674-4ed8-a66d-326796522901     10G    23% /               14.3G root  disk  brw-rw----


From dmesg (or journalctl) I get perfectly normal messages related to drive sda


Code:
rho@red:~ $ dmesg|grep sda
[    6.290502] sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
[    6.302722] sd 0:0:0:0: [sda] Write Protect is off
[    6.305073] sd 0:0:0:0: [sda] Mode Sense: 37 00 00 08
[    6.310044] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    6.344864]  sda: sda1
[    6.354993] sd 0:0:0:0: [sda] Attached SCSI disk

As it happens, I ran vcgencmd last night while scanning this drive and see no undervolt or throttling flags


Code:
rho@red:~ $ vcgencmd get_throttled
throttled=0x0

Following @GioF_71's suggestion, I ran lsusb this morning so you see what the output looks like

Code:
rho@red:~ $ lsusb
Bus 001 Device 009: ID 0bda:9210 Realtek Semiconductor Corp. RTL9210 M.2 NVME Adapter
Bus 001 Device 004: ID 041e:3125 Creative Technology, Ltd Creative Bluetooth Audio W2
Bus 001 Device 003: ID 0424:ec00 Microchip Technology, Inc. (formerly SMSC) SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Microchip Technology, Inc. (formerly SMSC) SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

As you can see, in my case, the controller in question is a Realtek.

Finally, to test the idea that the power supply might be close to being max'ed out,  I also plugged in a 1TB Western Digital Passport HD which has a USB interface. This drive is announced by lsusb as


Code:
Bus 001 Device 008: ID 1058:25e1 Western Digital Technologies, Inc. My Passport (WD20NMVW)


No drama here. Now I have both drive sda and drive sdb running with no undervolt or throttling codes and no error messages in dmesg. So, although a USB hub/dock certainly can handle a more power-consuming set of USB devices, I don't seem to need it in my test case. Normal operation all around.

IMHO if you continue to have problems you might be better served to post them on the Raspberry Pi Forums where far more people with far more varieties of hardware can respond. They will need lots of details about all your hardware.

Good hunting.

Regards,
Kent

*The one curiosity is your observation that you didn't see this disappearing act with an older release of moOde, but as far as the drive interface is concerned this means an older release of Raspberry Pi OS Lite.
Reply
#10
PS - note I was testing on a Pi 3B. This model has only USB 2.0 ports.

I believe there had been posts on the Raspberry Pi Forums in the past about some USB storage devices not behaving well on the USB 3.0 ports on Pi 4Bs. This in addition to @GioF_71's observation about the drive controller. Of course, the RPF keeps improving its firmware so what was true a year ago may no longer be true today, and v.v.

Again, the more detail you give, the better.

Regards,
Kent
Reply


Forum Jump: