External USB drive sometimes just hangs for ever

I have a Pi 4 running as a NAS with an external USB drive.

It has been working pretty reliably for a couple of months but two nights ago something happened which prevented the USB drive waking up when accessed.

I only noticed today, I connected via ssh and then any attempt to access the USB drive simply hung the process completely, CTRL/C wouldn't break back to the bash command prompt. Everything else worked fine still so I logged in again and rebooted the Pi. It rebooted OK and (after running fsck) I was again able to ssh to it and this time the external USB drive works OK.

Has anypne else seen anything like this with a Pi? I doubt it's hot as it does nothing else except run backups. It has a genuine Pi 4 power supply so that should be OK too. Any other ideas for things to check?

--
Chris Green
Reply to
Chris Green
Loading thread data ...

There are quite alot of USB3 attached Disk problems reported on the Pi forum. I seems some USB3 SATA adapters are not very good. I've been looking because I'm going to move my backup system from a Pi3 with a USB2 SATA attached disk to a Pi4 with USB3. I'd recommend searching the Pi forum and see if there are any hints there.

I've got my adapters (StarTech - one USB powered for an SSD and one powered for a large HD, and I have a WD USB3 HD) and been playing, and all seems to work but I've not had things running as long as you seem to have - so I'm a bit worried. I too have an official Pi4 PSU, but I've had some problems with a longish USB3 lead attaching the WD HD - which went away when I substituted a short lead - so I'm guessing the long lead wires were not thick enough and caused a bit of a voltage drop when the disk was very active and drawing more current.

I have also had problems with poor USB3 disk performance - because I hadn't pushed in the USB3.0 cable in to the Pi4 sufficiently far. The USB3 contacts are recessed, so if the cable is not fully pushed home, only the USB2 contacts are connected and the Pi4 seems it as a slower USB2 device!

I've not tried spinning the HD down - in my my home server powers up the backup server (currently Pi3 and USB2 disk) when it needs to do backups, and powers it down when it has finished. So no need for spinning down.

Jim

Reply to
Jim Jackson

Thanks, I'll take a look.

My USB disk has its own power supply so shouldn't be loading the Pi power supply.

Performance really isn't a big issue in my case, USB2 would be fine.

My USB drive spins down all by itself, the Pi runs all the time.

--
Chris Green
Reply to
Chris Green

FWIW, I'm using a very cheap uGreen usb3-sata adapter from Amazon. It cost less than $10 and _seems_ to work just fine. Haven't had it very long, so no comments on longevity. It's powered from the Pi4 using the Pi4's 3.5A power supply (Canakit). Voltage on the board is a bit above the warning limit and I haven't seen any trouble.

Dmesg reports it's using the UAS driver, so that much is good, at least superficially. Performance seems decent, in any case much better than USB flash or microSD.

If you learn of a good disk/adapter combo please do post! I'm looking for a couple more to replace flash devices and have found the search extremely hard, especially when the SMR vs CMR issue is added to the pot.

As an aside, I _have_ had trouble when Pi systems are left running untouched for long periods of time. The microSD and USB connectors are occasionally prone to simply developing bad connections that go away when they're reseated.

hth,

bob prohaska

Reply to
bob prohaska

Have you tried a squirt of switch cleaner (on both plug and socket) before plugging the USB device in for the first time?

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

No, mostly for behavioral reasons 8-)

It didn't occur to me that such a problem might occur in the first place. By the time it was found and fixed, I didn't want to take the machine down _again_ for a problem that was gone. It only happened once or twice on machines untouched for maybe a year. That really isn't the operational mode envisioned for USB.

In fact, I'm not at all sure spray contact cleaner will make much difference. The lubricants are dielectric fluids and must be displaced by contact pressure before a connection forms. Given light pressure for sake of insertion life, it isn't obvious to me that dust-attractive lubricants are helpful if things are reasonably clean to begin with. Increasing the contact pressure is more apt to help but hard to do.

The real key is simply being aware of the possibility. Wiggling the wires should be an early test, not the last one......

bob prohaska

Reply to
bob prohaska

Actually, contact cleaner contains oxide remover more than lubricant, the purpose of which is to slow the formation of more oxide.

It shouldn?t attract much dust if things are kept plugged together.

--
-michael - NadaNet 3.1 and AppleCrate II:  http://michaeljmahon.com
Reply to
Michael J. Mahon

I've had my Pi3+ based server (DNS, DHCP, syslog, IMAP etc) running for over 2 years with no USB connection problems. The current uptime is

10:16:39 up 364 days, 13:36, 1 user, load average: 0.01, 0.04, 0.09

The MicroSD card is only used on booting (the /boot partition is there, with the root filesystem on USB attached disk), so I will bear in mind if I have troubles rebooting.

I'd expect more problem with small movements in USB3.0 connectors, asd the USB3 contacts are so far back - any small movement could disrupt.

Reply to
Jim Jackson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.