Mobile USB 3.0 hard drive disconnecting for no reason
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Mobile USB 3.0 hard drive disconnecting for no reason
I'm using a fileserver with CentOS Linux release 7.5.1804 and I keep having a problem with my WD Passport 1TB drive disconnecting for no apparent reason. When it does this, I cannot in any way get it to mount again on that system until I do a reboot. This has only started to happen very recently, and no other computer seems to suffer this problem with this drive.
The problem persists even though I bought a powered USB 3.0 hub to connect the drive.
My fileserver uses a Gigabyte M68MT-S2P motherboard.
Randomly disconnecting and using the "wrong" driver can both be caused by problems with the physical USB port. Have you switched port recently? Could the port itself be worn, or one of the internal connections loose?
I had a box once that was supposedly all USB 2.0, but some of the ports would only work if I disabled the relevant module so that it fell beck to ohci. I suspect they were detected as USB2 but didn't properly implement the standard.
Randomly disconnecting and using the "wrong" driver can both be caused by problems with the physical USB port. Have you switched port recently? Could the port itself be worn, or one of the internal connections loose?
I had a box once that was supposedly all USB 2.0, but some of the ports would only work if I disabled the relevant module so that it fell beck to ohci. I suspect they were detected as USB2 but didn't properly implement the standard.
It happens on every port that I use with this device. Once it disconnects, no port (not even a newly attached external hubs) will let me mount the hard drive until I reboot. But only on one machine. I don't even see where my machine uses xhci or ehci, or how to enable it. I'm using kernel 3.10.0-862.11.6.el7.x86_64. I can't find a way to enable x/ehci or reset it...
Last edited by comcastuser; 09-19-2018 at 05:22 AM.
Actually, in further, desperate experiments I found that I cannot re-mount to the same mount point (directory) that I used before, even if I "umount /mountpoint -l", rm -rf /mountpoint and mkdir /mountpoint I cannot mount to that directory name ever again until reboot.
But if I create /mountpoint1 I can re-mount to that.
Is the disk there after you unmount it? Usually mounting/unmounting requires root. Anything mounted on bootup or in unusual places, ore with unusual options requires root privileges. If your usb drive is sdb1, try
Is the disk there after you unmount it? Usually mounting/unmounting requires root. Anything mounted on bootup or in unusual places, ore with unusual options requires root privileges. If your usb drive is sdb1, try
Code:
cat /etc/mtab |grep sdb1
before and after mounts and unmounts.
I did, still no entry found.
Edit: Wait, yes, it happened again and this time I found an entry. umount -l on that entry re-enabled use of the drive without rebooting.
I'll go with this temporary solution for a week and if it keeps working then mark it as solved. This bug has kept evolving over the last year...
Last edited by comcastuser; 09-24-2018 at 12:29 PM.
Note that a file system cannot be unmounted when it is 'busy' - for example, when there are open files on it, or when some
process has its working directory there, or when a swap file on it is in use. The offending process could even be umount
itself - it opens libc, and libc in its turn may open for example locale files. A lazy unmount avoids this problem.
It's usually good to run 'lsof |grep sdb1' or whatever the usb is if you're having suspicious stuff from umount. Alternatively 'lsof | grep mount/point (trim the initial forward slash to avoid regex type nonsense - always a possibility)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.