'Loading ignores: permission denied' error on Linux (newbie)

The USB was indeed on /dev/sda1 but the output of the above wasn’t as positive:

tune2fs 1.46.2 (28-Feb-2021)
tune2fs: Permission denied while trying to open /dev/sda1
Couldn't find valid filesystem superblock.

Not sure if this one is applicable as I’m using Ext4.

This is not intended to be a daily driver setup, so I literally only want to turn it on, leave it on, and plugged in all the time, and just know that it works.

Output of the above:

bash: /mnt/NVME_usb: No such file or directory

The /etc/fstab location seems to be inexistent on my system with the path stopping at /etc/.

And thank you for all the detailed explanations!

Ah, you’ll need to prepend sudo to the command like so:

sudo tune2fs -l /dev/sda1

(Not every Linux system has sudo set up, and some distros automatically grant the first user root privileges and prompt for a passwword so I normally leave the use of “sudo” to a user’s discretion. I’ve also seen users on other forums assume that every Linux command begins with sudo, which could have unintended results.)

No worries. I just tossed that bit in there for future reference in case you and/or others are new to btrfs.

oops… my bad… I should have done better proofreading:

sudo mkdir /mnt/NVME_usb

(Note that /mnt is almost always a protected directory owned by root:root, so elevated privileges are required to create anything there.)

That’s odd. Usually only occurs on Live CD/USB systems and VM containers.

Would you mind posting the list of files and directories under /etc? (A ls /etc of the top level content will do just fine.)

Output of the above:

tune2fs 1.46.2 (28-Feb-2021)
Filesystem volume name:   NVME_usb
Last mounted on:          /media/datapi/NVME_usb
Filesystem UUID:          3a1b4f5a-597c-485e-a3e2-61fde66c1538
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
Filesystem flags:         unsigned_directory_hash 
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              31260672
Block count:              125026560
Reserved block count:     6251328
Overhead clusters:        2243098
Free blocks:              87761248
Free inodes:              31229322
First block:              0
Block size:               4096
Fragment size:            4096
Group descriptor size:    64
Reserved GDT blocks:      1024
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
Flex block group size:    16
Filesystem created:       Mon Apr 24 16:24:41 2023
Last mount time:          Thu May  4 18:30:00 2023
Last write time:          Thu May  4 18:30:00 2023
Mount count:              34
Maximum mount count:      -1
Last checked:             Fri Apr 28 18:09:25 2023
Check interval:           0 (<none>)
Lifetime writes:          39 GB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:	          256
Required extra isize:     32
Desired extra isize:      32
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      129a1fbb-6788-432a-ba8d-6e0cf6f737a3
Journal backup:           inode blocks
Checksum type:            crc32c
Checksum:                 0x4ec928f6

This went through with no output.

Note sure where the top level content starts/stops so here’s the full output:

