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
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:
$ 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