===== Q: =====
I would like to prevent notifications every 24 hours from my Proxmox home server. It have installed a hard disk with some sectors pending to be reallocated, the data there is backed up to another drive, and the bad sector count is still the same from some months ago. I was reading the man pages of smartd.conf, it explains that the option -C ID[+], with the + sign being a flag for the incremental option: "If '+' is specified, a report is only printed if the number of sectors has increased between two check cycles. Some disks do not reset this attribute when a bad sector is reallocated. See also '-v 197,increasing' below."
How can I pass that setting to smartctl?
===== A: =====
To configure the ''smartd'' daemon to only notify you when the number of pending sectors has increased between two check cycles, you can make use of the ''-C ID+'' option in the ''smartd'' configuration file ( ''/etc/smartd.conf'').
Here's an example of how you can set up the configuration:
1. Open the smartd configuration file for editing:
sudo nano /etc/smartd.conf
2. Find the line that corresponds to your hard disk and add the `-C ID+` option at the end of the line. The `ID` represents the attribute ID for the pending sectors, which is typically `5`. For example:
/dev/sda -a -d ata -C 5+
Make sure to replace `/dev/sda` with the appropriate device identifier for your hard disk.
3. Save the file and exit the editor.
4. Restart the smartd daemon to apply the changes:
sudo systemctl restart smartd
With this configuration, smartd will only send a notification if the number of pending sectors has increased since the previous check cycle. This helps to avoid frequent notifications for the same number of pending sectors.
Remember to monitor your hard disk's health periodically and take appropriate actions if the situation worsens or if new issues arise.