How to move DB’s to SSD on Docker

Is this supposed to move the trash across as well?

no, and it likely may make it worse or could not work at all, because pieces moved to the trash using the OS functions, in case of the same drive it’s just update a pointer on filesystem, in case of different drives it will be forced to copy the piece to the destination, then delete it from the source, so much more I/O.

Well, the trash directory is in the storage directory. And this post mentions nothing of that. How can I work around this?

no good way. Only databases can be moved.
There are tricks, but symlinks doesn’t work. I would not help you to destroy your node, sorry :slight_smile:

2 Likes

So should I just manually copy over the db files to my SSD and leave the trash?

You may follow the guide from the top message, it’s working.

I moved all the db* files and it’s working. The guide need more details in my opinion. Thank you.

You can mention those details so someone else can find them useful.

2 Likes

How can I put this in docker run command?

storage2.database-dir: "dbs"

I don’t want to use the config anymore, just the docker run command. It’s more convenient. Thanks!

1 Like

You linked the thread were we are right now! :unamused:
I read the first post, but didn’t answeared my question.
Found it:
https://forum.storj.io/t/how-to-move-db-s-to-ssd-on-docker/7064/35?u=snorkel

Yes, that’s why you have to read the whole thread not just the first post :slight_smile:

3 Likes

I was on lazy mode :rofl:

2 Likes

How to check the correct database path in Windows?
I’ve made all mentioned above, the node is running but I don’t know wether it from new path on SSD or from the old one on HDD.

The above points mention .shm and .wal files. Check their time stamp on new location ?


there is no such files in new location and they are missed on different nodes storage folder also.

the command line is:

docker run -d --restart unless-stopped --stop-timeout 300 -p 28968:28967/tcp -p 28968:28967/udp -p 127.0.0.1:14002:14002 -e WALLET="YYY" -e EMAIL="XXX" -e ADDRESS="ZZZ:28968" -e STORAGE="11TB" --mount type=bind,source="G:\identity\storagenode",destination=/app/identity --mount type=bind,source="G:\data\",destination=/app/config --mount type=bind,source="Z:/storagenode1/dbs",destination=/app/dbs --mount type=bind,source=D:/Storj/Logs/node1.log,destination=/app/logs/node1.log --name storagenode1 storjlabs/storagenode:latest  --log.output=/app/logs/node1.log

Check the forward and backward slashes

checked and fixed:

docker run -d --restart unless-stopped --stop-timeout 300 -p 28968:28967/tcp -p 28968:28967/udp -p 127.0.0.1:14002:14002 -e WALLET="YYY" -e EMAIL="XXX" -e ADDRESS="ZZZ:28968" -e STORAGE="11TB" --mount type=bind,source="G:\identity\storagenode",destination=/app/identity --mount type=bind,source="G:\data\",destination=/app/config --mount type=bind,source="Z:\storagenode1\dbs",destination=/app/dbs --mount type=bind,source=D:\Storj\Logs\node1.log,destination=/app/logs/node1.log --name storagenode1 storjlabs/storagenode:latest  --log.output=/app/logs/node1.log

but still elevates via old path

found an issue:
I’ve edited config.yaml on different node.

looks like the node goes.