Testing with badblocks on a raidz2 pool - still destructive?

Oded

Explorer
Joined
Apr 20, 2014
Messages
66
I have a raidz2 pool with 8 drives.

I got an alert from a smartctl test:

* Device: /dev/ada3, Self-Test Log error count increased from 1 to 2.

The drive model is a WDC WD40EFRX-68WT0N0

Error is:
* Self-test execution status: ( 121) The previous self-test completed having the read element of the test failed.

There appears to be 17 errors if I run smartctl -x /dev/ada3 (log is attached), however I only get detailed list about 7 of them. I'm not that fluent in understanding the smartctl report so perhaps it only lists the last errors.

I thought about following this procedure: https://www.truenas.com/community/t...guide-basic-common-failures.41026/post-323590

However the guide clearly states that this is a destructive procedure.

What will happen to my raidz2 pool after I run this? If the procedure fixes the problematic sectors in this drive, can I salvage the pool by running a scrub? If the drive is failing then I'll need to replace it anyway, just wondering if this process impacts the pool itself or if a scrub will fix the random data written into those blocks.

Thank you for the assistance.
 

Attachments

  • error.txt
    19.5 KB · Views: 136

Etorix

Wizard
Joined
Dec 30, 2020
Messages
2,134
Using option -n instead of -w badblocks does a non-destructive test. But you shouldn't run such tests on a live pool. Replace the drive and then test it.

Is the drive under warranty?
 

Oded

Explorer
Joined
Apr 20, 2014
Messages
66
Thanks for the clarification.
No, the drive is not under warranty.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
I would never run badblocks on a disk that has data you want to keep - regardless of the option for non-destructive testing. Too easy for things to mess up.

It looks like the drive is failing the SMART Long test. The first failure appears to have occured at 56246 hours. The current Power on hours = 56258 which indicates the disk has been running for nearly 6.5 years - which is pretty old. You have gotten your money's worth out of that drive.

If it were me, I would replace the drive. I would do it now before your data is affected. This is one of the benefits of running RaidZ2.
 

Oded

Explorer
Joined
Apr 20, 2014
Messages
66
Thanks. I will replace the drive.
been replacing quite a few recently so I’m using this opportunity to put larger 8tb drives which hopefully increase my pool when the whole swap is complete.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Thanks. I will replace the drive.
been replacing quite a few recently so I’m using this opportunity to put larger 8tb drives which hopefully increase my pool when the whole swap is complete.
That is a good strategy, and it makes sense to do it before your data is at risk.
 
Top