r/TrueNAS: How do I fix a pool that imported improperly?

💡
This article archives a conversation, which took place in a subreddit post (original source linked below) and to which I contributed a solution or answer (with the u/MasterofSynapse handle), in a Q&A format.

Original Reddit post: https://www.reddit.com/r/truenas/comments/yth43n/how_do_i_fix_a_pool_that_imported_improperly/

Question

I migrated 5 disks in a Z2 pool from TrusNAS core over to my new NAS on TrueNAS scale. I did the export process on my old system and connected the disks to the new system. I did the import, and it saw the pool so I selected it.

Unfortunately only 3 of 5 disks were actually seen at the time so it restored the pool in a fully degraded state.

I immediately shutdown the system and fixed the two unrecognized disks. Then I powered back on. Problem was all disks were there, but the system did not recognize them as being part of the pool since they were not present when I performed the import.

Stupidly I disconnected the pool, rebooted the system, and did a re-import.

All 5 disks imported correctly; however, now the pool is showing as unhealthy as the two drives that were previously excluded are now reporting checksum errors.

After doing a little searching I felt that doing a pool scrub may resolve the issue, but after half a day of scrubbing it came back with zero errors, but the two drives still show a single checksum error in the Pool Status UI.

I am hoping risk to data is low to none, as I am positive I did nothing to touch the actual data when the pool was out of sync.

What do I need to do (or where can I find info on how to) resolve this issue?

Primarily, I need to be sure I have not lost any of the data, but then I would like to remove the checksum errors and return the pool back into production.

Answer

A zpool clear poolname will remove these checksum error counters. After that, run a second scrub, if all error counters stay at 0, you are fine.

Think of it like doing THE thing car service companies do, they clear out old errors before checking if any new ones will occur.