Did the hang occur when you tried to play a file? I’d be surprised if the whole OSMC box were to freeze while one application waits for I/O.
Have a look at this thread: Power settings with External Drive You might be able to set the spindown time using hdparm
, but in that thread @darwindesign mentions that some WD drives ignore this sleep setting when sent from the operating system.