Mist: How to change the blockchain dir?

Created on 6 May 2016  路  30Comments  路  Source: ethereum/mist

OS: Windows 7
Network type: main
Mist version: 0.7.2 (beta 16) ( https://github.com/ethereum/mist/releases/tag/0.7.2)

Hello guys,

I haven't found the option to move the blockchain directory from C:\Users\Title\AppData\Roaming.

Regarding bitcoin core, it was great UI button, where you just choose the path for storage of your blockchains. But what about Ethereum mist client? I don't have enough free space for ETH on my C disc. I have to download it in another disc's bin.

What could be a way to make it?

I would really appreciate your extended answer for that.
Thanks.

Most helpful comment

@MrBrighty try the following

  1. download the standalone version of geth (link) or use the binary geth.exe that is located under resources/node/geth/
  2. on the command-prompt navigate to the binary and run geth.exe --datadir "D:\Ethereum" (change this to fit your needs)
  3. run Ethereum-Wallet as you are used to (it will connect to geth)

All 30 comments

Unfortunately this not yet possible in Mist. Though it was proposed in https://github.com/ethereum/mist/issues/270.

In the meanwhile please try this workaround https://github.com/ethereum/mist/issues/210.

Thank you for a feedback,
Unfortunately, I'm not pretty good in coding, and as far as a I know, there is no way to change blockchain location on a Windows. So, we ll be waiting for release which will give me such option.

@MrBrighty try the following

  1. download the standalone version of geth (link) or use the binary geth.exe that is located under resources/node/geth/
  2. on the command-prompt navigate to the binary and run geth.exe --datadir "D:\Ethereum" (change this to fit your needs)
  3. run Ethereum-Wallet as you are used to (it will connect to geth)

@luclu
Yeah. something happened (I mean new bin was created for the nodes). Started to sync. Many thanks for that. I hope that sync will be smooth.

@luclu

One more thing, if you don't mind. I run the geth.exe via cmd with --datadir included. Then ethereum wallet.exe. Waiting for a sync. But in a 15 minutes, the space of chosen disc wasn't changed even by 100 mb. So i guess then download doesn't work.

Could you please check a screenshoot attached. I saw there "Warning". So, I did everthing correctly or not?

2016-05-07 09 55 52

@MrBrighty you forgot the backslash when specified the path.

@luclu
Yes, you're right, but it still doesn't work. I have been synchronizing for a 3 hours, and chosen bin wasn't changed at all. As bin had 274 bytes, so it has the same one now.
As summary:
1) Opened geth.exe --datadir "path" via cmd
2) Launched ethereum-wallet.exe
2016-05-07 14 35 54

Screenshoot is attached. Will be really happy getting your feedback.

@MrBrighty does this problem still occur with geth 1.4.3 (link)?

I succesfully created symlinks to a custom location for the chaindata directory. This works fine

@luclu first of all that you're keeping me in touch.
Yes, it still occurs, BUT i guess, I detected the root cause of not downloading the node.

The problem is in time synchronisation (please, see screenshot), but honestly, I don't have any idea how to solve this issue, because my computer time is synced automotically with time.windows.com.

Do you have any ides? Probably, some firewall actions prevents the download.

2016-05-12 21 18 02

Something seems to have stalled your OS's time sync. This might help you: https://github.com/ethereum/mist/issues/397

@luclu

Yes, I fixed it with clock sync. Moreover, I have downloaded 5 GB of blocks, but new issue came to my "lucky" head.

Do you know how to overcome it? :)

2016-05-17 20 23 01

Update to version 0.7.4. This includes geth 1.4.4 which could solve this for you.
If not, try to delete the file in question / the whole chaindata-folder.
I will close this as the initial question is answered, feel free to stay to here for discussion.

@luclu

Fair enough. So, for other people who could meet the same issue as me:

1) Download atomic clock sync
2) Open geth.exe --datadir "path" via cmd

Easiest option, link chaindata to a folder stored in an external drive;

rm -rf ~/Library/Ethereum/chaindata
ln -s /Volume/SomeExternalHDD ~/Library/Ethereum/chaindata

and then, run Mist again.

shit. I got windows

@Comodore125 you can follow these instructions:

Create the new folder for your chain data on desired drive with any name you want.

Move the contents of your Ethereum folder.

Delete the original Ethereum folder.

Run command prompt as admin.

Run "mklink /J linkdir datadir" such as "mklink /J C:\Users\Rewire\Etheruem D:\Etheruem"

This will create a symbolic link folder at Users\Rewire with a folder name of Ethereum that actually directs to D:\Ethereum when you open it.

Is there a GUI interface that can redirect it to D drive instead of manually put in the command? Can this be implement in the up coming release as the blockchain size is getting too big for the c drive now.

