Vero 4k USB HDD unmount

Thank you all for the time and advises!
It seems I have it working now, as it is with unmounting the drive.
I’ll have in mind the other way of stopping the mediacenter and samba too, if I find it necessary.
(I think I’ll abstain from this for the moment because, in the case I am playing a video and it tries to unmount, it will simply not happen. I am not sure other way around - what will happen if I am using it and in this moment cron tries to kill the mediacenter and samba. Probably will stop what I am doing, instead of refuse to get killed.)

Meanwhile, maybe someone would find our discussion here useful.

Have a good day/afternoon/evening :slight_smile:

An update - it seems it is not at all a problem with OSMC.
The drive won’t sleep even if unmounted.
hd-idle does not help neither.
It some WD bug.
On to more research and experiments.

OK, what I found by now is that the only thing that works is hdparm -y

All other modificators of hdparm I’ve tried to use have no effect…

I want simply to put the drive to sleep at, let’s say, midnight.
What worries me is what will happen, if the drive is busy at midnight and the hdparm command is sent.

Any idea?

So you’re saying that hdparm -S 12 doesn’t spindown after 1 minute?

Hi,

This may help:

If you set cron to run 23 - 7, it will check if the HDD is active or not. If active it doesn’t unmount until the script is run again.

Just a thought.

Thanks Tom.

It’s a good find but if there’s any activity on the disk, it could end up spinning down/up many times each night,

Perhaps the simplest solution is to spindown and then immediately unmount the disk. That way it should stay off for the whole night.

Hi,

True, I just found it in response to AdrP’s question.

Also from reading through the thread stopping kodi & samba, as yourself & fzinken have suggested should stop any activity on the HDD. So the script should work then or as you suggest spin down then unmount.

Thanks Tom.

Unfortunately not.

Thanks! I’ll try.

Or vice versa? I think it’ll spin down no matter mounted or not?

Careful. My reading of that script is that it issues a spindown when there has been no disk activity in the last measured time period. It’s just providing the same function as the WD Green disk firmware should have provided. It won’t prevent it from starting up again.

But… it might provide the basis for you to create a cron task. If disk is unmounted then exit, else check for activity. If activity, then exit, else spindown and then unmount.

Exactly, just have to figure out how to write it- I don’t write scripts usually.

A journey of a thousand miles begins with a single step. Not that it should take you that long. :wink: