0

My node has two SSDs and the first one is filling up. The second one still has ~230GB available and I would like to move old blockchain data over there to free up an equivalent amount on the first drive.

How can I do that? The node is running on an old Win7 machine.

2
  • How about moving 'datadir' onto the other disk?
    – pisjatblin
    Commented Dec 14, 2020 at 19:58
  • not an option. The datadir is way bigger than my second SSD. That's why I have to split the blockchain data. Commented Dec 17, 2020 at 21:39

2 Answers 2

0

You can either move a whole folder to you other disk and link it back to your original location with soft links, or move the files and make hard links for all of them.

The windows command for doing this is mklink. It's like creating shortcuts to files in other locations/drives.

I've only tested creating soft links (I moved index folders from HDD to SDD for speed) and I can confirm it works. I think hard links should work as well.

In your case, moving the folders wouldn't solve your issue, since the data would still be on only one drive. So the solution would be to move the large files to your "empty" disk and make hard links for all those files.

5
  • Thanks! Moving only large files is not an option since those only amount to around 30GB. Ended up using this awesome tool to to be able to quickly create soft links to all files in one go: schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html Unfortunately it can't create hard links of files to another drive. But at least so far it's working with soft links. Commented Dec 15, 2020 at 22:13
  • It seems hard links aren't possible between 2 drives in Windows. If you soft link all your folders to a different drive, then this is not different than changing the bitcoin default directory and moving all folders there. If you soft link only some folders though, you can effectively split your bitcoin data into 2 drives. Also, "large files only amount to 30GB" - well, files amount to 100% usage on the disk, so I'm not sure what you wanted to say.
    – GChuf
    Commented Dec 16, 2020 at 8:13
  • I was referring to your comment: "So the solution would be to move the large files" Assuming you meant to only move a few large files and manually create hard links. This isn't practical, since not enough large files exist. The only solution is to move thousands of small files from the .\blocks folder and create soft links to each one of those files. The afore mentioned tool can indeed create soft links to individual files, not just folders. So since bitcoind keeps running fine and the log has no complaints, I assume everything is working. Commented Dec 16, 2020 at 9:08
  • Not 100% sure though, since it's possible to ctrl+x old block data out of the .\blocks folder while bitcoind is running and everything seems to keep running fine as well. Not sure how to test if bitcoind actually is happy with those soft links I created... Commented Dec 16, 2020 at 9:32
  • I understand now. You could test it with --reindex-chainstate I think - that should look for the blocks you have on your disk and rebuild the chainstate. Might take a while though. Consider accepting the answer if you think it answered your question :)
    – GChuf
    Commented Dec 17, 2020 at 8:51
0

Raid 0 could save you some headache. See wikipedia.

2
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Feb 18, 2023 at 11:21
  • No, bot, actually RAID is a well known concept and the nitty gritty details on how to achieve it out of scope here. Commented Feb 18, 2023 at 12:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.