Trying to set up my first node. Downloaded the whole blockchain to my external Samsung T7 SSD. The node works, but sometimes when I stop `bitcoind` using `bitcoin-cli stop`, I get this error: `[error] Fatal LevelDB error: Corruption: block checksum mismatch`. I reindexed a few times, and it runs fine for a while, then the same thing happens again. Always stopping with `bitcoin-cli stop`, always unmounting the SSD...
Node Setup Issues: LevelDB Corruption Errors
20 replies 237 views
lynx_5hardMember
Posts: 76 · Reputation: 149
#2Mar 4, 2019, 02:01 AM
Is your SSD okay? Sounds like it might be the problem. Corruption can happen if you unmount too quickly or if your RAM is low. Maybe try boosting your RAM and tweaking your Bitcoin Core settings.
Yeah, I think there’s a delay when you stop the daemon. If you unplug the SSD too fast, that could cause corruption. Wait a few minutes after stopping it. And if you're on Windows, check Task Manager to see if `bitcoind` is still running.
Good point about the USB cable. If you're using a laptop, sometimes the cable can mess with the connection. A cable with separate power might help with this issue.
This error might mean your UTXO set is getting corrupted. It happens when writing the cached state to disk or if the SSD is unplugged suddenly. Try lowering your dbcache and dbbatchsize settings.
Happened again. Stopped with `bitcoin-cli stop`, waited, and still got the error. No unmounting or disconnecting involved this time. Just checked the debug log, and it’s showing some new connections... not sure what’s up.
+1 to ruling out improper unmounting. Looks like the chainstate is still getting corrupted. The last shutdown process was clean, so it’s weird.
Your `.bitcoin` folder is a symlink to the external SSD, right? Sometimes that can create issues. You might want to avoid using symlinks and just point directly to the external SSD.
Yup, symlink to the USB drive. But now I hit an error during `bitcoind -reindex-chainstate`. Can't connect to 127.0.0.1:9050. What gives?
Sounds like typical data transfer issues. You should consider replacing the USB drive. If that doesn’t work, try moving your files to another SSD, reformat it, and make sure it's NTFS. FAT isn’t the best for this.
Now it seems like one of my block index files is corrupted. Only way to fix it is with `-reindex`. But I'm worried it’s a hardware issue.
Symlinks shouldn’t cause corruption. But if your SSD is acting up, it's better to keep everything on the system drive and point blocks directly there. Less hassle that way.
SSD's ext4 format should be fine. But I read that model has slow write speeds. That might be part of the problem. Have you updated its firmware? That could help.
I’ve got the same setup with that SSD model, and it works fine on my older laptop. You might need to lower the memory settings and clean your CPU fan to avoid overheating.
Just found out my system time was off by an hour. Could that cause data corruption?
No way that would cause corruption. If the clock is just a bit off, it shouldn't mess with data integrity.
Yeah, as long as it’s not way off, you won’t have issues. Time misconfigurations usually lead to warnings, not random corruption.
I’m just trying to learn by setting up a node. That’s why I’m using an external SSD, makes it easier to move around between different PCs.
Using an external SSD might be more trouble than it’s worth. If you can, I’d suggest setting up an internal SSD for better performance.
At this point, I just want to get it working without corruptions. I’ll keep troubleshooting and share any findings.