I am looking into setting up smartmontools.
I'd like to control when the tests run. I was thinking of running:
/usr/sbin/smartctl --test=short /dev/sdX
(every week)
/usr/sbin/smartctl --test=long /dev/sdX
(every month)
And send an email/alert if an error is found.
1) Am I right to say that if I have the above set up in a cron, I don't need to have "smartd" daemon running in background?
2) Is there any advantage in enabling Offline Data Collection, if I run the tests above and have "smartd" disabled?
3) And the last thing that's been bugging me is that I see in the documentation that the commands for enabling/disabling --smart, --offlineauto and --saveauto are listed as Obsolete in ATA specifications. Does this mean that all these features are obsolete/useless on ATA devices?
As
smartd
works quite well, I would not rely on custom scripts. But let reply to each question:Q: Am I right to say that if I have the above set up in a cron, I don't need to have "smartd" daemon running in background? R: While technically correct, you have to discover the presence of an error:
smartctl
, by itself, immediately return with exit code 0. You then had to parse the output ofsmartctl --all
and examine the exit status of the previos test run;Q: Is there any advantage in enabling Offline Data Collection, if I run the tests above and have "smartd" disabled? R: Probably not. However, Offline Data Collection by itself will not cause any (noticeable) performance hit.
Q: And the last thing that's been bugging me is that I see in the documentation that the commands for enabling/disabling --smart, --offlineauto and --saveauto are listed as Obsolete in ATA specifications. Does this mean that all these features are obsolete/useless on ATA devices? R: while marked as "obsolete", each single HDD I have supports them. That said, each disk seems to implement them in a different (and inconsitent) manner, especially regarding SMART attributes update.