user7743
Posts: 7
Joined: Fri Jan 13, 2012 10:02 am

Pi4: USB drive spin down issues

Mon Sep 02, 2019 6:13 am

Hi all,

I am wondering if anyone has seen similar. I have just started experimenting with the RPi4 and one thing I would like to do is replace my current ownCloud "sever" which is a RPi3B+. I did a test install over the weekend and saw some strange behaviour which I think is attributed to the USB spin down of the drive.
First the RPi would drop of the network. Seemingly reboot needed to fix the interface having issues.
If I switched to the console directly and tried to login, the USB keyboard would lag terribly (to the point of being unusable). Again, a reboot would fix the issue.
After a few rounds of this, I decided to unplug the HDD and see what happens.
First thing is the lag on the USB keyboard instantly disappeared and I could bring the network back up.

I haven't yet tested this to the point of being definitively sure, but has anyone else seen such issues? Anyone know a cure?

Setup is:
RPi4, 4GB
Sandisk 32Gb (minimum class 10 but I have tried with higher speed card also with the same issues)
Official RPi foundation power supply for the RPi4
WD Elements USB3 drive

andrum99
Posts: 1207
Joined: Fri Jul 20, 2012 2:41 pm

Re: Pi4: USB drive spin down issues

Mon Sep 02, 2019 9:59 am

How do you know the hard drive is spinning down? If you install hdparm and run hdparm -C /dev/your_drive it will tell you if the drive has spun down - reported as 'standby'. You can also lift up the drive to feel for the vibration of it rotating - if there is none then the drive has spun down.

When you have the problem, can you run dmesg on the console and see what it says? Ideally you would want to do this over SSH and capture the whole output so you can copy and paste it here, but it sounds like that will not be possible. You could take a photo of the screen instead.

User avatar
thagrol
Posts: 2961
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Pi4: USB drive spin down issues

Mon Sep 02, 2019 10:31 am

Something else worth trying when teh problem manifests:

Code: Select all

top
That'll tell you what's actually eating all you CPU time.

For what it's worth, I had similar problems on a 4B when running minidlna. Shortly after boot it would rescan the media storage. Unfortunately that was on a ntfs formatted HDD. Performance dropped right off and network stopped responding. Top reported ntfs fuse as being the culprit.

The solution? Stop running minidlna. Or, probably reformat the disc to ext4 (which I can't do as I have no way to back up the data that's on it).

If you disc has been formatted in ntfs and owncloud is rescanning this could be the cause.
Attempts to contact me outside of these forums will be ignored unless signed in triplicate, sent in, sent back, queried, lost, found, subjected to public enquiry, lost again, and finally buried in soft peat for three months and recycled as firelighters

Return to “Troubleshooting”