Reliable USB to SATA adaptors
Matthew Phillips (473) 721 posts |
I have a couple of Raspberry Pi 3s which I use for time-consuming processing jobs involving a fair amount of disc activity. One runs RISC OS, the other Raspbian. In both cases they boot off SD card, but once the OS is loaded, the main drive is a SATA SSD attached via a USB to SATA adapter. Occasionally the RISC OS machine has “lost” its drive in the middle of processing. I can’t recall the exact error I get. The Raspbian machine runs headless. It too occasionally conks out and I had assumed it was dropping its network connection somehow as I could not SSH to the server. Yesterday, however, I had connected up a monitor to the Raspbian machine, and had reset it after it having conked out. While I was sitting there, watching the early stages of the job, and monitoring the processes in a terminal window using “top”, first the desktop wallpaper disappeared, and then a number of icons vanished off the desktop. In the terminal I tried “df” to see if the disc was connected, and it couldn’t even find “df” to run as a command. I’m concluding therefore that the make of SATA adapter I am using is not fully reliable with the RPi3. Does anyone have any recommendations of a make which works reliably without the machine losing the disc? I’m looking for something which has proved reliable over multiple days of operation, or even better, weeks. Or are there other possible explanations I should look into first? |
Alan Adams (2486) 1149 posts |
If you’re powering the drive via the adapter from the rPi, try moving it to a powered hub. I’ve been having similar troubles on an Armx6, and I first changed the adapter, which didn’t help, then tried an old USB hub, which didn’t help, then bought a powered USB 3 hub from Amazon (the only powered one they list), and all now seems reliable. |
Bryan (8467) 468 posts |
Or, use an adapter powered from the GPIO. I use Geekworm adapters (SATA and mSATA) which physically mount on the GPIO; some of which have been online for years. Do check that the Pi power supply is still working correctly – some fail with low voltage after a while. |
Jon Abbott (1421) 2651 posts |
I’ll second what Alan and Bryan have already said. Firstly you must use a powered hub with any device that needs power as the Pi struggles to meet the USB power spec, which as Bryan has mentioned is made worse by official Pi PSU’s not being very good, resulting in power-droop. I use a USB connected SSD via a powered hub on a Pi1, which has been running constantly for close to 10 years. Initially I tried it without the powered hub and it randomly disappeared as you’ve had happen. The other thing to be aware of, although probably not an issue in this case is hot-plugging mice/keyboard can cause USB bus resets, which causes drives to reset…this is only really an issue if you’re using a KVM or hot-plugging into a headless Pi. |
Dave Higton (1515) 3526 posts |
A while ago I set up a RasPi running OpenMediaVault as a NAS. There are just two portable spinning rust drives. I had all sorts of problems until I sorted out the power arrangements. I’ll preface the rest of this with a warning: don’t do it unless you’re sure you know what you’re doing, to the extent that you can be sure of safety. RasPi’s have a little resistance before the power pin of their USB sockets. This limits the available power, and drops the available voltage. I shorted out the resistances, because I have an overall power supply that is adequately current limited. I also shortened the output cable of the power supply, to reduce voltage drop still further. Since then I’ve had no trouble. The whole thing has been very reliable. |
Alan Adams (2486) 1149 posts |
You could also power the pi via GPIO pins. That bypasses the little resistor, and also the fuse. The fuse is there so that if something draws excessive power, e.g. from the GPIO 5volt pin or the USB outputs, it protects the tracks on the rPi circuit board. I think the fuse is the self-healing type, so if left, it recovers. It also avoids the risk of pulling the rather fragile micro-usb socket off the circuit board, if the power lead is strained. |
Matthew Phillips (473) 721 posts |
What’s the best way to do this? Do you mean check with a multimeter or something like that? |
Dave Higton (1515) 3526 posts |
The proper answer is, unfortunately, much harder than the question. One of the failure modes for power supplies is that the main reservoir capacitors dry out and lose capacitance. The consequence is that the output voltage can be seen to spike downwards 100 times per second. If you have an oscilloscope, it’s easy to observe and diagnose. If you only have a voltmeter, the challenge is that the average voltage, which is what you’re measuring, doesn’t fall very much in the early stage of failure, despite the spikes taking the voltage out of specification. It’s normally quicker, cheaper and easier to get a new PSU with comfortable spare capacity, than to try diagnosing it. If the new PSU doesn’t fix it, you’ve only lost a few quid – but it’s still there in storage for when another PSU fails. |
Bryan (8467) 468 posts |
I am inclined to agree that the best way to check a Raspberry Pi power supply is to try another one. The new power supplies also give more power than the original. 3 amp instead of 2.5 amp. A slight under-clocking may also increase reliability. |
Bryan (8467) 468 posts |
No harm in that and it may make you feel better if you need to replace a UBC-C connector with an older Pi 3 compatible micro USB. |
Dave Higton (1515) 3526 posts |
Actually it’s a barrel connector. I made my own case out of an off-the-shelf plastic box. It contains a RasPi3B+, a 7 port USB hub, an RTC and an SSD. |
David J. Ruck (33) 1635 posts |
If you suspect power issues check if |
Matthew Phillips (473) 721 posts |
Thanks for the help. I tried a powered hub and still got a failure, so now I’m trying a different power supply which says it does 3.5A. Thank you also for the pointer to Geekworm: something definitely to consider. |