Here’s an article:
Unable to use external SSD for Bitcoin Datadir in Ubuntu
As a Bitcoin enthusiast and a beginner with a complete placement of a node on Ubuntu, I encountered a frustrating problem that was tortured by my system. After setting an external SSD for storage of the whole Bitcoin blockchain, I was eager to explore ways to optimize my data storage. However, any attempt to use for Datadir (Directory) of my Bitcoin node ended with failure.
Problem
When installing the entire knot on Ubuntu, you must determine the Datadir, where your knot stores your Bitcoin information. The default datadir is usually located on /var/lib/mysqld
or// VAR/LIB/Bitcoin
, but for the whole knot we want to use an external drive specially designed to store large data sets like the whole blockchain. This can be a separate SSD drive from your computer.
Solution
After some research and experimentation, I discovered that setting Datadir using the command line options is not enough to solve this problem. In order to overcome this obstacle, we must manually configure the storage of the full node data.
Here’s a step to solve this problem:
- Edit
// etc/APT/APT.CONF.D/50-CLOUD-INIT
File : This file controls the system configuration inbuntu and can be used to install external plants as primary or secondary storage.
- Set
APT_storage_prefix
Variable: Add the following line U
/etc/APT/APT.CONF.D/50-CLOUD-INNIT
File:APT_storage_prefix =/MNT/Bitcoin
. Replace/MNT/Bitcoin
path to the external SSD drive.
- APT Update: Start
SUDO APT update in the terminal to ensure you have the latest packages of the package.
additional tips
- Make sure you create a dedicated user for your full knot, for example,Bitcoin
, and set their home directory/home/bitcoin
.
- Update your package list using
SUDO APT upgrade
or ‘APT Full-upgradeSUNDO to ensure any outdated packages.
- If you are using another storage device (eg LVM partition), be sure to update the/etc./APT.CONF.D/50-CLOUD-INIT
.
Conclusion
In this article, we explored the problem of using external SSD facilities for Bitcoin Datadir in Ubuntu and provided a solution. By changing// etc/APT/APT.CONF.D/50-CLOUD-INIT` File and APT update you can ensure that your entire knot storage is optimized for large data sets like Bitcoin Blockchain.
I hope this helps colleagues Bitcoin enthusiasts and Ubuntu users to overcome this frustrating problem!
دیدگاهتان را بنویسید