[SOLVED] [webmin issue] Hdd isn't kept in stand-by

I’ve recently noticed that my external hdd doesn’t stay in stand-by mode when the system is idle:
(of course that if a process is using the external disk - reading, writing the disk cannot be in stand-by)
Is there any suggestion on how to trace which process forces the disk out of stand-by ?

There’s nothing logged in journalctl.
And yes, /sbin/hdparm -S 240 /dev/sda
is run at boot.

(
for testing purposes:

  • forcing hdd stand-by:
    sudo hdparm -y /dev/sda
  • testing hdd status:
    sudo hdparm -C /dev/sda

)

Hi,

Similar reports in the past, is a western digital?

Could try a cron job, similar topic for vero4k here:

Thanks Tom.

i’ve tried to force stand.by, but it cames out in 3 or 4 minutes.
This is a recent issue.
I’m trying to trace which process is forcing it out of stand-by
(using lsof - no luck)

going to try
/proc/sys/vm/block_dump

Have you started using another skin lately?

If you get no success with /proc/sys/vm/block_dump, maybe this will help:

The blktrace package is available on Debian stretch.

It seems so be an issue related to webmin.

  1. having previously enabled:

echo 1 | sudo tee /proc/sys/vm/block_dump

  1. putting a small script to run in a separate terminal window:

while [ 1 ]
do
echo $(date +%d/%m/%y\ %T) " " $(hdparm -C /dev/sda)
sleep 2
done

  1. It was very easy to pinpoint the correct time in which the hdd comes out of stand-by. Then a quick look into the journal to find the offending commands:

journalctl

Apr 07 01:47:30 osmc kernel: miniserv.pl(649): dirtied inode 113408 (miniserv.lastcrons) on mmcblk0p2
Apr 07 01:47:30 osmc kernel: miniserv.pl(649): dirtied inode 113408 (miniserv.lastcrons) on mmcblk0p2
Apr 07 01:47:30 osmc kernel: miniserv.pl(649): WRITE block 2475984 on unknown-block(179,0) (8 sectors)
Apr 07 01:47:30 osmc kernel: /usr/share/webm(7084): dirtied inode 3971 (info.lock) on mmcblk0p2
Apr 07 01:47:30 osmc kernel: /usr/share/webm(7084): dirtied inode 3971 (info.lock) on mmcblk0p2
Apr 07 01:47:31 osmc kernel: /usr/share/webm(7084): dirtied inode 9486 (current.cache.webmintmp.7084) on mmcblk0p2
Apr 07 01:47:31 osmc kernel: /usr/share/webm(7084): WRITE block 6300848 on unknown-block(179,0) (808 sectors)
Apr 07 01:47:31 osmc kernel: /usr/share/webm(7084): dirtied inode 76668 (?) on mmcblk0p2
  1. Don’t forget to reset:

echo 0 | sudo tee /proc/sys/vm/block_dump

  1. Now I know it is webmin related - I have disabled it for now - probably will uninstall it, as I don’t use it, but I would like to understand what could be the issue.

1h30 without webmin
Disk in standby
Issue solved.

It is NOT related to OSMC - subject closed.

Thanks

Let me add some more information if someone else has the same issues:

Webmin forces the Hdd out of standby because it collects system data in the background, which includes disk usage.

If one pretends to use webmin and keep the hdd in standby is just as easy as disabling that function in webmin configuration panel, followed by a system reboot.