Resizing on Digital Ocean

Steps to resize and add volumes to new and existing droplets

Harmony ValidatorDAO
4 min readNov 16, 2021

Digital Ocean remains a popular cloud provider due to its quality and reliability. However the Digital Ocean server options are noticeably lower than the required storage space. We will be reviewing how to add a mounted drive in Digital Ocean to a new droplet, an old droplet and how to increase the size of your currently mounted drive.

Adding a mounted drive to a new droplet

First select your server.

Click on the Add block storage button.

Next select the 500 GB option at the time of writing but this can increase over time. Best to ask in the Harmony Discord or Validator Initiative Telegram Channel what the current status of the storage requirements are.

It is that simple! Now when you complete the droplet creation and your droplet finishes spinning up, the drive will be automatically mounted for you.

Adding a mounted drive to a old droplet

First select Volumes from the far left side menu.

Next select Add Volume

Fill out the Select Volume size. Select the droplet to attach the volume to and fill out your volume name. Lastly click on Create Volume.

Troubleshooting: So the volumes in Digital Ocean are suppose to attach automatically but in case of some error or you rebuilt the droplet, you will need to manually attach the volume.

Click on Volumes on the far left side menu and then click on the drop down arrow near the More. Then click on Config Instructions.

Follow the instructions on the popup window. Basically you’ll need to add the code from the lower code block on your server. This will allow the mounted drive to be recognized by the droplet.

Increase the Volume!

So you have added your volume but you need more! Again click on the Volumes from the far left side menu.

Click on the down arrow near the More and select increase size.

The far left option will be pre-filled with a 1 GB increase. Click on the box with the 501 GB and type in the amount you’d like to increase to. You can also select one of the other options available to the right side. The click the Resize volume.

🚨🚨!!WE ARE NOT DONE!!🚨🚨

Someone is going to miss this step. You have to resize the volume within your droplet. If you don’t remember your volume name and need a reminder, you can type:

ls -lha /mnt

Before you resize it is recommend you stop harmony.service with

sudo service harmony stop

NOTE: The name of your volume will be given in a format such as: volume_fra1_01. Notice the underscores. When you run the next command note it uses dashes and not underscores.

sudo resize2fs /dev/disk/by-id/scsi-0DO_Volume_volume-fra1–01

After that is it recommended to reboot the droplet.

Then remember to restart your harmony.service again.

sudo service harmony start

If you have any other tips, tricks or corrections, let us know in the comments below.

--

--