Page cover image

Mount Deka NFS in Instance

This section explains how to install Deka NFS on a Virtual Machine (VM) on an Instance that uses the Linux operating system with the Ubuntu distro through several stages.

Add Deka NFS Configuration

For the first step, make sure you have added the Clients configuration to the Deka NFS configuration. To see the steps for adding Client configuration in Deka NFS, see sub-chapter Create Deka NFS.

Add Deka NFS Configuration

After creating the Deka NFS configuration in your project, add the Client configuration to the Deka NFS configuration. For a more detailed explanation, see sub-chapter Add Client.

Add Client in Deka NFS Configuration

You can see on the NFS Details page, the IP address used by Deka NFS is 15.15.15.206. This IP address will be used when you add a Deka NFS configuration to the VM.

IP Address Deka NFS Configuration

Install NFS Client

This section explains the steps for installing the NFS Client package on a virtual machine (VM) in an Instance by opening the VM console in the Instance menu.

Open Console

After logging into the VM by entering the Username with root and Password used, you can run this syntax command. If the OS used is Ubuntu and Debian running this syntax.

sudo apt update
sudo apt install nfs-common
Installing NFS Client Packages
Installing NFS Client Packages

If the OS used is CentOS and Fedora, run this syntax.

sudo yum install nfs-utils

Mounting

There are two ways to install, namely manually and automatically.

If you mount manually, this configuration will only last until the Virtual Machine (VM) on the Instance is on. So you will need to reconfigure if your VM is restarted.

If you mount automatically, you don't need to reconfigure it when your VM is restarted, because the Deka NFS configuration is already saved in the System Table File in the etc directory.

Manually Mounting

The first step for manual mounting is adding a backup folder in the var directory by executing the syntax below.

sudo mkdir /var/backups
Manually Mounting (a)

The next stage is to pair the IP address obtained after creating Deka NFS and link it to the file system in a certain directory. When adding the Deka NFS configuration, you get the IP address 15.15.15.260. The shared directory on the server is /mnt/nfs and /var/backups is where it is installed locally. If you don't get a message in response, the command should run successfully.

sudo mount -t nfs [IP Address - Server NFS]:/mnt/nfs /var/backups
Manually Mounting (b)

To ensure that Deka NFS is mounted on the VM in the Instance, run this command to see the mounted file systems.

df -h
Manually Mounting (c)

Automatically Mounting

In this section, use the /etc/fstab file. This file is read at boot time and contains a list of entries that determine where, how, and what file systems should be mounted in Linux when the system starts. In the first step, add the backup folder in the var directory by running the syntax below. If you already have a backup folder in the var directory, then you can skip this step.

sudo mkdir /var/backup
Automatically Mounting (a)

The next step, open the fstab file using a text editor by running this command

sudo nano /etc/fstab
Automatically Mounting (b)

Add the following syntax into the fstab file.

[IP Address-Deka NFS]:/mnt/nfs /var/backup nfs defaults 0 0
Automatically Mounting (c)

Exit the fstab file page on the keyboard on your computer by pressing the ctrl key together with the x key and pressing the Enter key. Run this command to mount the configured Deka NFS on the VM.

mount /var/backup
mount [IP Address - Deka NFS]:/mnt/nfs
Automatically Mounting (d)

To ensure that Deka NFS is mounted on the VM in the Instance, run this command to see the mounted file systems.

df -h
Manually Mounting (c)

After running this command, when you turn on the VM it will automatically read the contents of the /etc/fstab file and install the Deka NFS configuration.

Last updated