How to free up space if you own multiple vNodes

I have created a node script that will automatically create hard-links to every .ldb file that you may have duplicated in your /home/incognito directory.

I’ve tested it my self and nothing has changed with my nodes: all of my nodes are still working the same, except that now I have around 200 GB more as free space.

You could create a cronjob to run this once a day without needing to worry if your nodes are or not in committee, because the script will check that for you and skip them if they are, to prevent slashing.


If this helped you and you want to say thanks, consider doing so in the memo of a donation:

12sdoBt4XsFUmNiyik3ZiuKMZnA9wv8cTf6QLctNQTeMrCu5HEkSXjPZF7KC2ncfLuGTW9sAUAeU59gVpoyydtWtP2KcYrrCuNRfWJ4q5jsqpaRwLet8TLLvgH6zoBaYr7dDoSH8WVYqpPycLzG3

6 Likes

This is super awesome @J053, I believe vnode operators would appreciate your great work (including myself to be honest)
By the way, the protocol team was also figuring a few solutions to reduce blockchain data size, we will publish a proposal once we finalized it internally to get community feedback then.
P/s: sending some prv to your wallet now :blush:

4 Likes

Btw there is an typo or unicode error in provided address, it should be:
12sdoBt4XsFUmNiyik3ZiuKMZnA9wv8cTf6QLctNQTeMrCu5HEkSXjPZF7KC2ncfLuGTW9sAUAeU59gVpoyydtWtP2KcYrrCuNRfWJ4q5jsqpaRwLet8TLLvgH6zoBaYr7dDoSH8WVYqpPycLzG3

2 Likes

:warning: Important update :warning:

I made a significant update to the script. It now doesn’t need you to insert the instructions manually inside constants.js, but in order to do that it now requires the public validator keys instead of the public keys, which are not optional.

I would advise anyone who would like to update the script to delete its directory and set it up from scratch following the README.md.

3 Likes

There is a short discussion here Multiple vNodes on same host, re-use storage?
So isn’t it going to be a problem if 2 nodes try to use shared data/files ?

1 Like

Hello @radonm,

@J053’s script uses hard links which reference the files so there will be no issue for your nodes.

This is highly beneficial and recommended.

1 Like

Hard links means same file in different folders so it is shared data, it is the same file.

The script only hard links the old files. Basically uses your first node to bootstrap the other nodes. Past that point the nodes will use their own directory to store files.

It is the same concept as using my bootstrap script but saves space instead of copying the bootstrap files to each directory.

1 Like

It only hard-links .ldb files, which are static and never change, since they store the blockchain. It leaves the other files that need to change between nodes intact so the node can still work independently, as it should.

2 Likes

I fixed a little bug in the code. Please update it with git pull.