-
Notifications
You must be signed in to change notification settings - Fork 104
Switching a block storage volume between droplets
This wiki article may be used if you have a block storage volume attached to a server which contains synchronised chains and wallet files, and want to create a new server without resyncing the chains or restoring wallet files.
Please note that support is not provided for such workarounds, which are not part of our standard technical knowledgebase. It is offered as-is and requires care when backing up wallets.
In your old server, stop the wallet daemons which currently use the volume, then unmount the volume:
supervisorctl stop all
umount /mnt/blockchains
Copy down the Ethereum seed from your old server:
cat /root/seeds/seed.txt
Create a droplet that's on the same DigitalOcean region as your volume.
In the 'Volumes' panel of DigitalOcean, click the dropdown next to the existing volume and choose to attach it to the new droplet.
Make note of the id indicated in the commands in thepop-up box after attaching. E.g., scsi-0DO_Volume_volume-nyc3-04
. (But DON'T run the commands DigitalOcean asks you to, as that will format the volume and lead to data loss.)
In the new server droplet, run the lamassu-install script.
Do the following, replacing two instances of scsi-0DO_Volume_volume-nyc3-04
with the id indicated above:
mkdir -p /mnt/blockchains
mount -o discard,defaults /dev/disk/by-id/scsi-0DO_Volume_volume-nyc3-04 /mnt/blockchains
echo '/dev/disk/by-id/scsi-0DO_Volume_volume-nyc3-04 /mnt/blockchains ext4 defaults,nofail,discard 0 0' | sudo tee -a /etc/fstab
Move any coin directories you have on the volume:
mv /mnt/blockchains/bitcoincash /mnt/blockchains/bitcoincash-old
mv /mnt/blockchains/zcash /mnt/blockchains/zcash-old
mv /mnt/blockchains/ethereum /mnt/blockchains/ethereum-old
Run and select the coins you intend to recover:
lamassu-coins
Stop the coins you just installed:
supervisorctl stop all
Move their newly created directories away:
mv /mnt/blockchains/bitcoincash /mnt/blockchains/bitcoincash-blank
mv /mnt/blockchains/zcash /mnt/blockchains/zcash-blank
mv /mnt/blockchains/ethereum /mnt/blockchains/ethereum-blank
Replace the Ethereum seed on the new droplet with that of the old:
nano /root/seeds/seed.txt
Move the old chain directories back:
mv /mnt/blockchains/bitcoincash-old /mnt/blockchains/bitcoincash
mv /mnt/blockchains/zcash-old /mnt/blockchains/zcash
mv /mnt/blockchains/ethereum-old /mnt/blockchains/ethereum
Start the daemons again:
supervisorctl start all