External HDD Issues

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
User avatar
Joulinar
Posts: 2566
Joined: Sat Nov 16, 2019 12:49 am

Re: External HDD Issues

Post by Joulinar »

On DietPi or raspbian?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
TurtleP
Posts: 16
Joined: Sat Feb 08, 2020 5:52 pm

Re: External HDD Issues

Post by TurtleP »

raspbian lite
User avatar
Joulinar
Posts: 2566
Joined: Sat Nov 16, 2019 12:49 am

Re: External HDD Issues

Post by Joulinar »

Puhh that looks more like hardware issue honestly
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
TurtleP
Posts: 16
Joined: Sat Feb 08, 2020 5:52 pm

Re: External HDD Issues

Post by TurtleP »

I really hope that isn't the case. I haven't done anything to this Pi that could cause that. It even worked fine with dietpi several months ago. Is there a diagnostic script I could run or something?
User avatar
Joulinar
Posts: 2566
Joined: Sat Nov 16, 2019 12:49 am

Re: External HDD Issues

Post by Joulinar »

I'm not aware on a diagnostic script that can be used to have this checked. Maybe @MichaIng has an idea how to find out.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
baz123
Posts: 166
Joined: Thu Jan 12, 2017 9:23 pm

Re: External HDD Issues

Post by baz123 »

I've started having issues with external drives. I have an RPi 4 as well as the OP. The problems have occurred on both an SSD and an HDD. Key thing here is that I have moved the rootfs to the HDD/SSD so when the USB error occurs, I lose access to everything (command not found error).

I was running an SSH window following the kernel and I did catch an error. Unfortunately, I did not save it exactly, but it was along the lines of

Code: Select all

xHCI host not responding to stop endpoint command.
I think it may be a kernel error/bug.

This error happened a couple of times and I put it down to the cheap SSD I had bought having googles the error. However, I have subsequently moved to a WD PiDrive (so an HDD rather than an SSD) that has run fautlessly when connected to a PiB+ for several years, and have experienced exactly the same issue again. However, as I was no expecting an issue, I did not have a journalctl window following the kernel.

My initial conclusions are that there is an issue with the kernel driver for the USB2 ports on the RPi4.

I currently have a couple of SSH sessions open and following the kernel messages so waiting to see what happens.

[edit]
Always the way, been searching for ages, post this search again and something new pops up.

This sticky post on the RPi forum suggests it is an issue with the quirks blacklist. I am surprised this HDD is not in it if there is a problem with it.

https://www.raspberrypi.org/forums/view ... 8&t=245931
Wessoj
Posts: 2
Joined: Fri Feb 07, 2020 5:03 pm

Re: External HDD Issues

Post by Wessoj »

Joulinar wrote: Sat Feb 08, 2020 8:08 pm Puhh that looks more like hardware issue honestly
I would agree, looks like it
TurtleP
Posts: 16
Joined: Sat Feb 08, 2020 5:52 pm

Re: External HDD Issues

Post by TurtleP »

So I did a quick test, if you don't mind me reviving this a bit.

I had my Pi's power supply on an Amazon Basics power strip. The only other item plugged into it was my network switch.
Shut down the Pi and plugged it directly into the wall, HDMI signal has been on for the past six minutes. If you recall, the signal died within a minute or two before. So I guess the power strip I used didn't supply enough power for it with another item attached.

I haven't tried with a USB/HDD/SSD just *yet*, but the USB I did have plugged in from the original test was still on. When I booted it the first time while it was in the wall, it actually was trying to read off of it for some reason. I'm not familiar with what reasons it would have for that, but I will try again on dietpi (as I was doing a separate test on raspbian lite) with this new information.
TurtleP
Posts: 16
Joined: Sat Feb 08, 2020 5:52 pm

Re: External HDD Issues

Post by TurtleP »

Running a few tests with a USB flash drive, I noticed that using dietpi-drive_manager appends x-systemd.automount which makes systemd handle it. The device eventually goes idle and then becomes inaccessible. I can't unmount the drive normally because it's busy according to dietpi-drive_manager, and doing sudo umount /mnt/media doesn't let me re-mount it.
User avatar
Joulinar
Posts: 2566
Joined: Sat Nov 16, 2019 12:49 am

Re: External HDD Issues

Post by Joulinar »

to un-mount a device, ensure you are not located on a file system hosted on it. otherwise you can get a device busy. Do a simple cd before un-mounting.

to find out who is using your mount, you can do the following:

Code: Select all

lsof /dev/sda[1-9]
fuser -m /dev/sda[1-9]
once you know who is blocking the device, you can kill the process. Or go the hard way by using -l option. This will force to un-mount (with all consequences).

Code: Select all

umount -l /dev/sda<ID>
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply