Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: cellard on November 07, 2017, 04:50:00 PM



Title: Running out of space
Post by: cellard on November 07, 2017, 04:50:00 PM
Suppose my node is running out of HDD space on my computer, and I have an USB external HDD that I could use to continue downloading the blockchain. How do I do this?

What I mean is, if the latest blk file is "blk01051.dat", how do I point Bitcoin Core to keep downloading from there in the new HDD so I can keep the whole blockchain? (I don't want to use pruned mode)


Title: Re: Running out of space
Post by: achow101 on November 07, 2017, 05:02:49 PM
You can't do that.

The best you can probably do is to set your datadir to be the external drive and then have symlinks for all of the files in the blocks folder that link back to the internal drive. However you will need to move the chainstate folder and basically all other files in the datadir to the external drive.

It would be better for you to just use the external drive for the datadir rather than trying to do some split drive thing.


Title: Re: Running out of space
Post by: cellard on November 07, 2017, 05:09:38 PM
You can't do that.

The best you can probably do is to set your datadir to be the external drive and then have symlinks for all of the files in the blocks folder that link back to the internal drive. However you will need to move the chainstate folder and basically all other files in the datadir to the external drive.

It would be better for you to just use the external drive for the datadir rather than trying to do some split drive thing.

What do you call "datadir"? the entiretiy of the "Bitcoin" folder? the "blocks" folder + "chainstate" folder?

So anyway from what I understood, it is a bad practice to try to divide the blockchain in 2 with symlinks or otherwise and I should keep everything inside a single HDD?

But this implies that the blockchain will grow slow enough to not be bigger than the current biggest HDD's? For example a "Seagate Archive HDD 8TB SATA3" would serve me for years... assuming that Bitcoin manages to remain Bitcoin at 1MB blocksize.


Title: Re: Running out of space
Post by: Lauda on November 07, 2017, 05:27:54 PM
What do you call "datadir"? the entiretiy of the "Bitcoin" folder? the "blocks" folder + "chainstate" folder?
The whole Bitcoin folder.

So anyway from what I understood, it is a bad practice to try to divide the blockchain in 2 with symlinks or otherwise and I should keep everything inside a single HDD?
Yes.

But this implies that the blockchain will grow slow enough to not be bigger than the current biggest HDD's?
No. You can use RAID, e.g. RAID 0 or Raid 5.

For example a "Seagate Archive HDD 8TB SATA3" would serve me for years... assuming that Bitcoin manages to remain Bitcoin at 1MB blocksize.
4 disks of that kind would give you 32 TB in RAID 0, and 24 TB in RAID 5.


Title: Re: Running out of space
Post by: LoyceV on November 07, 2017, 09:26:56 PM
So anyway from what I understood, it is a bad practice to try to divide the blockchain in 2 with symlinks or otherwise and I should keep everything inside a single HDD?
I've done this with many (non-Bitcoin) files for a long time: simlinking them to show up in several directories on different disks is very well possible. I used a script to create and delete all simlinks.
But: it's very tricky, back in those days I was much more limited on disk space, and I wouldn't recommend doing it. In general, it's much, much easier to keep your data in one directory, unless it's absolutely necessary.
Linux doesn't care if blk00297.dat is a simlink to a USB-stick and blk00624.dat a simlink to a network mount, but if one of those is offline, Bitcoin Core does care.