I have a XU4 Coudshell with DietPi running off the eMMC chip, and a 4TB 2.5 inch hard drive inside. Dietpi has been set the hard drive to permanent. We are basically just running Plex, PiHole, and SMB Server on the Cloudshell.
Everything is working except that the harddrive seems to unmount randomly. Typically it happens during a long file transfer (4GB+), the drive will just unmount itself, and the file transfer will fail. I then have to remount the drive.
Upon boot up the drive is typically “sda” and then it will unmount and be listed as “sdb” and continually increment as it unmounts. If i don’t do any file server efforts, then its typically stable for days on end.
If i do local file transfers (plug a USB stick into the unit), they are stable, though after they all complete, the drive will sometimes go offline. But that is rare. Its typically after/during network transfers.
I have a similar setup and remember reading that the USB 3 sockets had some sort of coating on the inside that could result in poor electrical contact - the advice was to clean them with a cotton bud and alcohol. Worth a try maybe? I have had the occasional random dismount but not to the extend you describe.
What’s odd is that when I do the built is disk test and such that doesn’t seem to cause it to unmount and that’s a lot of disk i/o vs the 10 megabytes a second in SMB. I haven’t tried cleaning the USB plug, but I will try that tomorrow.