Page 1 of 1

hdparm service is missing

Posted: Sat Feb 22, 2020 2:03 pm
by DeadlineX
Hi, everyone,
I’ve installed hdparm package and hdparm is working. But I’ve not understood how to apply its config on system startup. I’ve added appropriate section in config, but AFAIU there should be a service which will launch hdparm.
But the hdparm.service is absent. This is what I’ve got:

Code: Select all

 [email protected]:~ $ sudo service hdparm restart
Failed to restart hdparm.service: Unit hdparm.service not found.
Am I missing something?

Thank you.

Re: hdparm service is missing

Posted: Sat Feb 22, 2020 2:25 pm
by LTolledo
carefully read and fully understand what is written on the link provided below.

https://linux.die.net/man/8/hdparm

Re: hdparm service is missing

Posted: Sat Feb 22, 2020 3:45 pm
by DeadlineX
OK, I’ve read it. That’s the man page for hdparm. Nothing more. Do you wish to say that there is no service and service is not required? Or what? All I wish to do is to spin down the HDD after some predefined time. I’ve set this section in /etc/hdparm.conf

Code: Select all

dev/sda {
write_cache = on
spindown_time = 120
}
Is this all I should do?

Re: hdparm service is missing

Posted: Sat Feb 22, 2020 4:53 pm
by epoch1970
I think LTolledo means that one: https://manpages.debian.org/buster/hdpa ... .5.en.html

1. There is no init script, it is run by udev
2. There is a typo in your config file ("/dev/", not "dev/")

Re: hdparm service is missing

Posted: Sat Feb 22, 2020 7:25 pm
by DeadlineX
Thank you!
As for the typo - it’s a copypasting error. Everything is written correctly in the config file.
I’ve used this command:

Code: Select all

 /usr/lib/pm-utils/power.d/95hdparm-apm resume
and it has returned nothing. So, should I consider it, as “ok”?

Also I have yet a couple of questions:

1. The response of hdparm -y /dev/sda is:

Code: Select all

 [email protected]:/home/pi# hdparm -y /dev/sda

/dev/sda:
 issuing standby command
SG_IO: bad/missing sense data, sb[]:  70 00 01 00 00 00 00 0a 00 00 00 00 00 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
HDD spins down nevertheless, and is in standby mode unless I’ll awake it accessing its content. How should I consider this situation? Is this a USB-SATA controller incompatibility, or what? May I simply ignore this error?

2 Where can I get more info about -B option values? I’d like to know how these values correspond to standby delay in seconds? Is it just the same, as “spindown_time” parameter in the config file?

Thank you.

Re: hdparm service is missing

Posted: Sun Feb 23, 2020 11:19 am
by epoch1970
I can’t help about hdparm itself.

That utility was in full bloom when hard drives parking their heads sounded like a ping-pong ball had dropped...
I don’t believe hdparm is necessary any longer, firmwares built into modern drives are much more sophisticated than in the olden days.

If your drive goes into sleep mode within a reasonable delay after you dismounted all volumes, the firmware works ok.
Consider using a filesystem automounter instead.

Re: hdparm service is missing [CLOSED]

Posted: Sun Feb 23, 2020 6:16 pm
by DeadlineX
after you dismounted all volumes
I don't like the idea to dismount volumes. It will make the disk inaccessible, what is definitely not what I want to get.
At present I've resolved the standby problem. Disk goes sleeping in 10 min as it is defined in the config. That's just what I'd like to get.
Consider using a filesystem automounter instead
OK, I'll take a look, thank you.