You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the checksum passes, it means the file was downloaded properly. The next step is to extract it.
74
74
75
-
lz4 -d {SNAPSHOT_FILE} | tar xf - -C /mnt/columbus4
75
+
lz4 -d {SNAPSHOT_FILE} | tar xf - -C /mnt/columbus5a
76
76
77
-
This command extracts the files into /mnt/columbus4/data (assuming /mnt/columbus4 is a separate storage disk). This can also take a long while (hours) to complete depending on the size and the speed of the disk.
77
+
This command extracts the files into /mnt/columbus5a/data (assuming /mnt/columbus5a is a separate storage disk). This can also take a long while (hours) to complete depending on the size and the speed of the disk.
Prepare the server by making the software components are in place. There is no need to download the blockchain snapshot since the data is already available for migration.
182
+
Prepare the server by making sure that the software components are in place. There is no need to download the blockchain snapshot since the data is already available for migration.
183
183
184
184
What _needs_ to be done is to re-attach the block storage when doing the migration.
185
185
186
-
To do the migration:
186
+
The steps for the migration:
187
187
188
188
1. Stop the old terrad server.
189
189
2. Unmount the storage volume.
@@ -193,42 +193,53 @@ To do the migration:
193
193
194
194
### Commands
195
195
196
-
Sync the client data over:
196
+
Before following the next steps, it is prudent to reboot the machine and re-run the SSH agent.
197
197
198
198
```bash
199
-
rsync server-a:.terracli ~/ -e 'ssh -p 22' -vzrc
199
+
sudo reboot
200
+
# After rebooting,
201
+
eval`ssh-agent`
202
+
ssh-add ~/.ssh/id_ed25519.pub
203
+
bash sync.sh
200
204
```
201
205
202
-
Create the following sync script in Server B:
206
+
Create the following sync script (sync.sh) in Server B:
Before following the next steps, it is prudent to reboot the machine and re-run the SSH agent.
227
+
Running the sync script will create three systemd service files in the home directory. They are to be moved to _/etc/systemd/system_ after checking for correctness.
228
+
229
+
The ownership of the files also need to be set to `root:root`
230
+
231
+
After doing so, the first service that can be executed with no problems is the price server.
222
232
223
233
```bash
224
-
sudo reboot
225
-
# After rebooting,
226
-
eval`ssh-agent`
227
-
ssh-add ~/.ssh/id_ed25519.pub
228
-
bash sync.sh
234
+
sudo systemctl daemon-reload
235
+
sudo systemctl start price-server.service
229
236
```
230
237
231
-
The sequence of commands below needs to be executed in quick succession.
238
+
The service can be confirmed to be running by executing `journalctl -u price-server.service -f`
239
+
240
+
### Actual migration
241
+
242
+
The sequence of commands below needs to be **executed in quick succession**.
232
243
233
244
```bash
234
245
# server-a
@@ -238,14 +249,30 @@ umount /dev/sda
238
249
239
250
# server-b
240
251
bash sync.sh
241
-
sudo mount -o discard,defaults,noatime /dev/disk/by-id/scsi-0DO_Volume_columbus4e /mnt/columbus4
252
+
# Check that the symbolic link works.
253
+
sudo mount -o nodiscard,defaults,noatime /dev/disk/by-id/scsi-0DO_Volume_columbus5a /mnt/columbus5a && ls -l ~/.terra/
254
+
# Update ownership
255
+
sudo chown -R $USER:$USER /mnt/columbus5a
242
256
sudo systemctl start terrad
243
257
```
244
258
245
-
Finally, the command to automatically mount the volume needs to be added to /etc/fstab
259
+
The command to automatically mount the volume needs to be added to /etc/fstab so that the volume is auto-mounted on reboot.
0 commit comments