Re: [RFC] periodic self-tests on short-uptime machines

Christian Franke <[email protected]>
Newsgroups gmane.linux.utilities.smartmontools
Message-ID <[email protected]>
Lukasz Stelmach wrote:
> On 09.11.2014 19:29, Christian Franke wrote:
>> Lukasz Stelmach wrote:
>>> The way `-s' directive in smartd.conf works is good for long-running
>>> machines but somewhat inappropriate for desktops or laptops which may be
>>> turned on and off and suspended quite often. This is the very same issue
>>> that lead to development of special scripts that run daily (weekly,
>>> monthly) cron jobs and save timestamps across reboots.
>> Try -s PREFIX command line option to enable state persistence. Then
>> tests "forgotten" during downtime will be started after second(!) device
>> polling. See section starting with "If the scheduled tests are used in
>> conjunction with state persistence ..." on smartd.conf man page.
> I see, nice.
>
> How about using the state persistence instead of self-test logs to keep
> track of power-on-hours and to run once-N-hours tests. Take for example
> such schedule (suppose the machine is working 24/7 for a moment):
>
> * run a short test every 24 power-on-hours
>
> * run a long test every 168 power-on-hours (a week)
>
> For a machine without 100% duty cycle there should also be maximum spans
> between tests (something like forcing fsck after some span of real-time):
>
> * run a short test if the last time it was ran is longer than 672
> real-time-hours (4 weeks) ago,
>
> * force running a long test after 2016 real-time-hours (3 months).
>
> If nothing else such mode of scheduling seems to me more relevant for
> machines that don't work all the time and more intuitive for (me) their
> operators to set up.

I agree. Adding this would be more complex than expected. Feel free to 
create a ticket:
https://www.smartmontools.org/newticket


> BTW. Do self-tests impair performance. Is it important to schedule them
> when the least load on a server is expected?

Depends the self-test implementation in the disk firmware. In the past, 
I've seen anything between: "System unusable during self-tests" and 
"System load slows down self-test speed to ~zero" :-)

Regards,
Christian


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.