Author

Topic: btc node down:( (Read 345 times)

legendary
Activity: 2030
Merit: 1569
CLEAN non GPL infringing code made in Rust lang
May 21, 2019, 09:29:06 PM
#10
While this is a valid solution, in Linux I'd rather use symlinks, ie: ln -s /mnt/yourdevice/userfolder/bitcoin /home/YOURUSERNAME/.bitcoin/

This is valid, but you messed up with the order.
The syntax is ln -s source destination (just like the mv or cp command).

The above command would create a symlink from the mounted drive to the internal memory of the pi.
But OP needs the blockchain to be stored on the external drive.

So the command should be:
Code:
ln -s /home/YOURUSERNAME/standardpath/to/blockchain /mnt/mounted/drive/to/store/blockchain/on

Quote from: man ln
LN(1)                         User Commands

NAME
       ln - make links between files

SYNOPSIS
       ln [OPTION]... [-T] TARGET LINK_NAME

DESCRIPTION
       In  the  1st  form, create a link to TARGET with the name LINK_NAME.

I don't see the mistake. The "target" is the actual folder, in this case its mounted in /mnt/yourdevice/userfolder/bitcoin while the symbolic link itself, which is pointing to "target" would be replacing ~/.bitcoin with a symlink of the same name that is leading to "target". To make it simpler to understand, move away the original ~/.bitcoin into that mounted hard drive bitcoin folder.

Currently my ~/.bitcoin is actually symlinked that way, to a hard disk with capacity to keep the entire blockchain and index.

I suggest you try not to confuse ln with cp or mv, they are not alike. Your command is actually mistaken (you got it backwards).

Why don't you do a quick experiment:

Quote from: bash
$ touch test.txt && ln -s test.txt test.lnk && ls -l test.*
lrwxrwxrwx 1 user user 8 may 21 22:26 test.lnk -> test.txt
-rw-r--r-- 1 user user 0 may 21 22:26 test.txt
legendary
Activity: 1624
Merit: 2481
May 16, 2019, 02:24:31 AM
#9
While this is a valid solution, in Linux I'd rather use symlinks, ie: ln -s /mnt/yourdevice/userfolder/bitcoin /home/YOURUSERNAME/.bitcoin/

This is valid, but you messed up with the order.
The syntax is ln -s source destination (just like the mv or cp command).

The above command would create a symlink from the mounted drive to the internal memory of the pi.
But OP needs the blockchain to be stored on the external drive.

So the command should be:
ln -s /home/YOURUSERNAME/standardpath/to/blockchain /mnt/mounted/drive/to/store/blockchain/on


Edited, See post below.


But personally, i'd choose to edit the config instead of creating a symlink. But that's just a personal opinion.
legendary
Activity: 2030
Merit: 1569
CLEAN non GPL infringing code made in Rust lang
May 15, 2019, 12:38:57 PM
#8
Sounds like Bitcoin Core is simply trying to store the data on your SDCard instead of the external device. Most likely you just need to modify the bitcoin.conf and set the datadir to be the location on the external drive.

On Linux, the location of bitcon.conf is usually: $HOME/.bitcoin/

which will be something like: /home/YOURUSERNAME/.bitcoin/bitcoin.conf

Just add the following to bitcoin.conf (it's a text file):
Code:
datadir=/path/to/your/bitcoin/data

While this is a valid solution, in Linux I'd rather use symlinks, ie: ln -s /mnt/yourdevice/userfolder/bitcoin /home/YOURUSERNAME/.bitcoin/
Or you could do the same with just ~/.bitcoin/blocks, ~/.bitcoin/chainstate and ~/.bitcoin/indexes

Also some distros make a "system" bitcoin user and use a "system" folder for bitcoin, such as /etc/bitcoin instead of ~/.bitcoin/.

Debian being one such distro, which is popular among raspi users. You won't notice if you install bitcoin-qt, but you do if you just install bitcoind.
newbie
Activity: 7
Merit: 4
May 15, 2019, 11:32:53 AM
#7
alright thank you. I'll do the reindex and get back to you when its finished. Thank you  I'll also check the debug.log
HCP
legendary
Activity: 2086
Merit: 4361
May 14, 2019, 07:25:07 PM
#6
Is there anything obvious in the debug.log file that indicates why your node is stopping at block 569512?

It's possible there is a corrupted block causing issues (seems to be a fairly common occurrence when running with the blocks data on external drives). If you see something in the debug.log that inidicates something like that, you could try deleting the last block file and then restarting the node with -reindex to see if that helps...

otherwise, try pasting the last couple of hundred (thousand?) lines from debug.log to pastebin and then post the link here so peeps can check if there is anything obvious in the log as to why your node is not working properly.
newbie
Activity: 7
Merit: 4
May 14, 2019, 05:41:02 PM
#5
alright, I think I have created a whole new node on the SD by accident. I deleted all those files. everything bitcoin related should now be strictly on hdd, except the binaries in bin? I guess those just stay where they are  in;    home/pi/bin/bitcoin  ?  I deleted a couple directories of old versions of core. I think i messed up and deleted my bitcoin folder on pi -rf  I may need to rebuild soimething. The wallet starts up but  I am now back to the original problem. wallet v 0.17.1  8 outbound connections and I'm stuck on block 569512.  I think there was something I needed in that bitcoin folder. im pretty sure I needed that i just can't remember what it was  I still have my .bitcoin with my .dats  and chainstate and all that.  my bitcoin.conf is empty though.
HCP
legendary
Activity: 2086
Merit: 4361
May 14, 2019, 04:02:24 PM
#4
Sounds like Bitcoin Core is simply trying to store the data on your SDCard instead of the external device. Most likely you just need to modify the bitcoin.conf and set the datadir to be the location on the external drive.

On Linux, the location of bitcon.conf is usually: $HOME/.bitcoin/

which will be something like: /home/YOURUSERNAME/.bitcoin/bitcoin.conf

Just add the following to bitcoin.conf (it's a text file):
Code:
datadir=/path/to/your/bitcoin/data
newbie
Activity: 7
Merit: 4
May 14, 2019, 02:11:25 PM
#3
Sorry, yes. Blockchain is on an ext. HDD. I guess there a chance i saved the new update to the SD.  I used a different process this time when updated btc core. I'm a linux noob though idk what I did wrong. How can I verify this? Thank you
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
May 14, 2019, 01:03:25 PM
#2
I'm a bit confused. Did you store your blockchain files on external storage, but somehow Bitcoin Core store it on your SD card?
If so, all you need to do move whole Bitcoin files (blockchain, chainstate, wallet.dat, etc.) to your external storage and run Bitcoin Core. Bitcoin Core should show first time welcome pop-up and then you can set it to use external storage.
newbie
Activity: 7
Merit: 4
May 14, 2019, 12:13:59 PM
#1
about a 3 month ago I had to shutdown my node. while it was down I updated to v0.17.1  After that it never worked again. Its filling up my root folder, then the pi is out of memory. Ive tried to fix this for a month. I cant figure it out. Its like the update is going straight to the SD card and filling it up. my dev/root folder is out of memory.  I did a reindex before all this, because when I first started node back up it kept getting stuck on the same block for a couple days. The node ran flawless for over a year. Ive tried all updates and autoremoves but i'm stuck here. I havent made any progress in 2 weeks. I don't know how to get into that folder and see and/or delete some of whats in there. Ive already got rid of the unneccasary programs like wolf and those other 2 to try to free up memory. what should i do? I would like to have my node back up and running. i'm lost here
Jump to: