ethereum / mist

[DEPRECATED] Mist. Browse and use Ðapps on the Ethereum network.
http://ethereum.org
GNU General Public License v3.0
7.44k stars 2.12k forks source link

Be able to set or change the directory of the blockchain #210

Closed Codes4Fun closed 8 years ago

Codes4Fun commented 8 years ago

Currently defaults to my user folder which is on my system drive which is an SSD and doesn't have a lot of room, would rather store it on my archive drive but I don't see how to change this, and it didn't give me an option to set this in the beginning.

So it would be nice to be able to set the path of where to store the blockchain.

I'm guessing, since it uses geth by default I can just configure geth to use a different folder.

Codes4Fun commented 8 years ago

I tried hacking the code to do this by modifying modules/ethereumNodes.js and adding an argument for datadir (copied the data to that directory) but on launch Mist couldn't find geth and recommended passing an ipcpath, which I added to ethereumNodes.js and that also didn't work, so I took those arguments and just ran geth outside of mist and geth ran fine and Mist was able to find it.

It would be nice to get Mist to launch geth with those arguments though, maybe if I get more time I can look at that.

Codes4Fun commented 8 years ago

So I took a peak at some of the old logs and I found that it seems like the quotes (") around the directory were in the log when it failed but running it manually the quotes are removed. I'm not sure why the quotes are treated differently when launched from Mist, but when I get a chance I will try removing the quotes, as I am not sure if they are necessary (even though in their own example they show quotes, and every where else I look on the web everyone is using quotes).

Codes4Fun commented 8 years ago

I figured it out what I was doing wrong, the quotes I discovered are automatically removed when run from the command console, but using child_process.spawn the expectation is the quotes are already removed. So what works for the console doesn't necessary work for nodes spawn.

But here is an example of getting geth to use a different data directory: args = (type === 'geth') ? ['--fast', '--datadir', 'G:\\Ethereum'] : ['--unsafe-transactions', '--master', pw];

It turned out I didn't need ipcpath but in case someone does this also works: args = (type === 'geth') ? ['--fast', '--datadir', 'G:\\Ethereum', '--ipcpath', '\\\\.\\pipe\\geth.ipc'] : ['--unsafe-transactions', '--master', pw];

frozeman commented 8 years ago

We could add this, but as you found out starting your own node works as well. Will add this in the future, but has low prio right now

Ryan1981 commented 8 years ago

Hi There,

Could you try and clarify how I can start geth with a different datadir so that etherwallet uses this instead? I am really new to all this and have no programming experience so I can't really use what was typed above. I currently use geth on windows 7 64 bit and have the latest release of ether-wallet. To make it as easy as possible for me (and other users) i would like the command line I have to put in my batch file with the following directories used:

D:\Ethereum (this has a folder called chaindata, nodes etc) D:\Ethereum\Ethereum-Wallet-win64-0-5-2 (this is the installation folder of Ethereum Wallet with the exe)

Thank you very much for your time!

Regards,

Ryan

MrShackleford commented 8 years ago

I am launching from a batch file with folders referenced locally. I do this with bitcoin and all other alts. Shit embedded into the user profiles is convoluted and asking for trouble. I like to run coins worth anything from mounted true crypt containers. Easy to back up and flexible. start .\resources\node\geth\geth.exe --datadir ".\Ethereum" timeout /t 1 start .\Ethereum-Wallet.exe exit

if the wallet exe starts to soon it will bitch and start to create another ethereum folder in the user profile.

Ryan1981 commented 8 years ago

Thanks that workt :dancer:

ronoudgenoeg commented 7 years ago

For anyone running into this issue in the future and found this thread, a seperate option is to create a symlink from the AppData/Roaming/Ethereum directory, to the directory you actually want the files in.

Obviously replace "Username" with the correct user.

Hope this helps anyone.

dzodzo666 commented 7 years ago

why do users need to make any workarounds and this isn't possible to code directly into ethereumwallet.exe? i'm not a computer virgin but it's not quite that user-friendly

madorian commented 7 years ago

I have to make a symlink, cause devs can't even make an option where to store this gigantic file? I just feel like saying lots of dark words right now.

stefek99 commented 7 years ago

For some time I had the Ethereum blockchain on my machine.

Exactly 0 photos, 0 videos, 0 music.

But it grew and grew and I ran out of files to remove.


A few moments ago purchased 4TB external HDD, downloading Bitcoin blockchain - they are gentle - they warn:

Blockchain is big, it likely to use some space and bandwidth

Still no UI option to change the directly of Ethereum blockchain?

It's not internet in 1995, it's internet in 1968 😇

halibit commented 6 years ago

working solution for me is start start_geth.bat at first and after Geth start sync, the wallet.exe with light mode db is not so huge (1.5Gb for now).

Example: start_geth.bat geth.exe --datadir "D:\ethereum" --light --cache=2048 console

dzodzo666 commented 6 years ago

i'd still call that a workaround and not a solution :)

THX1959 commented 6 years ago

This is a huge inconvenience with no clear documentation and no clear explanation from the exalted crypto dev...

"We could add this..." but we'd rather just waste users' time on stupid basic file management crap that corporate devs include BY DEFAULT. After all, we already demonstrated our genius by unleashing this massive distributed storage mechanism, and we just think you should be so in awe of it in all its unbelievable inefficiency that you should happily have to worry about EVERY SINGLE MINUTE DETAIL IN ITS USE.

snowkidind commented 6 years ago

Guys really? This makes this software unusable.

jcklpe commented 6 years ago

I was having trouble with this, so I looked up to see if this was still an issue... and the last person commenting was 6 minutes ago. So I guess it is. Yeesh

lock[bot] commented 6 years ago

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.