Mounting a volume

Xongl Docs

Mounting an Volume

After attaching an volume you have to manually mount it to your VPS to use it

Step 1

Finding the volume

  • ssh into your VPS
  • run
lsblk -o NAME,SIZE,TYPE,MOUNTPOINT
  • vda is the main volume, you are not supposed to touch it, there would be other volumes with names like sda, sda1, sda2 etc., confirm it by checking the SIZE
  • SIZE would be same as to the size of volume you attached in the beginning
  • The TYPE would be disk for the volume and MOUNTPOINT would be empty
  • Let's say NAME sda is of SIZE 30G, it is the required volume, I'll use sda in the steps below as an example

 

Step 2

Mounting the volume

  • First change the file system of the disk to ext4
mkfs.ext4 /dev/sda
  • Mount it to the desired location, by creating a directory. Let's say I want to mount the volume to /home/data/vol1, then
mkdir -p /home/data/vol1
  • Now, to mount it, requires sudo permission
mount /dev/sda /home/data/vol1
  • Lastly, create an entry in /etc/fstab to retain the mount after reboot, requires sudo permission
nano /etc/fstab
OR
vim /etc/fstab
OR
gedit /etc/fstab

Make an entry like this, /dev/sda being the disk

/dev/sda /home/data/vol1 ext4 defaults 0 0

 

Step 3

Checking if the volume was successfully mounted or not

  • run
lsblk -o NAME,SIZE,FSTYPE,TYPE,MOUNTPOINT
  • After following the steps above, the FSTYPE should reflect ext4 for the NAME sda
  • MOUNTPOINT should show /home/data/vol1 for the NAME sda
  • If the values are correct then the volume is ready to use

  • 66 Users Found This Useful
Was this answer helpful?

Related Articles

How to connect to your Cloud Server

Download PuTTY. The "putty.exe" download is good for basic SSH. Save the download to your...

Deploying a VM

Step 1. Login into Xongl Cloud panel.Step 2. For first time use add some credit to account.Step...

How to create SSH Keys for Windows and MacOs or Linux

Step 1: Generating SSH keys: Select steps according to your operating system. For Windows:1....

Uploading/Downloading files using SFTP for Windows Server

Uploading/Downloading files using SFTP Grab WinSCP and install it:...