1-2: Add a volume
Blockchain nodes require a lot of storage and since the blockchain is growing, you'll also want the ability to add more storage when necessary. The Linode we setup in the last step only provides 160GB of storage. At the time of writing, Pocket requires ~160GB of storage itself. So, we'll need to add more storage to our Linode instance. We'll do that by adding a new volume to our Linode.
Adding a Linode volume is like adding a hard drive to your server. But unlike adding a hard drive with a fixed amounts of available space, Linode volumes can be resized. So, we can setup a volume with the space we need now, and expand it as the blockchain grows.
To add a Linode volume, do the following:
- Select the Volumes tab in the Linode web interface.
- Click the Create Volume button.
- Enter the following information:
- Label:
pokt001-data
- Size:
200 GB
- Region:
Fremont, CA
- Linode: [your-node-instance]
- Label:
After creating the volume, it will be attached to the Linode. You can confirm the volume is attached with the following command:
sudo fdisk -l
You should see the volume listed - it will be the one that is 200GB. Note the device file path which should look something like /dev/sdc
. You'll need that to create a partition and mount the volume.
Setting up the volume
Before you can use a volume, you need to create a partition on it and mount it. To do that, do the following:
Create a new partition using the following command:
sudo mkfs.ext4 /dev/sdc
Note: Replace
/dev/sdc
with the path from the last section.Create a new mount point using the following command:
sudo mkdir /mnt/data
Mount the new partition using the following command:
sudo mount /dev/sdc /mnt/data
Note: Replace
/dev/sdc
with the path for your volume.Verify that the partition was created by running the following command:
sudo lsblk -o NAME,PATH,SIZE,FSAVAIL,FSUSE%,MOUNTPOINT
Now that the volume is mounted, you can start using it. But we'll also want to make sure the volume gets mounted automatically when the server boots up.
Mounting the volume automatically
To mount the volume automatically when the server boots, do the following:
Edit the
/etc/fstab
file to mount the new partition automatically on boot:- Open the
/etc/fstab
file using nano.
sudo nano /etc/fstab
- Add the following line to the bottom of the file:
/dev/sdc /mnt/data ext4 defaults,noatime,nofail 0 2
Note: Replace
/dev/sdc
with the name of the disk you want to create a partition on.- Save the changes with Ctrl+O and then return
- Exit nano with Ctrl+X.
- Open the
Now that your Linode volume has been added and configured, we can move on to the next step.