You are not logged in.

#1 2022-10-12 07:58:59

evorster
Member
Registered: 2020-07-07
Posts: 89

[RESOLVED] SSD in external USB enclosure not showing up in /dev

Hey there!

This is quite an interesting one.

I have an SSD that is housed in an external USB enclosure. If it's plugged in when the system (Lenovo Thinkpad E15 Gen2 running linux-amd-znver2) boots up, the drive is visible and usable.

If, however, the drive is plugged in after the system is booted up, I can see in dmesg that it is detected, but the partitions on it does not show up, and it does not show in /dev

There are no blacklisted kernel modules, and all the necessary kernel modules are loaded.

All other external USB devices (Nvme in USB enclosure as well as traditional spinning rust) show up normally when plugged in, both before and after this is plugged in.
Maybe someone with more technical knowledge can point me in the right direction in regards to this?

Below is the output of journalctl -b -e , with comments on what has been happening outside the box

Plugged in some spinning rust:

Oct 12 09:10:50 Evert.Laptop kernel: usb 2-2: new SuperSpeed USB device number 7 using xhci_hcd
Oct 12 09:10:50 Evert.Laptop kernel: scsi host1: uas
Oct 12 09:10:50 Evert.Laptop kernel: scsi 1:0:0:0: Direct-Access     ST4000LM 016-1N2170       0508 PQ: 0 ANSI: 6
Oct 12 09:10:50 Evert.Laptop mtp-probe[105721]: checking bus 2, device 7: "/sys/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb2/2-2"
Oct 12 09:10:50 Evert.Laptop mtp-probe[105721]: bus: 2, device: 7 was not an MTP device
Oct 12 09:10:50 Evert.Laptop kernel: sd 1:0:0:0: Attached scsi generic sg1 type 0
Oct 12 09:10:51 Evert.Laptop mtp-probe[105777]: checking bus 2, device 7: "/sys/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb2/2-2"
Oct 12 09:10:51 Evert.Laptop mtp-probe[105777]: bus: 2, device: 7 was not an MTP device
Oct 12 09:10:56 Evert.Laptop kernel: sd 1:0:0:0: [sdb] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
Oct 12 09:10:56 Evert.Laptop kernel: sd 1:0:0:0: [sdb] 4096-byte physical blocks
Oct 12 09:10:56 Evert.Laptop kernel: sd 1:0:0:0: [sdb] Write Protect is off
Oct 12 09:10:56 Evert.Laptop kernel: sd 1:0:0:0: [sdb] Mode Sense: 53 00 00 08
Oct 12 09:10:56 Evert.Laptop kernel: sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Oct 12 09:10:56 Evert.Laptop kernel: sd 1:0:0:0: [sdb] Preferred minimum I/O size 4096 bytes
Oct 12 09:10:56 Evert.Laptop kernel: sd 1:0:0:0: [sdb] Optimal transfer size 33553920 bytes not a multiple of preferred minimum block size (4096 bytes)
Oct 12 09:10:56 Evert.Laptop kernel:  sdb: sdb1
Oct 12 09:10:56 Evert.Laptop kernel: sd 1:0:0:0: [sdb] Attached SCSI disk
[/quote]

