[SOLVED] Can't mount USB stick, no /dev/sdX devices in RasPi B

I just installed DietPi on an old RasPi B. To minimize SD card wear I’d like to move at least /home and /var to a USB stick, later maybe also swap.

Inserting the stick to the USB both dmesg and journalctl show it’s recognized:

[ 9634.723128] usb 1-1.3: new high-speed USB device number 7 using dwc_otg
[ 9634.858850] usb 1-1.3: New USB device found, idVendor=090c, idProduct=1000, bcdDevice=11.00
[ 9634.858915] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 9634.858947] usb 1-1.3: Product: USB DISK
[ 9634.858970] usb 1-1.3: Manufacturer: SMI Corporation
[ 9634.858992] usb 1-1.3: SerialNumber: AA00000000008421

helmi 24 14:43:32 holvi kernel: usb 1-1.3: new high-speed USB device number 7 using dwc_otg
helmi 24 14:43:32 holvi kernel: usb 1-1.3: New USB device found, idVendor=090c, idProduct=1000, bcdDevice=11.00
helmi 24 14:43:32 holvi kernel: usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
helmi 24 14:43:32 holvi kernel: usb 1-1.3: Product: USB DISK
helmi 24 14:43:32 holvi kernel: usb 1-1.3: Manufacturer: SMI Corporation
helmi 24 14:43:32 holvi kernel: usb 1-1.3: SerialNumber: AA00000000008421

It doesn’t auto-mount, and I can’t mount it manually as I have no clue where it’s supposed to be showing. There are no /dev/sdX files:

pg@holvi:~$ ls /dev/sd*
ls: tiedostoa '/dev/sd*' ei voi käsitellä: Tiedostoa tai hakemistoa ei ole *-> file or directory doesn't exist* 

lsusb output with another stick; both show up here when inserted

root@holvi:/home/pg# lsusb
Bus 001 Device 005: ID 0951:1643 Kingston Technology DataTraveler G3
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

The stick works perfectly fine in another Debian system and in a MacBook. For confirmation I

  • inserted the stick to another RasPi B - same deal
  • inserted a Live Debian stick to the same RasPi - same deal

The stick is the only USB device, I’m SSHing in.

What’s up, and where to go from here?

Did you tried using DietPi drive manager? Is your stick showing up on following command

lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid

Um WTF???

pg@holvi:~$ sudo lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid
[sudo] pg-käyttäjän salasana: 
NAME FSTYPE LABEL  SIZE RO TYPE MOUNTPOINT PARTUUID                             UUID
sda  iso966 BUNSENLABS_LITHIUM
│                 14,5G  0 disk                                                 2021-08-24-06-08-07-00
├─sda1
│    vfat   boot   256M  0 part            0e35582f-01                          17B6-FC00
└─sda2
     ext4   rootfs
                  14,2G  0 part            0e35582f-02                          b101bb80-3338-4b94-a775-b3844f8f2aa8
pg@holvi:~$ ls /dev/sd*
/dev/sda  /dev/sda1  /dev/sda2

This is the Kingston showing in the lsusb output… now it’s there. Unmounted, but it’s there.

I removed the Kingston and inserted the original. 15 minutes later it’s still not showing up, there are no /dev/sdaX. So looks like it’s just a question of “wait for a while, it’ll show up”… I’d understand if the box was under stress, but htop says nothing’s hogging the CPU.

I didn’t try DietPi Drive Manager yet. I’ll give that a go, thx for the suggestion. And for that lsblk command :slight_smile:

2min later

… and DietPi Drive Manager’s a no-go at this point as well.

After waiting for 2 hours with the first stick inserted and no change in the situation, I rebooted the RasPi with the stick still in. After reboot it appeared as expected.

Still interested if anyone has an idea what caused this and where I could look further to troubleshoot this kind of behavior.

Maybe something to do with the second one being Kingston while the first is a cheap-donkey supermarket-branded thingy? Or maybe something to do with power requirements/supply, as the RasPi’s currently powered by laptop’s USB3 port (laptop does have a 230W psu tho’…)?

have a look to dmesg once a USB stick has been plug in. Usually you should see it being detected.

One more note, we don’t mount any USB device automatically just if they are plug in. You need to configure the device first time.

Yap, I did, and it did show up. I still don’t get it why this stick didn’t get under /dev until I rebooted with the stick inserted, and why the Kingston did suddenly appear as /dev/sda after I left the thing untouched for a longer time.

I don’t mind configuring devices the first time, but I’ve never had to do it for a drive or USB stick; even if the distros I’ve used haven’t auto-mounted the device at least I’ve found it under /dev. So how does one go about accomplishing the task in this kind of situation?

I connected a powered external drive, and I got /dev/sdb/ as expected. As the Kingston stick also eventually showed up in /dev, my conclusion is the root cause was a combo of insufficient power and USB stick of questionable quality.