Guide: Migrating to a bigger and better SSD

With the merge looming ahead, depreciation of the fallback client options, and general fatigue with regular pruning, I decided to migrate my chain data from a 1TB to 2TB SSD (installed on the same device.) I’ve seen multiple people asking for a guide on how to do this in the RP discord, so wrote up the steps I took. I’d appreciate any feedback from the seasoned Devs here to make improvements to the draft and we can hopefully get some manifestation of this uploaded to the Rocketpool Docs.


At a certain point, Rocketpool node operators using a 1TB SSD will need to upgrade to a 2TB SSD (or larger) even if regularly pruning. You can follow these steps to migrate your docker containers to a secondary SSD mounted locally, without re-syncing the the entire blockchain from scratch.

Stop rocketpool to shut down the docker containers:

`rocketpool service stop`

Then check for the docker root directory field by pulling up general docker information:

`docker info` 

The default for an Ubuntu installation is var/lib/docker. Now that you know where to copy the docker volumes from, docker can be fully shut down:

`sudo systemctl stop docker`

Follow the rocketpool guide for mounting and formatting your new drive in the Rocketpool docs. Make sure to take note of the drive path you’ve chosen for the new drive (e.g. mnt/rpdata)

Now you can run rsync to copy your existing docker containers to the new drive:

`rsync -avxP <docker root directory>  <new drive path>`

It should look something like this:

rsync -avxP var/lib/docker mnt/rpdata

Note: rsync is included by default by most linux distributions, but if you do not have it for whatever reason, you can install it with the command:

`sudo apt install rsync`

The file transfer will take some time depending on read/write speeds. Once it is completed, follow the rocketpool guide for creating a .json file pointing docker to your new mount point:

Now start up docker to reload the system deamon:

`systemctl start docker`

It’s a good idea at this point to make sure that the docker images are now referencing the new mount point. Run the command:

`docker images` 

Now check for an image id entry corresponding to a rocketpool docker repository (any of them should work) and use the following command to check its file location:

`docker inspect  <image_id> | grep WorkDir`

The returned “WorkDir” path should start with your new drive’s mount point (e.g. “/mnt/rpdata/docker/…”) At this point, you can restart the Rocketpool service:

`rocketpool service start`

Keep an eye on your validator and make sure that it starts attesting as usual. If you had Grafana set up previously, it should automatically start reflecting the new drive’s storage space. Congratulations on all that fresh silicon!

5 Likes

I was facing the same problem. For me the easiest solution was using Clonezilla. (https://clonezilla.org/)

Clonezilla can be downloaded as ISO image, which is used to create a bootable USB stick. The node can then be cloned as follows:

  • Clonezilla Live Doc
  • Boot the node system (I have a NUC) using the bootable USB stick. You can boot to RAM so that the USB stick can be removed, which frees up a USB port (if necessary)
  • I attached the new SSD using a cheap USB adapter (NVME M.2 to USB-C)
  • Follow the Clonezilla instructions and carefully select source and destination disks. It is important to use “Expert Mode” and set option -k1. This expands all partitions proportionally to the new disk size.
  • In my case the clone process took about 45 minutes. Thereafter, you shutdown the NUC, switch SSDs and start up the system. The new SSD is an exact copy with larger disk size. It should just continue validating.

I followed this route as it is absolutely fail safe. There is no need to set up the operating system on the new SSD. As the NUC is booted from the USB stick, the regular operating system incl. all services is inactive and can safely be cloned. All existing settings are preserved. In case the clone process fails, I can just keep validating with the existing SSD.

I have to add that I run my node in native mode without the docker containers. My NUC only has one NVME M.2 slot so that I couldn’t just add a second SSD.

Please absolutely make sure to not boot again from the old SSD as this can cause a slashing event, in case there are two validators running in parallel using the same set of keys. I explicitly wiped my old SSD using safe erase.

3 Likes

I’m wondering about using rsync to copy the images to the second SSD…
Is there some slashing risk in leaving the original copy of the images around if they somehow became activated in the future after the new SSD has been used for awhile? What is the significance of using rsync as opposed to mv to move the files?

adding the link for a helpful guide written by Remy Roy also

sourced from ethstaker

Great guide. Mostly followed it. I noticed that although I selected the -k1 option in clonezilla my partition / filesystem still was stuck at the size of the original disk.

I used GParted to allocate the unused space, and then followed the instructions in this thread to expand the logical volume and file system.