Bitcoin Forum
July 15, 2024, 08:48:11 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin daemon not starting: fails to initialize the database  (Read 50 times)
darkv0rt3x (OP)
Hero Member
*****
Offline Offline

Activity: 1260
Merit: 674


I rather die on my feet than to live on my knees


View Profile
February 12, 2021, 07:04:23 PM
 #1

Hello.

My situation is the following:

I have this external USB HDD with 1Tb which I was using, among other stuff, to store my blockchain folder and what I did was to create a symlink in my home dir, named .bitcoin, pointing to this data folder in this external USB HDD. However, whenever an error occurs in the database, this HDD is very slow when I ask bitcoin daemon to -reindex-chainstate.

So, I was suggested to keep only the blocks in this external HDD and move the rest of the data folder into my SDD and this way, whenever another error would occur with the blockchain folder, it would be faster to -reindex-chainstate.

What I did was to copy to my home folder, the data base folder, except the debug files and the blocks folder, and I commented out from the bitcoin core config file the follwoing lines:
Code:
#conf=/media/WdElements/blockchain-backup/bitcoin.conf
#datadir=/media/WdElements/blockchain-backup

because now, the data folder was in it's default location (at my home folder) and I started bitcoin daemon using bitoicnd -blocksdir=WdElements/blockchain-backup/ but the daemon stops shortly after saying it couldn't initialize the database.

So, what am I doing wrong?


Bitcoin is energy. Bitcoin is freedom
I rather die on my feet than living on my knees!
NeuroticFish
Legendary
*
Offline Offline

Activity: 3738
Merit: 6461


Looking for campaign manager? Contact icopress!


View Profile
February 12, 2021, 07:16:05 PM
 #2

So, what am I doing wrong?

Maybe you forgot to write, but I want to be sure: inside your current datadir, since the blocks are not there, do you have a blocks symlink to the actual blocks folder?


I see it's there now. I would try that instead of -blocksdir use a blocks symlink to the actual blocks folder.
I've done something similar in the past (i.e. managed the datadir parts with symlinks) and it worked.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
darkv0rt3x (OP)
Hero Member
*****
Offline Offline

Activity: 1260
Merit: 674


I rather die on my feet than to live on my knees


View Profile
February 12, 2021, 07:27:51 PM
 #3

So, what am I doing wrong?

Maybe you forgot to write, but I want to be sure: inside your current datadir, since the blocks are not there, do you have a blocks symlink to the actual blocks folder?


I see it's there now. I would try that instead of -blocksdir use a blocks symlink to the actual blocks folder.
I've done something similar in the past (i.e. managed the datadir parts with symlinks) and it worked.

I can try that, but I actually wanted to know/understand why -blocksdir is not working.

Bitcoin is energy. Bitcoin is freedom
I rather die on my feet than living on my knees!
LoyceV
Legendary
*
Online Online

Activity: 3374
Merit: 17019


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
February 12, 2021, 08:43:41 PM
 #4

I would try that instead of -blocksdir use a blocks symlink to the actual blocks folder.
This is what I use, without any changes to my config file. I used to have a different setup with wallet symlinks, but at some upgrade that stopped working because Bitcoin Core decided to no longer accept my symlink choices. My current setup has worked ever since.

I actually wanted to know/understand why -blocksdir is not working.
I'm just guessing here: maybe because it's on a different disk.

darkv0rt3x (OP)
Hero Member
*****
Offline Offline

Activity: 1260
Merit: 674


I rather die on my feet than to live on my knees


View Profile
February 12, 2021, 11:08:37 PM
Merited by HCP (1)
 #5

Ok guys. I ended up creating a symlink too.

I guess I'll leave it like that fr now!

Bitcoin is energy. Bitcoin is freedom
I rather die on my feet than living on my knees!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!