Score:1

smartd keep sending emails for already replaced hdd

jp flag

We have got a server running Ubuntu Linux 18.04.6. Smartd is configured to send alert emails when one of the hdds goes bad. It has done so several times and the hdd in question has been replaced (weeks ago). But the messages keep getting sent for that hdd which doesn't even exist any more in the system. Today 2022-10-07 I got:

This message was generated by the smartd daemon running on:

host name: server

DNS domain: domain.com

The following warning/error was logged by the smartd daemon:

Device: /dev/sdi [SAT], Failed SMART usage Attribute: 7 Seek_Error_Rate.

Device info:

WDC WD6003FRYZ-01F0DB0, S/N:V9JLADNL, WWN:5-000cca-0bde484c2, FW:01.01H01, 6.00 TB

For details see host's SYSLOG.

You can also use the smartctl utility for further investigation.

The original message about this issue was sent at Fri Aug 12 20:40:12 2022 CEST

Another message will be sent in 24 hours if the problem persists.

Back then it was a 6 TB WD hdd, now its a 8 TB Seagate hdd, so I am pretty sure the error cannot persist.

The server has been rebootet at least twice during that time.

Where should I look for the reason?

EDIT:

I just found the directory /var/lib/smartmontools which contains several *.csv and *.state files which seem to contain the attribute values of the files, e.g.

attrlog.ST1000DM003_1ER162-Z4Y3R2ER.ata.csv

and

smartd.ST18000NM000J_2TV103-ZR5C0BVS.ata.state

Apparently these files are used to store the current state (.state) as well as some kind of history (.csv)

Unfortunately there is no such file for the WD drive this is all about.

Score:0
cn flag

I would suggest reading the info on the smartd manpage.

There appears to be a configuration file where smartd is reading info for the old drive. The config file is /etc/smartd.conf.

It looks like resetting the config file will fix the issue. If it is not present, a new one gets created.

It is suggested to do the following to backup the config file and restart smartd:

sudo mv /etc/smartd.conf /etc/smartd.conf.bak
sudo systemctl restart smartd.service

After this, insert the relevant parts from the old config /etc/smartd.conf.bak to the new /etc/smartd.conf if necessary.

Artur Meinild avatar
vn flag
Could you provide details here on how to reset the log? (In which case I'll upvote)
David avatar
cn flag
Answer updated. You may need sudo to remove the file I do not use that feature and do not know for sure.
dummzeuch avatar
jp flag
"The log file is /etc/smartd.conf" -> No, that's the configuration file, not the log file. But I will look for log files in that document.
David avatar
cn flag
As I read the man page it is one and the same. Remove the config file it will re build it. You can always make a backup first of the file.
Artur Meinild avatar
vn flag
David, do you agree with the edits I've made?
David avatar
cn flag
Thanks that is what I said LOL much nicer. I guess I assumed too much.
dummzeuch avatar
jp flag
The configuration file contains as the first non-comment line the DEVICESCAN entry, which according to the man page "If a non-comment entry in the configuration file is the text string DEVICESCAN in capital letters, then smartd will ignore any remaining lines in the configuration file, and will scan for devices." so restarting the smartd daemon should rescan all devices and therefore forget any devices that are no longer present.
David avatar
cn flag
OP did say in the question that the machine has been booted several times.
dummzeuch avatar
jp flag
see the edit to my question
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.