Manually Mount a Block Storage

Our provisioning system always attempts to attach and automatically mount a volume on your VPS server. However, due to the customisations that you may have done on the server, it may happen that the mounting of the volume may fail.

In such cases, you can SSH to the VPS server and follow the steps below to mount the volume on your VPS. 

  1. Partitioning of the volume.

    A raw volume needs to be partitioned with a filesystem before you can store any data on it. To format it with EXT4 filesystem, run the following command. sudo mkfs.ext4 /dev/vdb The subsequent volumes on the same VPS, will appear as /dev/vdc, /dev/vdd, and so on.

  2. Creation of a directory or mount point.

    Every device in Linux system can be accessed through a mount point for which you will need to create a directory. We recommend to use the given naming convention for directory name for easy identification. sudo mkdir /mnt/vol-us-1

  3. Mounting the partition on the server

    This step makes the volume accessible through a mount point. sudo mount -t ext4 /dev/vdb /mnt/vol-us-1 Please use the appropriate device and mount point names from the earlier steps.

  4. Updating /etc/fstab

    In order to make the volume persistently mounted on the server, you will need to update the fstab file. You will lose all the above settings upon restart if you skip this step. bin/bash -c "if [ $(cat /etc/fstab | grep -i /dev/vdb | awk '{print $1}')!="/dev/vdb" ]; then sudo bash -c 'echo \/dev/vdb /mnt/vol-us-1 ext4 defaults,nofail,discard,noatime 1 2\ >> /etc/fstab';fi"