View previous topic :: View next topic |
Author |
Message |
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2179
|
Posted: Fri Apr 05, 2024 12:51 pm Post subject: Run SMART long tests in parallel? |
|
|
I've a monthly cron job to remind me to run checkarray on my RAID setup, which also reminded me that perhaps it's sensible to run a SMART long test every so often. However, as that takes ages on a modern drive |(2 hrs for mine), I'd rather run them in parallel than sequentially. AFAIK, the test is performed in hardware, so the PCIe bus doesn't get flooded with spurious data, so I think that kicking off 5 parallel tests, one per drive, would be OK.
A second question is how frequently I should run it (and ditto for the checkarray). I've seen a recommendation for weekly short tests (not sure if that buys anything over and above just using the RAID array) and extended tests quarterly, or monthly, or twice a year. _________________ Greybeard |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3693 Location: Rasi, Finland
|
Posted: Fri Apr 05, 2024 1:22 pm Post subject: |
|
|
I think most people would recommend not to run short test at all, but only long tests.
For server You could run the test every week, or even every night. I have no idea how much that will wear a HDD or SSD down.
With dev-libs/libatasmart comes few tools which you can use to initiate the tests.
I once started a small project around the tools of libatasmart to challenge myself and learn awk. With it you should be able to start tests in parallel. Although I think I need to write rewrite that in ~POSIX sh or bash. It's been quite long abandoned.
However you could also do the same with simple shell commands using the cli tools from libatasmart. You won't get such nice progress display.
Note that I don't know if libatasmart could "collide" with smartmontools in certain situations. _________________ ..: Zucca :..
My gentoo installs: | init=/sbin/openrc-init
-systemd -logind -elogind seatd |
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2179
|
Posted: Fri Apr 05, 2024 3:33 pm Post subject: |
|
|
Well, I've kicked off a full set of parallel long tests to see what happens with:
Code: | for d in /dev/sd?
do smartctl -t long $d
done |
Haven't noticed any performance impact so far, but equally, I'm not simultaneously running:
Code: | emerge -1 qtwebengine |
_________________ Greybeard |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54577 Location: 56N 3W
|
Posted: Fri Apr 05, 2024 4:38 pm Post subject: |
|
|
Goverp,
What will the SMART long test tell you that the checkarray won't? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2179
|
Posted: Fri Apr 05, 2024 5:52 pm Post subject: |
|
|
Neddy,
Dunno, but it doesn't tie up the PCIe bus. May also do some electronics testing, according to the SMART writeup, though that may be no more than a checkarray does.
All 5 tests successfully completed in parallel in about 2 hours; no errors logged. The PC's "I'm doing I/O" light was off the entire time (or at least, whenever I looked at it). _________________ Greybeard |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54577 Location: 56N 3W
|
Posted: Fri Apr 05, 2024 7:24 pm Post subject: |
|
|
Goverp,
Yep, the long test is a surface scan. Like dd'ing the whole drive to /dev/null. It stops at the first read error.
As you say, it's all internal t the drive. That makes it good for separating internal drive errors from external problems.
checkarray validates the array parity information. That has to tie up the PCIe bus. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2179
|
Posted: Sat Apr 06, 2024 8:27 am Post subject: |
|
|
NeddySeagoon wrote: | What will the SMART long test tell you that the checkarray won't? |
My RAID arrays don't cover the whole disk, just partitions of about half a disk - I left the other half for future growth or alternative distros. SMART checks the disk, checkarray just the array. Of course, a read error on an unused disk partition isn't so important . _________________ Greybeard |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54577 Location: 56N 3W
|
Posted: Sat Apr 06, 2024 9:58 am Post subject: |
|
|
Goverp,
I raid everything except boot and maybe swap, then use LVM on top of mdadm.
device mapper (LVM) can do its own raid, its even the same kernel code, but being old and cynical, I like the conceptual simplicity (for my mind) of the separate layers. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|