0
I have a Raspberry Pi 3. I'm running bitcoind for the first time and would like to save the blockchain to an external hard disk.
When I run
bitcoind -datadir=/media/pi/FreeAgent\ GoFlex\Drive
I get the following error:
Error: Cannot obtain a lock on data directory /media/pi/FreeAgent GoFlex Drive
Bitcoin Core is probably already running. No such file or directory.
I tried stopping the process with
bitcoin-cli stop
But that didn't seem to do anything. Is the problem that the external hard disk has to be formatted and mounted, as per instructions here?
As a test, I tried writing a file to the hard disk from the system and received the following error:
mv: inter-device move failed: 'testfile' to '/media/pi/FreeAgent GoFlex Drive/testfile'; unable to remove target: Read-only file system
This does seem to confirm this hypothesis that the disk needs to be formatted/mounted.
thanks. It seems that it's a user permissions issue because I was able to view jpeg photos that I have on the external drive. Please let me know if that makes sense and that I only need to address the write permissions issue, but not the mounting. – matsuo_basho – 2018-02-15T13:59:17.543
1You only need to fix file permissions. Mounting may still be related because file permissions could be related to how the drive is mounted. Note that it is already mounted because you are able to access it. – Andrew Chow – 2018-02-15T16:48:34.040
You wrote that Bitcoin core is already stopped when I get that error, and rather it can't run without datadir. Do you mean that I have to manually specify datadir before running bitcoind? When i ran bitcoin daemon it seemed to have started - I would imagine that the blockchain is written to a default directory if datadir is not specified. – matsuo_basho – 2018-02-15T21:34:30.863
There is a default datadir. When you specify a datadir, it does not attempt to fallback to anything. If it can't write to the datadir it is using (either specified or the default if none was specified), it will simply exit with an error. – Andrew Chow – 2018-02-16T00:05:35.863
I tried to change permissions with following command
chmod 755 FreeAgent\ GoFlex\ Drive/. Got error:chmod: changing permisssons of 'FreeAgent GoFlex Drive/':Read-only file system. Also tried runningsudo mount -o remount,rw '/media/FreeAgent\ GoFlex\ Drive/. Got errormount: mount point /media/FreeAgent\ GoFlex\ Drive/does not exist – matsuo_basho – 2018-02-17T03:33:53.803