I have an external drive that I want to store my blockchain on. I gather that I can make a symlink to my .bitmonero folder so the blockchain automatically gets stored on the external drive but I don't know how to do it. Can anyone walk me through setting this up?
1 Answer
The simplest and most portable approach is provided by dEBYUNE above. The --data-dir can also be defined in the monero node's configuration file so it does not have to be passed as an argument of the monerod CLI.
Otherwise, a UNIX only approach is provided below.
Step 0 - make sure monerod is not running
Step 1 - make sure the owners, groups and permissions of the external directory are the same or appropriate for your system's permission security model.
Step 2 - make a relative path tape archive (tar) file of your ~/.bitmonero file.
% cd ~
% tar cvf /your_desired_external_drive_path/.bitmonero.tar .bitmonero
% cd /your_desired_external_drive_path
% tar xvf .bitmonero.tar
Step 3 - rename your original .bitmonero directory. (Can delete after step 6 after confirming monerod is functioning reliably.)
% cd ~
% mv .bitmonero original.bitmonero
Step 4 - make a relative .bitmonero directory link
% ln /your_desired_external_drive_path/.bitmonero .bitmonero
Step 5 - confirm link was made properly by:
% ls -l .bitmonero
Step 6 - start your monero daemon the way you did previously, in this case --data-dir becomes optional.
monerod
can be configured to use another data directory.--data-dir
flag. See: monero.stackexchange.com/questions/7225/…