@mbbyc

Is there a GUI interface that can redirect it to D drive instead of manually put in the command?

Have a look here: https://encrypted.google.com/search?hl=de&q=windows%20mklink%20gui

Can this be implement in the up coming release as the blockchain size is getting too big for the c drive now.

This is low priority because of two reasons:

  1. light client functionality is in alpha stage and will be the default once maturated (soon), thus it will solve the problem for most users
  2. a more sophisticated GUI will be developed to interact with different nodes and their corresponding settings, though this takes some time

Actually in Windows there's JUNCTION and, just like Linux, you can create a link of the existing data folder to another one (even in another drive) as you see fit.
You can download junction from microsoft technet here: https://technet.microsoft.com/en-us/sysinternals/bb896768.aspx . No installation required.

So, in this case, you just need to stop geth, move the data folder to another drive/folder/path and create a junction from the original path to the new one.

Example:
Move the contents of "%USERPROFILE%\AppData\Roaming\Etherium\Geth" to "G:\Data\Geth" and wait for it to finish. Then execute (on a cmd prompt):
cd "%USERPROFILE%\AppData\Roaming\Etherium\"
junction -s "Geth" "G:\Data\Geth"

If you list the contents (dir) it will show something like:
05/11/2017 20:52 Geth [\??\G:\Data\geth]

Then just start geth. :)

As fclage has said you can use a symlink folder junction. Its a special kind of folder shortcut that's really easy to do. I made a video showing how to do it here https://youtu.be/1fHeUUbWthI

Since original post is for windows I would suggest to try the installer (Ethereum-Wallet-installer-0-8-10.exe) which is delivered with version >=8.10 with the releases : https://github.com/ethereum/mist/releases
It will ask you for the folder where to install the soft and another folder where to store the chain. (BTW Thx for the creator of this installer. I think it will make the process smoother for newcomer).
Hope it help.

charly37 no such thing as new or not or smooth or not or more or lesssx

On a mac, you may need to symlink the folder instead. On Windows, the equivalent of symlinking a folder (junctions) seems to work.

Junction.exe is quite a useful tool for Windows users! Upvoted, since I didn't know if its existence. Helped me out a lot more than just with Geth. Put it in your %PATH% to use it anywhere.

@charly37
I'm trying to download the blockchain data in a different drive other than C.
I used the installer and provided a drive D location for Blockchain data to store.
Even then the data is downloading in C drive (C:\Users\Appdata\Roamingchaindata...).
Could anyone help me in this regard?

You just need to change the shortcut to the wallet.
In the example below my Ethereum Wallet.exe is located:
C:\Ethereum-Wallet\Ethereum Wallet.exe

While my geth store (where the 150GB node information is stored is
e:\Ethereum

Shortcut Example:
right click properties on your windows short cut to the wallet:
"C:\Ethereum-Wallet\Ethereum Wallet.exe" --node-datadir="e:\Ethereum"

WARNING:
your datadir is also the place where your cryptokeys are stored so you will want to make sure that , that directory is only accessible by your windows user account

datadir look like this
\geth
\keystore

@RiskyFire thanks for this video. It helps me to fix error "Cannot create a file when that file already exists." when trying to link folders.

You just need to change the shortcut to the wallet.
In the example below my Ethereum Wallet.exe is located:
C:\Ethereum-Wallet\Ethereum Wallet.exe

While my geth store (where the 150GB node information is stored is
e:\Ethereum

Shortcut Example:
right click properties on your windows short cut to the wallet:
"C:\Ethereum-Wallet\Ethereum Wallet.exe" --node-datadir="e:\Ethereum"

WARNING:
your datadir is also the place where your cryptokeys are stored so you will want to make sure that , that directory is only accessible by your windows user account

datadir look like this
\geth
\keystore

I did exactly this, apart from picking a directly on another drive.
When running mist wallet via shortcut as these directions state, after moving the ethereum \get and \keystore folders into the new WANTED location. Ethereum then errors out when connecting to the node with the following report

Couldn't connect to node? See the logs for more
Node type: get
Network: main
Platform: win32 (Architecture ia32)

It seems like the node couldn't be started. Do you already have one running? Is it upgrading the database right now?

Since I thought maybe it was a permission issue, I ran the wallet via the shortcut in administrator mode.
Still didn't work. Same error.

Running build 093

I'd prefer not using a systemlink, and as a matter of principle this far into development, there really should be variables used for ethereum node folder location that is set by the end user. It doesn't make sense, so I would rather assume I am just missing something with a new setting somewhere or some other simple fix built into the coding already?

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

Was this page helpful?
0 / 5 - 0 ratings