HD Spin down

Well, I have found the solution for the problem.
Long time ago, in year 2016, I had a similar discussion in this forum.
In mean time, I thought that osmc has solved this problem for us, so I forgot about it.
Now when I installed PI 4, as the disc was always on, looks like I was wrong.

Anyway, at one point in year 2016, @cocomic (thanks again) suggested a solution in his reply External USB HDD is not spinning down - #22 by cocomic

So, all you have to do is:
in /etc/rc.local put:

hdparm -S241 /dev/sdx (value 241 is for 30 minutes)

in /etc/udev/rules.d/80-udisks.rules put:

KERNEL==“sd*[!0-9]”, ATTR{removable}==“0”, ENV{ID_BUS}==“usb”, ENV{DEVTYPE}==“disk”, ENV{UDISKS_DISABLE_POLLING}=“1”
KERNEL==“sd*[!0-9]”, ATTR{removable}==“0”, ENV{ID_BUS}==“ata”, ENV{DEVTYPE}==“disk”, ENV{UDISKS_DISABLE_POLLING}=“1”
KERNEL==“sd*[!0-9]”, ATTR{removable}==“0”, ENV{ID_BUS}==“scsi”, ENV{DEVTYPE}==“disk”, ENV{ID_VENDOR}==“ATA”, ENV{UDISKS_DISABLE_POLLING}=“1”

That’s all.
Enjoy jour quite time.
HTH