# 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](/storage/deka-nfs/create-deka-nfs.md).

<figure><img src="https://putri.box.cloudeka.id/cloudeka-assets/static/images/26dekanfs/26.17%20add-conf-nfs.png" alt=""><figcaption><p>Add Deka NFS Configuration</p></figcaption></figure>

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](/storage/deka-nfs/detail-deka-nfs.md#add-client-nfs).

<figure><img src="https://putri.box.cloudeka.id/cloudeka-assets/static/images/26dekanfs/26.18%20add-client.png" alt=""><figcaption><p>Add Client in Deka NFS Configuration</p></figcaption></figure>

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.

<figure><img src="https://putri.box.cloudeka.id/cloudeka-assets/static/images/26dekanfs/26.19%20ip-add.png" alt=""><figcaption><p>IP Address Deka NFS Configuration</p></figcaption></figure>

## 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.

<figure><img src="https://putri.box.cloudeka.id/cloudeka-assets/static/images/26dekanfs/26.20%20open-console.png" alt=""><figcaption><p>Open Console</p></figcaption></figure>

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
```

<figure><img src="https://putri.box.cloudeka.id/cloudeka-assets/static/images/26dekanfs/26.21%20installing-package-a.png" alt=""><figcaption><p>Installing NFS Client Packages</p></figcaption></figure>

<figure><img src="https://putri.box.cloudeka.id/cloudeka-assets/static/images/26dekanfs/26.22%20installing-package-b.png" alt=""><figcaption><p>Installing NFS Client Packages</p></figcaption></figure>

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.

{% hint style="info" %}
If you mount <mark style="color:red;">manually</mark>, <mark style="color:red;">this configuration will only last until the Virtual Machine (VM) on the Instance is on</mark>. So you will need to reconfigure if your VM is restarted.
{% endhint %}

{% hint style="info" %}
If you mount <mark style="color:red;">automatically</mark>, <mark style="color:red;">you don't need to reconfigure it when your VM is restarted</mark>, because the Deka NFS configuration is already saved in the System Table File in the etc directory.
{% endhint %}

### 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
```

<figure><img src="/files/y4M3GvsgWOBO9J2ifMQh" alt=""><figcaption><p>Manually Mounting (a)</p></figcaption></figure>

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
```

<figure><img src="https://putri.box.cloudeka.id/cloudeka-assets/static/images/26dekanfs/26.24%20mount-manual-b.png" alt=""><figcaption><p>Manually Mounting (b)</p></figcaption></figure>

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

```
df -h
```

<figure><img src="https://putri.box.cloudeka.id/cloudeka-assets/static/images/26dekanfs/26.25%20mount-manual-c.png" alt=""><figcaption><p>Manually Mounting (c)</p></figcaption></figure>

### 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
```

<figure><img src="/files/y4M3GvsgWOBO9J2ifMQh" alt=""><figcaption><p>Automatically Mounting (a)</p></figcaption></figure>

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

```
sudo nano /etc/fstab
```

<figure><img src="https://putri.box.cloudeka.id/cloudeka-assets/static/images/26dekanfs/26.27%20mount--auto-b.png" alt=""><figcaption><p>Automatically Mounting (b)</p></figcaption></figure>

Add the following syntax into the fstab file.

```
[IP Address-Deka NFS]:/mnt/nfs /var/backup nfs defaults 0 0
```

<figure><img src="https://putri.box.cloudeka.id/cloudeka-assets/static/images/26dekanfs/26.28%20mount-autom-c.png" alt=""><figcaption><p>Automatically Mounting (c)</p></figcaption></figure>

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
```

<figure><img src="https://putri.box.cloudeka.id/cloudeka-assets/static/images/26dekanfs/26.29%20mount-autom-d.png" alt=""><figcaption><p>Automatically Mounting (d)</p></figcaption></figure>

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

```
df -h
```

<figure><img src="https://putri.box.cloudeka.id/cloudeka-assets/static/images/26dekanfs/26.30%20mount-autom-e.png" alt=""><figcaption><p>Manually Mounting (c)</p></figcaption></figure>

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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cloudeka.id/storage/deka-nfs/mount-deka-nfs-in-instance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
