You are not logged in.
Pages: 1
I am trying to setup hddtemp following the instuctions here:
https://wiki.archlinux.org/index.php/Hd … fault_disk
More specifically, I want to add my RAID array to the default config of just /dev/sda.
The instructions on the wiki page are to run:
$ sudo systemctl edit hddtemp.service
I then add this:
ExecStart=/usr/bin/hddtemp /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf
If I add either of these I get an error when restarting the service:
[Service]
ExecStart=
I then restarted the service by running:
$ sudo systemctl restart hddtemp.service
I got no errors. However when I tried running:
$ sudo suystemctl status hddtemp.service
I only got the default configuation. Next I tried rebooting but the system locked up. I had to boot the install media and delete the override file.
I am new to the "edit unit" feature of Systemd so I am prolly doing it wrong.
Any help is appreciated.
Last edited by zshlhuppe (2018-06-21 04:04:35)
Offline
Update - This what I am seeing:
$ sudo systemctl status hddtemp.service
● hddtemp.service - Hard drive temperature monitor daemon
Loaded: loaded (/usr/lib/systemd/system/hddtemp.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/hddtemp.service.d
└─override.conf
Active: active (running) since Wed 2018-06-20 09:59:51 EDT; 32min ago
Main PID: 13068 (hddtemp)
Tasks: 1 (limit: 4915)
Memory: 700.0K
CGroup: /system.slice/hddtemp.serv
Jun 20 10:25:11 Archie systemd[1]: /etc/systemd/system/hddtemp.service.d/override.conf:1: Assignment outside of section. Ignoring.ice
└─13068 /usr/bin/hddtemp -dF /dev/sdaJun 20 09:59:51 Archie systemd[1]: Started Hard drive temperature monitor daemon.
Jun 20 10:25:07 Archie systemd[1]: /etc/systemd/system/hddtemp.service.d/override.conf:1: Assignment outside of section. Ignoring.
$ sudo hddtemp /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf
/dev/sda: WDC WDS250G2B0A-00SM50: 31°C
/dev/sdb: WDC WD10EZEX-00BN5A0: 29°C
/dev/sdc: WDC WD10EZEX-22BN5A0: 30°C
/dev/sdd: WDC WD10EZEX-75M2NA0: 30°C
/dev/sde: WDC WD10EZEX-22BN5A0: 29°C
/dev/sdf: WDC WD10EZEX-08WN4A0: 31°C
Last edited by zshlhuppe (2018-06-20 14:58:43)
Offline
What does your override conf look like now? It has to look like in the wiki article, verbatim, empty ExecStart= as well as filled ExecStart= and all.
Offline
I tried to do it verbatim but I kept getting errors. Then I looked closer at the "status" screen:
● hddtemp.service - Hard drive temperature monitor daemon
Loaded: loaded (/usr/lib/systemd/system/hddtemp.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2018-06-21 00:03:20 EDT; 4min 54s ago
Main PID: 500 (hddtemp)
Tasks: 1 (limit: 4915)
Memory: 2.4M
CGroup: /system.slice/hddtemp.service
└─500 /usr/bin/hddtemp -dF /dev/sdaJun 21 00:03:20 Archie systemd[1]: Started Hard drive temperature monitor daemon.
The "Loaded" line gave me the answer. I fired up emacs and edited the config file:
$ sudo emacs /usr/systemd/system/hddtemp.service
[Unit]
Description=Hard drive temperature monitor daemon[Service]
ExecStart=/usr/bin/hddtemp -dF /dev/sda[Install]
WantedBy=multi-user.target
I then edited the "ExecStart" line:
[Unit]
Description=Hard drive temperature monitor daemon[Service]
ExecStart=/usr/bin/hddtemp -dF /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf[Install]
WantedBy=multi-user.target
After that it was a simple matter of
$ sudo systemctl daemon-reload
Followed by
sudo systemctl restart hddtemp.service
And finally
$ sudo sytemctl status hddtemp.service
Voila!
● hddtemp.service - Hard drive temperature monitor daemon
Loaded: loaded (/usr/lib/systemd/system/hddtemp.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2018-06-21 00:03:20 EDT; 4min 54s ago
Main PID: 500 (hddtemp)
Tasks: 1 (limit: 4915)
Memory: 2.4M
CGroup: /system.slice/hddtemp.service
└─500 /usr/bin/hddtemp -dF /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdfJun 21 00:03:20 Archie systemd[1]: Started Hard drive temperature monitor daemon.
I may very well have been doing it wrong when trying to follow the ArchWiki. In fact, it may have been a much better idea to copy the contents of the original config file to create the override file, and added my changes there.
Thanks!
Offline
That change will get overridden w/ the next update.
If the override does indeed not work (for whatever reason), rather replace the /etc/systemd/system/multi-user.target.wants/hddtemp.service symlink w/ a custom file or (better) derive your custom /usr/lib/systemd/system/hddtemp_raid.service and enable that instead of the stock hddtemp.service.
Offline
I got your suggestion to work nicely. However, when I rebooted my system it froze. I was forced to boot from an install CD and restore the default hddtemp configuration. After that my system booted fine.
It looks to me like I will just have to live with editing the original config file. In the grand scheme of things it's a minor inconvenience. I will tinker with it as I learn my way around systemd and see what happens.
Thanks!
Offline
Are you sure the tampered hddtemp.service doesn't cause similar "freezes" or this is related at all? It really should not matter how the service is named.
Offline
Unfortunately I don't have any log data from that attempted boot. I am digging around in journalctl with no success. The package in question is a beta and has no facilities for warning me or taking action. At least not yet. The command I am using in my "ExecStart" string works from the command line so I am confident about my changes. I will use this as an opportunity to learn how to make a timer service to monitor my drives and take action of some sort. This service is important to me because I live in a hot place and my system is at risk of overheating with all the drives I have packed in it.
I am building a test system that I can use for these kinds of tinkerings.
Thank you again.
Len Huppe
Last edited by zshlhuppe (2018-06-21 12:38:01)
Offline
On a side note, rather than running emacs with root permissions, can I suggest using tramp mode from the cli: emacs /sudo::/usr/systemd/system/hddtemp.service
It will run as you, but will ask for credentials for that file as the buffer opens. Given the complexity and versatility of emacs, it makes me feel a little safer not to run the whole thing with elevated privileged. And, your user configuration will work as expected.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
I had wondered how to do that but never looked into it.
I am in your debt, Sir.
Thanks!
Offline
From your original post, I do not think you followed the directions correctly, and you didn't post the final contents of your /etc/systemd/system/hddtemp.service.d/override.conf when requested. This would have led to the proper solution, I think.
I attempted to duplicate the WIKI article instructions, since like you, I have multiple drives.
# systemctl edit hddtemp.service
Add the following content to the editor:
[Service]
ExecStart=
ExecStart=/usr/bin/hddtemp -dF /dev/sda /dev/sdb /dev/sdc
Exit and Save
# systemctl daemon-reload
# systemctl enable hddtemp.service
# systemctl start hddtemp.service
I am able to see that the service is running successfully.
$ telnet localhost 7634
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
|/dev/sda|OCZ-VERTEX3|30|C||/dev/sdb|ST31000528AS|27|C||/dev/sdc|ST31000528AS|25|C|
Offline
Pages: 1