Bitcoin Forum
May 01, 2024, 12:29:19 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Linux - I can't install blockchain on external HDD  (Read 146 times)
dragospirvu75x (OP)
Jr. Member
*
Offline Offline

Activity: 42
Merit: 24


View Profile
October 28, 2023, 07:30:38 AM
 #1

Hello everyone.

I tried to find a solution, but I didn't find a step-by-step one.

I'm using Linux (Zorin - based on Ubuntu) on a 256 GB SSD. I want to install the blockchain on a separate 1 TB HDD. ( I have 2 HDD's)
The problem is that although I can access the HDD's from the OS, they are not seen when I want to install the blockchain.

How can I solve the problem? Step-by-step, please. Not just "Give permission to the app" or something like this. This is my first time using Linux.

Thank you!

1714523359
Hero Member
*
Offline Offline

Posts: 1714523359

View Profile Personal Message (Offline)

Ignore
1714523359
Reply with quote  #2

1714523359
Report to moderator
Even in the event that an attacker gains more than 50% of the network's computational power, only transactions sent by the attacker could be reversed or double-spent. The network would not be destroyed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714523359
Hero Member
*
Offline Offline

Posts: 1714523359

View Profile Personal Message (Offline)

Ignore
1714523359
Reply with quote  #2

1714523359
Report to moderator
paid2
Hero Member
*****
Offline Offline

Activity: 672
Merit: 2050


Crypto Swap Exchange


View Profile WWW
October 28, 2023, 09:26:28 AM
Merited by ABCbits (1)
 #2

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.


█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
dragospirvu75x (OP)
Jr. Member
*
Offline Offline

Activity: 42
Merit: 24


View Profile
October 28, 2023, 10:04:28 AM
 #3

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.
paid2
Hero Member
*****
Offline Offline

Activity: 672
Merit: 2050


Crypto Swap Exchange


View Profile WWW
October 28, 2023, 10:22:56 AM
 #4

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 :
Code:
lsblk

This command will show you the exact path to find your external HDD.

More information here :

lsblk  lists  information  about  all available or the specified block devices.  The lsblk  command reads the sysfs filesystem and udev db to gather information.
The command prints all block devices (except RAM disks) in a tree-like format by  default.
Use lsblk --help to get a list of all available columns.


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

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
dragospirvu75x (OP)
Jr. Member
*
Offline Offline

Activity: 42
Merit: 24


View Profile
October 28, 2023, 11:05:32 AM
 #5

Thank you for your answer Smiley 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.
LoyceV
Legendary
*
Offline Offline

Activity: 3290
Merit: 16577


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
October 28, 2023, 11:47:25 AM
Merited by ABCbits (2), paid2 (1)
 #6

This is my first time using Linux.
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.

dragospirvu75x (OP)
Jr. Member
*
Offline Offline

Activity: 42
Merit: 24


View Profile
October 28, 2023, 12:55:29 PM
 #7

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.
vv181
Legendary
*
Offline Offline

Activity: 1932
Merit: 1273


View Profile
October 28, 2023, 01:44:09 PM
 #8



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.

LoyceV
Legendary
*
Offline Offline

Activity: 3290
Merit: 16577


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
October 28, 2023, 01:48:47 PM
Last edit: October 29, 2023, 10:00:46 AM by LoyceV
Merited by ABCbits (1)
 #9

I also did the trick with symlink for chainstate on ssd.
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).

Quote
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.
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.

Quote
the linux btc core installer sees only the partition where the os is installed.
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.

dragospirvu75x (OP)
Jr. Member
*
Offline Offline

Activity: 42
Merit: 24


View Profile
October 28, 2023, 02:58:54 PM
 #10

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!
dragospirvu75x (OP)
Jr. Member
*
Offline Offline

Activity: 42
Merit: 24


View Profile
October 28, 2023, 04:12:17 PM
 #11

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!
paid2
Hero Member
*****
Offline Offline

Activity: 672
Merit: 2050


Crypto Swap Exchange


View Profile WWW
October 28, 2023, 04:44:11 PM
 #12

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/

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
LoyceV
Legendary
*
Offline Offline

Activity: 3290
Merit: 16577


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
October 29, 2023, 07:21:12 AM
 #13

Maybe I have used the words "external" and "partition" wrong. I'm not a techie person.
"External" just means: outside of your computer.

In the /media folder I found the disks. Linux is so different from Windows.
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.

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!