Sounds like the HDD is dying, maybe check it's S.M.A.R.T. status? Most drives have statistics for errors and such
Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
Don't just look at sdb hits in the log. Open up that entire session in journalctl kernel mode (journalctl -k -bN
where N is the session number in session history) and find the context surrounding the drive dropping and reconnecting.
You'll probably find that something caused a USB bus reset or a similar event before the drive dropped and reconnected. if you find nothing like that try switching power supplies for the HDD and/or switching USB ports until you can move the drive to a different USB root port. Use lsusb -t
and swap ports until the drive is attached beneath a different root port. You might have a neighboring USB device attached to the bus that's causing issues for other devices attached to the same root port (it happens, USB devices or drivers sometimes behave badly.)
Always look at the context of the event when you're troubleshooting a failure like this, don't just drill down on the device messages. Most of the time the real cause of the issue preceded the symptom by a bit of time.
Very good answer. I've also spent some time analyzing some red herrings when it was something else like a bad cable or connector. And by the way, you can use the same keys in journalctl
as in the usual pager (less(?)) so hit /
and search for 'unmount', 'disconnect', etc. And then scroll through the log and find out what led to the situation.
Please post a full dmesg and a full list of specs
Maybe the power supply is dying? Do you move it often? Or could the USB cable be degrading?
What does your fstab say?
USB Cable connection, power failing? Is drive set to power down on idle and then falling off the radar?