adduser.conf            dhcpcd.conf.save     init.d              mkshrc          rc0.d             subuid
alsa                    dictionaries-common  initramfs-tools     modprobe.d      rc1.d             sudo.conf
alternatives            dillo                inputrc             modules         rc2.d             sudoers
apache2                 dphys-swapfile       insserv.conf.d      modules-load.d  rc3.d             sudoers.d
apg.conf                dpkg                 ipp-usb             motd            rc4.d             sudo_logsrvd.conf
apparmor.d              e2scrub.conf         iproute2            mtab            rc5.d             sv
apt                     emacs                iptables.up.rules   nanorc          rc6.d             sysctl.conf
avahi                   environment          issue               netconfig       rc.local          sysctl.d
bash.bashrc             environment.d        issue.net           network         rcS.d             systemd
bash_completion         ethertypes           kernel              NetworkManager  reader.conf.d     terminfo
bash_completion.d       fake-hwclock.data    ldap                networks        request-key.conf  timezone
bindresvport.blacklist  fb.modes             ld.so.cache         nftables.conf   request-key.d     timidity
binfmt.d                fonts                ld.so.conf          nsswitch.conf   resolv.conf       tlp.conf
bluetooth               fstab                ld.so.conf.d        nvme            resolv.conf.bak   tlp.d
ca-certificates         fuse.conf            libaudit.conf       openal          resolvconf.conf   tmpfiles.d
ca-certificates.conf    gai.conf             libblockdev         openni2         rmt               triggerhappy
chatscripts             gdb                  libccid_Info.plist  opensc          rpc               ucf.conf
chromium                gdm3                 libibverbs.d        openvpn         rpi-issue         udev
chromium.d              ghostscript          libnl-3             opt             rsyslog.conf      udisks2
cifs-utils              glvnd                libpaper.d          os-release      rsyslog.d         ufw
console-setup           gnome                lightdm             PackageKit      RTIMULib.ini      unbound
cracklib                groff                lighttpd            pam.conf        runit             update-motd.d
cron.d                  group                locale.alias        pam.d           rygel.conf        UPower
cron.daily              group-               locale.gen          papersize       sane.d            usb_modeswitch.conf
cron.hourly             gshadow              localtime           passwd          security          usb_modeswitch.d
cron.monthly            gshadow-             logcheck            passwd-         selinux           vdpau_wrapper.cfg
crontab                 gss                  login.defs          perl            sensors3.conf     vim
cron.weekly             gtk-2.0              logrotate.conf      pip.conf        sensors.d         vnc
cups                    gtk-3.0              logrotate.d         pipewire        services          vulkan
cupshelpers             hdparm.conf          machine-id          plymouth        sgml              webmin
dbus-1                  host.conf            magic               polkit-1        shadow            wgetrc
dconf                   hostname             magic.mime          ppp             shadow-           wpa_supplicant
debconf.conf            hosts                mailcap             profile         shells            X11
debian_version          hosts.allow          mailcap.order       profile.d       skel              xattr.conf
default                 hosts.deny           manpath.config      protocols       snmp              xdg
deluser.conf            hp                   menu-methods        pulse           ssh               xml
dhcp                    idmapd.conf          mime.types          python3         ssl
dhcpcd.conf             ifplugd              mke2fs.conf         python3.9       subgid

Hmmm…

According to tune2fs your USB NVMe drive was last mounted by user datapi.

It’s definitely part of your permissions problem because your Syncthing setup for user raspi4 is looking for /media/raspi4/NVME_usb.

Anytime datapi takes ownership of the mount (/media/datapi/NVME_usb) it’s not available for raspi4, and according to your output from ls -l /media/raspi4/NVME_usb/, datapi doesn’t own sync_folder1 or the other directories so it’s actually of limited used to datapi.

The inode counts look fine. Unless you’re planning on dropping 32 million more files and directories onto your drive it’s nothing to be concerned about.

That’s normal. Like with touch, no output generally means no errors.

So the output from the command ls /etc says that you do have a /etc/fstab file. :smirk:

(Be very careful whenever editing /etc/fstab because it tells Linux which drives/partitions to use. Issues with the configuration file will cause boot errors.)

Although I think you should manually edit /etc/fstab because it’d be a good learning experience, the following commands will back up your existing file and then append the mount parameters described earlier:

sudo cp -p /etc/fstab /etc/fstab.prev
sudo echo "LABEL=NVME_usb    /mnt/NVME_usb   ext4    defaults,noatime,nodev,nosuid,discard,uid=1000,gid=1000 0 0" >> /etc/fstab

(Review each command after copying and pasting before pressing the [Enter] key. If you make a mistake, do not reboot the RPi.)

If all goes well, neither command will generate any output.

Note that with the above mount configuration, the mount point /mnt/NVME_usb will only be writable by users raspi and root unless the appropriate permissions are granted to other users on the system.

Reboot the RPi and verify that you can access /mnt/NVME_usb while logged on as user raspi4. Also try creating and deleting some files.

If things checks out, then as user raspi4, run the following commands:

  1. killall syncthing terminates any instances of Syncthing running under user raspi4.
  2. rm /home/raspi4/.config/autostart/syncthing-start.desktop removes the Syncthing desktop shortcut from the autostart directory.
  3. systemctl --user --now enable syncthing tells SystemD you want to enable then immediately launch Syncthing as user raspi4.
  4. loginctl enable-linger raspi4 is optional. It tells the SystemD login manager that you want Syncthing to continue running even when you’re not logged on as raspi4 (very useful if you want your RPi to act as a server).

