For the complete documentation index, see llms.txt. This page is also available as Markdown.

Dealing with Storage Issues on the Execution Client

It is currently recommended to use a minimum 1TB hard disk.

Kudos to angyts for this contribution.

After running the execution client for a while, you will notice that it will start to fill up the hard disk. The following steps might be helpful for you.

Since Geth 1.10x version, the blockchain data can be regularly pruned to reduce it's size.

Reference: https://gist.github.com/yorickdowne/3323759b4cbf2022e191ab058a4276b2

You will need to upgrade Geth to at least 1.10x. Other prerequisites are a fully synced execution engine and that a snapshot has been created.

Stop your execution engine

sudo systemctl stop execution

Prune the blockchain data

sudo -u execution geth --datadir /var/lib/geth snapshot prune-state

Restart execution engine

sudo systemctl start execution

After you have installed your hard disk, you will need to properly format it and automount it. Consult the ubuntu guides on this.

I will assume that the new disk has been mounted onto /mnt/execution-data. (The name of the mount point is up to you)

Handling file permissions.

You need to change ownership of the folder to be accessible by your executionservice. If your folder is a different name, please change the /mnt/execution-data accordingly.

sudo chown execution:execution /mnt/execution-data
sudo chmod 755 /mnt/execution-data

Stop your execution client.

sudo systemctl stop execution

Edit the system service file to point to a new data directory.

sudo nano /etc/systemd/system/execution.service

At the end of this command starting with /usr/bin/geth --http --metrics .... add a space and the following flag --datadir "/mnt/execution-data".

Ctrl-X to save your settings.

Refresh the system service daemon to load the new configurations.

sudo systemctl daemon-reload

Restart the execution client.

sudo systemctl start execution

Make sure it is up and running by viewing the running logs.

sudo journalctl -fu execution

(Optional) Delete original data directory

Last updated