How can I turn off HDD when I'm not using it?

I have SSD drive for system and software and HDD for data (mostly pictures).
When I don’t edit / view my pictures I would like to have my HDD turned off.
Currently, I can hear platter spinning. It’s not a big problem but if there is a simple solution I would like to use it.
Till now I was able to find two solutions:

udiskctl power-off -b /dev/sdX
and
hdparm -S /dev/sdX

I tried udiskctl, and it worked, but I’m not sure what it does to the drive. Is that the same as powering off a whole PC but only for HDD?

About hdparm. I wasn’t able to find the information if for example hdparm -S /dev/sdX is permanent (written in HDD firmware of somewhare in the system) or if this change will disappear after reboot.

Are there any disadvantages in any of those solutions I mentioned?
Is one better from another?
Or maybe both are very bad for HDD and I shouldn’t use them?

No hdparm is not persistent after a reboot but you can make it so via a udev rule. You can find all the information you need here

If you want the drive to spin down values for -B from 1 to 127 permit spin-down whereas values from 128 to 254 do not, keep that in mind.

1 Like

After some problems with hdparm i now use hd-idle with success. On my external USB3-SATA-HDD a Western-Digital-Blue i had problems with hdparm. I can spindown/up this hdd immedately but i got it never working when i tried to setup a timeout after it should automatically spindown. With hd-idle i had no such problems. I knew i compare two different working principles, between hdparm and hd-idle.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.