Opened 3 years ago

Last modified 3 years ago

#1505 new enhancement

smartd: only start self-test if temperature is low enough?

Reported by: Célestin Matte Owned by:
Priority: minor Milestone: undecided
Component: smartd Version:
Keywords: smartd.conf Cc:

Description (last modified by Christian Franke)

Hello,
I'm using smartd with the following configuration:

/dev/sda -a -m myaddress@mydomain.com -W 4,40,45 -o on -S on -n standby,q -s (S/../.././20|L/../../6/21) -M test

The problem is, I'm often getting temperature warnings during the long self-tests, because the test itself rises the temperature too high.
Is there a way to postpone or cancel tests if chances are the test will rise the temperature too high because it's already above a certain threshold?
Another option could be to stop the test if a temperature warning is risen.

Change History (3)

comment:1 by Christian Franke, 3 years ago

Description: modified (diff)

comment:2 by Christian Franke, 3 years ago

Component: allsmartd
Keywords: smartd.conf added
Milestone: undecided

This makes sense, but there is no way to do this.

Interestingly there was no similar enhancement request since the -W directive was added in 2006.

If (and only if) the critical temperature event occurs during a test, a custom -M exec /PATH/SCRIPT could be used to abort the test. Example (not tested):

#!/bin/sh

if [ -n "$SMARTD_ADDRESS" ]; then
  /usr/bin/mail -s "$SMARTD_SUBJECT" $SMARTD_ADDRESS
fi

if [ "$SMARTD_FAILTYPE" = "Temperature" ]; then
  /usr/sbin/smartctl -X -d "$SMARTD_DEVICETYPE" "$SMARTD_DEVICE" >/dev/null 2>&1
fi

exit 0
Last edited 3 years ago by Christian Franke (previous) (diff)

comment:3 by Christian Franke, 3 years ago

Some alternatives for such an enhancement:

  • Always postpone a self-test if temperature >= -W .,INFO,., or
  • always postpone a self-test if temperature >= -W .,.,CRIT, or
  • add a new limit to the -W directive: -W .,.,.[,TEST_START_LIMIT].

Further possible enhancement:

  • Always abort a self-test if temperature >= -W .,.,CRIT, or
  • add a new limit to the -W directive: -W .,.,.[,.[,TEST_ABORT_LIMIT]].
Last edited 3 years ago by Christian Franke (previous) (diff)
Note: See TracTickets for help on using tickets.