Hard disk keeps spinning after shutdown

After my recent upgrade from a rpi 2 to a rpi 3 my 3,5” external powered hard drive (320 Gb) is not powering down anymore after a normal Kodi shutdown menu  system power off.

From the LED lights on the rpi 3 is see that the green one goes out and only the red light stays active (is normal), this process takes approx. 10-15 seconds. Then my external hard drive keeps spinning even after several hours the hard drive just keeps spinning (you here the sound).

The same hard drive was functioning ok on the rpi 2 with an old version (Kodi 17.5 and Jessie). Now running on Kodi 18.5 and Stretch seems to have influence this power off function.

I only expect that the hard drive will power off during a normal shutdown or from SSH: sudo power off. I don’t expect any power saving option to work. I don’t have any external apps installed for the hard drive and mounting is all as the standard settings (no adjustments made).

My logs are attached here from a normal startup and direct shutdown.

Anybody recognizing this behavior or has an idea how I can stop the hard drive to spin after a normal shutdown?

It may be possible to turn off the power to the USB. See GitHub - mvp/uhubctl: uhubctl - USB hub per-port power control.

Thanks Sam, for the quick reply. I didn’t install the software yet but I did find out why it was not spinning down.
When I have the USB dongle of my Logitech K400r wireless keyboard plugged in 1 of the 4 USB port of the rpi 3 the hard disk is not spinning down.
When I remove the USB dongle the hard drive is spinning down completely after a shutdown.
Strange. Looks like the dongle is preventing a shutdown of the USB drive.