Struggling with USB and Pi3
Hi all,
while it's not Slackware related, I'm writing here trying to find a solution. I have a Pi3b ( but had this problem also on a Pi3b+ ) whee I have attached an external 1Tb HD to use as NFS tsorage for other servers. It always keep disconnecting and this obviuosly lead to non usable nfs share and sometimes to ext4 corruption. The disk is connected to a powered USB HUB that I think is THE part of problem but cannot identify exactly. I thought that using a powered hub would have fixed the "Undervoltage detected" issue that some times used to appear on my boards, but it seems that the fix is worst than the problem :( I use the nfs share as backend for backup, so it's quite important to have it rock solid. I'm starting to think to replace the USB HUB with something tested ( and recommended ) by others. Do you have any suggestion ? Thanks in advance Pierluigi |
I have a PI 4 and recently had to return a 2.5" usb case which would work in my laptop, but gave read errors on my Pi. It did have solder bridges between tracks.
My point is that current limits on Pis are probably stricter than on x86 PCs. That said, tell us about the disk. 2.5" or 3.5"? SSD or platter? |
Quote:
There have been some user reports that powered hubs can produce the problems you are experiencing on the Raspberry Pi. I haven't had any issues with the powered hubs I have used in the past, but I have had several issues with USB power and data cables. |
The disk is a "Toshiba Canvio Basics 1TB Portable External Hard Drive 2.5 Inch USB 3.0"
The hub is a "MEDIACOM HUB USB 2.0 Zero Line" The disk cable I think it should be fine, as Toshiba is a good name. Maybe the HUB cable could be the problembut I won't bother chaning both if it fix my problem. What should I look for, when searching for the cables ? |
Quote:
[EDIT] If you have a spare PSU for the USB hub try that too. The power could be dipping when there's high demand and that would cause the sort of disconnects you're describing. |
The funny thing, Exaga, is that I get some disconnect also when ( I'm sure of this ) there is no NFS activities.
My backups starts at 22.30, and no one other could connect to these machines, but I've seen disconnections also at 12.00 or 16.xx so whene there is no activities at all. Actually one of my workaround is to run these script: Code:
#!/bin/bash If I issue these commands just before the backups then usually these ( backups ) works. Instead if I just let things go ( no umount, no fsck no other stuffs ) then I get the problems, as during the day the USB disconnect. I will try to power the USB HUB with a different power, or find a new PS for the Pi with more amps, and bypass the HUB. The only hard thing is that for every test I have to move to the remote site where sit the servers :( |
Quote:
|
Exaga, I've googled for the Toshiba and Raspberry Pi, but found also a lot of users that use this HD quite happly.
Yesterday I had a new "crash" that I already have seen ( on other hard disk ) sometime ago. Basially, when the CPU is under stress, the Pi loose the whole USB stack ( loosing also the eth0 ). Part of my backup include doing a bzip2 of weekly backup, for historical purpose. I moved this bzip2 procedure to Pi, to save some network bandwidth and, as soon as the CPU usage goes high, I gest the following: Code:
[Sun Oct 11 08:36:50 2020] ------------[ cut here ]------------ Code:
[Sun Oct 11 08:36:52 2020] smsc95xx v1.0.6 This problem was already present sometime ago, with the 5.4.21 kernel ( and that's why I rollback to 4.19.80-v7 ). I'm still searching a valid power supply to provide enough juice to Pi to be able to exclude USB HUB from the equation. as it could also be part of the problem. Not sure if, eventually, is a firmware problem. Pigi |
Have you tried switching the script to xz? It should tidy things up. bzip2 is the slowest IMO.
|
It could be an idea to save some time, but the problem is with the high-CPU/high-usb traffic IMHO, as I already have seen this behavior in other applications...
Before upgrading my Pi to a new Pi4 I used to have a Pi3 and have the same probllem when doing some "dump | scp" operation. It seems that I have no trouble with the Pi4, but must check a little more. Pigi |
I've changed the power supply, and at the same time I've removed the Usb-HUB from the equation by connecting the disk directly to the board, and leaving the keyboard and other not critical stuff on the hub.
So far so good. At the end of the week, if everything is fine, I will mark this as solved :) Thanks to all. |
Quote:
Code:
makepkg -l y -c n --threads 1 /path/to/${PKGNAM}.t?z |
I suggest you use autofs so that the drive powers down while it is not in use. You would then be avoiding disconnects and the need to run umount/fsck/mount. The difference between what you have and what autofs provides is a small amount of latency while your drive powers back on for use. Additionally, I suggest connecting the disk directly to the USB port.
Here is an example of autofs, ext4, and nfs: https://opensource.com/article/18/7/...e-Raspberry-Pi |
99% of USB hubs are junk (crap, garbage, steaming piles of smelly poo).
In the past I've used an Anker USB 3.0 Aluminum 14-Port Hub with good results running multiple external DVD drives when connected to a Super Micro server USB port. Have never tried a hub connected to RPi's yet. So maybe worth trying one of Anker's USB hubs to see if that helps (they make various models with fewer ports also). No guarantees though ever when a hub is involved. |
From lurking on Pi lists, I think the received wisdom is: If you're having usb issues, install a separately powered usb hub of any make/description, and you won't look back.
|
All times are GMT -5. The time now is 09:26 PM. |