Hi. Is there any way to stop all the scheduled hard disk SMART tests that start automatically on Tumbleweed? I’d rather do those tests manually if they’re needed.
Thank you.
Hi. Is there any way to stop all the scheduled hard disk SMART tests that start automatically on Tumbleweed? I’d rather do those tests manually if they’re needed.
Thank you.
It’s not too difficult. I think you ought to let systemd handle it, but if you disable a line in the base config for smartd, it won’t look for drives to scan automatically.
You’ll need sudo to edit /etc/smartd.conf
look for two lines and comment them out:
DEFAULT -d removable -s (S/…/…/./03|L/…/(01|02|03|04|05|06|07)/7/01)
and
DEVICESCAN
I think that should do the trick. Obviously, you could just disable smartd, since it handles scanning of the detected drives. However, it does other good functions, as well. That being said, if you comment out the above lines, it may not even perform those functions. I just let it do its thing but I have scripts running to run my own tests and give me outputs in case of errors.
How did you determine that it is the smartd service that runs?
Every time a test starts, a message appears in journalctl showing that the scheduled test is starting and a few minutes after the test is complete, another message shows the result.
Both messages originate from smartd.
I read the instructions that are commented out in /etc/smartd.conf and the solution was quite clear. I commented out just the -s (S/…L/…) part. The -s S/ parameter causes the short tests and the L/ causes the long tests. The -d parameter must stay to prevent error messages if a monitored device is disconnected.
Thank you very much though for informing me about the location of the .conf file. I think the tests will stop now.
Thanks for the feedback / confirmation.
There are times when we read “I can hear the drive spin up” (obviously HDD) and associate the random fire up to SMART tools running a check. Obviously, if using a SSD, no noise
(BTW) There is also a service, fstrim, that is triggered by fstrim.timer, that will result in drive activity.
It’s easy to disable fstrim and smartd using systemctl. Can always run them on-demand.
Then it is most likely to late…
The smartd service has absolutely zero noticable impact on your system performance. They are there to inform you about hardware issues before it is to late.
Advices from (inexperienced) users to disable services which can prevent you from disastrous data loss should and need to be ignored. The services are there and activated for a good reason.
Absolutely. Smartd is an amazing service.
Who advised whom for what? I see no advice anywhere in the post. The only thing I see is that I asked one simple question for MY system and MY system alone.
I am a 60 year old “inexperienced” user who has decided to see what openSUSE has to offer after having tried a lot of distributions since 2010. And guess what… NOT EVEN ONE OF THEM had automatic SMART tests enabled by default and that’s why I had never faced this situation before. Debian, Ubuntu and derivatives, Arch, Manjaro, Mint and I don’t even remember how many more. On Ubuntus and Manjaro the smartmontools package was not even installed by default. So, I guess this “good reason of service existence and activation” was not there for all of them. But they’re “inexperienced” too I guess.
If one wants to check the condition of their hard disks, they can run smartctl --all (or -x) /dev/device regularly and read the results (assuming the user is experienced enough to know what to check for). Maybe they can run self tests once a week if they wish but on a daily basis? Why? That’s all it takes. If something appears, the user can run several self tests, plus the disk itself transfers bad blocks to a safe place giving you plenty of time to back it up and replace it if needed.
What each user decides to do with their system is not of your business and will never be. If you want to answer questions, fine. If not, it’s better to be polite, instead of offending people, especially when you know nothing about them.
@alexsec wrote:
What each user decides to do with their system is not of your business and will never be. If you want to answer questions, fine. If not, it’s better to be polite, instead of offending people,
Absolutely every statement you wrote is well said, and factual (including the being offensive statement).
My perspective: my response was to hopefully provide an answer to your underlying question, “how to stop it”.
If someone wants to disable xxxx or yyyy, that’s their want, for a given reason.
Exactly, @alexsec, gotta love Linux. This is what it’s all about. This is why I run scripts to automate running smartctl when I want it to work on my drives and to let me know when those tests produce a bad result. I get my information my way.
Hi. Is there any way to stop all the scheduled hard disk SMART tests that start automatically on Tumbleweed? I’d rather do those tests manually if they’re needed.
To manage SMART tests on openSUSE Tumbleweed:
Stop the SMART daemon:
sudo systemctl stop smartd
Check if the service is stopped:
sudo systemctl status smartd
Disable automatic start at boot:
sudo systemctl disable smartd
Verify that automatic start is disabled:
sudo systemctl is-enabled smartd
While you have complete control over your Linux system, I’m curious about your reasons for wanting to stop smartmontools?
While you have complete control over your Linux system, I’m curious about your reasons for wanting to stop smartmontools?
Hi. I don’t want to stop smartmontools entirely. I just want to stop the automatic self tests. I use those tools manually quite often. I check the disks condition every time I start each system by using smartctl.
While these tests cause no harm to an SSD, one of the tests they impose on HDD’s is the servo mechanism accuracy test which moves the heads at very high speeds. A couple of my systems are quite old and I’d like to avoid this additional stress on their disk heads on a daily basis. A short test every once in a while, when I’m not working on something else, is OK for me.
I had been informed about a failing disk two years ago this way and did a complete backup and replaced it before it died. I don’t know if it died actually. I replaced it while it was still alive.
Thank you for your response. Commenting out the parameters I wrote above, on @PJ_NJ 's response has done the trick. I haven’t seen any other automatic tests starting so far. We’ll see.
ok, you’re talking about smartmontools self-tests.
You could also simply stop them using GNOME Disks application, in “SMART Data & Self-Tests” settings.
removed-done
What each user decides to do with their system is not of your business and will never be. If you want to answer questions, fine. If not, it’s better to be polite, instead of offending people, especially when you know nothing about them.
There’s nothing particularly impolite in informing a user (whose experience nobody likely has any idea of) that taking an action is not generally a best practice (or indeed, a good idea). Sure, you can disregard the advice, but also consider that while you asked the question, others will come along later when looking for help and see the steps, without the context of whether or not it is a good idea to do what you want.
Do what you want with your system - it is your system, of course. But there was nothing “impolite” about hui’s suggestion, he was just making sure that you were fully aware that disabling this service is generally not recommended. Of course, other distros/people will have different ideas about what’s “reasonable” and what’s not. Getting upset over advice you disagree with isn’t particularly constructive - just take it in the spirit in which it was offered (ie, being helpful).
[Getting upset over advice you disagree with isn’t particularly constructive - just take it in the spirit in which it was offered (ie, being helpful).
Hi. It’s not the disagreement part that upset me my friend. It’s one thing to say something like “I must inform you that this could be dangerous because of this or that…” and another thing to say “advice from inexperienced users should be ignored”. I’m sure we all understand the difference. Nevertheless we move on. All is good. Let’s have a happy new year.
I really hope Tumbleweed is going to be an excellent choice. I’m so tired of installing new releases every two years.
Thanks a lot.
I’ve been pretty happy with TW myself - we’re all here to help, so of course, if you do run into issues, please do ask.
Also be aware that we have people from many different cultures and not everyone’s native language is English - so errors in translation can certainly come across as more “harsh” than those of a native speaker. I find it’s usually best to assume good intentions, even if the wording isn’t what I’d use.
Happy new year!