I have a very old and very loud HDD relegated purely to archiving "leftover" data that isn't hugely important should the drive finally die.
Rather than unplugging it and plugging it in when needed, I'd like to simply have it power off if/when it is unmounted. Unforatuntely, it does not have AMP support, but I have found that either of these do the trick and the drive comes back on when remounted:
hdparm -S 1 /dev/sda1
or
udisksctl power-off -b /dev/sda1
The drawback is I would have to put this in every time I unmount the disk as well as whenever I boot up the system. I am also unable to disable the drive in the BIOS.
Is there a way that I can have one of these trigger whenever the drive has completed unmounting? Or is there some disk options I just haven't discovered that allow this?