DeadlineX
Posts: 25
Joined: Sat Dec 28, 2019 7:02 am

hdparm service is missing

Sat Feb 22, 2020 2:03 pm

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.

LTolledo
Posts: 3058
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: hdparm service is missing

Sat Feb 22, 2020 2:25 pm

carefully read and fully understand what is written on the link provided below.

https://linux.die.net/man/8/hdparm
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

DeadlineX
Posts: 25
Joined: Sat Dec 28, 2019 7:02 am

Re: hdparm service is missing

Sat Feb 22, 2020 3:45 pm

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?

epoch1970
Posts: 4762
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: hdparm service is missing

Sat Feb 22, 2020 4:53 pm

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/")
Last edited by epoch1970 on Sun Feb 23, 2020 11:06 am, edited 1 time in total.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

DeadlineX
Posts: 25
Joined: Sat Dec 28, 2019 7:02 am

Re: hdparm service is missing

Sat Feb 22, 2020 7:25 pm

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.

epoch1970
Posts: 4762
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: hdparm service is missing

Sun Feb 23, 2020 11:19 am

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.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

DeadlineX
Posts: 25
Joined: Sat Dec 28, 2019 7:02 am

Re: hdparm service is missing [CLOSED]

Sun Feb 23, 2020 6:16 pm

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.

Return to “Raspberry Pi OS”