Bitcoin Forum
April 26, 2024, 06:24:33 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Full node on a raspberry pi with blockchain data on a samba share  (Read 3327 times)
thorjag (OP)
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile
October 16, 2014, 08:17:48 PM
 #1

I am trying to get a full node running on a raspberry pi. However, because of the storage requirements I dont want to save the blockchain locally, which means I mounted a remote share which included the blockchain data files. When starting bitcoind I get the following error message:
Code:
: 
Error opening block database.

Do you want to rebuild the block database now?

More verbose from the log file:
Code:
2014-10-16 19:52:36 Bitcoin version v0.9.3.0-g40d2041-beta (Mon, 22 Sep 2014 16:42:15 +0200)
2014-10-16 19:52:36 Using OpenSSL version OpenSSL 1.0.1j 15 Oct 2014
2014-10-16 19:52:36 Using BerkeleyDB version Berkeley DB 5.3.28: (September  9, 2013)
2014-10-16 19:52:36 Default data directory /home/bitcoin/.bitcoin
2014-10-16 19:52:36 Using data directory /home/bitcoin/.bitcoin
2014-10-16 19:52:36 Using at most 125 connections (1024 file descriptors available)
2014-10-16 19:52:36 Using wallet wallet.dat
2014-10-16 19:52:36 init message: Verifying wallet...
2014-10-16 19:52:36 CDBEnv::Open : LogDir=/home/bitcoin/.bitcoin/database ErrorFile=/home/bitcoin/.bitcoin/db.log
2014-10-16 19:52:37 Bound to [::]:8333
2014-10-16 19:52:37 Bound to 0.0.0.0:8333
2014-10-16 19:52:37 init message: Loading block index...
2014-10-16 19:52:37 Opening LevelDB in /home/bitcoin/.bitcoin/blocks/index
2014-10-16 19:52:37 IO error: /home/bitcoin/.bitcoin/blocks/index: Invalid argument
2014-10-16 19:52:37 : Error opening block database.

Do you want to rebuild the block database now?
2014-10-16 19:52:37 Aborted block database rebuild. Exiting.
2014-10-16 19:52:37 Shutdown : In progress...
2014-10-16 19:52:37 StopNode()
2014-10-16 19:52:37 Shutdown : done

When running bitcoind with a local datadir it runs as normal with no error message. Someone who might know what the issue might be?

I am running a slim archlinux install and mounted the remote share with:
Code:
mount.cifs //<ip-address>/bitcoin /home/bitcoin/.bitcoin -o username=<username>,uid=bitcoin
1714155873
Hero Member
*
Offline Offline

Posts: 1714155873

View Profile Personal Message (Offline)

Ignore
1714155873
Reply with quote  #2

1714155873
Report to moderator
1714155873
Hero Member
*
Offline Offline

Posts: 1714155873

View Profile Personal Message (Offline)

Ignore
1714155873
Reply with quote  #2

1714155873
Report to moderator
No Gods or Kings. Only Bitcoin
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714155873
Hero Member
*
Offline Offline

Posts: 1714155873

View Profile Personal Message (Offline)

Ignore
1714155873
Reply with quote  #2

1714155873
Report to moderator
1714155873
Hero Member
*
Offline Offline

Posts: 1714155873

View Profile Personal Message (Offline)

Ignore
1714155873
Reply with quote  #2

1714155873
Report to moderator
Newar
Legendary
*
Offline Offline

Activity: 1358
Merit: 1000


https://gliph.me/hUF


View Profile
October 17, 2014, 12:49:55 AM
 #2

Where do you specify the data directory?

OTC rating | GPG keyid 1DC91318EE785FDE | Gliph: lightning bicycle tree music | Mycelium, a swift & secure Bitcoin client for Android | LocalBitcoins
thorjag (OP)
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile
October 17, 2014, 07:32:37 AM
 #3

I dont specify a datadir. I start bitcoind with the user bitcoin so the datadir is /home/bitcoin/.bitcoin, which is where I mount the share.
spin
Sr. Member
****
Offline Offline

Activity: 362
Merit: 261


View Profile
October 17, 2014, 02:04:19 PM
 #4

Permissions?  Does the user running bitcoind have write permissions on the samba share?
Perhaps you can use a symlink rather than mounting it directly in that folder?  Might help?
Try with an alternative mountpoint and using a datadir argument?

If you liked this post buy me a beer.  Beers are quite cheap where I live!
bc1q707guwp9pc73r08jw23lvecpywtazjjk399daa
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1499


No I dont escrow anymore.


View Profile WWW
October 17, 2014, 09:27:25 PM
 #5

-snip-
Perhaps you can use a symlink rather than mounting it directly in that folder?

I would try this next as well. I have no idea what happens if you mount into an existing directory. Maybe there are files missing because the client was started once without the mount point or files that should be there but are not on the samba share.

Im not really here, its just your imagination.
Dabs
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
October 17, 2014, 11:07:46 PM
 #6

Maybe you should try specifying a datadir too. In addition to the symlink, which should already be mounted before you start bitcoind. You might as well grab the blockchain data from one of your other nodes first.

Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1862
Merit: 1011

Reverse engineer from time to time


View Profile
October 18, 2014, 12:54:19 AM
 #7

If you want to reduce the memory consumption of bitcoind(as the Raspberry pi has very little RAM), look at the post in this thread https://bitcointalk.org/index.php?topic=765934

Worked really well for me, Bitcoind even went under 200mb at times.

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
thorjag (OP)
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile
October 18, 2014, 06:22:06 PM
 #8

Thanks for the help.

There is nothing wrong with the permissions. I am able to read/write from/to the share without issues.

I tried symlinking, as you suggested, but with the same results...

Will definately check out the memory optimizations once I get up and running. Thanks for the tip.
doof
Hero Member
*****
Offline Offline

Activity: 765
Merit: 503


View Profile WWW
October 27, 2014, 05:07:33 AM
 #9

If you want to reduce the memory consumption of bitcoind(as the Raspberry pi has very little RAM), look at the post in this thread https://bitcointalk.org/index.php?topic=765934

Worked really well for me, Bitcoind even went under 200mb at times.

Likewise.
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!