Normal kernel-y stuff
[quote]
Oct 12 09:10:56 Evert.Laptop dbus-daemon[731]: [system] Activating service name='org.kde.kded.smart' requested by ':1.37' (uid=1000 pid=1630 comm="/usr/bin>
Oct 12 09:10:57 Evert.Laptop dbus-daemon[731]: [system] Successfully activated service 'org.kde.kded.smart'
Oct 12 09:10:58 Evert.Laptop plasmashell[1643]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog(0x559addac2b90)
Oct 12 09:10:58 Evert.Laptop plasmashell[1643]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog(0x559addac2b90)
Oct 12 09:10:58 Evert.Laptop plasmashell[1643]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog(0x559addac2b90)
Oct 12 09:10:58 Evert.Laptop plasmashell[1643]: kf5idletime_kwayland: This plugin does not support polling idle time
Oct 12 09:10:58 Evert.Laptop plasmashell[1643]: file:///usr/share/plasma/plasmoids/org.kde.plasma.devicenotifier/contents/ui/DeviceItem.qml:206:32: QML Act>
Oct 12 09:11:11 Evert.Laptop xdg-desktop-portal-kde[1666]: xdp-kde-background: GetAppState called: no parameters
Oct 12 09:11:41 Evert.Laptop xdg-desktop-portal-kde[1666]: xdp-kde-background: GetAppState called: no parameters

Plugged in the weird disk

Oct 12 09:11:48 Evert.Laptop kernel: usb 2-1.3: new SuperSpeed USB device number 8 using xhci_hcd
Oct 12 09:11:48 Evert.Laptop kernel: usb-storage 2-1.3:1.0: USB Mass Storage device detected
Oct 12 09:11:48 Evert.Laptop kernel: scsi host2: usb-storage 2-1.3:1.0
Oct 12 09:11:48 Evert.Laptop mtp-probe[106265]: checking bus 2, device 8: "/sys/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb2/2-1/2-1.3"
Oct 12 09:11:48 Evert.Laptop mtp-probe[106265]: bus: 2, device: 8 was not an MTP device
Oct 12 09:11:48 Evert.Laptop mtp-probe[106307]: checking bus 2, device 8: "/sys/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb2/2-1/2-1.3"
Oct 12 09:11:48 Evert.Laptop mtp-probe[106307]: bus: 2, device: 8 was not an MTP device

There was supposed to be more to the disk being detected here...

Just some innocent system messages:

Oct 12 09:12:11 Evert.Laptop xdg-desktop-portal-kde[1666]: xdp-kde-background: GetAppState called: no parameters
Oct 12 09:12:41 Evert.Laptop xdg-desktop-portal-kde[1666]: xdp-kde-background: GetAppState called: no parameters
Oct 12 09:14:07 Evert.Laptop konsole[3159]: qt.qpa.wayland: setGrabPopup called with a parent, QtWaylandClient::QWaylandXdgSurface(0x5596326b79f0) which do>
Oct 12 09:14:08 Evert.Laptop systemd[1480]: Started Chromium - Web Browser.
Oct 12 09:14:09 Evert.Laptop plasmashell[106943]: Opening in existing browser session.
Oct 12 09:14:09 Evert.Laptop plasmashell[106981]: libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
Oct 12 09:14:10 Evert.Laptop plasmashell[2000]: [2000:2000:1012/091410.542225:ERROR:interface_endpoint_client.cc(689)] Message 0 rejected by interface blin>
Oct 12 09:14:39 Evert.Laptop xdg-desktop-portal-kde[1666]: xdp-kde-background: GetAppState called: no parameters
Oct 12 09:14:49 Evert.Laptop pacserve[777]: [2022-10-12 09:14:49 CEST] INFO: sending multicast message to (224.3.45.67, 15679) via 127.0.0.1
Oct 12 09:14:49 Evert.Laptop pacserve[777]: [2022-10-12 09:14:49 CEST] INFO: sending multicast message to (224.3.45.67, 15679) via 192.168.88.253
Oct 12 09:15:09 Evert.Laptop xdg-desktop-portal-kde[1666]: xdp-kde-background: GetAppState called: no parameters
Oct 12 09:15:39 Evert.Laptop xdg-desktop-portal-kde[1666]: xdp-kde-background: GetAppState called: no parameters
Oct 12 09:16:09 Evert.Laptop xdg-desktop-portal-kde[1666]: xdp-kde-background: GetAppState called: no parameters
Oct 12 09:16:39 Evert.Laptop xdg-desktop-portal-kde[1666]: xdp-kde-background: GetAppState called: no parameters
Oct 12 09:17:09 Evert.Laptop xdg-desktop-portal-kde[1666]: xdp-kde-background: GetAppState called: no parameters
Oct 12 09:17:39 Evert.Laptop xdg-desktop-portal-kde[1666]: xdp-kde-background: GetAppState called: no parameters
Oct 12 09:17:42 Evert.Laptop plasmashell[108781]: libpng warning: iCCP: known incorrect sRGB profile
Oct 12 09:17:44 Evert.Laptop plasmashell[108781]: libpng warning: iCCP: known incorrect sRGB profile
Oct 12 09:17:44 Evert.Laptop plasmashell[108781]: libpng warning: iCCP: known incorrect sRGB profile
Oct 12 09:18:09 Evert.Laptop xdg-desktop-portal-kde[1666]: xdp-kde-background: GetAppState called: no parameters
Oct 12 09:19:49 Evert.Laptop pacserve[777]: [2022-10-12 09:19:49 CEST] INFO: sending multicast message to (224.3.45.67, 15679) via 127.0.0.1
Oct 12 09:19:49 Evert.Laptop pacserve[777]: [2022-10-12 09:19:49 CEST] INFO: sending multicast message to (224.3.45.67, 15679) via 192.168.88.253
Oct 12 09:20:49 Evert.Laptop xdg-desktop-portal-kde[1666]: xdp-kde-background: GetAppState called: no parameters
Oct 12 09:21:19 Evert.Laptop xdg-desktop-portal-kde[1666]: xdp-kde-background: GetAppState called: no parameters
Oct 12 09:21:49 Evert.Laptop xdg-desktop-portal-kde[1666]: xdp-kde-background: GetAppState called: no parameters
Oct 12 09:22:19 Evert.Laptop xdg-desktop-portal-kde[1666]: xdp-kde-background: GetAppState called: no parameters

Plugged in some more spinning rust:

Oct 12 09:23:12 Evert.Laptop kernel: usb 1-4: new high-speed USB device number 7 using xhci_hcd
Oct 12 09:23:12 Evert.Laptop kernel: scsi host3: uas
Oct 12 09:23:12 Evert.Laptop kernel: scsi 3:0:0:0: Direct-Access     LaCie    P9227 Mobile     1153 PQ: 0 ANSI: 6
Oct 12 09:23:12 Evert.Laptop mtp-probe[111823]: checking bus 1, device 7: "/sys/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-4"
Oct 12 09:23:12 Evert.Laptop mtp-probe[111823]: bus: 1, device: 7 was not an MTP device
Oct 12 09:23:12 Evert.Laptop kernel: sd 3:0:0:0: Attached scsi generic sg2 type 0
Oct 12 09:23:12 Evert.Laptop kernel: sd 3:0:0:0: [sdc] Spinning up disk...
Oct 12 09:23:13 Evert.Laptop mtp-probe[111862]: checking bus 1, device 7: "/sys/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-4"
Oct 12 09:23:13 Evert.Laptop mtp-probe[111862]: bus: 1, device: 7 was not an MTP device
Oct 12 09:23:21 Evert.Laptop kernel: ........ready
Oct 12 09:23:21 Evert.Laptop kernel: sd 3:0:0:0: [sdc] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
Oct 12 09:23:21 Evert.Laptop kernel: sd 3:0:0:0: [sdc] 4096-byte physical blocks
Oct 12 09:23:21 Evert.Laptop kernel: sd 3:0:0:0: [sdc] Write Protect is off
Oct 12 09:23:21 Evert.Laptop kernel: sd 3:0:0:0: [sdc] Mode Sense: 43 00 00 00
Oct 12 09:23:21 Evert.Laptop kernel: sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Oct 12 09:23:21 Evert.Laptop kernel: sd 3:0:0:0: [sdc] Preferred minimum I/O size 512 bytes not a multiple of physical block size (4096 bytes)
Oct 12 09:23:21 Evert.Laptop kernel: sd 3:0:0:0: [sdc] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
Oct 12 09:23:21 Evert.Laptop kernel:  sdc: sdc1 sdc2 sdc3 sdc4 sdc5
Oct 12 09:23:21 Evert.Laptop kernel: sd 3:0:0:0: [sdc] Attached SCSI disk

OK, so when I forcefully unload usb_storage, and then modprobe it back in, the disk shows up.
In this instance it loaded with another disk that was plugged into the laptop.
The Samsung QVO is the weird disk in question, and the Sabrent Rocket Q is the Nvme, both in USB enclosures.
Here is the output of journalctl -b -e:

Oct 12 09:43:49 Evert.Laptop dbus-daemon[731]: [system] Activating via systemd: service name='org.freedesktop.home1' unit='dbus-org.freedesktop.home1.servi>
Oct 12 09:43:49 Evert.Laptop dbus-daemon[731]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.home1.service': Unit dbus-org.freedesk>
Oct 12 09:43:49 Evert.Laptop sudo[120661]: pam_systemd_home(sudo:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not foun>
Oct 12 09:43:49 Evert.Laptop sudo[120661]:    evert : TTY=pts/3 ; PWD=/etc/modprobe.d ; USER=root ; COMMAND=/usr/bin/modprobe usb_storage
Oct 12 09:43:49 Evert.Laptop sudo[120661]: pam_unix(sudo:session): session opened for user root(uid=0) by evert(uid=1000)
Oct 12 09:43:49 Evert.Laptop kernel: usb 2-1.2: UAS is ignored for this device, using usb-storage instead
Oct 12 09:43:49 Evert.Laptop kernel: usb-storage 2-1.2:1.0: USB Mass Storage device detected
Oct 12 09:43:49 Evert.Laptop kernel: usb-storage 2-1.2:1.0: Quirks match for vid 0bda pid 9210: 800000
Oct 12 09:43:49 Evert.Laptop kernel: scsi host0: usb-storage 2-1.2:1.0
Oct 12 09:43:49 Evert.Laptop sudo[120661]: pam_unix(sudo:session): session closed for user root
Oct 12 09:43:49 Evert.Laptop kernel: usb-storage 2-1.3:1.0: USB Mass Storage device detected
Oct 12 09:43:49 Evert.Laptop kernel: scsi host1: usb-storage 2-1.3:1.0
Oct 12 09:43:49 Evert.Laptop kernel: usbcore: registered new interface driver usb-storage
Oct 12 09:43:51 Evert.Laptop kernel: scsi 1:0:0:0: Direct-Access     Samsung  SSD 870 QVO 4TB       PQ: 0 ANSI: 6
Oct 12 09:43:51 Evert.Laptop kernel: scsi 0:0:0:0: Direct-Access     Sabrent  Rocket Q         1.00 PQ: 0 ANSI: 6
Oct 12 09:43:51 Evert.Laptop kernel: sd 0:0:0:0: Attached scsi generic sg0 type 0
Oct 12 09:43:51 Evert.Laptop kernel: sd 1:0:0:0: Attached scsi generic sg1 type 0
Oct 12 09:43:51 Evert.Laptop kernel: sd 1:0:0:0: [sdb] Very big device. Trying to use READ CAPACITY(16).
Oct 12 09:43:51 Evert.Laptop kernel: sd 1:0:0:0: [sdb] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
Oct 12 09:43:51 Evert.Laptop kernel: sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
Oct 12 09:43:51 Evert.Laptop kernel: sd 1:0:0:0: [sdb] Write Protect is off
Oct 12 09:43:51 Evert.Laptop kernel: sd 1:0:0:0: [sdb] Mode Sense: 3b 00 00 00
Oct 12 09:43:51 Evert.Laptop kernel: sd 1:0:0:0: [sdb] No Caching mode page found
Oct 12 09:43:51 Evert.Laptop kernel: sd 1:0:0:0: [sdb] Assuming drive cache: write through
Oct 12 09:43:51 Evert.Laptop kernel: sd 0:0:0:0: [sda] physical block alignment offset: 2178048
Oct 12 09:43:51 Evert.Laptop kernel: sd 0:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
Oct 12 09:43:51 Evert.Laptop kernel: sd 0:0:0:0: [sda] Write Protect is off
Oct 12 09:43:51 Evert.Laptop kernel: sd 0:0:0:0: [sda] Mode Sense: 37 00 00 08
Oct 12 09:43:51 Evert.Laptop kernel: sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Oct 12 09:43:51 Evert.Laptop kernel:  sda: sda1 sda2 sda3 sda4
Oct 12 09:43:51 Evert.Laptop kernel: sd 0:0:0:0: [sda] Attached SCSI disk
Oct 12 09:43:51 Evert.Laptop kernel:  sdb: sdb1 sdb2 sdb3
Oct 12 09:43:51 Evert.Laptop kernel: sd 1:0:0:0: [sdb] Attached SCSI disk
Oct 12 09:43:51 Evert.Laptop dbus-daemon[731]: [system] Activating service name='org.kde.kded.smart' requested by ':1.37' (uid=1000 pid=1630 comm="/usr/bin>
Oct 12 09:43:51 Evert.Laptop xdg-desktop-portal-kde[1666]: xdp-kde-background: GetAppState called: no parameters
Oct 12 09:43:51 Evert.Laptop dbus-daemon[731]: [system] Successfully activated service 'org.kde.kded.smart'
Oct 12 09:43:51 Evert.Laptop kernel: BTRFS: device label EVO_Data devid 1 transid 688 /dev/sdb3 scanned by systemd-udevd (120680)
Oct 12 09:43:51 Evert.Laptop kernel: BTRFS: device label EVO_Root devid 1 transid 52 /dev/sdb2 scanned by systemd-udevd (120669)

Last edited by evorster (2022-10-13 09:47:53)

Offline

#2 2022-10-12 15:37:32

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,879

Re: [RESOLVED] SSD in external USB enclosure not showing up in /dev

Please use "code" tags, not "quote" tags.

Exclude the drive from mtp-probe, see eg.
https://superuser.com/a/1258799

Offline

#3 2022-10-12 18:22:46

evorster
Member
Registered: 2020-07-07
Posts: 89

Re: [RESOLVED] SSD in external USB enclosure not showing up in /dev

Hi there, Seth.

I have updated the quote tags for code tags, thanks for the tip!

Unfortunately, the solution proposed did not work.

After adding in the line that disables mtp-probe for the device, I can see that it is not being probed anymore, but it is still not being made available to the system.

I am of course prodding around the system some more to see if I can figure out what is causing this weird behavior, and appreciate any tips and thoughts on what may be causing this. If you have any more helpful hints, please do not hesitate to share!

Offline

#4 2022-10-12 20:01:10

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,879

Re: [RESOLVED] SSD in external USB enclosure not showing up in /dev

If you run "dmesg -w" resp. "journalctl --system -f" w/ usb_storage loaded and then plug the device, what are now the updated kernel/system messages in return?
(The system journal carries the ringbuffer and might have interesting userspace action logged, but could also be too noisy)

Offline

#5 2022-10-13 05:41:48

evorster
Member
Registered: 2020-07-07
Posts: 89

Re: [RESOLVED] SSD in external USB enclosure not showing up in /dev

Hi Seth.

Thanks for helping!

I downgraded the kernel a couple of versions, as I remember this hard drive working without issue on this machine. Unfortunately, no changes were observed.

For this reply, I did the following test. I started up the system without any external storage attached, then plugged in the Nvme device.

Output of journalctl:

Oct 13 07:19:41 Evert.Laptop kernel: usb 2-1.2: new SuperSpeed USB device number 4 using xhci_hcd
Oct 13 07:19:41 Evert.Laptop mtp-probe[1935]: checking bus 2, device 4: "/sys/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb2/2-1/2-1.2"
Oct 13 07:19:41 Evert.Laptop mtp-probe[1935]: bus: 2, device: 4 was not an MTP device
Oct 13 07:19:41 Evert.Laptop kernel: scsi host0: uas
Oct 13 07:19:41 Evert.Laptop kernel: usbcore: registered new interface driver uas
Oct 13 07:19:41 Evert.Laptop kernel: scsi 0:0:0:0: Direct-Access     Sabrent  Rocket Q         1.00 PQ: 0 ANSI: 6
Oct 13 07:19:41 Evert.Laptop kernel: scsi 0:0:0:0: Attached scsi generic sg0 type 0
Oct 13 07:19:41 Evert.Laptop mtp-probe[1977]: checking bus 2, device 4: "/sys/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb2/2-1/2-1.2"
Oct 13 07:19:41 Evert.Laptop mtp-probe[1977]: bus: 2, device: 4 was not an MTP device
Oct 13 07:19:41 Evert.Laptop kernel: sd 0:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
Oct 13 07:19:41 Evert.Laptop kernel: sd 0:0:0:0: [sda] Write Protect is off
Oct 13 07:19:41 Evert.Laptop kernel: sd 0:0:0:0: [sda] Mode Sense: 37 00 00 08
Oct 13 07:19:41 Evert.Laptop kernel: sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Oct 13 07:19:41 Evert.Laptop kernel: sd 0:0:0:0: [sda] Preferred minimum I/O size 512 bytes
Oct 13 07:19:41 Evert.Laptop kernel: sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes
Oct 13 07:19:41 Evert.Laptop kernel:  sda: sda1 sda2 sda3 sda4
Oct 13 07:19:41 Evert.Laptop kernel: sd 0:0:0:0: [sda] Attached SCSI disk
Oct 13 07:19:42 Evert.Laptop dbus-daemon[751]: [system] Activating service name='org.kde.kded.smart' requested by ':1.39' (uid=1000 pid=1539 comm="/usr/bin/kded5") (using servicehelper)
Oct 13 07:19:42 Evert.Laptop dbus-daemon[751]: [system] Successfully activated service 'org.kde.kded.smart'

The output of dmesg:

[   48.553251] usb 2-1.2: new SuperSpeed USB device number 4 using xhci_hcd
[   49.135438] scsi host0: uas
[   49.135542] usbcore: registered new interface driver uas
[   49.147862] scsi 0:0:0:0: Direct-Access     Sabrent  Rocket Q         1.00 PQ: 0 ANSI: 6
[   49.172612] scsi 0:0:0:0: Attached scsi generic sg0 type 0
[   49.235265] sd 0:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[   49.236851] sd 0:0:0:0: [sda] Write Protect is off
[   49.236853] sd 0:0:0:0: [sda] Mode Sense: 37 00 00 08
[   49.240028] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   49.241219] sd 0:0:0:0: [sda] Preferred minimum I/O size 512 bytes
[   49.241221] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes
[   49.412395]  sda: sda1 sda2 sda3 sda4
[   49.412791] sd 0:0:0:0: [sda] Attached SCSI disk

Then, I plugged in the weird disk, and this is the journalctl output:

Oct 13 07:19:57 Evert.Laptop kernel: usb 2-1.3: new SuperSpeed USB device number 5 using xhci_hcd
Oct 13 07:19:57 Evert.Laptop kernel: usb-storage 2-1.3:1.0: USB Mass Storage device detected
Oct 13 07:19:57 Evert.Laptop kernel: scsi host1: usb-storage 2-1.3:1.0

and the dmesg output:

[   64.789469] usb 2-1.3: new SuperSpeed USB device number 5 using xhci_hcd
[   64.809231] usb-storage 2-1.3:1.0: USB Mass Storage device detected
[   64.809475] scsi host1: usb-storage 2-1.3:1.0

Then, I plugged in a spinny disk, and here is the journalctl output:

Oct 13 07:21:03 Evert.Laptop kernel: usb 2-2: new SuperSpeed USB device number 6 using xhci_hcd
Oct 13 07:21:03 Evert.Laptop kernel: scsi host2: uas
Oct 13 07:21:03 Evert.Laptop kernel: scsi 2:0:0:0: Direct-Access     Freecom                   1402 PQ: 0 ANSI: 6
Oct 13 07:21:03 Evert.Laptop kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0
Oct 13 07:21:03 Evert.Laptop mtp-probe[2112]: checking bus 2, device 6: "/sys/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb2/2-2"
Oct 13 07:21:03 Evert.Laptop mtp-probe[2112]: bus: 2, device: 6 was not an MTP device
Oct 13 07:21:03 Evert.Laptop mtp-probe[2148]: checking bus 2, device 6: "/sys/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb2/2-2"
Oct 13 07:21:03 Evert.Laptop mtp-probe[2148]: bus: 2, device: 6 was not an MTP device
Oct 13 07:21:06 Evert.Laptop kernel: sd 2:0:0:0: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
Oct 13 07:21:06 Evert.Laptop kernel: sd 2:0:0:0: [sdb] 4096-byte physical blocks
Oct 13 07:21:06 Evert.Laptop kernel: sd 2:0:0:0: [sdb] Write Protect is off
Oct 13 07:21:06 Evert.Laptop kernel: sd 2:0:0:0: [sdb] Mode Sense: 53 00 00 08
Oct 13 07:21:06 Evert.Laptop kernel: sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Oct 13 07:21:06 Evert.Laptop kernel: sd 2:0:0:0: [sdb] Preferred minimum I/O size 4096 bytes
Oct 13 07:21:06 Evert.Laptop kernel: sd 2:0:0:0: [sdb] Optimal transfer size 33553920 bytes not a multiple of preferred minimum block size (4096 bytes)
Oct 13 07:21:06 Evert.Laptop kernel:  sdb: sdb1
Oct 13 07:21:06 Evert.Laptop kernel: sd 2:0:0:0: [sdb] Attached SCSI disk
Oct 13 07:21:06 Evert.Laptop dbus-daemon[751]: [system] Activating service name='org.kde.kded.smart' requested by ':1.39' (uid=1000 pid=1539 comm="/usr/bin/kded5") (using servicehelper)
Oct 13 07:21:06 Evert.Laptop dbus-daemon[751]: [system] Successfully activated service 'org.kde.kded.smart'

and the dmesg output:

[  130.559357] usb 2-2: new SuperSpeed USB device number 6 using xhci_hcd
[  130.579056] scsi host2: uas
[  130.579801] scsi 2:0:0:0: Direct-Access     Freecom                   1402 PQ: 0 ANSI: 6
[  130.582031] sd 2:0:0:0: Attached scsi generic sg1 type 0
[  134.164334] sd 2:0:0:0: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[  134.164346] sd 2:0:0:0: [sdb] 4096-byte physical blocks
[  134.164520] sd 2:0:0:0: [sdb] Write Protect is off
[  134.164523] sd 2:0:0:0: [sdb] Mode Sense: 53 00 00 08
[  134.164794] sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[  134.165000] sd 2:0:0:0: [sdb] Preferred minimum I/O size 4096 bytes
[  134.165004] sd 2:0:0:0: [sdb] Optimal transfer size 33553920 bytes not a multiple of preferred minimum block size (4096 bytes)
[  134.206643]  sdb: sdb1
[  134.206934] sd 2:0:0:0: [sdb] Attached SCSI disk

The only difference I can see between the working and non-working disks is that the scsi host for the working disks are uas, and for the non-working disks is usb_storage.

Of course, you can also see from the journalctl output that the non-working disk now is not probed by mtp-probe as well, indicating that the udev rule is working as intended. In this case I think this mtp-probe might have been a red herring, but it is good to rule it out.

Thanks, again, for taking a look at this.

Offline

#6 2022-10-13 07:33:27

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,879

Re: [RESOLVED] SSD in external USB enclosure not showing up in /dev

USB Attached SCSI operates on top of usb_storage.

What if you pass "usb_storage.delay_use=3" to the kernel?

modinfo usb_storage wrote:

parm:           delay_use:seconds to delay before using a new device (uint)

I assume there's some race condition, but since mtp-probe isn't getting in the way, it might be the time the controller requires to fire up after getting some power…

Offline

#7 2022-10-13 09:34:31

evorster
Member
Registered: 2020-07-07
Posts: 89

Re: [RESOLVED] SSD in external USB enclosure not showing up in /dev

Hi there, Seth.

Thanks so much for your help!
It turns out that the manufacturer of the enclosure is one with known quirks, which is why it uses the usb_storage driver rather than the uas driver.

[evert@Evert ~]$ strings /lib/udev/hwdb.bin | grep -i innostor
Innostor Technology Corporation

It seems one other Arch user also has run into this issue:
https://bbs.archlinux.org/viewtopic.php?id=264962

I swapped out the enclosure for a different brand, and that works fine.

So, in conclusion, if your enclosure's chipset is "Innostor Technology Corporation" , your simplest option would be not to use it, and get something else.

It may very well be that there is some race condition, or that the device does not allow the disk to initialize properly before trying to access it.

Last edited by evorster (2022-10-13 09:39:09)

Offline

#8 2022-10-13 09:35:37

evorster
Member
Registered: 2020-07-07
Posts: 89

Re: [RESOLVED] SSD in external USB enclosure not showing up in /dev

How do I mark this issue resolved?

Offline

#9 2022-10-13 09:46:56

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,779

Re: [RESOLVED] SSD in external USB enclosure not showing up in /dev

You can edit and append to the title in your first post.

Offline

Board footer

Powered by FluxBB