I do not consider SSD as safe when it comes to storing sensitive data (such as your wallet.dat) since in the event that you needed to wipe it out, you couldn't, that I know off. In classic HDD drives, you could delete it easily.
An easy way to wipe it, is simply remove it and then fill the disk with other data. Just copy your music collection until the disk is full, then remove it again.
So my idea was to try to make Bitcoin Core run faster by allocating chainstate files in an SSD, then store wallet.dat and blockchain files in an external HDD.
I have an SSD and HDD in my laptop. My wallet.dat used to be in my home directory, the rest of the Bitcoin Core data is on the hdd. Since the 0.15-upgrade though, Bitcoin Core doesn't allow the wallet.dat to be symlinked outside it's data directory.
I haven't tried to symlink the chainstate yet, if it improves speed I'll go that way. And you just gave me the idea to symlink the blocks-directory, so I can have my data-directory and wallet on my SSD again.
Normally, a program just follows any symlink the file system shows. I disagree with the way Bitcoin Core rejects a symlinked wallet.dat.
(im not sure how fast it will be with this method, but I heard that the important files to have in the SSD are the chainstate files
Normally, I just keep it running, but when it starts, it takes a while indeed. It does make sense faster access to chainstate can improve that.
I wouldn't be so happy storing it on a USB disk though, that risks unplugging and corrupting your data.
Test resultschainstate on hddWhen starting, "Verifying blocks" takes a long time.
Total time to start Bitcoin Core 0.15.1, and close it directly after popping up:
1m20.391s.
chainstate on ssdWhen starting, "Verifying blocks" is
much faster.
Total time to start Bitcoin Core 0.15.1, and close it directly after popping up:
0m22.246s.
For testing, I made sure my file cache was empty. All data has to come from disk while loading Bitcoin Core.
I'd say you're on to something
It's much faster, and as a bonus I can have my wallets on my ssd again. Thanks for giving me the idea!
The only drawback is that the chainstate directory performs many write actions, adding to the wear level of my SSD.
Basically, from your perspective, I did this:
cd ~/.bitcoin # my home directory is on the ssd
mv blocks/ /media/hdd/bitcoin/
ln -s /media/hdd/bitcoin/blocks blocks
You want to move your chainstate, so use some variation to this:
In ~/.config/Bitcoin/Bitcoin-Qt.conf , edit the location of your bitcoin data directory to point it at your USB-disk
strDataDir=/media/usd-disk/bitcoin
You'll need to format the usb disk with a Linux file system to deny other users access to that directory.
mkdir /home/directory-on-ssd/bitcoin
mv chainstate/ /home/directory-on-ssd/bitcoin/
ln -s /home/directory-on-ssd/bitcoin/chainstate chainstate