Article 5P5P2 Spindown hdd after boot, tried systemd or hdparm.conf, does not work @ubuntu20.04

Spindown hdd after boot, tried systemd or hdparm.conf, does not work @ubuntu20.04

by
Johannes33
from LinuxQuestions.org on (#5P5P2)
Hi, I'm trying to get my hdd:s to spin down after boot. Arch Linux wiki suggest using systemd:

Quote:
Putting a drive to sleep directly after boot

A device which is rarely needed can be put to sleep directly at the end of the boot process. This does not work with the above udev rule because it happens too early. In order to issue the command when the boot is completed, just create a systemd service and enable it:

/etc/systemd/system/hdparm.service
Code:[Unit]
Description=hdparm sleep

[Service]
Type=oneshot
ExecStart=/usr/bin/hdparm -q -S 120 -y /dev/sdb

[Install]
WantedBy=multi-user.target
After that I make the service start after every reboot by:

Quote:
$ sudo systemctl enable hdparm.service
That did not work. Does anyone know what is wrong?

Then I edited the settings file /etc/hdparm.conf. In the end I appended

Code:/dev/sda {
standby
quiet
spindown_time = 24
}

/dev/sdb {
standby
quiet
spindown_time = 20
}It did not work. I also tried to put standby at the end, i.e.:

Code:/dev/sdb {
quiet
spindown_time = 20
standby
}but it did not work either. Does anyone know what is wrong?

The only thing that works is to type in the terminal:
Quote:
$sudo hdparm -S 1 /dev/sda
@ubuntu 20.04latest?d=yIl2AUoC8zA latest?i=ySmzrHBZ1aE:DAoLOYWcciQ:F7zBnMy latest?i=ySmzrHBZ1aE:DAoLOYWcciQ:V_sGLiP latest?d=qj6IDK7rITs latest?i=ySmzrHBZ1aE:DAoLOYWcciQ:gIN9vFwySmzrHBZ1aE
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments