4

I want to use my Windows 7 Bitcoin database (the block chain I downloaded + my wallets) on Linux (Debian). I run Debian as VirtualBox guest on Windows 7 host and share the Bitcoin data folder (C:/Users/Username/AppData/Roaming/Bitcoin/) as a folder to Debian.

However bitcoind on Debian with proper -datadir parameter says "Error opening block database. Do you want to rebuild the block database now?" message. This brings me to the question whether the databases are compatible between Windows and Linux at all.

Edit 1: I am using one Bitcoin instance at a time. I realized I get the same error even when using en empty data directory that is mounted via VirtualBox on the host.

Here is the debug.log (same for empty or full data directory):

2013-12-22 20:49:07 Bitcoin version v0.8.6-dirty-beta (2013-12-05 13:11:26 +0100)
2013-12-22 20:49:07 Using OpenSSL version OpenSSL 1.0.1e 11 Feb 2013
2013-12-22 20:49:07 Default data directory /home/kozuch/.bitcoin
2013-12-22 20:49:07 Using data directory /home/kozuch/vboxshare2
2013-12-22 20:49:07 Using at most 125 connections (1024 file descriptors available)
2013-12-22 20:49:07 init message: Verifying wallet...
2013-12-22 20:49:07 dbenv.open LogDir=/home/kozuch/vboxshare2/database ErrorFile=/home/kozuch/vboxshare2/db.log
2013-12-22 20:49:07 Bound to [::]:8333
2013-12-22 20:49:07 Bound to 0.0.0.0:8333
2013-12-22 20:49:07 init message: Loading block index...
2013-12-22 20:49:07 Opening LevelDB in /home/kozuch/vboxshare2/blocks/index
2013-12-22 20:49:07 : Error opening block database.
Do you want to rebuild the block database now?
2013-12-22 20:49:07 Shutdown : In progress...
2013-12-22 20:49:07 Flush(false)
2013-12-22 20:49:07 DBFlush(false) ended               0ms
2013-12-22 20:49:07 StopNode()
2013-12-22 20:49:07 Flushed 0 addresses to peers.dat  4ms
2013-12-22 20:49:07 Flush(true)
2013-12-22 20:49:07 DBFlush(true) ended               1ms
2013-12-22 20:49:07 Shutdown : done

Seems like the problem might be with following:

ErrorFile=/home/kozuch/vboxshare2/db.log

Edit 2: There also is a .lock file with 0 size in the datadir after I get the error.

Edit 3: So "ErrorFile=/home/kozuch/vboxshare2/db.log" was not a problem. I get this error for a working instance locally (without shared data folder).

  • can you check if all the files in bitcoin folder are owned by the same user you are using? if not try to chown -R ~/.bitcoin as root – user10950 Dec 24 '13 at 1:11
1

Just something to check quick. What are the file permissions on the folder and files you are trying to access. You may want to set them to 777 temporarily and try opening it just to rule out that it's not a permission issue.

Edit: A .lock file of size 0 does not tell us anything. My client is running perfectly and also has one just fyi.

  • The permissions should be fine. The user under which I run bitcoind can write/delete from that shared directory. Running "chmod -R 777 vboxshare2" does not help. – Kozuch Dec 22 '13 at 21:06
  • have you tried starting bitcoin with starting bitcoin with the datadir=\new directory\ flag. Also do you need to run bitcoin-qt instead of one of the lighter wallets? – mschuett Dec 22 '13 at 21:13
  • Yes I use the -datadir=/home/kozuch/vboxshare2 parameter if that is what you are asking. And yes I want to run the full client. – Kozuch Dec 22 '13 at 21:19
  • Very odd issue. Last thing I can think of is running bitcoin with -checklevel=2. – mschuett Dec 22 '13 at 21:29
1

It should be compatible if your running one instance at a time, BUT I think that the datadir is being locked. Try to find more details in the logs, it should tell you the reason of the error which could be anything. if you are running any bitcoin software on windows stop it and try to restart bitcoind from your linux box.

EDIT: Did you install bitcoind and run it as root? if not, can you try to chown -R ~/.bitcoin as root, not the db folder itself, it still can be a permission issue,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.