Thank you for the numerous list of suggestions of other things for me to investigate (rather than asking for assistance with the bitcoin core client here.)
My PC has 6 Gb of RAM, it does have a SSD (which all programs, including the Bitcoin Core, run from), the OS is Windows 7. The NAS works fine with all the other devices connected to it. Someday I guess I will benchmark it in my spare time.
It seems the specs are fine but you didn't mention other specs like CPU and if you are using 32bit or 64bit I have experienced before when using Bitcoin core with 32bit which is too buggy and can't able to use it.
Anyway, have you recently force to shut down your PC without closing Bitcoin core while syncing? It will always end up with data corruption if you didn't properly shut down your core.
The logs are suggesting to use -reindex it must be work but since you already tried it how did you perform -reindex?
Did you edit the bitcoin core shortcut under target add -reindex? Or you run bitcoin core through command prompt with -reindex?
Adding this if you are using 32bit read this
https://bitcointalksearch.org/topic/m.50915664 posted by Achow101 you might need to build a 32bit one to make your core work properly.
BitMaxz -- CPU is AMD Phenom II X4 960T 3.4 GigaHz, 64 bit W7. Sometimes I have shut it down by accident before closing bitcoin core.
I performed -reindex by adding it as a flag to the Windows shortcut that opens bitcoin core. So, I use the flags: -datadir=F:\Bitcoin -reindex tacked onto the bitcoin-qt.exe call in the shortcut. My W7 box connects to the NAS this way -- F is a samba share.
There surely must be some other detail(s) some of you could find for me to not expect the bitcoin core software to work and give up on the question I asked?
We already mention almost all option. Parameter
-reindex and
-reindex-chainstate are the only option Bitcoin Core provide when your blockchain file is corrupted. Besides, I/O error and missing files usually related with your hardware.
Normally i
DO NOT recommend this, but you could try remove all files inside "index" folder, then run Bitcoin Core with
-reindex parameter. If your NAS has slow I/O speed, it could take few days. And if you still see same LevelDB error message, you definitely you should check your hardware.
ETFbitcoin -- thanks for the suggestion. I tried moving all the files inside the "index" folder then running Bitcoin Core with -reindex but it immediately abended with the same error as before. Here is the log created by my attempt to follow your suggestion:
-------------------------------------------
2022-09-02T17:45:39Z Bitcoin Core version v22.0.0 (release build)
2022-09-02T17:45:39Z Qt 5.12.11 (static), plugin=windows (static)
2022-09-02T17:45:39Z Static plugins:
2022-09-02T17:45:39Z QWindowsIntegrationPlugin, version 330752
2022-09-02T17:45:39Z QWindowsVistaStylePlugin, version 330752
2022-09-02T17:45:39Z Style: windowsvista / QWindowsVistaStyle
2022-09-02T17:45:39Z System: Windows 7 SP 1 (6.1), x86_64-little_endian-llp64
2022-09-02T17:45:39Z Screen: \\.\DISPLAY1 1920x1200, pixel ratio=1.0
2022-09-02T17:45:41Z Assuming ancestors of block 00000000000000000008a89e854d57e5667df88f1cdef6fde2fbca1de5b639ad have valid signatures.
2022-09-02T17:45:41Z Setting nMinimumChainWork=00000000000000000000000000000000000000001fa4663bbbe19f82de910280
2022-09-02T17:45:41Z Using the 'standard' SHA256 implementation
2022-09-02T17:45:41Z GUI: "registerShutdownBlockReason: Successfully registered: Bitcoin Core didn't yet exit safely…"
2022-09-02T17:45:41Z Default data directory C:\Users\Ted\AppData\Roaming\Bitcoin
2022-09-02T17:45:41Z Using data directory F:\Bitcoin
2022-09-02T17:45:41Z Config file: F:\Bitcoin\bitcoin.conf
2022-09-02T17:45:41Z Command-line arg: datadir="F:\\Bitcoin"
2022-09-02T17:45:41Z Command-line arg: reindex=""
2022-09-02T17:45:41Z Using at most 125 automatic connections (2048 file descriptors available)
2022-09-02T17:45:41Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2022-09-02T17:45:41Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2022-09-02T17:45:41Z Script verification uses 3 additional threads
2022-09-02T17:45:41Z scheduler thread start
2022-09-02T17:45:41Z Using wallet directory F:\Bitcoin
2022-09-02T17:45:41Z init message: Verifying wallet(s)…
2022-09-02T17:45:41Z init message: Loading banlist…
2022-09-02T17:45:41Z SetNetworkActive: true
2022-09-02T17:45:41Z Using /16 prefix for IP bucketing
2022-09-02T17:45:41Z Cache configuration:
2022-09-02T17:45:41Z * Using 2.0 MiB for block index database
2022-09-02T17:45:41Z * Using 8.0 MiB for chain state database
2022-09-02T17:45:41Z * Using 290.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space)
2022-09-02T17:45:41Z init message: Loading block index…
2022-09-02T17:45:41Z Switching active chainstate to Chainstate [ibd] @ height -1 (null)
2022-09-02T17:45:41Z Wiping LevelDB in F:\Bitcoin\blocks\index
2022-09-02T17:45:41Z boost::filesystem::status: Access is denied: "F:\Bitcoin\blocks\index"
2022-09-02T17:45:41Z Error: Error opening block database
2022-09-02T17:45:45Z Shutdown: In progress...
2022-09-02T17:45:45Z scheduler thread exit
2022-09-02T17:45:45Z Shutdown: done
What do you have in your bitcoin.conf file or command line parameters?
Because AFAIK, Bitcoin Core wont work if you set its datadir to a NAS due to leveldb incompatibility.
I don't know how you managed to make it work before but try to set only the "
blocksdir" to your NAS and leave the "
datadir" to your local disk.
There surely must be some other detail(s) some of you could find for me to not expect the bitcoin core software to work and give up on the question I asked?
Feels like you already expecting an answer and just want to make sure...
The whole idea of leaving the datadir on the NAS was to not need to re-download the entire blockchain WHEN something like this happened. I'm pretty disappointed with the Bitcoin Core program. For lack of alternatives, I will probably have to delete the blocks and start all over. Given my experience, I probably won't use the NAS next time and eventually, I will try to navigate away from needing Bitcoin Core because it creates problems for me.