At any time while logged on as user raspi4, the following commands will start, stop, or restart Syncthing:

systemctl --user start syncthing
systemctl --user stop syncthing
systemctl --user restart syncthing

Now if you set up OpenSSH and VNC, you can operate your RPi remotely without a keyboard, mouse and monitor. :wink:

A few more Linux pointers…

The Linux (Quick Study Computer) Pamphlet by BarCharts, Inc. was published back in March 2000, but it’s still a handy reference and well worth the $6.95. It’s a 8.5"x11" fan-fold laminated pamphlet crammed full of useful info.

A few websites:

Oops… anyway… datapi = raspi4 :sweat:

Rookie mistake here… I was previously looking for a folder, not a file. Second oopsie.

Output from the above:

bash: /etc/fstab: Permission denied

The file was duplicated so I guess the error is refering to the echo part of the command.

Pending action on the above due to the previous error.

Already using VNC so I can run it headless which makes everything so much easier!

Bookmarked. Thanks for the tips!

ugh… yeah, my system has a bit different setup. It’s the parsing of the redirection (>> /etc/fstab) with the sudo command. Here’s a revised version:

echo "LABEL=NVME_usb    /mnt/NVME_usb   ext4    defaults,noatime,nodev,nosuid,discard,uid=1000,gid=1000 0 0" | sudo tee -a /etc/fstab

:smiley:

Done this while making sure things were correct and now it’s booting into emergency mode. I’m unable to run VNC at this point, so I might not be able to proceed from here until I can get my keyboard on Tuesday. This is now, yet again, making me consider to just start from scratch with a fresh setup. :frowning:

So your RPi has a monitor but no keyboard? If so, what’s the exact boot error message?

If your USB NVMe weren’t plugged in, Linux usually continues booting after 90 seconds as long as the required drives/partitions are available. Booting into emergency mode can be caused by an error in /etc/fstab or filesystem errors that require user intervention.

