Hey folks.
I've been searching for a solution but can't find a clear, step-by-step guide.
I'm running Linux (Zorin, which is Ubuntu-based) on a 256 GB SSD. I want to set up the blockchain on a different 1 TB HDD. (I’ve got 2 HDDs in total.) The thing is, while I can see the HDDs in the OS, they don’t show up when I try to install the blockchain.
Can anyone help me figure this out? I need a detailed explanation, not just something like "allow the app to access it". This is all new to me.
Thanks a lot!
Don't you see your external HDD in /media when you are selecting a folder in Bitcoin Core?
Otherwise you can use lsblk to try to find the exact path.
If you copy paste or write the exact path in Bitcoin Core, it should be fine normally.
https://ibb.co/3RL6kvp - This is what is displayed.
https://ibb.co/Xxpk01H
I don't have /media (or at least I don't see it). In the "Look in" window is just "Computer" (where linux is installed).
And in the left windows is "Computer" and User (/home/user). Dragos in my case.
The HDD's are not displayed.
I don't know commands in linux, like lsblk, that's why I asked a step-by-step solution. Because I'm new in linux.
Thanks.
You just need to open a Terminal and type :
This command will show you the exact path to find your external HDD.
More information here :
On your first screenshot, if you click on /
You will get a list of folders.
Inside this list you have a folder named media.
This folder is where you can find your HDD, USB sticks etc..
So from your Screenshot number 1, I would click on /
media
Dragos
name of your HDD (which can easily find with the help of lsblk mentioned above
Thank you for your answer I will try when I'll be home.
I tried 3 ways to install it. From snap, bitcoin.org, and default linux store.
For the first two I get the same result. For the last, it skips the window where I can choose the directory, and it's downloading the blockchain in the default directory.
First things first: what are you trying to do? I wouldn't recommend installing Bitcoin Core on an exteral drive, if the USB cable gets disconnected, chances are your blockchain gets corrupted. Your screenshots show "prune to 2 GB", if you choose that, you can just as well use your internal SSD.
But if you do insist on using an external drive, there's a huge performance improvement if you keep chainstate on your SSD. My blocks directory is a symlink to my (internal) HDD, and if you insist on using an external drive, I recommend to do the same.
What filesystem do you have on your external drive? If you're not planning on using it without Linux, I recommend formatting it with a decent filesystem that supports permissions. For instance, ext4 will do.
I know this doesn't answer your questions directly, but it's probably good to take a step back first and get the basics right. Linux is great, but there can be a steep learning curve.
Yes, Software Store. Maybe, there is a configuration file, but I had not chosen a directory for blockchain to install before.
LoyceV, you misunderstood my problem. I want to run a full node, not a pruned one. I know how to install each one. I ran a full node in the past, I know how to install and configure it. I also did the trick with symlink for chainstate on ssd. My 1TB HDD is already formatted and I plan to use it just for Bitcoin Core. My hdd's and ssd are connected through SATA, not USB.
My problem is that, unlike windows btc core installer, where I could choose any partition I wanted, the linux btc core installer sees only the partition where the os is installed.
Can you make sure the three drives beside "Computer" are mounted? Try to browse around within the drives, and see if you can access your HDD first. The screenshot you gave seems to indicate it hasn't yet mounted.
After you make sure it's mounted. Continue to this current step. On the Choose Data Directory window, click "/" to see if there are lists of folders.
If there is none, that might indicate Bitcoin Core somehow can not access the folders. And I don't know any clue what causes it.
If it's listed, continue to look at the "mnt" folder, see if your mounted drive exists there and locate which folder you want to use for the data directory. If there is no mnt folder, try to look at "media" as others suggest.
I meant the other way around: chainstate can just stay in your normal home directory. That way, all your wallets end up in your home directory too (which makes it easier to add to your standard backups).
Does that mean they're internal instead of external? I assumed it's USB because of the topic title, and I don't think external SATA is very common.
In Linux, applications don't deal with "partitions". You just mount the partition, for instance in /home2, set up the permissions, and tell Bitcoin Core to save it's data in /home2/username/bitcoin.
Or better: Tell Bitcoin Core to install in your normal home directory, then quit it, move blocks from ~/.bitcoin to /home2/username/bitcoin/blocks, create a symlink for blocks in your .bitcoin directory, and restart Bitcoin Core.
Maybe I have used the words "external" and "partition" wrong. I'm not a techie person.
I've read all of your replies, I appreciate your efforts to help me.
I will try all of them today or tomorrow morning, and will tell you how it went. Wish me luck.
If anyone has other ideas, please let them here.
Thank you brothers!
iwantmyhomepaidwithbtc2 was right. In the /media folder I found the disks. Linux is so different from Windows. I didn't know that.
I also moved the chainstate folder from HDD to SDD and created a symlink. Now it's downloading twice faster.
I'm grateful to everyone who help me on this topic.
Cheers!
I'm glad to hear that everything's okay now! You did the right thing moving chainstate.
If you want to learn more about the Unix file system, this article is cool : https://www.geeksforgeeks.org/unix-file-system/
"External" just means: outside of your computer.
I like the Linux approach much more. You could for instance mount the second disk as /home/username/.bitcoin/blocks, which makes it a dedicated blockchain disk.