My hard drive wakes up every hour and I can not find the reason

Hello.

I have a vero 4k + and a Western Digital Elements 1to external hard drive, everything works but I have a problem with the external hard drive, when I do not use the vero my hard drive goes to sleep after 20 minutes but after 1 hour the hard drive wakes up for no reason it goes on standby again after 20 minutes and wakes up again after 1 hour and the hard drive is doing its all day.
If a person could help me discover why.
I created a log file and I give you about the minutes when it happens.

hard drive goes into standby at about ~17:38
hard drive wakes up at about ~18.38

I do not understand the log file very well
thank you very much to try to help me

I tested forcing hdd stand-by
sudo hdparm -y /dev/sda
it works but the hard drive wakes up anyway after 1 hour

When the drive goes to sleep does the light stay on or does it blink? I spend quite a bit of time looking into this subject a while back. This post is probably the info you need…

Hello. yes the light stays on but she does not blink. after 20 minutes I hear that the hard drive is no longer spinning

Download WD Drive Utilities and turn the drive sleep setting to off. This will make it so only Linux is handling the sleep functions and it should stop the needless spidups that your seeing.

ok I will try

You can also try to set /proc/sys/vm/block_dump if you suspect that a process is causing this, see https://lxadm.com/Simple_filesystem_read/write_tracing_with_/proc/sys/vm/block_dump.

So I suggest:

  1. wait till the HDD went to sleep
  2. activate the debugging output using block_dump
  3. once the hdd spins up check with dmesgwhat has accessed the drive
  4. Don’t forget to stop the debugging output afterwards!
1 Like

thank you I will try to watch

The issue is something to the effect of this version of debian polls the drive for sleep status every twenty minutes (if a user has not changed the timer) and this particular command wakes some of these external drives. There used to be a command to shut off this behavior in earlier versions of Debian, and newer versions of Debian use a different command that does not cause the behavior. If the drive was sleeping with a blinking light and waking up then I would suggest looking for something else that was waking the drive up, but the spindown with light on and wake up after 20 min is pretty much a dead giveaway of what is going on. If the drive sleep is disabled with the utility I linked to above it the drive will no longer wake but it still responds to the spin-down/up commands that OSMC is using stock. This also leaves the drive with working sleep functions in at least current versions of windows as it does not disable the USB selective suspend sleeping functions.