Assuming that you don’t already have another Linux system and/or a bootable Linux system on a USB flash drive…

  1. Download Linux Reader (https://diskinternals.com/linux-reader/) onto a Windows PC.
  2. Power down the RPi (while Linux is in emergency boot mode, everything it needs is in memory, so it’s fine) and eject the microSD.
  3. Insert the microSD into your Windows PC that has Linux Reader.
  4. Launch Linux Reader and access the 2nd partition on the microSD (the Raspberry Pi OS imager creates two partitions (1st is FAT, 2nd is ext4).
  5. Review the contents of /etc/fstab and the backup made earlier /etc/fstab.prev.

If you do have another Linux system that you can use for read/write access to the microSD, the backup /etc/fstab can be quickly restored.

See also:

A bit of a jump here but I decided to re-image a new SD card and start this whole thing from scratch.

Just installed Syncthing using the official instructions, and before trying to setup my stuff again and make any changes, I’ve tried the following the steps below to try to get the app to autostart properly from scratch. This new user is no longer raspi4 and it’s called datapi now.

I’ve done the steps below and restarted the RPi.

After rebooting the RPi, I ran systemctl status syncthing

Unit syncthing.service could not be found.

Followed by systemctl --user status syncthing

● syncthing.service - Syncthing - Open Source Continuous File Synchronization
     Loaded: loaded (/usr/lib/systemd/user/syncthing.service; enabled; vendor p>
     Active: active (running) since Mon 2023-05-08 17:39:06 BST; 27s ago
       Docs: man:syncthing(1)
   Main PID: 632 (syncthing)
      Tasks: 19 (limit: 3933)
        CPU: 1.587s
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/syncthing.>
             ├─632 /usr/bin/syncthing serve --no-browser --no-restart --logflag>
             └─649 /usr/bin/syncthing serve --no-browser --no-restart --logflag>

May 08 17:39:09 datapi syncthing[632]: [EX6ZD] INFO: listenerSupervisor@dynamic>
May 08 17:39:09 datapi syncthing[632]: [EX6ZD] INFO: Relay listener (dynamic+ht>
May 08 17:39:09 datapi syncthing[632]: [EX6ZD] INFO: Relay listener (dynamic+ht>
May 08 17:39:09 datapi syncthing[632]: [EX6ZD] INFO: listenerSupervisor@dynamic>
May 08 17:39:09 datapi syncthing[632]: [EX6ZD] INFO: Relay listener (dynamic+ht>
May 08 17:39:09 datapi syncthing[632]: [EX6ZD] INFO: Relay listener (dynamic+ht>
May 08 17:39:09 datapi syncthing[632]: [EX6ZD] INFO: listenerSupervisor@dynamic>
May 08 17:39:09 datapi syncthing[632]: [EX6ZD] INFO: GUI and API listening on 1>
May 08 17:39:09 datapi syncthing[632]: [EX6ZD] INFO: Access the GUI via the fol>
May 08 17:39:09 datapi syncthing[632]: [EX6ZD] INFO: My name is "datasync"
lines 1-21/21 (END)...skipping...
● syncthing.service - Syncthing - Open Source Continuous File Synchronization
     Loaded: loaded (/usr/lib/systemd/user/syncthing.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2023-05-08 17:39:06 BST; 27s ago
       Docs: man:syncthing(1)
   Main PID: 632 (syncthing)
      Tasks: 19 (limit: 3933)
        CPU: 1.587s
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/syncthing.service
             ├─632 /usr/bin/syncthing serve --no-browser --no-restart --logflags=0
             └─649 /usr/bin/syncthing serve --no-browser --no-restart --logflags=0

May 08 17:39:09 datapi syncthing[632]: [EX6ZD] INFO: listenerSupervisor@dynamic+https://relays.syncthing.net/endpoint: service dynamic+https://relays.syncthing.net/endpoint failed: Get "https://relays.syncthing.net/endpoint": dial tcp: l>
May 08 17:39:09 datapi syncthing[632]: [EX6ZD] INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
May 08 17:39:09 datapi syncthing[632]: [EX6ZD] INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) shutting down
May 08 17:39:09 datapi syncthing[632]: [EX6ZD] INFO: listenerSupervisor@dynamic+https://relays.syncthing.net/endpoint: service dynamic+https://relays.syncthing.net/endpoint failed: Get "https://relays.syncthing.net/endpoint": dial tcp: l>
May 08 17:39:09 datapi syncthing[632]: [EX6ZD] INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
May 08 17:39:09 datapi syncthing[632]: [EX6ZD] INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) shutting down
May 08 17:39:09 datapi syncthing[632]: [EX6ZD] INFO: listenerSupervisor@dynamic+https://relays.syncthing.net/endpoint: service dynamic+https://relays.syncthing.net/endpoint failed: Get "https://relays.syncthing.net/endpoint": dial tcp: l>
May 08 17:39:09 datapi syncthing[632]: [EX6ZD] INFO: GUI and API listening on 127.0.0.1:8384
May 08 17:39:09 datapi syncthing[632]: [EX6ZD] INFO: Access the GUI via the following URL: http://127.0.0.1:8384/
May 08 17:39:09 datapi syncthing[632]: [EX6ZD] INFO: My name is "datasync"

Is the error Unit syncthing.service could not be found. a problem? Are there any other recommended steps I should take before proceeding?

No worries about the “Unit syncthing.service could not be found.” error. It’s normal and expected.

SystemD supports both system-level and user-level services. With the latter, a user can set up and maintain services that run with a user’s permissions, i.e., the service can only do what the user is already permitted to do on the system.

The following command asks SystemD to return the status of Syncthing that might be running at system-level:

systemctl status syncthing

Because Syncthing wasn’t enabled to run at system-level, an error is returned.

In contrast, the following command asks SystemD to return the status of Syncthing that might be running at user-level (specified by the --user option):

systemctl --user status syncthing

The status output you posted says that:

  • Syncthing is enabled as a SystemD service.
  • Syncthing is running as user datapi.
  • The RPi’s hostname is “datasync”.
  • Syncthing’s web GUI is available at http://127.0.0.1:8384/

So far so good. :slightly_smiling_face:

Great! I’ll get it to run at boot by using this guide and proceed with the rest of the setup in that case. I’m definitely referring to all the previous stuff you posted previously and ping this thread if I run into any issues. Thanks again for all the help - much appreciated! :raised_hands:

When following the instructions on apt.syncthing.net, did you set the priority so that Syncthing from the Debian repo doesn’t get used?

Since you followed steps 3 and 4 from my earlier list of instructions, there’s no need to do any more to get Syncthing auto-starting at boot time. Note the following line from your systemctl --user status syncthing output:

Loaded: loaded (/usr/lib/systemd/user/syncthing.service; enabled; vendor preset: enabled)

The line above says that Syncthing is enabled as a service.

And if you also issued the command loginctl enable-linger datapi (note the updated username), Syncthing will start at boot time rather than waiting for you to log on first.

I did set the priority indeed and I just ran systemctl --user status syncthing after rebooting to doublecheck that status and the service is indeed running, and opening the web GUI further confirms this as I can also see the other remote device as active.

I have not done that but I guess I will now as I was previously looking to set it as system service as mentioned in Starting Syncthing Automatically — Syncthing documentation so that seems to equally achieve my goal. :slight_smile:

:slightly_smiling_face: … without looking closely at the logs it’s not immediately obvious that Syncthing actually just started as soon as you logged on instead of at boot time.

Accessing Syncthing’s web GUI via another computer…

VNC is great, but if you have sshd enabled on the RPi, it’s easy to access Syncthing’s web GUI from another computer via network port forwarding.

On Windows 10/11 (OpenSSH is available from Microsoft), macOS, or Linux, via a command-line:

ssh -L 48384:127.0.0.1:8384 datapi@1.2.3.4`

Breaking it down…

  • ssh – OpenSSH client (filename is ssh.exe in Windows).
  • -L – Set up local network port forwarding.
  • 48384 – Any available local network port will do. Since Syncthing defaults to 8384, prepending a 4 was convenient.
  • 127.0.0.1 – Remote host endpoint for the SSH tunnel.
  • 8384 – Remote network port to connect to. Combined with the preceding IP address, it works out to 127.0.0.1:8384 (Syncthing on the RPi).
  • datapi – Remote user to login as.
  • 1.2.3.4 – Remote host IP address (substitute your RPi’s real IP address in place of 1.2.3.4).

Now open a local web browser and point it at http://127.0.0.1:48384/

Besides OpenSSH, PuTTY or other suitable SSH clients that support port forwarding can also be used.

1 Like

Unfortunately, I already have some results and it seems like it’s how the USB drive is setup.

This is the error I keep on having:

Error on folder "syncpi_backup" (syncpi_backup): folder path missing

I had previously re-formatted my NVME_USB drive and selected the following Mount Options using Gnome Disk:

The USB is connected to the USB 3.0 port and I told it to mount as /mnt/NVME_USB. The problem is that the USB drive keeps disconnecting as I keep getting the ‘device was removed’ error window.

I’ve tried plugging it to the USB 2.0 port instead but then it’s no longer at /mnt/NVME_USB and it mounts as /media/datapi/NVME_USB, which is no longer the folder path setup with Syncthing, hence the error.

Should I re-do the steps from the screenshot above on one of the USB 2.0 ports instead and simply redirect the folder paths? I don’t understand why it keeps disconnecting in the first place as I would very much like to keep it connected to the faster 3.0 port.

If the “User Session Defaults” setting is toggled off in GNOME Disks, behind the scenes GNOME Disks adds/removes entries from /etc/fstab, so the end result is similar to the command-line method I described earlier.

Based on your screenshot of the GNOME Disks options panel, the following line would be appended to /etc/fstab

/dev/disk/by-label/NVME_USB    /mnt/NVME_USB    auto    nosuid,nodev,nofail,x-gvfs-show 0 0

Comparing it to the version I provided earlier (updated with your new volume label)…

LABEL=NVME_USB    /mnt/NVME_USB   ext4    defaults,noatime,nodev,nosuid,discard,uid=1000,gid=1000 0 0

(The pull down menu “Identify As” should have “LABEL=NVME_USB” as one of the available choices.)

While both /etc/fstab entries above succeed in mounting your USB NVMe drive at boot time, the difference is that GNOME Disks’ version doesn’t optimize for SSDs and by default leaves the mount point owned by root:root.

hmmm…

That’s normal behavior whenever unplugging – after hopefully cleanly unmounting the drive first – and then plugging back into any USB port (not just the USB 2.0 ports).

Drives/partitions configured to be mounted via /mnt/fstab aren’t usually plug-and-play. You normally manually mount/unmount via a CLI/GUI (or alternatively, there’s autofs but that’s for a different discussion).

Although it’s possible to target a specific USB device on a specific USB port in /etc/fstab, it’s not all that common. Most of the time storage volumes are referenced by volume label or UUID.

It’s easy to get lost down the proverbial rabbit hole when debugging stuff like this, so start by ruling out a hardware issue:

  1. Leave the USB NVMe drive plugged into a USB 3.0 port
  2. Reboot the RPi.
  3. Once the RPi finishes booting, log on and do whatever you were doing before until the “device was removed” error window appears.
  4. When the USB NVMe disconnects, issue the following command in a terminal window: dmesg -T > /tmp/dmesg.log
  5. Upload /tmp/dmesg.log file in a reply.

dmesg dumps messages contained in the Linux kernel’s ring buffer. Messages include diagnostic info about USB devices as they’re connected and disconnected.

I formatted the USB drive once again. This time I didn’t change any mounting options so I left it all to default and connected to the 3.0 port. It has also mounted as /media/datapi/NVME_USB by default.

It disconnected again while trying to sync the same folder with a lot of data. Attaching the dmesg.log as the output was above the character limit. — dmes.log (49.4 KB)

So according to your dmesg output, you’ve got a Inateck FE202x series enclosure with a USB bridge made by Realtek (RTL9210B-CG).

A snippet from the log file you posted shows the drive resets:

[Mon May  8 23:35:26 2023] sd 0:0:0:0: [sda] tag#20 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD 
[Mon May  8 23:35:26 2023] sd 0:0:0:0: [sda] tag#20 CDB: opcode=0x2a 2a 00 1d c4 64 08 00 00 50 00
[Mon May  8 23:35:26 2023] scsi host0: uas_eh_device_reset_handler start
[Mon May  8 23:35:26 2023] usb 2-1: reset SuperSpeed USB device number 3 using xhci_hcd
[Mon May  8 23:35:31 2023] xhci_hcd 0000:01:00.0: Trying to add endpoint 0x83 without dropping it.
[Mon May  8 23:35:31 2023] usb 2-1: failed to restore interface 0 altsetting 1 (error=-110)
[Mon May  8 23:35:31 2023] scsi host0: uas_eh_device_reset_handler FAILED err -19
[Mon May  8 23:35:31 2023] sd 0:0:0:0: Device offlined - not ready after error recovery
[Mon May  8 23:35:31 2023] sd 0:0:0:0: [sda] tag#20 UNKNOWN(0x2003) Result: hostbyte=0x03 driverbyte=DRIVER_OK cmd_age=36s
[Mon May  8 23:35:31 2023] sd 0:0:0:0: [sda] tag#20 CDB: opcode=0x2a 2a 00 1d c4 64 08 00 00 50 00
[Mon May  8 23:35:31 2023] I/O error, dev sda, sector 499409928 op 0x1:(WRITE) flags 0x800 phys_seg 10 prio class 2
[Mon May  8 23:35:31 2023] Aborting journal on device sda1-8.
[Mon May  8 23:35:31 2023] sd 0:0:0:0: rejecting I/O to offline device

Errors similar to the ones above can be caused by insufficient power, flaky firmware, flaky drivers, flaky cables, and even mismatches between hardware.

Although for the most part USB is plug-and-play and most people don’t have to worry about compatibility between different manufacturers, sometimes the combination of a particular USB chipset on a mainboard and in a particular enclosure don’t work well together.

  • A quick check of Inateck’s website didn’t turn up any downloadable firmware updates. Might be worth a closer look.
  • Same goes for the NVMe stick. Check the manufacturer’s website for any firmware updates.
  • Try another drive that supports USB 3.0 in the same port on the RPi to help rule out issues with the RPi.
  • Is the Inateck enclosure directly plugged into the RPi, via a USB extension cable, or external USB hub? If it’s not direct, try that.
  • Who made the SSD inside the enclosure? The combination of the SSD + enclosure might be pulling too much power. Are you using the official Raspberry Pi USB-C power supply or something else?

Could you upload the file from the following command?

lsusb -v > /tmp/lsusb.log

FWIW, I haven’t had any similar issues with a RPi 400 (same core hardware as the RPi 4, but with an enhanced PCB) and the stock Raspberry Pi OS in either 32-bit or 64-bit editions.

  • I’ve tried looking for any available firmware by the USB manufacturer before and also no luck.
  • I’ll give this a go with another USB enclosure with an HDD.
  • The enclosure is connected via the provided USB-C ↔ USB-A 3.0 USB cable.
  • The enclosure is directly connected to the RPi.
  • The SSD is a Samsung 512GB PM981 M.2 PCIe NVMe Performance OEM SSD.
  • I am using the official RPi USB-C power supply.

Log below, but it also outputted the following:

Couldn't open device, some information will be missing
Couldn't open device, some information will be missing
Couldn't open device, some information will be missing
Couldn't open device, some information will be missing

Bus 002 Device 002: ID 0bda:9210 Realtek Semiconductor Corp. RTL9210 M.2 NVME Adapter
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.20
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         9
  idVendor           0x0bda Realtek Semiconductor Corp.
  idProduct          0x9210 RTL9210 M.2 NVME Adapter
  bcdDevice           20.01
  iManufacturer           1 Realtek
  iProduct                2 RTL9210B-CG
  iSerial                 3 012345678922
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0079
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              896mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           4
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     98 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
        MaxStreams             32
        Data-in pipe (0x03)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
        MaxStreams             32
        Data-out pipe (0x04)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
        MaxStreams             32
        Status pipe (0x02)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst               0
        Command pipe (0x01)

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 
  bDeviceProtocol         3 
  bMaxPacketSize0         9
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0003 3.0 root hub
  bcdDevice            6.01
  iManufacturer           3 Linux 6.1.21-v8+ xhci-hcd
  iProduct                2 xHCI Host Controller
  iSerial                 1 0000:01:00.0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x001f
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12
        bMaxBurst               0

Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x2109 VIA Labs, Inc.
  idProduct          0x3431 Hub
  bcdDevice            4.21
  iManufacturer           0 
  iProduct                1 USB2.0 Hub
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0019
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0002 2.0 root hub
  bcdDevice            6.01
  iManufacturer           3 Linux 6.1.21-v8+ xhci-hcd
  iProduct                2 xHCI Host Controller
  iSerial                 1 0000:01:00.0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0019
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12

That’s fine. Some USB devices such as hubs aren’t meant to be probed. They more or less function transparently in the daisy chain.

According to the lsusb output, the Realtek USB bridge inside the Inateck FE202x enclosure told the RPi that it wants up to 896mA.

However, Samsung’s manual for the PM981 NVMe SSD says that power consumption is 5.9W during active reads and 5.7W during active writes so the 896mA is just an initial estimate.

Per the Raspberry Pi 4 Model B specifications page:

A good quality 2.5A power supply can be used if downstream USB peripherals consume less than 500mA in total.

That means the RPi 4 requires up to 2A at full load (without overclocking). 2000mA (RPi) + 896mA (Inateck) = 2896mA = 2.896A.

The official Raspberry Pi 15W USB-C power supply is rated at 5.1V / 3.0A DC output, so it’s cutting it close. A typical USB optical mouse might want 100mA, a basic USB keyboard 100-150mA, a 16GB flash drive might want 65mA.

A bigger power supply would be good, but a powered USB hub for the external drive would be even better (less waste heat for the RPi to dissipate).