Do you think that the SCP upload got disrupted mid-copy and abruptly left some blocks partially-copied? I don't think SCP attempts to finish copying interrupted transfers.
I don't think that SCP is the culprit. I have already tried copying all the files using Windows Explorer when the whole drive was formatted to exFat. I am also using WinSCP which I believe resumes interrupted transfers.
Given that the scp transfer took a whole night the speed probably wasn't that great. Possibly several dozen Kbytes/s?
It was about 18-20 MB/s, so the transfer took about 5-6 hours. With a samba server, I could get those speeds up to 100 MB/s.
Check your block files with md5sum and make sure they're all the same as the ones you have locally.
I could do that, but it is very likely to be a waste of time. The error indicates that there is something wrong with the latest block which I believe was not downloaded on my PC.
Other than that the only thing I can think of is there is some hardware issue that is only showing itself when the system is under load, like when it's verifying the blockchain or a block. But, that is really a stretch.
I could try running either -reindex or -reindex-chainstate as the debug.log suggests, but I guess that would take a few days. When the drive was formatted to exFat, after the corruption had occurred on the Pi, I tried connecting it to my PC and replacing the "chainstate" folder with a backup, but I couldn't modify that folder unless I ran a Windows built-in repair tool.
I have configured my samba server with the exFat partition and everything seems to be working fine. I have transferred a few large files back-and-forth and there are no corruptions so far.