Grid Guides

Explore How System On Grid Can Work For You

Grid GuideGrid Guide Topics


Mounting a Secondary Volume to your Orbit


Introduction

If your original orbit does not have enough space for you to work with, we provide a simple way to create and attach extra volumes to your current orbit. You can create a new volume or you can clone a volume that you currently have on your account.

Prerequisites

  • There are no major prerequisites required to create a volume. You will only be required to have an existing volume if you wish to clone and an orbit if you wish to attach your volume to said orbit.

Creating a Volume

  1. To create a volume, first navigate to the “My Volumes” tab.

    My Volumes
  2. Once there, you can name your volume that you are going to create. Aside from naming your volume, you need to specify what size you wish for it to be. Lastly, if you wish, you can attach the volume you are about to create to an existing orbit from the drop down list.

    Create Volume

Checking an Attached Volume

  1. Now assuming that you have attached the volume to an orbit, you can check to see if it is properly attached. First use SSH or console to log in to the Orbit with user that has sudo privileges.

  2. The following command will display all block devices that you have on your orbit.

    sudo lsblk
    Create Orbit

    Generally the root volume that your orbit was created with will be the first one or “vda” based on the screenshot. The newly created and attached volume should be after your root volume in this case “vdb”.

Creating a Partition on the Volume

    Now we have a newly created and attached volume but it’s still not ready for use. In this section we will prepare the volume that way it can be mounted and used by you. We first need to create a new GPT disk label, a partition that will span the size of the volume and format it with the EXT4 filesystem

  1. Run these commands in this order

    sudo parted /dev/vdb mklabel gpt
    sudo parted /dev/vdb mkpart primary ext4 0% 100%
    sudo mkfs.ext4 /dev/vdb1
  2. The following command will confirm that everything was created.

    sudo lsblk
    Create Orbit

    Here you can see a new partition named “vdb1”. This will be the partition we will mount to our Orbit next.

Mounting the Volume

  1. Now we need to create a mounting point for this volume. Run the following command.

    sudo mkdir /mnt/vol2-p1
  2. Next we need to edit your /etc/fstab file so that the new partition will be mounted persistently.

    echo '/dev/vdb1 /mnt/vol2-p1 ext4 defaults 0 2' | sudo tee -a /etc/fstab

    Note: before you detach the volume from dashboard, make sure you remove this partition from /etc/fstab

  3. Finally mount all the partitions mentioned in fstab

    sudo mount -a
  4. Once again run the command “sudo lsblk” to see the volume that you just created and the new mounting point.

    LSBLK

    Now you can start using this new volume by storing data in /mnt/vol2-p1 directory. Since we have update the /etc/fstab file, even after reboot, the volume will still be mounted.